/* =============================================
   GOLEADA - Sistema de Campeonatos
   Design: Esportivo moderno, vibrante, premium
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800;900&family=Barlow:wght@300;400;500;600;700&display=swap');

:root {
  --verde:       #00c853;
  --verde-dark:  #009624;
  --azul:        #0d47a1;
  --azul-mid:    #1565c0;
  --azul-light:  #1e88e5;
  --laranja:     #ff6f00;
  --vermelho:    #d32f2f;
  --bg:          #f0f2f5;
  --bg-card:     #ffffff;
  --texto:       #1a1a2e;
  --texto-muted: #6b7280;
  --border:      #e5e7eb;
  --shadow:      0 2px 12px rgba(0,0,0,.08);
  --shadow-lg:   0 8px 30px rgba(0,0,0,.15);
  --radius:      12px;
  --radius-sm:   8px;
  --live-glow:   0 0 20px rgba(0,200,83,.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Barlow', sans-serif;
  background: var(--bg);
  color: var(--texto);
  min-height: 100vh;
  font-size: 15px;
}

/* ===== HEADER ===== */
.site-header {
  background: linear-gradient(135deg, #0d1b3e 0%, #1565c0 60%, #0d47a1 100%);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}
.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--verde);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 10px rgba(0,200,83,.5);
}
.logo-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 28px;
  letter-spacing: 1px;
  line-height: 1;
}
.logo-sub {
  font-size: 11px;
  font-weight: 400;
  opacity: .7;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.header-nav a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all .2s;
}
.header-nav a:hover { background: rgba(255,255,255,.15); color: #fff; }
.btn-admin-header {
  background: var(--verde) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(0,200,83,.4);
}
.btn-admin-header:hover { background: var(--verde-dark) !important; }

/* ===== LIVE TICKER ===== */
.live-ticker {
  background: var(--verde);
  overflow: hidden;
  height: 34px;
  display: flex;
  align-items: center;
}
.ticker-label {
  background: #009624;
  color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  gap: 6px;
}
.ticker-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.ticker-track {
  display: inline-flex;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
  gap: 50px;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: .5px;
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== CONTAINER ===== */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* ===== SECTION TITLE ===== */
.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--texto);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border);
}
.section-title i { color: var(--azul-light); }

/* ===== GAME CARD ===== */
.game-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  margin-bottom: 10px;
}
.game-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.game-card.live {
  border-color: var(--verde);
  box-shadow: var(--live-glow);
  animation: pulseLive 2s ease-in-out infinite;
}
@keyframes pulseLive {
  0%, 100% { box-shadow: 0 0 12px rgba(0,200,83,.3); }
  50% { box-shadow: 0 0 24px rgba(0,200,83,.6); }
}

