/* public/assets/css/referee.css - Mobile Referee Touch Scoreboard */
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@700;800&family=Be+Vietnam+Pro:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  --ref-bg: #090d16;
  --ref-team1-color: #0284c7;
  --ref-team1-bg: rgba(2, 132, 199, 0.12);
  --ref-team2-color: #e11d48;
  --ref-team2-bg: rgba(225, 29, 72, 0.12);
  --ref-font-score: 'Chakra Petch', monospace, sans-serif;
  --ref-font-text: 'Be Vietnam Pro', 'Plus Jakarta Sans', -apple-system, sans-serif;
}

body.referee-body {
  background: var(--ref-bg);
  color: #f8fafc;
  font-family: var(--ref-font-text);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  user-select: none;
  touch-action: manipulation;
}

/* Referee Header */
.ref-header {
  background: #0f172a;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1e293b;
}

.ref-court-badge {
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  padding: 4px 12px;
  border-radius: 6px;
}

.ref-match-title {
  font-size: 14px;
  font-weight: 700;
  color: #94a3b8;
  text-align: center;
}

.ref-set-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ref-set-btn {
  padding: 6px 10px;
  border-radius: 8px;
  background: #1e293b;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.ref-set-btn:hover {
  background: #334155;
  color: #fff;
}

.ref-set-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.ref-set-btn.finished {
  border-color: #10b981;
}

.ref-set-score-pill {
  background: rgba(0, 0, 0, 0.4);
  color: inherit;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--ref-font-score);
  letter-spacing: 0.5px;
}

.ref-set-btn.active .ref-set-score-pill {
  background: rgba(0, 0, 0, 0.3);
  color: #e0f2fe;
}

/* Banner hiển thị Set đang chấm & Trận đấu đã hoàn tất */
.ref-current-set-banner {
  background: linear-gradient(90deg, rgba(2, 132, 199, 0.2) 0%, rgba(225, 29, 72, 0.2) 100%);
  border-bottom: 1px solid #1e293b;
  padding: 6px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ref-match-finished-banner {
  background: linear-gradient(90deg, #065f46 0%, #047857 100%);
  color: #a7f3d0;
  padding: 8px 16px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Main Split Scoring Court */
.ref-scoring-area {
  flex-grow: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px;
  height: calc(100vh - 160px);
}

@media (max-width: 600px) {
  .ref-scoring-area {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    height: auto;
  }
}

/* Đổi sân (Swapped) */
.ref-scoring-area.swapped #team1Box {
  order: 2;
}
.ref-scoring-area.swapped #team2Box {
  order: 1;
}

.ref-team-box {
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  border: 2px solid transparent;
  transition: all 0.15s ease;
  position: relative;
}

.ref-team-box.team1 {
  background: var(--ref-team1-bg);
  border-color: rgba(2, 132, 199, 0.4);
}

.ref-team-box.team2 {
  background: var(--ref-team2-bg);
  border-color: rgba(225, 29, 72, 0.4);
}

.ref-team-name {
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
}

.ref-team-club {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 4px;
}

/* Score Touch Pad */
.ref-big-score-btn {
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  width: 100%;
  max-width: 260px;
  height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  transition: transform 0.1s ease, background 0.1s ease;
}

.ref-big-score-btn:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.15);
}

.ref-score-num {
  font-family: var(--ref-font-score);
  font-size: 96px;
  font-weight: 800;
  line-height: 1;
}

.ref-team-box.team1 .ref-score-num { color: #38bdf8; text-shadow: 0 0 20px rgba(56, 189, 248, 0.5); }
.ref-team-box.team2 .ref-score-num { color: #fb7185; text-shadow: 0 0 20px rgba(251, 113, 133, 0.5); }

.ref-tap-hint {
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* Minus correction button */
.ref-btn-minus {
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
  padding: 8px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ref-btn-minus:active {
  background: #ef4444;
  color: #fff;
}

/* Referee Controls Footer */
.ref-footer {
  background: #0f172a;
  border-top: 1px solid #1e293b;
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.ref-action-btn {
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.ref-action-btn.finish-set {
  background: #10b981;
  color: #fff;
}
.ref-action-btn.finish-set:hover { background: #059669; }

.ref-action-btn.finish-match {
  background: #f59e0b;
  color: #0f172a;
}
.ref-action-btn.finish-match:hover { background: #d97706; }

.ref-action-btn.switch-sides {
  background: #334155;
  color: #fff;
}

/* Category Filter Pills on Referee Index */
.ref-pill-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.ref-pill-btn {
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.ref-pill-btn:hover {
  background: #334155;
  color: #ffffff;
  border-color: #38bdf8;
}

.ref-pill-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.45);
}

/* Override general buttons on referee dark mode */
.referee-body .btn-outline {
  background: #1e293b;
  border: 1px solid #334155;
  color: #cbd5e1;
}

.referee-body .btn-outline:hover {
  background: #334155;
  color: #ffffff;
  border-color: #38bdf8;
}

/* Quick Score (Biên bản giấy) */
.ref-quick-btn {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ref-quick-btn:hover {
  background: linear-gradient(135deg, #0369a1, #075985);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.6);
  transform: translateY(-1px);
}

.btn-score-preset {
  background: #334155;
  color: #e2e8f0;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-family: monospace;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-score-preset:hover {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
  transform: translateY(-1px);
}


