@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
  --green-dark: oklch(0.12 0.05 140);
  --green-primary: oklch(0.35 0.16 142);
  --green-light: oklch(0.48 0.18 142);
  --yellow-primary: oklch(0.85 0.19 85);
  --yellow-light: oklch(0.93 0.15 88);
  --yellow-dark: oklch(0.7 0.18 80);
  --blue-accent: oklch(0.45 0.22 250);
  --white: #ffffff;
  --text-light: #f3f4f6;
  --text-muted: #9ca3af;
  --glass-bg: rgba(12, 38, 25, 0.7);
  --glass-card: rgba(18, 53, 36, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.12);
  --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --shadow-glow: 0 0 15px oklch(0.85 0.19 85 / 0.3);
  --font-main: 'Outfit', sans-serif;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--green-dark);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(254, 224, 0, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 156, 59, 0.08) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54 48c-2 0-3 1-4 2v4c0 1-1 2-2 2h-4c-1 0-2 1-2 2s1 2 2 2h4c2 0 3-1 4-2v-4c0-1 1-2 2-2h4c1 0 2-1 2-2s-1-2-2-2h-4zM30 20c-2 0-3 1-4 2v4c0 1-1 2-2 2h-4c-1 0-2 1-2 2s1 2 2 2h4c2 0 3-1 4-2v-4c0-1 1-2 2-2h4c1 0 2-1 2-2s-1-2-2-2h-4zM6 4c-2 0-3 1-4 2v4c0 1-1 2-2 2s-2-1-2-2v-4c0-2 1-3 2-4h4c1 0 2-1 2-2s-1-2-2-2H6zm36 28c-2 0-3 1-4 2v4c0 1-1 2-2 2h-4c-1 0-2 1-2 2s1 2 2 2h4c2 0 3-1 4-2v-4c0-1 1-2 2-2h4c1 0 2-1 2-2s-1-2-2-2h-4zm-24 4c-2 0-3 1-4 2v4c0 1-1 2-2 2s-2-1-2-2v-4c0-2 1-3 2-4h4c1 0 2-1 2-2s-1-2-2-2h-4z' fill='%23fe00%27 fill-opacity='0.02' fill-rule='evenodd'/%3E%3C/svg%3E");
  color: var(--text-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Container Principal */
.app-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ==========================================
   ESTILO LOGIN & TROCA DE SENHA
   ========================================== */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 2rem 0;
}

.login-card {
  background: var(--glass-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 450px;
  box-shadow: var(--shadow-main);
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.6s ease;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--green-light), var(--yellow-primary), var(--blue-accent));
}

.login-card h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--yellow-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.login-card p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--text-light);
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--yellow-primary);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 10px rgba(254, 224, 0, 0.2);
}

.btn-primary {
  width: 100%;
  padding: 1rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--yellow-primary), var(--yellow-dark));
  color: var(--green-dark);
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(254, 224, 0, 0.3);
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(254, 224, 0, 0.5);
  background: linear-gradient(135deg, var(--yellow-light), var(--yellow-primary));
}

.btn-primary:active {
  transform: translateY(0);
}

.error-message {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 0.8rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  display: none;
}

/* ==========================================
   HEADER & HERO DE COPA
   ========================================== */
header {
  margin-bottom: 2rem;
  animation: slideDown 0.6s ease;
}

.header-banner {
  background: linear-gradient(rgba(12, 38, 25, 0.5), rgba(12, 38, 25, 0.9)), url('assets/banner.jpg') no-repeat center center;
  background-size: cover;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  padding: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-main);
  position: relative;
  overflow: hidden;
}

.header-logo-section h1 {
  font-size: 2.5rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.header-logo-section h1 span {
  color: var(--yellow-primary);
  display: block;
}

.header-logo-section p {
  color: var(--text-light);
  font-size: 1rem;
  margin-top: 0.5rem;
  opacity: 0.9;
  text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

.header-user-badge {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-main);
  z-index: 2;
}

.user-avatar {
  background: linear-gradient(135deg, var(--green-light), var(--yellow-primary));
  color: var(--green-dark);
  font-weight: 800;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 0 10px rgba(0, 156, 59, 0.3);
}

.user-meta {
  text-align: left;
}

.user-meta .name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--white);
}

