/* Intro Cutscene Styles */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 50000;
    /* Above everything */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
}

.intro-overlay.hidden {
    display: none;
}

.intro-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Keep generic bg styles just in case, but slide images will overlay it */
    background-size: cover;
    background-position: center;
    z-index: -1;
}

/* Updated Slide Image Style for Dynamic Slides */
.intro-slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
    /* Above base BG */
    animation: fadeInSlide 2s ease-out forwards;
}

/* Keyframes for slide fade in */
@keyframes fadeInSlide {
    0% {
        opacity: 0;
        transform: scale(1.05);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.intro-overlay {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.intro-overlay.intro-active {
    opacity: 1;
}

.intro-content {
    width: 100%;
    max-width: 900px;
    padding: 20px;
    margin-bottom: 40px;
    animation: slideUp 1s ease-out;
    position: relative;
    z-index: 10;
}

.intro-dialogue-box {
    background: rgba(15, 23, 42, 0.95);
    border: 3px solid #334155;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.intro-dialogue-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 9px;
    box-shadow: inset 0 0 20px rgba(59, 130, 246, 0.1);
    pointer-events: none;
}

.intro-text {
    font-size: 22px;
    line-height: 1.6;
    color: #e2e8f0;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-family: 'Georgia', serif;
}

.intro-footer {
    margin-top: 20px;
    text-align: center;
}

.intro-hint {
    font-size: 14px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: blink 2s infinite;
}

.intro-skip {
    position: absolute;
    top: 30px;
    right: 40px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    border: 2px solid #64748b;
    color: #94a3b8;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5001;
    /* Above everything */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.intro-skip:hover {
    background: rgba(30, 41, 59, 0.9);
    color: #fff;
    border-color: #64748b;
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.intro-overlay.fade-in {
    animation: fadeInOverlay 1.5s ease;
}

/* Response to screen sizes */
@media (max-width: 600px) {
    .intro-text {
        font-size: 18px;
    }

    .intro-dialogue-box {
        padding: 20px;
    }
}