/* =====================================================================
   CAPITAL RP — HOJA DE ESTILOS PRINCIPAL
   ---------------------------------------------------------------------
   Todas las variables de color/tema están centralizadas aquí arriba,
   en :root (tema oscuro por defecto) y en [data-theme="light"]
   (tema claro). Cambia estos valores para rediseñar la paleta completa
   del sitio sin tocar el resto del CSS.
   ===================================================================== */

/* -------------------- IMPORTAR FUENTES (Google Fonts) -------------------- */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* =====================================================================
   VARIABLES DE TEMA — TEMA OSCURO (por defecto)
   ===================================================================== */
:root {
  /* Colores de acento — paleta "ciudad nocturna / cyberpunk urbano" */
  --accent-primary: #b026ff;      /* morado eléctrico */
  --accent-secondary: #00f0ff;    /* cian neón */
  --accent-tertiary: #ff2bd6;     /* magenta neón */
  --accent-blue: #2e5cff;         /* azul neón */

  /* Gradiente insignia usado en botones, textos destacados y bordes */
  --gradient-accent: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  --gradient-accent-2: linear-gradient(135deg, var(--accent-tertiary), var(--accent-blue));

  /* Fondos */
  --bg-base: #07070d;
  --bg-elevated: #0d0d18;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --bg-nav: rgba(7, 7, 13, 0.72);

  /* Bordes / glass */
  --border-glass: rgba(255, 255, 255, 0.09);
  --border-glow: rgba(176, 38, 255, 0.45);

  /* Texto */
  --text-primary: #f5f5fa;
  --text-secondary: #a3a3b8;
  --text-muted: #6b6b80;

  /* Sombra / glow */
  --shadow-glow: 0 0 40px rgba(176, 38, 255, 0.25);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.45);

  /* Tipografías */
  --font-heading: 'Rajdhani', 'Poppins', sans-serif;
  --font-body: 'Poppins', sans-serif;

  /* Transición global para el cambio de tema */
  --theme-transition: background-color .5s ease, color .5s ease, border-color .5s ease, box-shadow .5s ease;
}

/* =====================================================================
   VARIABLES DE TEMA — TEMA CLARO
   Se activa agregando data-theme="light" al <html> (ver js/main.js)
   ===================================================================== */
[data-theme="light"] {
  --accent-primary: #8a1fd6;
  --accent-secondary: #00b8c9;
  --accent-tertiary: #e0189f;
  --accent-blue: #2947d6;

  --gradient-accent: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  --gradient-accent-2: linear-gradient(135deg, var(--accent-tertiary), var(--accent-blue));

  --bg-base: #f4f4fb;
  --bg-elevated: #ffffff;
  --bg-card: rgba(20, 20, 40, 0.04);
  --bg-card-hover: rgba(20, 20, 40, 0.08);
  --bg-nav: rgba(244, 244, 251, 0.75);

  --border-glass: rgba(20, 20, 40, 0.08);
  --border-glow: rgba(138, 31, 214, 0.35);

  --text-primary: #16161f;
  --text-secondary: #4a4a5e;
  --text-muted: #83839a;

  --shadow-glow: 0 0 40px rgba(138, 31, 214, 0.15);
  --shadow-card: 0 8px 32px rgba(20, 20, 40, 0.10);
}

/* =====================================================================
   RESET BÁSICO
   ===================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-primary);
  transition: var(--theme-transition);
  overflow-x: hidden;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { text-decoration: none; color: inherit; }

ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: .5px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Fondo global con degradados suaves tipo "ciudad nocturna" */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 15% 20%, rgba(176, 38, 255, 0.16), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(0, 240, 255, 0.12), transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(255, 43, 214, 0.10), transparent 45%),
    var(--bg-base);
  transition: var(--theme-transition);
}

/* =====================================================================
   SCROLLBAR PERSONALIZADA
   ===================================================================== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
  background: var(--gradient-accent);
  border-radius: 10px;
}

/* =====================================================================
   UTILIDADES
   ===================================================================== */