.user-meta .role {
  font-size: 0.75rem;
  color: var(--yellow-primary);
  text-transform: uppercase;
  font-weight: 800;
}

.btn-logout {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.7);
}

.btn-change-pwd {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--yellow-primary);
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
}

.btn-change-pwd:hover {
  background: rgba(254, 224, 0, 0.1);
  border-color: var(--yellow-primary);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  width: 90%;
  max-width: 420px;
  box-shadow: var(--shadow-main);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-light);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
  padding: 0 0.3rem;
}

.modal-close:hover {
  color: #f87171;
}

.success-message {
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 0.7rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  text-align: center;
}

/* ==========================================
   MURAL DE LENDAS DA SELEÇÃO
   ========================================== */
.legends-carousel {
  margin-bottom: 2rem;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-main);
  border: 1px solid var(--glass-border);
  height: 280px;
  animation: fadeIn 0.8s ease;
}

.legends-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.legends-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(12, 38, 25, 0.95) 20%, rgba(12, 38, 25, 0.7) 60%, transparent 100%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  text-align: left;
}

.legends-overlay h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--yellow-primary);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.legends-overlay p {
  color: var(--text-light);
  font-size: 0.95rem;
  max-width: 700px;
  opacity: 0.9;
  text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

/* ==========================================
   NAVEGAÇÃO (TABS)
   ========================================== */
.nav-tabs {
  display: flex;
  background: var(--glass-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  padding: 0.5rem;
  border-radius: 15px;
  gap: 0.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-main);
}

.tab-btn {
  flex: 1;
  padding: 0.9rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-transform: uppercase;
}

.tab-btn:hover {
  background: var(--glass-hover);
  color: var(--text-light);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--green-primary), var(--green-light));
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(0, 156, 59, 0.2);
}

.tab-btn.admin-only {
  border: 1px dashed rgba(254, 224, 0, 0.3);
}

.tab-btn.admin-only.active {
  background: linear-gradient(135deg, var(--yellow-primary), var(--yellow-dark));
  color: var(--green-dark);
  border: 1px solid rgba(254, 224, 0, 0.4);
  box-shadow: 0 4px 10px rgba(254, 224, 0, 0.2);
}

/* ==========================================
   CONTEÚDO DAS ABAS (VIEWS)
   ========================================== */
.view-panel {
  display: none;
  animation: fadeIn 0.4s ease;
}

.view-panel.active {
  display: block;
}

/* ==========================================
   TELA DE JOGOS & PALPITES (CARDS)
   ========================================== */
.matches-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.date-group-header {
  grid-column: 1 / -1;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--yellow-primary);
  padding: 0.8rem 1.2rem;
  background: linear-gradient(90deg, rgba(254, 224, 0, 0.08) 0%, transparent 100%);
  border-left: 3px solid var(--yellow-primary);
  border-radius: 0 12px 12px 0;
  margin-top: 0.5rem;
  text-transform: capitalize;
}

.date-group-header:first-child {
  margin-top: 0;
}

.date-group-icon {
  margin-right: 0.3rem;
}

@media (min-width: 768px) {
  .matches-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.match-card {
  background: var(--glass-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: var(--shadow-main);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.match-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.match-card.is-closed {
  border-left: 4px solid var(--blue-accent);
}

.match-card.is-finished {
  border-left: 4px solid var(--green-light);
}

.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}

.match-header .match-id {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  color: var(--yellow-primary);
}

.match-header .match-status {
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
}

.match-status.status-pending {
  background: rgba(254, 224, 0, 0.1);
  color: var(--yellow-primary);
  border: 1px solid rgba(254, 224, 0, 0.2);
}

.match-status.status-closed {
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.match-status.status-finished {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Linha dos times */
.match-teams-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  padding: 0.5rem 0;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 35%;
  text-align: center;
}

.team-flag {
  font-size: 2.2rem;
  margin-bottom: 0.4rem;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

.team-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.match-vs {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
}

/* Placar Oficial se finalizado */
.official-score-display {
  background: rgba(0, 156, 59, 0.1);
  border: 1px dashed rgba(0, 156, 59, 0.3);
  padding: 0.5rem;
  border-radius: 10px;
  text-align: center;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.official-score-display .score-number {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--yellow-primary);
  margin-top: 0.2rem;
}

/* Área de Palpites */
.bet-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}

.bet-box-header {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  display: flex;
  justify-content: space-between;
}

.bet-box-header .pts-earned {
  color: var(--yellow-primary);
  font-weight: 800;
}

.bet-inputs-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.bet-input {
  width: 50px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.05);
  color: var(--white);
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  transition: all 0.3s ease;
}

.bet-input:focus {
  outline: none;
  border-color: var(--yellow-primary);
  background: rgba(255,255,255,0.1);
}

.bet-input:disabled {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  border-color: transparent;
  font-weight: 600;
}

.bet-divider {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-muted);
}

/* Seleção de desempate nos pênaltis */
.penalty-bet-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed rgba(255,255,255,0.05);
  font-size: 0.8rem;
}