.game-header {
  background: linear-gradient(90deg, #f8f9fa 0%, #fff 100%);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.game-header .camp-name {
  font-weight: 600;
  color: var(--azul-light);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.game-header .rodada {
  color: var(--texto-muted);
}

.game-body {
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
.team-side {
  display: flex;
  align-items: center;
  gap: 12px;
}
.team-side.visitante {
  flex-direction: row-reverse;
  text-align: right;
}
.team-shield {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}
.team-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
}
.team-abrev {
  font-size: 11px;
  color: var(--texto-muted);
  text-transform: uppercase;
}

.score-center {
  text-align: center;
  min-width: 100px;
}
.score-display {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 40px;
  line-height: 1;
  letter-spacing: 2px;
  color: var(--texto);
}
.score-display.live { color: var(--verde); }
.score-vs {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--texto-muted);
}
.game-time-display {
  font-size: 11px;
  font-weight: 700;
  color: var(--texto-muted);
  margin-top: 2px;
}
.penaltis-score {
  font-size: 12px;
  color: var(--texto-muted);
  margin-top: 2px;
}

/* ===== STATUS BADGES ===== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}
.badge-live {
  background: var(--verde);
  color: #fff;
  animation: blinkBadge 1.5s ease-in-out infinite;
}
@keyframes blinkBadge {
  0%, 100% { opacity: 1; }
  50% { opacity: .7; }
}
.badge-intervalo { background: var(--laranja); color: #fff; }
.badge-encerrado { background: #374151; color: #fff; }
.badge-agendado  { background: var(--azul-light); color: #fff; }
.badge-prorrogacao { background: #7c3aed; color: #fff; }
.badge-penaltis   { background: #dc2626; color: #fff; }

/* ===== LIVE DOT ===== */
.live-dot {
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  animation: blinkDot 1s ease-in-out infinite;
  display: inline-block;
}
@keyframes blinkDot { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }

/* ===== CLASSIFICATION TABLE ===== */
.classif-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
.classif-table thead th {
  background: linear-gradient(135deg, #0d1b3e, #1565c0);
  color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 12px;
  text-align: center;
}
.classif-table thead th:first-child { text-align: left; border-radius: 10px 0 0 0; }
.classif-table thead th:last-child  { border-radius: 0 10px 0 0; }
.classif-table tbody tr {
  transition: background .15s;
}
.classif-table tbody tr:hover { background: #f0f4ff; }
.classif-table tbody td {
  padding: 10px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.classif-table tbody td:first-child { text-align: left; }
.classif-table .pos {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 16px;
  width: 36px;
}
.pos-1 { color: #f59e0b; }
.pos-2 { color: #6b7280; }
.pos-3 { color: #cd7c2f; }
.classif-table .pts {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 18px;
  color: var(--azul-light);
}
.classif-table .team-col {
  display: flex;
  align-items: center;
  gap: 10px;
}
.classif-table .team-col img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.classif-table .team-col span {
  font-weight: 600;
}
.pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 14px;
}
.pos-badge.ouro   { background: #fef3c7; color: #d97706; }
.pos-badge.prata  { background: #f3f4f6; color: #6b7280; }
.pos-badge.bronze { background: #fef3c7; color: #92400e; }
.pos-badge.rebaixamento { background: #fee2e2; color: #dc2626; }
.pos-badge.normal { background: #f0f4ff; color: var(--azul-light); }

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-btn {
  border: 2px solid var(--border);
  background: #fff;
  color: var(--texto-muted);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all .2s;
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--azul-light);
  background: var(--azul-light);
  color: #fff;
}

/* ===== CARD WRAPPER ===== */
.card-box {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card-box-header {
  background: linear-gradient(90deg, #0d1b3e, #1565c0);
  color: #fff;
  padding: 14px 20px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== ADMIN STYLES ===== */
.admin-sidebar {
  width: 240px;
  background: linear-gradient(180deg, #0d1b3e 0%, #1a2550 100%);
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 200;
  overflow-y: auto;
  padding-bottom: 30px;
}
.admin-logo {
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}
.admin-logo-icon {
  width: 36px; height: 36px;
  background: var(--verde);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.admin-logo-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 20px;
}

.admin-nav { padding: 10px 0; }
.admin-nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  padding: 14px 18px 6px;
}
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all .2s;
  border-left: 3px solid transparent;
}
.admin-nav a:hover, .admin-nav a.active {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-left-color: var(--verde);
}
.admin-nav a i { width: 18px; text-align: center; }

.admin-content {
  margin-left: 240px;
  min-height: 100vh;
  background: var(--bg);
}
.admin-topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  position: sticky;
  top: 0;
  z-index: 99;
}
.admin-page-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--texto);
}
.admin-body { padding: 24px; }

/* Admin forms */
.form-label { font-weight: 600; font-size: 13px; color: #374151; margin-bottom: 4px; }
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 14px;
  transition: border-color .2s;
  width: 100%;
}
.form-control:focus, .form-select:focus {
  border-color: var(--azul-light);
  outline: none;
  box-shadow: 0 0 0 3px rgba(30,136,229,.15);
}

/* Buttons */
.btn-primary-c {
  background: var(--azul-light);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary-c:hover { background: var(--azul-mid); }
.btn-success-c {
  background: var(--verde);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-success-c:hover { background: var(--verde-dark); }
.btn-danger-c {
  background: var(--vermelho);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border-radius: 6px;
}
.btn-sm-c {
  padding: 5px 12px;
  font-size: 12px;
}
.btn-outline-c {
  background: transparent;
  color: var(--azul-light);
  border: 2px solid var(--azul-light);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-outline-c:hover {
  background: var(--azul-light);
  color: #fff;
}

/* ===== PLACAR RÁPIDO (admin) ===== */
.quick-score-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}
.quick-score-header {
  background: linear-gradient(90deg, #0d1b3e, #1565c0);
  color: #fff;
  padding: 10px 16px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.quick-score-body {
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}
.quick-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.quick-team img {
  width: 44px; height: 44px;
  object-fit: contain;
}
.quick-team-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
}
.quick-score-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-goal {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  transition: all .15s;
  display: flex; align-items: center; justify-content: center;
}
.btn-goal-add { background: var(--verde); color: #fff; }
.btn-goal-add:hover { background: var(--verde-dark); transform: scale(1.1); }
.btn-goal-sub { background: #fee2e2; color: var(--vermelho); }
.btn-goal-sub:hover { background: #fecaca; transform: scale(1.1); }
.goal-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 42px;
  line-height: 1;
  min-width: 50px;
  text-align: center;
  color: var(--texto);
}
.quick-score-footer {
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.btn-status {
  padding: 6px 14px;
  border-radius: 20px;
  border: none;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .5px;
  cursor: pointer;
  transition: all .2s;
}
.btn-iniciar  { background: #dcfce7; color: #166534; }
.btn-iniciar:hover  { background: var(--verde); color: #fff; }
.btn-intervalo-btn { background: #fef9c3; color: #854d0e; }
.btn-intervalo-btn:hover { background: var(--laranja); color: #fff; }
.btn-encerrar { background: #f3f4f6; color: #374151; }
.btn-encerrar:hover { background: #374151; color: #fff; }
.btn-prorrogacao { background: #ede9fe; color: #5b21b6; }
.btn-prorrogacao:hover { background: #7c3aed; color: #fff; }

/* ===== ADMIN TABLE ===== */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table thead th {
  background: #f8f9fa;
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--texto-muted);
  border-bottom: 2px solid var(--border);
}
.admin-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tbody tr:hover { background: #f8faff; }
.admin-table tbody tr:last-child td { border-bottom: none; }

/* ===== ALERTS ===== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.stat-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 36px;
  line-height: 1;
  color: var(--azul-light);
}
.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--texto-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #0d1b3e;
  color: rgba(255,255,255,.6);
  text-align: center;
  padding: 20px;
  font-size: 13px;
  margin-top: 40px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform .3s; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-content { margin-left: 0; }
  .team-name { font-size: 14px; }
  .score-display { font-size: 30px; }
  .team-shield { width: 36px; height: 36px; }
  .header-nav { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .classif-table .hide-mobile { display: none; }
  .quick-score-body { gap: 8px; }
  .goal-num { font-size: 32px; }
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.gap-2 { gap: 12px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
