body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #01020a;
    font-family: 'Georgia', serif;
}

#skyCanvas {
    display: block;
    position: fixed; 
    top: 0;
    left: 0;
    z-index: 1;
    /* Hemos quitado width: 100vw y height: 100vh para que el Javascript 
       controle la resolución sin deformar las figuras */
}

#universe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200vh;
    z-index: 2; 
    transform: translateY(0);
    transition: transform 4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

#sky-scene {
    position: relative;
    width: 100%;
    height: 100vh;
}

#ui-container {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    padding: 60px 0 40px 0;
    box-sizing: border-box;
}

#text-box {
    height: 140px;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

#narrative-text {
    color: #e6f0ff;
    font-size: 1.8rem;
    text-align: center;
    opacity: 0;
    transition: opacity 1.5s ease;
    text-shadow: 0 0 15px rgba(100, 150, 255, 0.6);
    line-height: 1.5;
    max-width: 800px;
}

#controls {
    pointer-events: auto; 
    margin-bottom: 30px;
    z-index: 50;
}

#next-btn {
    padding: 12px 30px;
    background: rgba(20, 40, 80, 0.3);
    border: 1px solid rgba(100, 150, 255, 0.4);
    color: #cce0ff;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 25px;
    backdrop-filter: blur(5px);
    transition: all 0.4s ease;
}

#next-btn:hover {
    background: rgba(40, 80, 150, 0.5);
    box-shadow: 0 0 25px rgba(100, 150, 255, 0.5);
    color: white;
}

/* --- ESCENA DE LA TIERRA --- */
#ground-scene {
    width: 100%;
    height: 100vh;
    background: linear-gradient(to bottom, rgba(1, 2, 10, 0) 0%, rgba(1, 2, 10, 0.2) 50%, #01020a 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 2s ease 1.5s; 
}

#ground-scene.visible {
    opacity: 1;
    pointer-events: auto;
}

.ground-content {
    text-align: center;
    z-index: 10;
    position: absolute;
    top: 15vh; 
    width: 100%;
}

.final-quote {
    color: #b3d9ff;
    font-size: 1.8rem;
    font-style: italic;
    text-shadow: 0 0 15px rgba(179, 217, 255, 0.8);
    padding: 0 20px;
}

.foreground-image {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 55vh; 
    display: flex;
    justify-content: center;
    align-items: flex-end; 
    z-index: 5;
    pointer-events: none;
}

.foreground-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    object-position: bottom center; 
}