.penalty-bet-box label {
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.penalty-options {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.penalty-btn {
  flex: 1;
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-light);
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-main);
  transition: all 0.3s ease;
}

.penalty-btn:hover {
  background: rgba(255,255,255,0.1);
}

.penalty-btn.selected {
  background: linear-gradient(135deg, var(--green-primary), var(--green-light));
  border-color: rgba(255,255,255,0.2);
  color: var(--white);
  font-weight: 600;
}

.penalty-btn.selected-away {
  background: linear-gradient(135deg, var(--blue-accent), #2563eb);
}

.penalty-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.btn-save-bet {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  background: var(--yellow-primary);
  color: var(--green-dark);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-save-bet:hover {
  background: var(--yellow-light);
  transform: translateY(-1px);
}

.btn-save-bet:disabled {
  display: none;
}

/* Apostas de Outros Jogadores */
.other-bets-section {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.other-bets-section h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  text-align: left;
}

.other-bets-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 120px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

/* Custom Scrollbar */
.other-bets-list::-webkit-scrollbar {
  width: 4px;
}
.other-bets-list::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.1);
  border-radius: 4px;
}
.other-bets-list::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 4px;
}

.other-bet-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
}

.other-bet-item .player-name {
  font-weight: 600;
  color: var(--text-light);
}

.other-bet-item .player-score {
  font-weight: 700;
  color: var(--white);
}

.other-bet-item .pts-tag {
  background: rgba(254, 224, 0, 0.1);
  color: var(--yellow-primary);
  font-size: 0.7rem;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-weight: 700;
}

/* ==========================================
   RANKING / PLACAR DE APOSTAS
   ========================================== */
.table-card {
  background: var(--glass-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-main);
}

.table-card h2 {
  font-size: 1.8rem;
  color: var(--yellow-primary);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  font-weight: 800;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 0.8rem;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.ranking-table th {
  padding: 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--glass-border);
}

