/* =================================
   GLOBAL BASE (2026)
   ================================= */

body {
    margin: 0;
    min-height: 100vh;
    background-color: #ffb3d9;
    font-family: 'Quicksand', sans-serif;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Headings */
h1, h2 {
    color: #ff1a66;
    margin-top: 0;
}

/* Paragraphs */
p {
    color: #444;
    line-height: 1.5;
}

/* =================================
   GENERIC CONTAINERS
   ================================= */

.container,
.quiz-container,
.intro-container,
.letter,
.playlist-container,
.drawing-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 24px;
    width: 90%;
    max-width: 720px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    position: relative;
}

/* Smaller containers (quiz questions) */
.quiz-container {
    max-width: 650px;
}

/* =================================
   QUIZ LAYOUT
   ================================= */

.question {
    display: none;
}

.question.active {
    display: block;
}

.answers {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 25px;
    min-height: 360px;
}

/* =================================
   REACTION OVERLAY
   ================================= */

.reaction {
    display: none;
    position: absolute;
    inset: 0;
    background-color: #fff;
    border-radius: 18px;
    z-index: 20;

    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 20px;
}

.reaction img {
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
}

.reaction p {
    font-size: 18px;
}

/* =================================
   PROCESSING & ENDING
   ================================= */

.processing,
.ending {
    display: none;
}

.processing p {
    font-size: 22px;
    font-weight: 600;
}

.ending {
    margin-top: 20px;
}

.ending-title {
    font-size: 30px;
    margin-bottom: 10px;
}

.ending-text {
    font-size: 18px;
    margin-bottom: 25px;
}

/* Buttons wrapper on ending screen */
.ending-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* =================================
   LETTER PAGE
   ================================= */

.letter p {
    margin-bottom: 14px;
}

/* =================================
   PLAYLIST / DRAWING FRAMES
   ================================= */

.playlist-frame,
.drawing-frame {
    margin: 25px auto;
    padding: 20px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.playlist-frame iframe {
    width: 100%;
    height: 380px;
    border: none;
    border-radius: 12px;
}

.drawing-frame img {
    max-width: 100%;
    max-height: 420px;
    border-radius: 12px;
    object-fit: contain;
}

/* =================================
   SMALL SCREENS
   ================================= */

@media (max-width: 480px) {
    .container,
    .quiz-container,
    .intro-container,
    .letter,
    .playlist-container,
    .drawing-container {
        padding: 26px;
    }

    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 24px;
    }
}

/* =================================
   PROCESSING BUTTON
   ================================= */

.loading-overlay {
    position: fixed;
    inset: 0;
    background-color: #ffb3d9; /* same pink as your page */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-text {
    color: white;
    font-size: 32px;
    font-weight: bold;
    letter-spacing: 1px;
}

.loading-text {
    animation: pulse 1.2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/*test*/
.question {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

.question.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.quiz-container {
    max-width: 650px;
    width: 100%;
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    z-index: 5;
}

 /* ANSWERS AREA */
.answers {
    margin-top: 30px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;

    min-height: 360px;

    /* ✨ NEW */
    justify-content: center;
}

/* REACTION OVERLAY */
.reaction {
    position: absolute;
    inset: 0;

    background-color: #fff;
    border-radius: 18px;

    z-index: 20;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 20px;

    /* NEW */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.reaction.show{
    opacity: 1;
    pointer-events: auto;
}

/* REACTION CONTENT */
.reaction img {
    max-height: 320px;      /* THIS is the key */
    max-width: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}

.reaction p {
    font-size: 18px;
    padding: 0 20px;
}

.ending .button {
    margin-top: 10px;
    min-width: 220px;
}


/* ANSWER BUTTONS */
.answers .button {
    width: 100%;
    max-width: 520px;
    padding: 14px 20px;

    font-size: 18px;
    line-height: 1.35;
    text-align: center;
    white-space: normal;

    background-color: #ff1a66;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;

    transition:
        background-color 0.2s ease,
        transform 0.15s ease;
}

/* Hover = darker + lift */
.answers .button:hover {
    background-color: #e6005c;
    transform: translateY(-3px);
}

/* Click = press down */
.answers .button:active {
    transform: translateY(0);
}

/* PROCESSING / ENDING */
.processing,
.ending {
    display: none;
}

.processing p {
    font-size: 22px;
    font-weight: bold;
}

.ending h2 {
    margin-bottom: 15px;
}

.ending-text {
    font-size: 18px;
    margin: 10px 0 25px;
    line-height: 1.5;
    opacity: 0.9;
}