/* ============================================================
   splash.css — Splash screen, auth forms, progress bar,
   intro story dialog, and mobile responsive
   ============================================================ */

/* ===== NOVO SPLASH SCREEN ===== */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#splash-screen:not([style*="display: none"]) ~ #player-panel {
    display: none !important;
}

.splash-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a1e;
    z-index: 0;
}

.splash-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(10, 10, 30, 0.6) 0%, rgba(10, 10, 30, 0.9) 100%);
}

.splash-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.8);
    z-index: 1;
}

.splash-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(240, 192, 64, 0.6), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(255, 107, 53, 0.4), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(78, 205, 196, 0.5), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(240, 192, 64, 0.4), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(255, 107, 53, 0.3), transparent),
        radial-gradient(1px 1px at 33% 80%, rgba(78, 205, 196, 0.4), transparent);
    background-size: 200% 200%;
    animation: splashParticlesFloat 20s ease-in-out infinite;
    opacity: 0.5;
    z-index: 2;
}

.splash-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
    max-width: 500px;
    padding: 0 20px;
}

.splash-logo {
    text-align: center;
    animation: splashLogoEnter 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.splash-logo-img {
    max-width: 280px;
    width: 80%;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.3));
    animation: splashLogoPulse 4s ease-in-out infinite;
}

.splash-title {
    font-family: 'Almendra', serif;
    font-size: 64px;
    font-weight: 700;
    color: #f0c040;
    letter-spacing: 10px;
    margin: 0;
    text-shadow: 0 0 30px rgba(240, 192, 64, 0.5), 0 0 60px rgba(240, 192, 64, 0.2);
    animation: splashLogoPulse 4s ease-in-out infinite;
}

.splash-slogan {
    font-size: 18px;
    color: #4ecdc4;
    font-weight: 700;
    letter-spacing: 6px;
    margin-top: 15px;
    opacity: 0;
    animation: splashSloganEnter 0.8s ease-out 0.6s forwards;
    text-shadow: 0 0 20px rgba(78, 205, 196, 0.4);
}

.splash-progress-wrapper {
    width: 100%;
    max-width: 400px;
    opacity: 0;
    animation: splashFadeInUp 0.6s ease-out 1s forwards;
}

.splash-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 215, 0, 0.15);
}

.splash-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f0c040, #ff6b35, #f0c040);
    background-size: 200% 100%;
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: splashProgressShimmer 2s linear infinite;
}

.splash-progress-glow {
    position: absolute;
    top: -4px;
    bottom: -4px;
    left: 0;
    width: 0%;
    background: linear-gradient(90deg, transparent, rgba(240, 192, 64, 0.4), transparent);
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: blur(4px);
}

.splash-progress-phases {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding: 0 2px;
}

.splash-phase {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.25);
    font-weight: 600;
    letter-spacing: 1px;
    transition: color 0.5s ease, text-shadow 0.5s ease;
}

.splash-phase.active {
    color: #f0c040;
    text-shadow: 0 0 10px rgba(240, 192, 64, 0.4);
}

.splash-phase.done {
    color: #4ecdc4;
}

.splash-status {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    letter-spacing: 1px;
    min-height: 20px;
    text-align: center;
    opacity: 0;
    animation: splashFadeIn 0.4s ease-out 1.2s forwards;
    transition: opacity 0.3s ease;
}

.splash-auth {
    width: 100%;
    max-width: 380px;
    animation: splashFadeInUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.splash-auth-box {
    background: rgba(10, 10, 30, 0.85);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 16px;
    padding: 20px 25px;
    backdrop-filter: blur(10px);
}

.splash-auth-title {
    color: #ffd700;
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.splash-input {
    display: block;
    width: 100%;
    padding: 14px 16px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.splash-input:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.15);
}

.splash-auth-btn {
    display: block;
    width: 100%;
    padding: 14px;
    margin: 16px 0 0;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.splash-auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.splash-auth-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
    text-align: center;
}

.splash-link {
    color: #888;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.splash-link:hover {
    color: #ffd700;
}

.splash-link.highlight {
    color: #4ecdc4;
    font-weight: 700;
    font-size: 25px;
    margin-top: 25px;
}

.splash-link.highlight:hover {
    color: #6ef0e0;
    text-shadow: 0 0 10px rgba(78, 205, 196, 0.4);
}

/* Botão de toggle de senha */
.password-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 18px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.password-toggle-btn:hover {
    opacity: 1;
}

.password-toggle-btn .eye-icon {
    display: inline-block;
    filter: grayscale(100%);
}

.password-toggle-btn.active .eye-icon {
    filter: none;
}

.splash-error {
    color: #e04040;
    font-size: 12px;
    text-align: center;
    margin-top: 10px;
    min-height: 16px;
}

.splash-auth-info {
    color: #aaa;
    font-size: 12px;
    text-align: center;
    margin-bottom: 10px;
}

.splash-footer {
    position: absolute;
    bottom: 30px;
    display: flex;
    gap: 30px;
    z-index: 10;
}

.splash-footer span {
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

.splash-exit {
    animation: splashExit 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes splashParticlesFloat {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}

@keyframes splashLogoEnter {
    0% { opacity: 0; transform: scale(0.7) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes splashLogoPulse {
    0%, 100% { filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.3)); }
    50% { filter: drop-shadow(0 0 50px rgba(255, 215, 0, 0.5)); }
}

@keyframes splashSloganEnter {
    0% { opacity: 0; transform: translateY(10px); letter-spacing: 12px; }
    100% { opacity: 0.9; transform: translateY(0); letter-spacing: 6px; }
}

@keyframes splashProgressShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes splashFadeInUp {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes splashFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes splashExit {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.05); pointer-events: none; }
}

/* ================================================
   TELA DE INTRODUÇÃO NARRATIVA
   ================================================ */

#intro-story-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 100000;
    overflow: hidden;
}

#intro-story-dialog {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px 20px;
    box-sizing: border-box;
}