.ranking-table td {
  padding: 1.1rem 1rem;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.ranking-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

/* Estilos de Posição */
.rank-col {
  width: 80px;
  font-weight: 800;
  text-align: center;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.9rem;
}

.rank-badge.gold {
  background: linear-gradient(135deg, #ffe066, #d4af37);
  color: #111;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.rank-badge.silver {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  color: #111;
  box-shadow: 0 0 10px rgba(203, 213, 225, 0.3);
}

.rank-badge.bronze {
  background: linear-gradient(135deg, #dd9c74, #a05a2c);
  color: var(--white);
  box-shadow: 0 0 10px rgba(160, 90, 44, 0.3);
}

.player-col {
  font-weight: 600;
  color: var(--white);
}

.points-col {
  font-weight: 800;
  color: var(--yellow-primary);
  font-size: 1.2rem;
  text-align: right;
  padding-right: 1.5rem !important;
}

/* ==========================================
   PAINEL DO ADMINISTRADOR (ADMIN VIEW)
   ========================================== */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  .admin-grid {
    grid-template-columns: 350px 1fr;
  }
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.admin-card {
  background: var(--glass-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.8rem;
  box-shadow: var(--shadow-main);
}

.admin-card h3 {
  font-size: 1.3rem;
  color: var(--yellow-primary);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  font-weight: 800;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 0.6rem;
}

.player-list-scroll {
  max-height: 250px;
  overflow-y: auto;
  margin-top: 1rem;
}

.player-list-scroll::-webkit-scrollbar {
  width: 4px;
}
.player-list-scroll::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 4px;
}

.admin-player-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.admin-player-item .name {
  font-weight: 600;
}

.admin-player-item .status-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-badge.pwd-default {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-badge.pwd-changed {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Painel de Placar Oficial do Admin */
.admin-matches-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.admin-match-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .admin-match-item {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.admin-match-info {
  flex: 1;
}

.admin-match-info .round {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--yellow-primary);
  font-weight: 800;
}

.admin-match-info .teams {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.2rem 0;
  color: var(--white);
}

.admin-match-info .details {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-score-form {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.admin-score-input {
  width: 55px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
}

.admin-score-input:focus {
  outline: none;
  border-color: var(--yellow-primary);
}

.btn-update-score {
  background: linear-gradient(135deg, var(--green-primary), var(--green-light));
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--white);
  padding: 0.7rem 1.2rem;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-update-score:hover {
  background: linear-gradient(135deg, var(--green-light), oklch(0.55 0.2 142));
  transform: translateY(-1px);
}

/* Estilo geral de feedback de sucesso */
.success-banner {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  padding: 0.8rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  display: none;
  animation: fadeIn 0.3s ease;
}

/* Footer */
footer {
  margin-top: auto;
  padding: 2rem 0 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer span {
  color: var(--yellow-primary);
  font-weight: 600;
}

/* ==========================================
   ANIMAÇÕES
   ========================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   DESIGN RESPONSIVO (MOBILE FIRST & RETOQUES)
   ========================================== */
@media (max-width: 992px) {
  .app-container {
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .header-banner {
    flex-direction: column;
    text-align: center;
    padding: 1.8rem 1.2rem;
    gap: 1.5rem;
  }

  .header-logo-section h1 {
    font-size: 1.9rem;
  }

  .header-user-badge {
    width: 100%;
    justify-content: center;
    padding: 0.8rem 1.2rem;
  }

  .nav-tabs {
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.4rem;
  }

  .tab-btn {
    padding: 0.7rem 0.5rem;
    font-size: 0.85rem;
    flex-basis: calc(50% - 0.25rem); /* Ocupa metade da largura em telas médias */
  }

  .legends-carousel {
    height: 220px;
  }

  .legends-overlay {
    padding: 1.2rem;
  }

  .legends-overlay h3 {
    font-size: 1.3rem;
  }

  .legends-overlay p {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .admin-match-item {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .admin-score-form {
    justify-content: space-between;
    background: rgba(0,0,0,0.15);
    padding: 0.8rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
  }
}

@media (max-width: 600px) {
  .login-card {
    padding: 2rem 1.5rem;
  }

  .login-card h2 {
    font-size: 1.6rem;
  }

  .tab-btn {
    font-size: 0.8rem;
    padding: 0.6rem 0.4rem;
  }

  .legends-carousel {
    height: 170px;
  }

  .legends-overlay {
    padding: 0.8rem;
  }

  .legends-overlay h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
  }

  .legends-overlay p {
    font-size: 0.75rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .matches-grid {
    gap: 1rem;
  }

  .match-card {
    padding: 1.1rem;
  }

  .team-flag {
    font-size: 1.8rem;
  }

  .team-name {
    font-size: 0.85rem;
  }

  .bet-box {
    padding: 0.8rem;
  }

  .bet-input {
    width: 44px;
    height: 36px;
    font-size: 0.95rem;
  }

  .penalty-btn {
    font-size: 0.7rem;
    padding: 0.35rem 0.2rem;
  }

  .table-card {
    padding: 1.2rem 1rem;
    border-radius: 15px;
  }

  .table-card h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }

  .ranking-table th, 
  .ranking-table td {
    padding: 0.7rem 0.5rem;
    font-size: 0.85rem;
  }

  .points-col {
    font-size: 0.95rem;
    padding-right: 0.4rem !important;
  }

  .rank-badge {
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
  }

  .admin-score-form {
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .admin-score-input {
    width: 48px;
    height: 38px;
    font-size: 0.95rem;
  }

  .btn-update-score {
    width: 100%;
    padding: 0.6rem;
    text-align: center;
  }

  footer {
    font-size: 0.75rem;
    padding: 1.5rem 0 0.5rem;
  }
}

