/* ============================================
   ROMANTIC BIRTHDAY WEBSITE — STYLESHEET
   ============================================ */

/* Theme Tokens */
:root {
    --pink: #ff6b8a;
    --hot-pink: #ff2a6d;
    --soft-peach: #ffd3b6;
    --lavender: #d4a5ff;
    --light-purple: #e8c8ff;
    --deep-rose: #c9184a;
    --text-dark: #3d1f34;
    --glass-bg: rgba(255, 255, 255, 0.55);
    --glass-border: rgba(255, 255, 255, 0.45);
    --shadow-pink: rgba(255, 107, 138, 0.35);
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    font-family: 'Nunito', sans-serif;
    color: var(--text-dark);
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===== BACKGROUND ===== */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, #ffd3b6 0%, #ffb3c6 35%, #d4a5ff 70%, #c3a6ff 100%);
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    animation: orb-drift 18s ease-in-out infinite alternate;
}

.orb-1 {
    width: 280px;
    height: 280px;
    background: #ff5e8c;
    top: -60px;
    left: -60px;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: #a275ff;
    bottom: -120px;
    right: -80px;
    animation-delay: -6s;
}

.orb-3 {
    width: 220px;
    height: 220px;
    background: #ffcf77;
    top: 45%;
    left: 35%;
    animation-delay: -12s;
}

@keyframes orb-drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(25px, -40px) scale(1.12);
    }
}

/* Ambient floating hearts */
#ambient-hearts {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.ambient-heart {
    position: absolute;
    opacity: 0;
    animation: float-up-heart linear infinite;
    pointer-events: none;
}

@keyframes float-up-heart {
    0% {
        transform: translateY(100vh) scale(0.5) rotate(0deg);
        opacity: 0;
    }

    8% {
        opacity: 0.5;
    }

    92% {
        opacity: 0.4;
    }

    100% {
        transform: translateY(-8vh) scale(1.15) rotate(15deg);
        opacity: 0;
    }
}

/* ===== MAIN APP ===== */
#app {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 460px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Glass Card */
.glass-panel {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    box-shadow:
        0 16px 40px var(--shadow-pink),
        inset 0 0 20px rgba(255, 255, 255, 0.5);
    flex: 1;
    margin: 12% 16px 0 16px;
    max-height: 65%;
    overflow: hidden;
}

/* ===== SCREENS ===== */
/* START SCREEN IMAGES & EMOJIS */
.start-images-container {
    position: relative;
    width: 100%;
    max-width: 310px;
    height: 430px;
    margin: 0 auto 16px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    background: #fff;
    overflow: hidden;
    border: 4px solid #fff;
}

.bday-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    z-index: 1;
}

.bday-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

/* Manual Navigation Buttons */
.bday-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    color: var(--hot-pink);
    font-size: 1.2rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bday-nav:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-50%) scale(1.1);
}

.bday-prev {
    left: 10px;
}

.bday-next {
    right: 10px;
}

/* Floating Emojis */
.start-emojis {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.fly-emoji {
    position: absolute;
    font-size: 1.8rem;
    opacity: 0;
    animation: float-emoji 4s ease-in-out infinite alternate;
}

.e-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    font-size: 2rem;
}

.e-2 {
    top: 20%;
    right: 15%;
    animation-delay: 0.5s;
}

.e-3 {
    bottom: 25%;
    left: 10%;
    animation-delay: 1.2s;
    font-size: 1.5rem;
}

.e-4 {
    bottom: 20%;
    right: 10%;
    animation-delay: 0.8s;
    font-size: 2.2rem;
}

.e-5 {
    top: 40%;
    left: 5%;
    animation-delay: 1.5s;
    font-size: 1.6rem;
}

.e-6 {
    top: 45%;
    right: 5%;
    animation-delay: 2.1s;
    font-size: 1.9rem;
}

@keyframes float-emoji {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.9);
        opacity: 0.4;
    }

    100% {
        transform: translateY(-25px) rotate(15deg) scale(1.1);
        opacity: 0.9;
    }
}

.screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 28px 22px 56px 22px;
    text-align: center;
    opacity: 0;
    transform: scale(0.92);
    pointer-events: none;
    visibility: hidden;
    overflow-y: auto;
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(.22, 1, .36, 1), visibility 0s 0.55s;
}

.screen.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    visibility: visible;
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(.22, 1, .36, 1), visibility 0s 0s;
}

/* ===== TYPOGRAPHY ===== */
.title-main {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 16px;
}

.highlight {
    color: var(--hot-pink);
    font-family: 'Dancing Script', cursive;
    font-size: 2.4rem;
}

