:root {
    --primary-color: #ff9a9e;
    --secondary-color: #fad0c4;
    --text-color: #2d3436;
    --bg-color: #fdfbf7;
    --modal-bg: rgba(255, 255, 255, 0.95);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    user-select: none;
    /* Prevent blue selection highlight */
    -webkit-user-select: none;
}

#app-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ... (skipping unchanged parts) ... */

@keyframes popAndFloat {
    0% {
        transform: scale(0) translateY(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        transform: scale(1.2) translateY(-20px) rotate(10deg);
        opacity: 1;
    }

    100% {
        transform: scale(1) translateY(-200px) rotate(45deg);
        opacity: 0;
    }
}

#click-area {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.instruction-text {
    position: absolute;
    bottom: 50px;
    color: #b2bec3;
    font-size: 1rem;
    animation: pulse 2s infinite;
    pointer-events: none;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

#open-note-btn {
    padding: 20px 40px;
    font-size: 1.5rem;
    background: linear-gradient(45deg, #ff9a9e, #fad0c4);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(255, 154, 158, 0.4);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
    z-index: 10;
}

#open-note-btn:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 35px rgba(255, 154, 158, 0.6);
}

/* Flowers */
.flower-pop {
    position: absolute;
    width: 60px;
    height: 60px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    animation: popAndFloat 3s forwards ease-out;
    z-index: 5;
}

@keyframes popAndFloat {
    0% {
        transform: scale(0) translateY(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        transform: scale(1.2) translateY(-20px) rotate(10deg);
        opacity: 1;
    }

    100% {
        transform: scale(1) translateY(-200px) rotate(45deg);
        opacity: 0;
    }
}

/* Flower Trail */
.trail-flower {
    position: absolute;
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 4;
    font-size: 20px;
    animation: fadeOut 1s forwards;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

/* Background Floating Flowers */
.bg-flower {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
    animation: float 15s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(110vh) rotate(0deg);
    }

    100% {
        transform: translateY(-10vh) rotate(360deg);
    }
}

/* Mobile Polish */
@media (max-width: 600px) {
    .modal-content {
        width: 90%;
        padding: 25px;
        min-height: auto;
        /* Allow height to adjust based on content */
    }

    h2 {
        font-size: 1.6rem;
    }

    p {
        font-size: 1.1rem;
    }

    #open-note-btn {
        width: 80%;
        padding: 18px;
        font-size: 1.3rem;
    }
}

/* Landscape mode handling for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .modal-content {
        padding: 15px;
        width: 80%;
    }

    h2 {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }

    p {
        font-size: 1rem;
    }

    .instruction-text {
        bottom: 20px;
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s;
    backdrop-filter: blur(5px);
}

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

.modal-content {
    background-color: var(--modal-bg);
    padding: 40px;
    border-radius: 30px;
    width: 90%;
    max-width: 500px;
    min-height: 300px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.hidden .modal-content {
    transform: scale(0.8);
}

#close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #b2bec3;
}

.slides-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.slide {
    display: none;
    animation: fadeIn 0.5s;
}

.slide.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    color: #e84393;
    margin-bottom: 1rem;
    font-size: 2rem;
}

p {
    color: #636e72;
    font-size: 1.2rem;
    line-height: 1.6;
}

.controls {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
}

.controls button {
    padding: 10px 20px;
    border: 2px solid #fad0c4;
    background: transparent;
    border-radius: 20px;
    color: #e84393;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.controls button:hover:not(:disabled) {
    background: #fad0c4;
    color: white;
}


/* ... (existing styles) ... */

/* Cake Overlay */
#cake-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(253, 251, 247, 0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
    opacity: 1;
    transition: opacity 1s;
}

#cake-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.cake-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.cake-instruction {
    font-size: 1.5rem;
    color: #e84393;
    margin-bottom: 50px;
    text-align: center;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Cake CSS */
.cake {
    position: relative;
    width: 250px;
    height: 220px;
    margin-bottom: 50px;
}

/* Plate */
.plate {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 280px;
    height: 60px;
    background: #f7f7fa;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

/* Cake layers */
.cake-layer {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: #fff7fb;
    border-radius: 24px 24px 18px 18px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.cake-layer.base {
    bottom: 40px;
    width: 220px;
    height: 80px;
    background: #ffe2ec;
    /* soft strawberry cake */
}

.cake-layer.middle {
    bottom: 90px;
    width: 190px;
    height: 60px;
    background: #fff9f9;
}

.cake-layer.top {
    bottom: 135px;
    width: 160px;
    height: 40px;
    background: #ffe6f0;
}

/* Strawberry icing drip */
.strawberry-drip {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 230px;
    height: 60px;
    background: linear-gradient(180deg, #ff9ac5, #ff6ea7);
    border-radius: 30px 30px 40px 40px;
    clip-path: polygon(0% 0%,
            100% 0%,
            100% 50%,
            85% 80%,
            75% 55%,
            62% 85%,
            52% 60%,
            40% 88%,
            28% 60%,
            15% 78%,
            0% 55%);
}

/* Candles row */
.candles {
    position: absolute;
    bottom: 165px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 18px;
}

/* Candle body */
.candle {
    width: 14px;
    height: 46px;
    background: repeating-linear-gradient(45deg,
            #ffffff,
            #ffffff 5px,
            #ffd1e5 5px,
            #ffd1e5 10px);
    border-radius: 7px;
    position: relative;
    box-shadow: 0 4px 8px rgba(255, 145, 180, 0.4);
}

/* Wick */
.wick {
    position: absolute;
    top: -8px;
    left: 50%;
    width: 2px;
    height: 10px;
    background: #333;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Flame */
.flame {
    position: absolute;
    top: -22px;
    left: 50%;
    width: 14px;
    height: 20px;
    background: radial-gradient(circle at 30% 20%, #fffdd7, #ffc14f, #ff8b3d);
    border-radius: 50% 50% 50% 50%;
    transform: translateX(-50%);
    transform-origin: center bottom;
    box-shadow:
        0 0 12px rgba(255, 180, 70, 0.8),
        0 0 24px rgba(255, 180, 70, 0.6),
        0 0 40px rgba(255, 120, 80, 0.4);
    animation: flame-flicker 0.18s infinite alternate;
}

@keyframes flame-flicker {
    0% {
        transform: translateX(-50%) scale(1) rotate(-2deg);
        opacity: 0.95;
    }

    100% {
        transform: translateX(-50%) scale(1.05) rotate(3deg);
        opacity: 0.7;
    }
}

/* Blow-out animation */
.flame.out {
    animation: puff 0.5s forwards;
}

@keyframes puff {
    0% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) scale(0.4) translateY(-18px);
    }
}

#start-mic-btn,
#skip-blow-btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    background: #ff9a9e;
    border: none;
    border-radius: 30px;
    color: white;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.2s;
}

#start-mic-btn:hover {
    transform: scale(1.05);
}

#skip-blow-btn {
    background: transparent;
    border: 2px solid #b2bec3;
    color: #b2bec3;
    font-size: 1rem;
    padding: 10px 20px;
}