:root {
    --bg-color-start: #0c0414;
    --bg-color-end: #020005;
    --text-color-1: #e0e0e0;     /* Soft ethereal grey for Speaker 1 */
    --text-color-2: #3cefff;     /* Glowing Minecraft Aqua for Speaker 2 */
    --highlight-glow: rgba(60, 239, 255, 0.4);
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    background: radial-gradient(circle at center, var(--bg-color-start) 0%, var(--bg-color-end) 100%);
    color: var(--text-color-1);
    font-family: 'Cormorant Garamond', serif;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Particle Canvas */
#bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 800px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    transition: opacity 0.5s ease;
}

.welcome-message {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-message .title {
    color: var(--text-color-2);
    font-weight: 600;
    font-size: 3.5rem;
    margin-top: 0;
    margin-bottom: 10px;
    text-shadow: 0 0 15px var(--highlight-glow);
    letter-spacing: 6px;
    text-transform: uppercase;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); text-shadow: 0 0 25px rgba(60, 239, 255, 0.6); }
}

.welcome-message .author-credit {
    color: #a9a9a9;
    font-size: 1.4rem;
    font-style: italic;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

.welcome-message .author-credit span {
    color: #fff;
}

.mystical-decor {
    font-size: 2rem;
    color: var(--text-color-2);
    margin-bottom: 10px;
    opacity: 0.7;
}

.separator {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--text-color-2), transparent);
    margin: 0 auto 25px auto;
}

.welcome-message .subtitle {
    color: #888;
    font-size: 1.2rem;
    max-width: 450px;
    margin: 0 auto;
    line-height: 1.6;
}

.name-input {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid rgba(60, 239, 255, 0.3);
    color: #ffffff;
    padding: 10px 10px;
    font-size: 1.5rem;
    text-align: center;
    width: 250px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 40px;
    font-family: 'Cormorant Garamond', serif;
}

.name-input:focus {
    outline: none;
    width: 320px;
    border-bottom: 1px solid var(--text-color-2);
    box-shadow: 0 10px 15px -10px var(--highlight-glow);
}

.name-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.start-button {
    background-color: transparent;
    color: var(--text-color-2);
    border: 1px solid rgba(60, 239, 255, 0.4);
    border-radius: 30px;
    padding: 12px 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.start-button:hover {
    background-color: rgba(60, 239, 255, 0.15);
    border-color: var(--text-color-2);
    box-shadow: 0 0 20px var(--highlight-glow);
    transform: translateY(-2px);
}

/* Smooth Fading for Intro */
#namePrompt {
    transition: opacity 1.5s ease, transform 1.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.poem-container {
    position: absolute;
    opacity: 0;
    pointer-events: none; /* Block clicks until visible */
    height: 100%;
    width: 100%;
    overflow-y: auto;
    padding: 50vh 20px; /* Cinematic entry and exit padding */
    box-sizing: border-box;
    scroll-behavior: smooth;
    line-height: 2;
    /* Hide scrollbar completely for pure immersion */
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.poem-container::-webkit-scrollbar {
    display: none;
}

.poem-container.active {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 3s ease-in;
}

.line {
    min-height: 24px;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 2.5s ease-out, transform 2.5s ease-out;
    font-size: 1.6rem;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

.highlight {
    color: var(--text-color-2);
    text-shadow: 0 0 10px var(--highlight-glow);
}

.scrambled {
    font-family: 'Space Mono', monospace;
    opacity: 0.85;
    letter-spacing: 1px;
    display: inline-block;
    white-space: nowrap;
    vertical-align: baseline;
}

.bold { font-weight: bold; }
.italic { font-style: italic; }
.bold-italic { font-weight: bold; font-style: italic; }

/* Final 3 Lines Styling */
.final-narrative {
    font-style: italic;
    font-size: 1.8rem;
    color: #f0f0f0;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    line-height: 2.2;
}

.final-revelation {
    color: var(--text-color-2);
    font-size: 2.4rem;
    font-weight: 600;
    text-shadow: 0 0 20px var(--highlight-glow);
    letter-spacing: 3px;
    margin-top: 60px;
}

.wake-up {
    font-size: 4.5rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 30px #fff, 0 0 15px var(--text-color-2);
    letter-spacing: 12px;
    text-transform: uppercase;
    animation: pulse-glow 3s infinite alternate;
    margin-top: 20px;
}

@keyframes pulse-glow {
    0% { text-shadow: 0 0 20px #fff, 0 0 10px var(--text-color-2); transform: scale(1); }
    100% { text-shadow: 0 0 40px #fff, 0 0 25px var(--text-color-2); transform: scale(1.03); }
}

/* Credits Card Styling */
.credits-card {
    margin: 100px auto 80px auto;
    max-width: 500px;
    background: rgba(10, 5, 20, 0.7);
    border: 1px solid rgba(60, 239, 255, 0.3);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 25px rgba(60, 239, 255, 0.1);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(30px);
    transition: all 2.5s ease-out;
}

.credits-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.credits-card p {
    margin: 15px 0;
    font-size: 1.4rem;
    color: #ccc;
}

.credits-card a {
    color: var(--text-color-2);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.credits-card a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--text-color-2);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.credits-card a:hover { text-shadow: 0 0 15px var(--highlight-glow); }
.credits-card a:hover::after { transform: scaleX(1); transform-origin: left; }

.controls-container {
    position: absolute; 
    top: 20px; 
    right: 20px; 
    display: flex; 
    flex-direction: column;
    gap: 10px;
    z-index: 20;
}

.control-group {
    display: flex; 
    align-items: center;
    background: rgba(10, 5, 20, 0.6); 
    padding: 8px 15px; 
    border-radius: 25px;
    border: 1px solid rgba(60, 239, 255, 0.2); 
    backdrop-filter: blur(5px);
    transition: border-color 0.3s ease;
}

.control-group:hover {
    border-color: rgba(60, 239, 255, 0.5);
}

.control-icon { cursor: pointer; margin-right: 12px; color: var(--text-color-2); font-size: 1.1rem; }
.control-slider { width: 80px; accent-color: var(--text-color-2); cursor: pointer; }

.resume-btn {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    pointer-events: none;
    background: rgba(10, 5, 20, 0.8);
    color: var(--text-color-2);
    border: 1px solid var(--text-color-2);
    padding: 10px 25px;
    border-radius: 25px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 20;
    transition: all 0.4s ease;
}

.resume-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    box-shadow: 0 0 15px rgba(60, 239, 255, 0.2);
}

.resume-btn:hover { background: rgba(60, 239, 255, 0.15); box-shadow: 0 0 25px rgba(60, 239, 255, 0.5); }