/* ===== 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-color: #0a0a0a;
}

.page-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.page-bg-overlay {
  display: none;
}


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

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

.regulamento-btn {
  padding: 8px 16px;
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
  border: 2px solid #fbbf24;
  border-radius: 8px;
  color: #1f1f1f;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.regulamento-btn:hover {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.header-logo {
  max-height: 60px;
  max-width: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: 800px;
}

.header-text {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.header-title {
  margin: 0;
  font-size: 2rem;
  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: 0;
  font-size: 0.9rem;
  color: #dc2626;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  padding-left: 0;
}

/* ===== 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;
}

.crown-icon img {
  height: 1em;
  width: auto;
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.5));
  animation: crown-glow 2s ease-in-out infinite alternate;
}

@keyframes crown-glow {
  from {
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.5));
  }
  to {
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.8));
  }
}

/* ===== MODAL REGULAMENTO ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(5px);
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #000000 !important;
  border: 3px solid #fbbf24;
  border-radius: 16px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(251, 191, 36, 0.2);
}

.modal-header {
  background: linear-gradient(180deg, #b91c1c 0%, #7f1d1d 100%);
  padding: 15px 20px;
  border-bottom: 2px solid #fbbf24;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 20px 20px 0 0;
  margin: -30px -30px 15px -30px;
}

.modal-header h2 {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 2rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.modal-body {
  padding: 20px;
  max-height: calc(90vh - 100px);
  overflow-y: auto;
  background: #000000 !important;
}

.modal-body::-webkit-scrollbar {
  display: none;
}

/* ===== REGULAMENTO ===== */
.regulamento-body {
  background: linear-gradient(145deg, #1f1f1f 0%, #2a2a2a 100%) !important;
  color: #ffffff;
  line-height: 1.6;
  padding: 30px;
  border-radius: 20px;
  border: 3px solid #fbbf24;
  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);
  margin: 0;
  position: relative;
}

.regulamento-content {
  color: #ffffff;
  line-height: 1.6;
}

.regulamento-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(251, 191, 36, 0.2);
  background: transparent !important;
}

.regulamento-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.regulamento-section h3 {
  color: #fbbf24;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 12px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.regulamento-section p {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
  color: #ffffff;
}

.regulamento-section p:last-child {
  margin-bottom: 0;
}

.regulamento-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 2px solid #fbbf24;
  text-align: center;
  background: transparent !important;
}

.regulamento-footer p {
  color: #fbbf24;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Scrollbar personalizada para regulamento */
.regulamento-body::-webkit-scrollbar {
  width: 8px;
}

.regulamento-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.regulamento-body::-webkit-scrollbar-thumb {
  background: #fbbf24;
  border-radius: 4px;
}

.regulamento-body::-webkit-scrollbar-thumb:hover {
  background: #f59e0b;
}


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

  .header-content {
    flex-direction: column;
    gap: 16px;
  }

  .header-logo {
    max-height: 40px;
    max-width: 120px;
  }

  .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;
  }

  /* Botão regulamento responsivo */
  .regulamento-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  /* Modal responsivo */
  .modal-overlay {
    padding: 10px;
  }

  .modal-content {
    max-width: 95%;
    max-height: 95vh;
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-header h2 {
    font-size: 0.9rem;
  }

  .modal-close {
    width: 32px;
    height: 32px;
    font-size: 1.5rem;
  }

  .modal-body {
    padding: 20px 16px;
  }

  .regulamento-section h3 {
    font-size: 1rem;
  }

  .regulamento-section p {
    font-size: 0.85rem;
  }
  
  .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; }
}
