/* ============================================================
   LOGIN — Estilos extraídos desde login.html
   ============================================================ */
:root {
    --accent: #00f3ff;
    --accent-glow: rgba(0, 243, 255, 0.4);
    --bg-deep: #010206;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-deep);
    font-family: 'Outfit', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
}

/* --- HEADER BRANDING --- */
.branding-header {
    text-align: center;
    margin-bottom: 60px;
    z-index: 100;
}

.ogmei-tag {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    font-size: 0.8rem;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 10px;
    opacity: 0.8;
}

.main-logo-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 3.8rem;
    font-weight: 900;
    letter-spacing: -2px;
    text-transform: uppercase;
    background: linear-gradient(to bottom, #fff, #444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    line-height: 1;
}

.main-logo-text span {
    -webkit-text-fill-color: transparent;
    background: inherit;
    -webkit-background-clip: text;
}

/* --- DUAL MODULES CONTAINER --- */
.modules-grid {
    display: grid;
    grid-template-columns: 450px 450px;
    gap: 40px;
    z-index: 100;
}

@keyframes modules-fade {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- TACTICAL CARD STYLE --- */
.tactical-card {
    background: rgba(3, 8, 18, 0.6);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(0, 243, 255, 0.15);
    border-radius: 10px;
    padding: 50px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.tactical-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 40px 80px rgba(0,0,0,0.7), 0 0 30px rgba(0, 243, 255, 0.05);
}

.card-corner {
    position: absolute;
    width: 20px; height: 20px;
    border: 2px solid var(--accent);
    opacity: 0.3;
}
.c-tl { top: -1px; left: -1px; border-right: none; border-bottom: none; border-top-left-radius: 10px; }
.c-br { bottom: -1px; right: -1px; border-left: none; border-top: none; border-bottom-right-radius: 10px; }

.card-header {
    margin-bottom: 40px;
}

.card-header h2 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.card-header h2 i,
.card-header h2 svg { color: var(--accent); width: 26px; height: 26px; flex-shrink: 0; }

.card-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--accent);
    margin-top: 8px;
    opacity: 0.6;
    letter-spacing: 2px;
}

/* --- FORMS --- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.field-wrap {
    position: relative;
}

.field-wrap i,
.field-wrap svg {
    position: absolute;
    left: 15px; top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    opacity: 0.5;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.tactical-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 16px 16px 16px 45px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 1px;
    outline: none;
    transition: 0.3s;
}

/* Placeholder consistente y dentro del campo */
.tactical-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
}

.tactical-input:focus {
    border-color: var(--accent);
    background: rgba(0, 243, 255, 0.05);
}

/* Estados de error del input + mensaje */
.tactical-input.input-error {
    border-color: #ff003c;
}
.login-error {
    color: #ff003c;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 1px;
    margin-top: -10px;
    text-align: center;
}

/* Overlay del intro cinemático: centra todo en ambos ejes.
   (antes vivía solo en style2.css, que el login no carga) */
.cinematic-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: transparent;
    z-index: 99999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow: hidden;
}

/* Estados iniciales de los elementos del intro (antes inline en HTML) */
#loading-overlay { display: none; }
#msg-1-container { display: flex; flex-direction: column; align-items: center; }
#msg-2 { display: none; }

/* Botón SALTAR intro */
.skip-intro-btn {
    position: fixed;
    bottom: 48px;
    right: 48px;
    z-index: 100000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: rgba(0, 243, 255, 0.06);
    border: 1px solid rgba(0, 243, 255, 0.35);
    border-radius: 6px;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease, background 0.25s ease, border-color 0.25s ease;
}
.skip-intro-btn.visible {
    opacity: 0.85;
    pointer-events: auto;
    transform: translateY(0);
}
.skip-intro-btn:hover {
    opacity: 1;
    background: rgba(0, 243, 255, 0.14);
    border-color: var(--accent);
    box-shadow: 0 0 18px rgba(0, 243, 255, 0.25);
}
.skip-intro-btn svg { width: 16px; height: 16px; }

@media (max-width: 640px) {
    .skip-intro-btn { bottom: 24px; right: 24px; padding: 10px 16px; font-size: 0.68rem; letter-spacing: 2px; }
}

