/* ═══════════════════════════════════════════════════════════
   main.css — Estilos globales de MU Server
   Orden: Variables → Reset → Base → Utilidades → Componentes
         → Animaciones → Scrollbar → Reducción de movimiento
═══════════════════════════════════════════════════════════ */

/* ── 1. Variables de diseño ──────────────────────────────── */
:root {
  --accent:        #dc2626;
  --accent-hover:  #b91c1c;
  --accent-glow:   rgba(220, 38, 38, 0.35);
  --gold:          #f59e0b;
  --blue-brand:    #3b82f6;
  --surface:       rgba(10, 10, 10, 0.45);
  --border-subtle: rgba(255, 255, 255, 0.08);

  --font-display:  'Cinzel',   serif;
  --font-body:     'Inter',    sans-serif;
  --font-tech:     'Rajdhani', sans-serif;

  --radius-sm:  0.5rem;
  --radius-md:  0.75rem;
  --radius-lg:  1rem;
  --radius-xl:  1.5rem;

  --shadow-glow: 0 0 20px var(--accent-glow);
  --shadow-card: 0 4px 32px rgba(0, 0, 0, 0.55);

  --transition-fast:   0.2s ease;
  --transition-base:   0.3s ease;
  --transition-slow:   0.5s ease-in-out;

  --z-particles: 1;
  --z-noise:     4;
  --z-navbar:    40;
  --z-float:     40;
  --z-toast:     50;
  --z-lightbox:  9000;
  --z-modal:     9500;
  --z-skip:      99999;
}

/* ── 2. Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── 3. Base ─────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: #000;
  color: #fff;
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.6;
}

img, video { max-width: 100%; height: auto; display: block; }

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

button { cursor: pointer; font-family: inherit; }

/* ── 4. Tipografía ───────────────────────────────────────── */
.font-display { font-family: var(--font-display); }
.font-tech    { font-family: var(--font-tech); }

/* ── 5. Utilidades globales ──────────────────────────────── */

/* Glassmorphism */
.glass {
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

/* Gradiente de texto */
.text-gradient {
  color: transparent;
  background: linear-gradient(180deg, #fff 0%, #d1d5db 55%, #6b7280 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Fondo de ruido (posición fija, z-index alto pero pointer-none) */
.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-noise);
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Patrón de puntos */
.dot-grid {
  background-image: radial-gradient(rgba(220, 38, 38, 0.1) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Hero overlay */
.hero-overlay {
  background: linear-gradient(to bottom,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.65) 60%,
    rgba(0, 0, 0, 0.90) 100%
  );
}

/* Video de fondo en hero */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* Línea decorativa de acento */
.line-accent {
  display: inline-block;
  width: 2rem;
  height: 2px;
  background: var(--accent);
  vertical-align: middle;
}

/* Selector de idioma */
.lang-btn { transition: color var(--transition-fast); }
.lang-btn.active { color: var(--accent); }

/* Skip link accesibilidad */
.skip-link {
  position: absolute;
  top: -50px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  z-index: var(--z-skip);
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { top: 0; }

/* Canvas de partículas */
#particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-particles);
  mix-blend-mode: screen;
}

/* ── 6. Botones ──────────────────────────────────────────── */
.btn-primary {
  background: var(--accent);
  border: 2px solid rgba(220, 38, 38, 0.5);
  box-shadow: var(--shadow-glow);
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 30px rgba(220, 38, 38, 0.55);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(220, 38, 38, 0.5);
  transform: translateY(-2px);
}

.btn-discord {
  background: #5865F2;
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.btn-discord:hover { background: #4752C4; }

/* ── 7. Cards ────────────────────────────────────────────── */
.feature-card {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #1f2937;
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.plan-card {
  background: transparent;
  border-radius: var(--radius-lg);
  transition: transform var(--transition-base);
}
.plan-card:hover { transform: translateY(-4px); }

.plan-glow { box-shadow: 0 0 40px rgba(245, 158, 11, 0.15); }

/* ── 8. Navbar ───────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-navbar);
}

#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}
#mobile-menu.open { max-height: 600px; }

/* ── 9. Tabs ─────────────────────────────────────────────── */
.tab-btn {
  transition: all 0.25s ease;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab-btn.active {
  border-color: #fff;
  color: #fff;
}

.tab-panel.hidden { display: none; }

/* ── 10. FAQ Acordeón ────────────────────────────────────── */
.faq-item {
  border-bottom: 1px solid #1f2937;
  padding: 1.25rem 0;
  cursor: pointer;
}
.faq-item:first-child { border-top: 1px solid #1f2937; }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  color: #9ca3af;
  font-size: 0.875rem;
  line-height: 1.6;
}
.faq-item.open .faq-answer {
  max-height: 600px;
  padding-top: 1rem;
}

.faq-chevron { transition: transform var(--transition-base); }
.faq-item.open .faq-chevron { transform: rotate(180deg); }

/* ── 11. Carrusel de screenshots ─────────────────────────── */
.carousel-track {
  display: flex;
  transition: transform var(--transition-slow);
  will-change: transform;
}

/* ── 12. Lightbox ────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: var(--z-lightbox);
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }

/* ── 13. Modales ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }

/* ── 14. Toasts (actividad en vivo) ──────────────────────── */
#toasts-container {
  position: fixed;
  top: 5rem;
  right: 0.75rem;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 20rem;
  pointer-events: none;
}

.toast { animation: toastIn 0.4s ease forwards; }
.toast.removing { animation: toastOut 0.3s ease forwards; }
.toast-bar { animation: shrinkBar 5s linear forwards; }

/* ── 15. CTA Flotante ────────────────────────────────────── */
.float-cta {
  transition: all var(--transition-base);
}
.float-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 28px rgba(88, 101, 242, 0.4);
}

.shimmer-btn { position: relative; overflow: hidden; }
.shimmer-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -130%;
  width: 55%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
  transform: skewX(-20deg);
  animation: shimmer 2.8s ease-in-out infinite;
}

/* ── 16. Cookie bar ──────────────────────────────────────── */
#cookie-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 50;
  padding: 1rem;
  display: none;
}

/* ── 17. Animaciones ─────────────────────────────────────── */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes shrinkBar {
  from { width: 100%; }
  to   { width: 0%; }
}
@keyframes shimmer {
  0%, 100% { left: -130%; }
  45%, 55%  { left: 130%; }
}
@keyframes spinFade {
  to { transform: rotate(360deg); }
}

.anim-down  { animation: fadeInDown 0.6s ease forwards; }
.anim-up    { animation: fadeInUp   0.5s ease forwards; }
.pulse      { animation: pulse 2s ease-in-out infinite; }

/* ── 18. Scrollbar personalizada ─────────────────────────── */
::-webkit-scrollbar              { width: 6px; }
::-webkit-scrollbar-track        { background: #0a0a0a; }
::-webkit-scrollbar-thumb        { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover  { background: #555; }

#discord-list::-webkit-scrollbar-thumb { background: #10b981; }

/* ── 19. Reducción de movimiento ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:   0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration:  0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── 20. Responsive helpers ──────────────────────────────── */
@media (max-width: 639px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 640px) {
  .show-mobile-only { display: none !important; }
}