.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-secondary);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

section { padding: 110px 0; position: relative; }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* =====================================================================
   BOTONES
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 4px 24px rgba(176, 38, 255, 0.35);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 34px rgba(176, 38, 255, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-glass);
  backdrop-filter: blur(6px);
}
.btn-outline:hover {
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.18);
}

.btn-discord {
  background: #5865f2;
  color: #fff;
  box-shadow: 0 4px 24px rgba(88, 101, 242, 0.35);
}
.btn-discord:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 34px rgba(88, 101, 242, 0.5);
}

.btn-sm {
  padding: 10px 20px;
  font-size: .8rem;
}

/* =====================================================================
   NAVBAR
   ===================================================================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  transition: var(--theme-transition);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
}
.navbar-logo img { height: 38px; width: 38px; border-radius: 8px; }

.navbar-links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.navbar-links a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .92rem;
  letter-spacing: .5px;
  color: var(--text-secondary);
  position: relative;
  transition: color .3s ease;
}
.navbar-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--gradient-accent);
  transition: width .3s ease;
}
.navbar-links a:hover { color: var(--text-primary); }
.navbar-links a:hover::after { width: 100%; }

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Toggle de tema */
.theme-toggle {
  width: 54px;
  height: 28px;
  border-radius: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  position: relative;
  cursor: pointer;
  transition: var(--theme-transition);
  flex-shrink: 0;
}
.theme-toggle-knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  transition: transform .4s cubic-bezier(.68,-0.4,.27,1.4);
}
[data-theme="light"] .theme-toggle-knob { transform: translateX(26px); }

/* Botón menú móvil */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
}
.navbar-toggle span {
  width: 26px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.navbar-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggle.active span:nth-child(2) { opacity: 0; }
.navbar-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  padding-top: 90px;
  overflow: hidden;
}

/* Canvas de partículas de fondo */
#particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .6;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  padding: 0 24px;
}

.hero-logo {
  width: 120px; height: 120px;
  margin: 0 auto 28px;
  border-radius: 24px;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 700;
  color: #fff;
  box-shadow: var(--shadow-glow);
  animation: floatLogo 5s ease-in-out infinite;
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

.hero-title {
  font-size: clamp(2.8rem, 8vw, 5.2rem);
  line-height: 1.05;
  margin-bottom: 18px;
  text-shadow: 0 0 40px rgba(176, 38, 255, .35);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  margin-bottom: 46px;
}

/* Contador de jugadores en vivo */
.player-counter {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 26px;
  border-radius: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(10px);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .95rem;
}
.player-counter .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #22ff88;
  box-shadow: 0 0 10px #22ff88;
  animation: pulseDot 1.6s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.3); }
}
.player-counter #players-online,
.player-counter #players-max { color: var(--accent-secondary); }

.scroll-indicator {
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: .75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: bounceDown 2s infinite;
}
@keyframes bounceDown {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 10px); }
}

/* =====================================================================
   TARJETAS DE VIDRIO (glassmorphism) — base compartida
   ===================================================================== */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform .35s ease, box-shadow .35s ease, background .35s ease, border-color .35s ease;
}
.glass-card:hover {
  transform: translateY(-8px);
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

/* =====================================================================
   SOBRE EL SERVIDOR
   ===================================================================== */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 34px;
}
.about-stat {
  text-align: center;
  padding: 20px 10px;
}
.about-stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
}
.about-stat span {
  font-size: .8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.about-visual {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--gradient-accent-2);
}
.about-visual img {
  width: 100%; height: 100%;
  object-fit: cover;
  mix-blend-mode: luminosity;
  opacity: .85;
}
.about-visual::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.55));
}

