/* =====================================================================
   CAPITAL RP — ESTILOS DE LA PANTALLA DE INTRO / LOADING
   Reutiliza las variables de color definidas en css/style.css
   (este archivo se carga después de style.css en intro.html)
   ===================================================================== */

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg-base);
}

.intro-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 10;
  background: var(--bg-base);
  transition: opacity .8s ease, visibility .8s ease;
}
.intro-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

/* Fondo con rejilla cyberpunk + glow */
.intro-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(176,38,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,240,255,.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black, transparent 75%);
  animation: gridMove 14s linear infinite;
}
@keyframes gridMove {
  from { background-position: 0 0, 0 0; }
  to { background-position: 200px 400px, -200px 300px; }
}

#particles-intro-canvas {
  position: absolute;
  inset: 0;
  opacity: .5;
}

.intro-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
}

.intro-logo-wrap {
  width: 130px; height: 130px;
  margin: 0 auto 30px;
  border-radius: 26px;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 0 60px rgba(176,38,255,.5);
  opacity: 0;
  animation: logoAppear 1.2s ease forwards .2s, logoGlitch 4s infinite 1.6s;
}

@keyframes logoAppear {
  0% { opacity: 0; transform: scale(.4) rotate(-15deg); filter: blur(10px); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); filter: blur(0); }
}

/* Pequeño efecto glitch periódico, estilo cyberpunk */
@keyframes logoGlitch {
  0%, 96%, 100% { transform: translate(0,0); filter: none; }
  97% { transform: translate(-3px, 2px); filter: hue-rotate(20deg); }
  98% { transform: translate(3px, -2px); filter: hue-rotate(-20deg); }
  99% { transform: translate(-2px, 0); filter: none; }
}

.intro-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 5vw, 3rem);
  letter-spacing: 4px;
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeUp .8s ease forwards .6s;
}

.intro-subtitle {
  font-size: .85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp .8s ease forwards .9s;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Barra de progreso */
.intro-progress-track {
  width: 280px;
  max-width: 70vw;
  height: 6px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  overflow: hidden;
  margin: 0 auto 14px;
  opacity: 0;
  animation: fadeUp .8s ease forwards 1.1s;
}
.intro-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 10px;
  background: var(--gradient-accent);
  box-shadow: 0 0 14px rgba(176,38,255,.7);
  transition: width .2s ease;
}
.intro-progress-label {
  font-family: var(--font-heading);
  font-size: .8rem;
  letter-spacing: 2px;
  color: var(--text-secondary);
  opacity: 0;
  animation: fadeUp .8s ease forwards 1.1s;
}

/* Botón saltar intro */
.intro-skip {
  position: absolute;
  bottom: 34px;
  right: 34px;
  z-index: 3;
  padding: 10px 22px;
  border-radius: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: .8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all .3s ease;
}
.intro-skip:hover {
  color: #fff;
  background: var(--gradient-accent);
  border-color: transparent;
}

/* Overlay para desbloquear audio (políticas de autoplay del navegador) */
.audio-unlock-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(4,4,10,.88);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.audio-unlock-box {
  text-align: center;
  padding: 46px 40px;
  border-radius: 22px;
  max-width: 380px;
}
.audio-unlock-box .audio-icon {
  font-size: 2.4rem;
  margin-bottom: 18px;
}
.audio-unlock-box h2 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}
.audio-unlock-box p {
  color: var(--text-secondary);
  font-size: .9rem;
  margin-bottom: 26px;
}

@media (max-width: 480px) {
  .intro-skip { bottom: 20px; right: 20px; padding: 8px 18px; font-size: .72rem; }
}