#intro-story-skip {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.4);
    font-family: 'IM Fell English', serif;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

#intro-story-skip:hover {
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
}

#intro-story-content {
    max-width: 700px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.intro-scene {
    position: absolute;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1;
    transition: opacity 1.2s ease;
}

.intro-scene.scene-hidden {
    opacity: 0;
    pointer-events: none;
}

.intro-story-line {
    opacity: 0;
    transition: opacity 1.2s ease;
    margin: 6px 0;
}

.intro-story-line.visible {
    opacity: 1;
}

.intro-typewriter {
    display: inline;
    border-right: 2px solid rgba(255, 255, 255, 0.6);
    animation: intro-blink 0.8s step-end infinite;
}

.intro-typewriter.done {
    border-right-color: transparent;
    animation: none;
}

@keyframes intro-blink {
    50% { border-right-color: transparent; }
}

.intro-narration {
    font-family: 'IM Fell English', serif;
    color: rgba(255, 255, 255, 0.85);
    font-size: 20px;
    line-height: 1.6;
    letter-spacing: 0.5px;
    margin: 0;
}

.intro-narration-emphasis {
    color: #f0c040;
    font-size: 22px;
    font-weight: bold;
}

.intro-title-reveal {
    font-family: 'Almendra', serif;
    font-size: 52px;
    font-weight: 700;
    color: #f0c040;
    text-shadow: 0 0 30px rgba(240, 192, 64, 0.5), 0 0 60px rgba(240, 192, 64, 0.2);
    letter-spacing: 8px;
    margin: 15px 0;
}

.intro-narration-warning {
    color: #e05050;
    font-style: italic;
    font-size: 21px;
}

.intro-separator {
    font-size: 28px;
    margin: 10px 0;
    opacity: 0.7;
}

.intro-story-cta {
    display: none;
    margin-top: 40px;
    padding: 16px 50px;
    font-family: 'Almendra', serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #1a1a2e;
    background: linear-gradient(135deg, #f0c040, #e0a030);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(240, 192, 64, 0.3);
}

.intro-story-cta.visible {
    opacity: 1;
    transform: translateY(0);
}

.intro-story-cta:hover {
    box-shadow: 0 6px 30px rgba(240, 192, 64, 0.5);
}

@media (max-width: 768px) {
    .intro-narration {
        font-size: 16px;
    }

    .intro-narration-emphasis {
        font-size: 18px;
    }

    .intro-title-reveal {
        font-size: 36px;
        letter-spacing: 5px;
    }

    .intro-narration-warning {
        font-size: 17px;
    }

    .intro-story-cta {
        font-size: 16px;
        padding: 14px 36px;
        letter-spacing: 2px;
    }

    #intro-story-content {
        min-height: 200px;
    }
}

/* Splash screen mobile */
@media (max-width: 768px) {
    .splash-bg {
    }

    .splash-logo-img {
        max-width: 200px;
    }

    .splash-title {
        font-size: 42px;
        letter-spacing: 6px;
    }

    .splash-slogan {
        font-size: 14px;
        letter-spacing: 4px;
    }

    .splash-progress-wrapper {
        max-width: 300px;
    }

    .splash-auth-box {
        padding: 25px 20px;
    }

    .splash-footer {
        flex-direction: column;
        gap: 10px;
        align-items: center;
        bottom: 20px;
    }

    .splash-footer span {
        font-size: 11px;
    }
}