.romantic-font {
    font-family: 'Dancing Script', cursive;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
    min-height: 2.8em;
}

.proposal-q {
    font-size: 1.3rem;
    line-height: 1.4;
}

/* ===== SPEECH BUBBLE ===== */
.speech-bubble {
    background: white;
    border-radius: 20px;
    padding: 14px 20px;
    margin-bottom: 12px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    font-size: 1.1rem;
    font-weight: 600;
    max-width: 90%;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 30px;
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

/* ===== BUTTONS ===== */
.glow-btn {
    background: linear-gradient(135deg, #ff6b8a, #ff2a6d);
    color: #fff;
    border: none;
    padding: 14px 36px;
    font-size: 1.15rem;
    font-weight: 800;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 42, 109, 0.4), 0 0 12px rgba(255, 107, 138, 0.3);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    outline: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 16px;
    position: relative;
    overflow: hidden;
}

.glow-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50px;
    background: linear-gradient(135deg, #ff9ebb, #ff6b8a, #d4a5ff, #ff6b8a);
    background-size: 300% 300%;
    z-index: -1;
    animation: shimmer 3s ease infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glow-btn:hover::before,
.glow-btn:active::before {
    opacity: 1;
}

.glow-btn:hover,
.glow-btn:active {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 12px 30px rgba(255, 42, 109, 0.55);
}

@keyframes shimmer {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.glow-btn.small-btn {
    padding: 11px 26px;
    font-size: 1rem;
}

.yes-btn {
    min-width: 140px;
}

/* ===== OPTIONS ===== */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin-top: 14px;
}

.option-btn {
    background: rgba(255, 255, 255, 0.88);
    border: 2px solid var(--pink);
    color: var(--deep-rose);
    padding: 12px 8px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.option-btn:hover,
.option-btn:active {
    background: var(--pink);
    color: #fff;
    transform: scale(1.03);
    box-shadow: 0 6px 16px var(--shadow-pink);
}

.option-btn.selected {
    background: var(--hot-pink);
    color: #fff;
    border-color: var(--hot-pink);
    transform: scale(1.05);
}

/* ===== TEXT INPUT ===== */
.input-wrapper {
    width: 100%;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.romantic-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--pink);
    border-radius: 16px;
    font-size: 1.05rem;
    font-family: 'Nunito', sans-serif;
    outline: none;
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.romantic-input:focus {
    border-color: var(--hot-pink);
    box-shadow: 0 0 18px rgba(255, 107, 138, 0.35);
}

/* ===== REACTION BUBBLE ===== */
.reaction-bubble {
    background: var(--hot-pink);
    color: #fff;
    padding: 12px 22px;
    border-radius: 20px;
    margin-top: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 6px 18px rgba(201, 24, 74, 0.3);
    position: relative;
    animation: pop-bounce 0.5s cubic-bezier(.22, 1, .36, 1);
}

.reaction-bubble::after {
    content: '';
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 9px 10px;
    border-style: solid;
    border-color: transparent transparent var(--hot-pink) transparent;
}

/* ===== LOVE LETTER / MESSAGE (Bold & Readable) ===== */
.love-letter-scroll {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--pink) transparent;
}

.love-letter-scroll::-webkit-scrollbar {
    width: 4px;
}

.love-letter-scroll::-webkit-scrollbar-thumb {
    background: var(--pink);
    border-radius: 4px;
}

.love-letter-container {
    background: rgba(255, 255, 255, 0.65);
    padding: 22px 18px;
    border-radius: 20px;
    border: 1px dashed var(--pink);
    text-align: left;
    min-height: 100%;
}

/* ★ BOLD, READABLE EMOTIONAL MESSAGE FONT ★ */
.letter-text {
    font-family: 'Nunito', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.65;
    color: #2d0a1f;
    white-space: pre-wrap;
    display: inline;
    text-shadow: 0 0.5px 0 rgba(0, 0, 0, 0.08);
}

.cursor-blink {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--hot-pink);
    animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ===== PHOTO CAROUSEL ===== */
.photo-title {
    font-family: 'Dancing Script', cursive;
    font-size: 1.6rem;
    color: var(--hot-pink);
    margin-bottom: 12px;
}

.photo-carousel {
    width: 100%;
    max-width: 360px;
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    background: #000;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(.22, 1, .36, 1);
    width: 100%;
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.carousel-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
}

.carousel-btn {
    background: rgba(255, 255, 255, 0.85);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    color: var(--hot-pink);
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.carousel-btn:hover {
    transform: scale(1.1);
}

.carousel-counter {
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ===== AUDIO GIFT SECTION ===== */
.audio-gift-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
}

.audio-gift-icon {
    font-size: 2.2rem;
    animation: gift-bounce 1.5s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(255, 107, 138, 0.4));
}

@keyframes gift-bounce {

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

    25% {
        transform: translateY(-10px) rotate(-5deg);
    }

    50% {
        transform: translateY(-5px) rotate(0deg);
    }

    75% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.audio-gift-title {
    font-size: 1.5rem;
    color: var(--hot-pink);
    text-shadow: 0 0 16px rgba(255, 42, 109, 0.3), 0 0 32px rgba(255, 42, 109, 0.15);
    margin-bottom: 2px;
}

.audio-gift-msg {
    font-family: 'Nunito', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--deep-rose);
    background: rgba(255, 255, 255, 0.7);
    padding: 8px 14px;
    border-radius: 16px;
    border: 2px dashed var(--pink);
    max-width: 90%;
    text-align: center;
    box-shadow: 0 4px 16px rgba(255, 107, 138, 0.15);
}

.audio-player-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 280px;
}

/* Vinyl Record */
.audio-vinyl {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
            #1a1a2e, #2d2d4e, #1a1a2e, #2d2d4e,
            #1a1a2e, #2d2d4e, #1a1a2e, #2d2d4e);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 4px #333,
        0 0 0 6px rgba(255, 107, 138, 0.4),
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(255, 107, 138, 0.2);
    position: relative;
    transition: box-shadow 0.3s ease;
}

.audio-vinyl.spinning {
    animation: vinyl-spin 3s linear infinite;
    box-shadow:
        0 0 0 4px #333,
        0 0 0 6px var(--hot-pink),
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(255, 42, 109, 0.4);
}

.vinyl-inner {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--hot-pink), var(--deep-rose));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 0 8px rgba(255, 42, 109, 0.5);
}

