/* CSS Variables for theming */
:root {
    --bg-color: #FFF0F5; /* Lavender Blush */
    --text-color: #4B0082; /* Indigo */
    --accent-color: #FF69B4; /* Hot Pink */
    --button-bg: #FFC0CB; /* Pink */
    --button-text: #8B008B; /* Dark Magenta */
}

/* Basic body styling */
body {
    margin: 0;
    padding: 0;
    font-family: 'Patrick Hand', cursive;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
}

/* Container for the Three.js canvas background */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0;
    background: linear-gradient(135deg, #ffdde1, #ee9ca7);
    pointer-events: none;
}

/* Styling for each scene/question card */
.scene {
    position: absolute;
    width: 90%;
    max-width: 600px;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    border: 2px solid var(--button-bg);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transform: scale(0.9);
    transition: visibility 0.5s, opacity 0.5s, transform 0.5s;
    box-sizing: border-box;
}

/* Active scene state */
.scene.active {
    visibility: visible;
    opacity: 1;
    transform: scale(1);
}

/* Heading styles */
h1, h2 {
    font-family: 'Gloria Hallelujah', cursive;
    color: var(--accent-color);
    margin-bottom: 1rem;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.1);
}

h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 4vw, 1.8rem); line-height: 1.5; }

/* Special glowing text shadow for the final question */
#scene-q5 h2 {
    text-shadow: 0 0 8px var(--button-bg), 0 0 15px var(--accent-color);
}

/* Container for buttons */
.button-container {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* General button styling */
.btn {
    font-family: 'Patrick Hand', cursive;
    font-size: clamp(1rem, 3vw, 1.5rem);
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: 50px; /* Pill shape */
    cursor: pointer;
    background-color: var(--button-bg);
    color: var(--button-text);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, top 0.4s ease, left 0.4s ease;
    position: relative; /* All buttons start as relative */
}

/* Button hover effect */
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Text that appears after a choice is made */
.response-text {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--accent-color);
    margin-top: 1.5rem;
    font-weight: bold;
    opacity: 0;
    transform: translateY(10px);
}

/* Styling for emoji choices */
.emoji-choice {
    font-size: 3rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.emoji-choice:hover { transform: scale(1.2); }

/* Container for the final message overlay */
.final-message-container {
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     position: absolute;
     width: 100%;
     height: 100%;
     z-index: 100;
     visibility: hidden;
     opacity: 0;
     transition: visibility 0.5s, opacity 0.5s;
     pointer-events: none;
}

/* Styling for the final message text */
.final-message-text {
    font-family: 'Patrick Hand', cursive;
    font-size: clamp(1.5rem, 5vw, 2.8rem);
    color: white;
    text-shadow: 0 0 8px hotpink, 0 0 15px hotpink, 0 0 25px hotpink;
    transform: translateY(20px);
    opacity: 0;
    text-align: center;
    line-height: 1.4;
    padding: 1rem;
}

/* Signature style within the final message */
.final-message-text .signature {
     display: block;
     font-size: clamp(1.2rem, 4vw, 2rem);
     margin-top: 1.5rem;
     opacity: 0.9;
}

/* Footer credit styling */
.footer {
    font-family: 'Patrick Hand', cursive;
    font-size: clamp(0.8rem, 2.5vw, 1rem); /* Adjusted font size for longer text */
    color: var(--button-text);
    margin-top: 3rem; /* Adds space above the footer */
    width: 100%;
    text-align: center;
    opacity: 0.8;
    line-height: 1.4; /* Added for better line spacing */
}
