/* Reset and Base Styles */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    color: #ffffff; 
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Garamond", "EB Garamond", serif; 
    overflow: hidden;
}

/* Scene Container Logic */
.scene {
    position: absolute; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.5rem; 
    line-height: 1.4; 
    transition: opacity 1.2s ease;
    width: 100vw;
    height: 100vh;
    box-sizing: border-box; 
    overflow-y: auto; 
    overflow-x: hidden;
}

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

.scene.visible {
    opacity: 1;
    pointer-events: auto; 
}

.poem-container {
    position: relative;
    z-index: 10;
    pointer-events: auto;
    flex-shrink: 0; 
}

/* Line-by-Line Fade Logic */
.fade-line {
    opacity: 0;
    transform: translateY(10px); 
    transition: opacity 1.2s ease, transform 1.2s ease; 
    margin: 5px 0; 
}

.fade-line.show {
    opacity: 1;
    transform: translateY(0); 
}

.special-text {
    display: inline-block; 
    color: #ffd700; 
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.6); 
    font-weight: normal; 
}

#enter-btn {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 2rem;
    cursor: pointer;
    margin-top: 30px; 
    letter-spacing: 2px;
    transition: opacity 1.2s ease, transform 1.2s ease, text-shadow 0.3s ease, color 0.3s ease;
}

#enter-btn:hover {
    text-shadow: 0 0 20px rgba(255, 215, 0, 1); 
    color: #fffacd;
}

/* --- ORBITAL MECHANICS --- */
#nav-links {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    margin: 0;
    z-index: 5; 
}

.orbit-point {
    position: absolute;
    top: 0;
    left: 0;
    animation: orbit 120s linear infinite;
    animation-delay: calc(-120s * (var(--i) / 4));
}

.orbit-point a {
    position: absolute;
    transform: translate(-50%, -50%); 
    white-space: nowrap; 
    color: #aaaaaa; 
    text-decoration: none;
    font-size: 1.2rem; 
    letter-spacing: 1px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.orbit-point a:hover {
    color: #ffd700; 
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

@keyframes orbit {
    from { transform: rotate(0deg) translateX(clamp(170px, 27vw, 320px)) rotate(0deg); }
    to { transform: rotate(360deg) translateX(clamp(170px, 27vw, 320px)) rotate(-360deg); }
}

/* --- STARFIELD MECHANICS --- */
#starfield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1; 
    pointer-events: none; 
    overflow: hidden;
    transition: opacity 2s ease; 
}

.starfield-hidden { opacity: 0; }
.starfield-visible { opacity: 1; }

.ascii-star {
    position: absolute;
    color: #ffffff;
    font-family: monospace; 
    user-select: none;
    opacity: 0; 
    animation: twinkle linear infinite;
}

@keyframes twinkle {
    0% { opacity: 0.1; }
    50% { opacity: 0.8; text-shadow: 0 0 5px rgba(255,255,255,0.5); }
    100% { opacity: 0.1; }
}

/* --- SUB-SCENES & FLYING TEXT STYLES --- */

.flying-title {
    position: fixed;
    font-size: 1.2rem;
    color: #aaaaaa;
    pointer-events: none;
    z-index: 100;
    transition: top 1.2s ease-in-out, left 1.2s ease-in-out, font-size 1.2s ease-in-out, color 1.2s ease, text-shadow 1.2s ease, opacity 1s ease;
}

.flying-title.centered {
    top: 10vh !important;
    left: 50vw !important;
    font-size: 2.5rem;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.sub-scene {
    justify-content: flex-start;
    padding-top: 12.5vh; 
    transition: none !important; 
}

.sub-scene.hidden {
    opacity: 1; 
    visibility: hidden;
    pointer-events: none;
}

.sub-scene.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* UPDATED: Subtitle Poetry is now italicized */
.scene-3-poem {
    font-size: 1.1rem;
    margin: 2px 0;
    font-style: italic; 
}

/* NEW: The Grey Dividing Line */
.scene-divider {
    width: 80%;
    max-width: 300px;
    border: 0;
    border-top: 1px solid #444; 
    margin: 25px auto 20px auto; 
}

/* NEW: The Info Blurb Text */
.scene-3-blurb {
    font-size: 1.1rem; 
    margin: 0 auto;
    max-width: 600px;
    line-height: 1.5;
    color: #cccccc; 
    padding: 0 20px; 
}

/* Movie Poster Cards */
.cards-container {
    display: flex;
    gap: 40px 30px; 
    /* Slightly reduced margin-top since the blurb takes up space now */
    margin-top: 40px; 
    margin-bottom: 40px; 
    justify-content: center;
    flex-wrap: wrap; 
    max-width: 600px; 
    flex-shrink: 0; 
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #aaaaaa;
    transition: color 0.3s ease, transform 0.3s ease;
    width: 140px; 
    flex-shrink: 0;
}

.card-art {
    width: 140px;
    height: 210px; 
    border: 1px solid #444;
    background-color: #111;
    margin-bottom: 15px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.card-title {
    font-size: 1.2rem;
    letter-spacing: 1px;
    text-align: center; 
}

.card:hover {
    color: #ffd700;
    transform: translateY(-8px); 
}

.card:hover .card-art {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

/* Unique Vaults Link */
.descend-link {
    font-size: 1.5rem;
    text-decoration: none;
    letter-spacing: 3px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.descend-link:hover {
    color: #fffacd;
    text-shadow: 0 0 20px rgba(255, 215, 0, 1);
}

/* Return Button */
.return-btn {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.8rem;
    color: #666;
    cursor: pointer;
    margin-top: 20px; 
    margin-bottom: 60px; 
    flex-shrink: 0; 
    letter-spacing: 2px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.return-btn:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}