@keyframes vinyl-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Play Button */
.play-btn {
    background: linear-gradient(135deg, #ff6b8a, #d4a5ff);
    color: #fff;
    border: none;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 50px;
    cursor: pointer;
    box-shadow:
        0 6px 20px rgba(255, 42, 109, 0.35),
        0 0 20px rgba(212, 165, 255, 0.2);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.play-btn:hover,
.play-btn:active {
    transform: translateY(-2px) scale(1.05);
    box-shadow:
        0 10px 28px rgba(255, 42, 109, 0.5),
        0 0 30px rgba(212, 165, 255, 0.3);
}

.play-btn.playing {
    background: linear-gradient(135deg, #d4a5ff, #ff6b8a);
    animation: glow-pulse 1.5s ease-in-out infinite;
}

@keyframes glow-pulse {

    0%,
    100% {
        box-shadow:
            0 6px 20px rgba(255, 42, 109, 0.35),
            0 0 20px rgba(212, 165, 255, 0.2);
    }

    50% {
        box-shadow:
            0 6px 28px rgba(255, 42, 109, 0.6),
            0 0 40px rgba(212, 165, 255, 0.4);
    }
}

/* Progress Bar */
.audio-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.audio-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--hot-pink), var(--lavender), var(--hot-pink));
    background-size: 200% 100%;
    border-radius: 3px;
    transition: width 0.2s linear;
    animation: progress-shimmer 2s ease infinite;
}

@keyframes progress-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Sparkles container */
.audio-sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    font-size: 1rem;
    opacity: 0;
    pointer-events: none;
    animation: sparkle-float var(--spark-dur, 2.5s) ease-out forwards;
}

@keyframes sparkle-float {
    0% {
        transform: translateY(0) scale(0.5) rotate(0deg);
        opacity: 0;
    }

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

    100% {
        opacity: 0;
        transform: translateY(-80px) scale(0.3) rotate(180deg);
    }
}

/* Musical note float for playing state */
.music-note {
    position: absolute;
    font-size: 1.2rem;
    opacity: 0;
    pointer-events: none;
    animation: music-float var(--note-dur, 3s) ease-out forwards;
}

@keyframes music-float {
    0% {
        transform: translateY(0) translateX(0) scale(0.5);
        opacity: 0;
    }

    15% {
        opacity: 0.9;
        transform: translateY(-10px) translateX(var(--note-x, 10px)) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-100px) translateX(var(--note-x2, -20px)) scale(0.6) rotate(20deg);
    }
}

/* ===== PROPOSAL ===== */
.proposal-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

.celebration-box {
    margin-top: 24px;
}

.gold-glow {
    color: var(--hot-pink);
    font-size: 2.6rem;
    text-shadow: 0 0 12px rgba(255, 42, 109, 0.5), 0 0 24px rgba(255, 42, 109, 0.25);
}

.celebration-sub {
    font-size: 1.1rem;
    margin-top: 12px;
    opacity: 0;
}