/* Variantes "Invitado" (la card secundaria usa bordes blancos en vez de cian) */
.card-corner.c-light { border-color: #fff; }
.card-label.is-muted-light { color: #fff; opacity: 0.4; }

/* Texto descriptivo de la tarjeta de invitado */
.guest-card-text {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.btn-core {
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 6px;
    padding: 20px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.btn-core svg { width: 18px; height: 18px; }

.btn-core:hover {
    background: #fff;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.btn-observer {
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: #fff;
    margin-top: auto;
}

.btn-observer:hover {
    border-style: solid;
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* --- FOOTER --- */
.official-footer {
    margin-top: 80px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 3px;
    z-index: 100;
}

/* --- INTRO + OUTRO ANIMATIONS --- */
.load-text-1 {
    font-family: 'Rajdhani', sans-serif;
    color: var(--accent);
    letter-spacing: 15px;
    font-size: 3.5rem;
    font-weight: 800;
    opacity: 0;
    text-transform: uppercase;
    margin-bottom: 30px;
    text-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
}

.load-bar-wrap {
    width: 700px;
    height: 6px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
}

.load-bar-fill {
    position: absolute;
    top: 0; left: 0; height: 100%;
    width: 0%;
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent);
}

.bar-anim { animation: bar-fill 16.5s linear forwards; }
.fade-in-bar { animation: fade-in 0.5s forwards; }

@keyframes bar-fill { from { width: 0%; } to { width: 100%; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.load-text-2 {
    font-family: 'Rajdhani', sans-serif;
    color: #fff;
    letter-spacing: 4px;
    font-size: 2.6rem;
    font-weight: 900;
    opacity: 0;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
}

.anim-1 { animation: anim-1 1.8s forwards; }
.anim-2 { animation: anim-2 1.8s forwards; }

@keyframes anim-1 {
    0% { opacity: 0; transform: translateY(30px); filter: blur(20px); }
    20% { opacity: 1; transform: translateY(0); filter: blur(0); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes anim-2 {
    0% { opacity: 0; transform: scale(0.8); filter: blur(30px) brightness(0); }
    30% { opacity: 1; transform: scale(1); filter: blur(0) brightness(1.5) drop-shadow(0 0 30px var(--accent)); }
    70% { opacity: 1; transform: scale(1); filter: brightness(1); }
    85% { opacity: 1; transform: scale(1.1); filter: brightness(2) blur(0); }
    100% { opacity: 0; transform: scale(4); filter: brightness(10) blur(20px); }
}

/* --- POST-LOGIN OUTRO --- */
.fade-blur-out {
    animation: fade-soft 0.85s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    will-change: opacity;
}
@keyframes fade-soft {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}

.outro-veil {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(1, 4, 10, 0.55);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}
.outro-veil.active { opacity: 1; pointer-events: auto; }

.pre-intro { opacity: 0; pointer-events: none; }
.reveal-in { animation: modules-fade 1.1s cubic-bezier(0.4,0,0.2,1) forwards; }

/* --- SPLASH inicial --- */
.splash {
    position: fixed; inset: 0; z-index: 200000;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    cursor: pointer;
    transition: opacity 0.6s ease, filter 0.6s ease;
    user-select: none;
    overflow: hidden;
}
.splash.hide { opacity: 0; pointer-events: none; filter: blur(10px); }

.splash-inner { position: relative; text-align: center; z-index: 5; padding: 0 24px; }

.splash-tag-line {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    font-size: 0.78rem;
    letter-spacing: 6px;
    text-transform: uppercase;
    opacity: 0;
    margin-bottom: 22px;
    animation: splash-line-in 0.9s 0.15s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

.splash-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 4.4rem;
    font-weight: 900;
    letter-spacing: -1px;
    text-transform: uppercase;
    background: linear-gradient(to bottom, #fff, #444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    line-height: 1;
    opacity: 0;
    transform: translateY(20px);
    filter: blur(18px);
    animation: splash-title-in 1.4s 0.45s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
    position: relative;
}
.splash-title span {
    background: linear-gradient(to bottom, var(--accent), #006e75);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.splash-sub {
    font-family: 'JetBrains Mono', monospace;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.72rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: 14px;
    opacity: 0;
    animation: splash-line-in 0.9s 1.0s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

.splash-line {
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 28px auto 24px;
    box-shadow: 0 0 12px var(--accent);
    animation: splash-line-grow 1.0s 1.2s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

.splash-cta {
    display: inline-flex; align-items: center; gap: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 4px;
    color: var(--accent);
    text-transform: uppercase;
    opacity: 0;
    animation: splash-cta-in 0.6s 1.5s cubic-bezier(0.2, 0.8, 0.3, 1) forwards, splash-pulse 2s 2.1s ease-in-out infinite;
}
.splash-dot {
    width: 10px; height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent), 0 0 24px var(--accent);
    animation: splash-blink 1.2s infinite;
}

.splash-corner {
    position: absolute;
    width: 60px; height: 60px;
    border: 1px solid var(--accent);
    opacity: 0;
    animation: splash-corner-in 1.2s 0.2s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}
.splash-corner.tl { top: 40px; left: 40px; border-right: none; border-bottom: none; }
.splash-corner.tr { top: 40px; right: 40px; border-left: none; border-bottom: none; }
.splash-corner.bl { bottom: 40px; left: 40px; border-right: none; border-top: none; }
.splash-corner.br { bottom: 40px; right: 40px; border-left: none; border-top: none; }

.splash:hover .splash-title { letter-spacing: 1px; }
.splash:hover .splash-corner { opacity: 1 !important; }

@keyframes splash-line-in {
    0%   { opacity: 0; transform: translateY(8px); letter-spacing: 12px; }
    100% { opacity: 0.8; transform: translateY(0); letter-spacing: 6px; }
}
@keyframes splash-title-in {
    0%   { opacity: 0; transform: translateY(20px); filter: blur(18px); letter-spacing: 30px; }
    60%  { opacity: 1; filter: blur(0); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); letter-spacing: -1px; }
}
@keyframes splash-line-grow {
    0%   { width: 0; opacity: 0; }
    100% { width: 220px; opacity: 1; }
}
@keyframes splash-cta-in {
    0%   { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes splash-pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
@keyframes splash-blink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.3; transform: scale(0.85); } }
@keyframes splash-corner-in {
    0%   { opacity: 0; transform: scale(0.4); }
    100% { opacity: 0.55; transform: scale(1); }
}

/* ============================================================
   LOGIN RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    /* 2 cards lado a lado → 1 columna apilada */
    .modules-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        width: min(94vw, 480px);
    }
    .tactical-card { padding: 32px 24px; }
    .card-header { margin-bottom: 24px; }
    .card-header h2 { font-size: 1.4rem; letter-spacing: 2px; }
    .main-logo-text { font-size: 2.8rem; }
    .branding-header { margin-bottom: 30px; }

    /* Splash inicial: tipografía y esquinas más pequeñas */
    .splash-title { font-size: 2.6rem; letter-spacing: 0; }
    .splash-tag-line { font-size: 0.65rem; letter-spacing: 3px; padding: 0 16px; }
    .splash-sub { font-size: 0.62rem; letter-spacing: 2px; padding: 0 16px; }
    .splash-cta { font-size: 0.7rem; letter-spacing: 2px; padding: 0 16px; }
    .splash-corner { width: 40px; height: 40px; }
    .splash-corner.tl, .splash-corner.tr { top: 20px; }
    .splash-corner.bl, .splash-corner.br { bottom: 20px; }
    .splash-corner.tl, .splash-corner.bl { left: 20px; }
    .splash-corner.tr, .splash-corner.br { right: 20px; }

    /* Intro cinemático: barra y textos más pequeños */
    .load-text-1 { font-size: 2rem; letter-spacing: 8px; padding: 0 20px; }
    .load-text-2 { font-size: 1.5rem; letter-spacing: 2px; padding: 0 20px; }
    .load-bar-wrap { width: 90vw; max-width: 480px; }

    .official-footer {
        margin-top: 24px;
        font-size: 0.6rem;
        letter-spacing: 2px;
        padding: 0 20px;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .main-logo-text { font-size: 2.2rem; }
    .tactical-card { padding: 24px 18px; }
    .card-header h2 { font-size: 1.2rem; letter-spacing: 1.5px; }
    .btn-core { padding: 16px; font-size: 0.95rem; letter-spacing: 3px; }
    .splash-title { font-size: 2rem; }
    .load-text-1 { font-size: 1.4rem; letter-spacing: 5px; }
    .load-text-2 { font-size: 1.1rem; }
}

/* ============================================================
   DYNAMIC TACTICAL BACKGROUND (AURORA HACKER MODE)
   Importado desde style2.css para que el login tenga el mismo
   fondo animado que la app principal (<div class="aurora-bg">).
   ============================================================ */
.aurora-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
    background: #01040a;
}

/* Vibrant Aurora Energy Clouds */
.aurora-bg::before {
    content: '';
    position: absolute;
    width: 200%; height: 200%;
    top: -50%; left: -50%;
    background:
        radial-gradient(circle at 20% 30%, rgba(0, 243, 255, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(189, 0, 255, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(0, 100, 255, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 70% 40%, rgba(0, 255, 163, 0.15) 0%, transparent 30%);
    filter: blur(120px);
    animation: aurora-drift 25s infinite alternate ease-in-out;
    will-change: transform, filter;
    opacity: 0.8;
}

@keyframes aurora-drift {
    0% { transform: rotate(0deg) scale(1); filter: blur(120px) hue-rotate(0deg); }
    50% { transform: rotate(5deg) scale(1.1) translate(2%, 2%); filter: blur(120px) hue-rotate(180deg); }
    100% { transform: rotate(-5deg) scale(1.05) translate(-2%, -2%); filter: blur(120px) hue-rotate(360deg); }
}

/* Moving Tactical Grid (Brightened) */
.aurora-bg::after {
    content: '';
    position: absolute;
    width: 200%; height: 200%;
    top: 0; left: -50%;
    background-image:
        linear-gradient(rgba(0, 243, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.1) 1px, transparent 1px);
    background-size: 80px 80px;
    transform: perspective(600px) rotateX(60deg);
    animation: grid-scroll 15s infinite linear;
    mask-image: radial-gradient(ellipse at center, black, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 90%);
}

@keyframes grid-scroll {
    from { background-position: 0 0; }
    to { background-position: 0 80px; }
}

/* Global CRT Scanline Overlay */
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.05) 50%);
    background-size: 100% 4px;
    z-index: 10000;
    pointer-events: none;
    opacity: 0.3;
}

/* Respeta usuarios con movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .aurora-bg::before,
    .aurora-bg::after {
        animation: none !important;
    }
}
