/* 
  Estilo Premium focado em Dark Mode com Glassmorphism.
  Usando paleta verde neon remetendo a campo de futebol, misturado com roxo escuro para contraste luxuoso.
*/

:root {
  --bg-color: #0b0f19;
  --panel-bg: rgba(20, 25, 40, 0.6);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text-main: #ffffff;
  --text-muted: #8b95a5;
  --primary: #10b981; /* Esmeralda/Verde Grama */
  --primary-glow: rgba(16, 185, 129, 0.4);
  --secondary: #6366f1; /* Indigo */
  --danger: #ef4444;
  --font-family: "Inter", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
}

/* Background com efeito animado (Orbs) */
.glass-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(
    circle at center,
    #111827 0%,
    var(--bg-color) 100%
  );
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -10%;
  left: -10%;
}
.orb-2 {
  width: 300px;
  height: 300px;
  background: var(--secondary);
  bottom: -10%;
  right: -5%;
  animation-delay: -5s;
}
.orb-3 {
  width: 250px;
  height: 250px;
  background: #3b82f6;
  top: 40%;
  left: 50%;
  animation-delay: -10s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(50px, 50px) scale(1.1);
  }
}

.container {
  width: 100%;
  max-width: 600px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  z-index: 1;
}

/* Header */
.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--primary-glow);
}

.glow-text {
  font-size: 2.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.hero p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.admin-login-btn {
  margin-top: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-login-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

/* Painéis Glassmorphism */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 0.75rem;
}

.panel-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Tabela de Liderança */
.table-header {
  display: flex;
  padding: 0 1rem 0.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.col-rank {
  width: 40px;
  text-align: center;
}
.col-name {
  flex: 1;
  padding-left: 1rem;
}
.col-score {
  width: 50px;
  text-align: right;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.participant-row {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  transition:
    transform 0.2s,
    background 0.2s;
  border: 1px solid transparent;
}

.participant-row:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.participant-row.rank-1 {
  background: linear-gradient(
    90deg,
    rgba(234, 179, 8, 0.1) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  border-left: 3px solid #eab308; /* Ouro */
}
.participant-row.rank-2 {
  border-left: 3px solid #94a3b8; /* Prata */
}
.participant-row.rank-3 {
  border-left: 3px solid #b45309; /* Bronze */
}

.rank-badge {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.rank-1 .rank-badge {
  background: rgba(234, 179, 8, 0.2);
  color: #eab308;
}
.rank-2 .rank-badge {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}
.rank-3 .rank-badge {
  background: rgba(180, 83, 9, 0.2);
  color: #fbbf24;
}

.participant-name {
  flex: 1;
  padding-left: 1rem;
  font-weight: 600;
  font-size: 1.05rem;
}

.participant-score {
  width: 50px;
  text-align: right;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary);
}

/* Painel Admin */
.subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  margin-top: -1rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.admin-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-card .name {
  font-weight: 600;
  font-size: 0.95rem;
}

.point-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-ctrl {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.btn-ctrl:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-ctrl.add {
  color: var(--primary);
}
.btn-ctrl.sub {
  color: var(--danger);
}

.current-points {
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.danger-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.danger-btn:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Add some animations to score updates via JS classes */
.pop {
  animation: pop 0.3s ease-out;
}

@keyframes pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
    color: white;
  }
  100% {
    transform: scale(1);
  }
}

@media (max-width: 480px) {
  .glow-text {
    font-size: 1.8rem;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
}