/* ===== CHARACTERS (Image-Based) ===== */
.characters-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 12px 14px;
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.character {
    width: 42%;
    max-width: 140px;
    transition: transform 1s cubic-bezier(.22, 1, .36, 1);
}

.char-img {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.18));
    border-radius: 12px;
}

/* Character Animations */
@keyframes breathe {

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

    50% {
        transform: scaleY(1.02) translateY(-3px);
    }
}

.breathe-anim {
    animation: breathe 3.2s ease-in-out infinite;
}

.breathe-anim-delay {
    animation: breathe 3.5s ease-in-out infinite 1.6s;
}

/* Celebrate (bounce) */
@keyframes celebrate-bounce {

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

    25% {
        transform: translateY(-18px) rotate(-3deg);
    }

    75% {
        transform: translateY(-18px) rotate(3deg);
    }
}

.character.celebrating {
    animation: celebrate-bounce 0.6s ease-in-out infinite;
}

/* Move closer */
.character.boy.closer {
    transform: translateX(30px);
}

.character.girl.closer {
    transform: translateX(-30px);
}

/* ===== EFFECTS OVERLAY ===== */
.effects-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    overflow: hidden;
}

.flying-emoji {
    position: absolute;
    font-size: 1.8rem;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
    animation: fly-kiss var(--duration, 1.4s) cubic-bezier(.25, 1, .5, 1) forwards;
    opacity: 0;
    z-index: 51;
}

@keyframes fly-kiss {
    0% {
        transform: translate(0, 0) scale(0.4) rotate(0deg);
        opacity: 0;
    }

    15% {
        opacity: 1;
        transform: translate(10px, -30px) scale(1.1) rotate(-10deg);
    }

    75% {
        opacity: 0.85;
    }

    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(var(--end-scale, 1.3)) rotate(var(--end-rot, 10deg));
    }
}

/* ===== GENERIC ANIMATION CLASSES ===== */
@keyframes bounce-in {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.06);
        opacity: 1;
    }

    70% {
        transform: scale(0.92);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.bounce-in {
    animation: bounce-in 0.7s cubic-bezier(.22, 1, .36, 1) forwards;
    opacity: 0;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

.fade-in {
    animation: fade-in 0.65s ease forwards;
    opacity: 0;
}

@keyframes pop-bounce {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }

    60% {
        transform: scale(1.08);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

@keyframes scale-up {
    0% {
        transform: scale(0.4);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.scale-up {
    animation: scale-up 0.8s ease-out forwards;
    opacity: 0;
}

.delay-1 {
    animation-delay: 0.5s;
}

.delay-2 {
    animation-delay: 1s;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.06);
    }
}

.pulse-anim {
    animation: pulse 2.2s infinite;
}

/* Delayed pulse for start button — waits for parent fade-in (1s delay + 0.65s fade) */
.start-pulse {
    animation: pulse 2.2s 1.7s infinite;
}

/* ===== SCREEN NAV BUTTONS ===== */
.screen-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 16px;
    z-index: 10;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.4));
    border-radius: 0 0 28px 28px;
}

.nav-arrow-btn {
    background: rgba(255, 255, 255, 0.75);
    border: 2px solid var(--pink);
    color: var(--deep-rose);
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 800;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 3px 10px rgba(255, 107, 138, 0.2);
    font-family: 'Nunito', sans-serif;
}

.nav-arrow-btn:hover,
.nav-arrow-btn:active {
    background: var(--pink);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 5px 16px rgba(255, 42, 109, 0.35);
}

.nav-arrow-btn:disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* ===== UTILITY ===== */
.hidden {
    display: none !important;
}

/* ===== RESPONSIVE ===== */
@media (max-height: 700px) {
    .glass-panel {
        margin-top: 4%;
        max-height: 68%;
    }

    .characters-container {
        height: 160px;
    }

    .char-img {
        max-height: 150px;
    }

    .title-main {
        font-size: 1.3rem;
    }

    .highlight {
        font-size: 2rem;
    }

    .question-text {
        font-size: 1.05rem;
    }

    .letter-text {
        font-size: 0.95rem;
    }

    .carousel-slide img {
        height: 180px;
    }
}

@media (max-height: 600px) {
    .glass-panel {
        margin-top: 3%;
        max-height: 58%;
        border-radius: 20px;
    }

    .characters-container {
        height: 130px;
        padding-bottom: 6px;
    }

    .char-img {
        max-height: 120px;
    }

    .carousel-slide img {
        height: 150px;
    }
}

@media (min-width: 500px) {
    .glass-panel {
        margin-top: 6%;
        max-height: 72%;
    }
}