/* =====================================================================
   FEATURES — GRID DE TARJETAS
   ===================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
}

.feature-card {
  padding: 36px 28px;
  text-align: left;
}
.feature-icon {
  width: 58px; height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-accent);
  font-size: 1.5rem;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(176, 38, 255, .3);
}
.feature-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.feature-card p { color: var(--text-secondary); font-size: .95rem; }

/* =====================================================================
   GALERÍA
   ===================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16/10;
  cursor: pointer;
  border: 1px solid var(--border-glass);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease, filter .5s ease;
}
.gallery-item:hover img {
  transform: scale(1.1);
  filter: brightness(1.1);
}
.gallery-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.75));
  display: flex;
  align-items: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity .35s ease;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay span {
  font-family: var(--font-heading);
  font-weight: 600;
  color: #fff;
  font-size: .9rem;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  z-index: 2000;
  background: rgba(4, 4, 10, 0.92);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
}
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 88vw;
  max-height: 82vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  transform: scale(.9);
  transition: transform .35s ease;
}
.lightbox.active img { transform: scale(1); }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  color: #fff;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background .3s ease, transform .3s ease;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: var(--gradient-accent);
  transform: scale(1.08);
}
.lightbox-close { top: 26px; right: 26px; }
.lightbox-prev { left: 26px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 26px; top: 50%; transform: translateY(-50%); }

/* =====================================================================
   REGLAS / CÓMO UNIRSE
   ===================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
  margin-bottom: 50px;
}
.step-card {
  padding: 34px 26px;
  position: relative;
}
.step-number {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
  display: block;
}
.step-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step-card p { color: var(--text-secondary); font-size: .92rem; }

.connect-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 32px;
}
.connect-box-info { display: flex; flex-direction: column; gap: 6px; }
.connect-box-info span:first-child {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
}
.connect-code {
  font-family: 'Rajdhani', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-secondary);
}
.connect-box-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.copy-feedback {
  display: none;
  color: #22ff88;
  font-size: .85rem;
  font-weight: 600;
  align-items: center;
  gap: 6px;
}
.copy-feedback.show { display: inline-flex; }

/* =====================================================================
   STAFF
   ===================================================================== */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 26px;
}
.staff-card {
  padding: 30px 24px;
  text-align: center;
}
.staff-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  margin: 0 auto 18px;
  overflow: hidden;
  border: 3px solid transparent;
  background: var(--gradient-accent);
  background-clip: border-box;
  padding: 3px;
}
.staff-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.staff-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.staff-role {
  display: inline-block;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-secondary);
  margin-bottom: 10px;
}
.staff-card p { color: var(--text-secondary); font-size: .85rem; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer {
  padding: 70px 0 30px;
  border-top: 1px solid var(--border-glass);
  background: var(--bg-elevated);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}
.footer-brand .navbar-logo { margin-bottom: 16px; }
.footer-brand p { color: var(--text-secondary); font-size: .9rem; max-width: 280px; }
.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.footer-social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  transition: all .3s ease;
}
.footer-social a:hover {
  background: var(--gradient-accent);
  transform: translateY(-4px);
}
.footer-col h4 {
  font-size: .95rem;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a {
  color: var(--text-secondary);
  font-size: .9rem;
  transition: color .3s ease;
}
.footer-col ul li a:hover { color: var(--accent-secondary); }
.footer-bottom {
  text-align: center;
  padding-top: 26px;
  border-top: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: .85rem;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .navbar-toggle { display: flex; }
  .navbar-links {
    position: fixed;
    top: 70px; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-nav);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    padding: 24px;
    gap: 22px;
    transform: translateY(-150%);
    opacity: 0;
    transition: transform .4s ease, opacity .4s ease;
  }
  .navbar-links.active { transform: translateY(0); opacity: 1; }

  section { padding: 80px 0; }
  .connect-box { flex-direction: column; text-align: center; }
  .connect-box-info { align-items: center; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-brand p { margin: 0 auto; }
  .footer-social { justify-content: center; }
}

@media (max-width: 480px) {
  .hero-buttons { flex-direction: column; width: 100%; }
  .hero-buttons .btn { width: 100%; }
  .about-stats { grid-template-columns: 1fr; }
}
