/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: transparent;
  color: #f3f4f6;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Roboto", sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ===== FUNDO COM ESTÁDIO ===== */
.page-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: url("estadio-vermelho3.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}


/* ===== HEADER ===== */
.main-header {
  background: linear-gradient(180deg, #1a0a0a 0%, #2d0f0f 100%);
  border-bottom: 2px solid #dc2626;
  padding: 20px 24px;
  position: relative;
  z-index: 10;
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.header-logo {
  height: 56px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.header-text {
  text-align: center;
}

.header-title {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.header-subtitle {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: #dc2626;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== MAIN CONTAINER ===== */
.main-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  position: relative;
  z-index: 1;
}

/* ===== HERO SECTION ===== */
.hero-section {
  margin-bottom: 40px;
}

.hero-card {
  background: linear-gradient(145deg, #b91c1c 0%, #7f1d1d 50%, #450a0a 100%);
  border: 3px solid #fbbf24;
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(251, 191, 36, 0.3),
    inset 0 1px 0 rgba(251, 191, 36, 0.2);
  display: flex;
  align-items: center;
  gap: 28px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.hero-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(251, 191, 36, 0.5),
    inset 0 1px 0 rgba(251, 191, 36, 0.3);
}

/* IMAGEM_TROFEU placeholder */
.hero-trophy-placeholder {
  flex: 0 0 120px;
  height: 120px;
  background-image: url("coroa.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 8px rgba(251, 191, 36, 0.3));
}

.hero-content {
  flex: 1;
  text-align: left;
}

.hero-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.hero-id {
  font-size: 2.25rem;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  margin-bottom: 4px;
}

.hero-points {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.hero-updated {
  font-size: 0.8rem;
  color: #d4d4d8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}


/* ===== RANKING SECTION ===== */
.ranking-section {
  margin-bottom: 40px;
}

.ranking-card {
  background: linear-gradient(145deg, #1f1f1f 0%, #2a2a2a 100%);
  border: 3px solid #fbbf24;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(251, 191, 36, 0.2),
    inset 0 1px 0 rgba(251, 191, 36, 0.1);
}

.ranking-header {
  background: linear-gradient(180deg, #b91c1c 0%, #7f1d1d 90%);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 16px 24px;
  text-align: center;
  border-bottom: 2px solid #fbbf24;
}

.ranking-body {
  padding: 0;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
}

.ranking-table th {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 20px;
  text-align: left;
  font-size: 0.9rem;
}

.ranking-table td {
  padding: 14px 20px;
  font-size: 1rem;
  color: #f3f4f6;
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
  transition: background 0.3s, color 0.3s;
}

/* coluna 2 = Apelido: exibir sempre em MAIÚSCULAS */
.ranking-table td:nth-child(2) {
  text-transform: uppercase;
}

.ranking-table tr:last-child td {
  border-bottom: none;
}

.ranking-table tbody tr:hover td {
  background: rgba(251, 191, 36, 0.08);
  color: #ffffff;
}

/* TOP 3 DESTAQUES */
.ranking-table tbody tr:nth-child(1) td {
  color: #fbbf24;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(251, 191, 36, 0.06);
}

.ranking-table tbody tr:nth-child(2) td {
  color: #e5e7eb;
  font-weight: 800;
}

.ranking-table tbody tr:nth-child(3) td {
  color: #d4d4d8;
  font-weight: 700;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
  .main-header {
    padding: 16px 20px;
  }

  .header-inner {
    flex-direction: column;
    gap: 12px;
  }

  .header-title {
    font-size: 2rem;
  }

  .main-container {
    padding: 24px 20px 32px;
  }

  .hero-card {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
    gap: 20px;
  }

  .hero-trophy-placeholder {
    flex: 0 0 100px;
    height: 100px;
    width: 100px;
    margin: 0 auto;
  }

  .hero-content {
    text-align: center;
  }

  .hero-id {
    font-size: 2rem;
  }

  .hero-points {
    font-size: 1.25rem;
  }

  
  .ranking-table th,
  .ranking-table td {
    padding: 12px 16px;
    font-size: 0.9rem;
  }
}

@media (min-width: 1024px) {
  .main-container {
    padding: 40px 32px 64px;
  }
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0a0a 50%, #0a0a0a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(251, 191, 36, 0.2);
  border-top: 4px solid #fbbf24;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
