/* ==========================================================================
   DESIGN SYSTEM & RESET
   ========================================================================== */
:root {
    --bg-color-1: #ffd5e0;
    --bg-color-2: #ffeaef;
    --text-primary: #3d1c25;
    --text-accent: #d13a62;
    --btn-yes-bg: linear-gradient(135deg, #d82b5e, #be1848);
    --btn-yes-hover: linear-gradient(135deg, #e43c6d, #d11e51);
    --btn-no-color: #d13a62;
    --btn-no-border: #ffd1dc;
    --card-bg: rgba(255, 255, 255, 0.75);
    --card-shadow: 0 12px 40px rgba(224, 76, 120, 0.18);
    --font-handwritten: 'Pacifico', cursive;
    --font-rounded: 'Fredoka', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    font-family: var(--font-rounded);
    color: var(--text-primary);
    overflow: hidden;
    background: linear-gradient(180deg, var(--bg-color-2) 0%, var(--bg-color-1) 100%);
    position: relative;
}

/* ==========================================================================
   FLOATING HEARTS BACKGROUND
   ========================================================================== */
.hearts-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.heart-particle {
    position: absolute;
    bottom: -50px;
    font-size: 24px;
    opacity: 0;
    user-select: none;
    animation: floatUp 10s linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-110vh) rotate(360deg) scale(1.2);
        opacity: 0;
    }
}

/* ==========================================================================
   MUSIC TOGGLES
   ========================================================================== */
.music-toggle-top {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #ffffff;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: #4b6584;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.music-toggle-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.music-toggle-top:active {
    transform: scale(0.95);
}

.music-toggle-bottom {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(45, 52, 54, 0.8);
    backdrop-filter: blur(4px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: #ffffff;
    transition: all 0.3s ease;
}

.music-toggle-bottom:hover {
    background-color: rgba(45, 52, 54, 0.95);
    transform: scale(1.05);
}

.music-toggle-bottom.muted .wave {
    display: none;
}

.music-toggle-bottom.muted .mute-line {
    display: block !important;
}

/* Animated Sound Wave classes */
.wave-1 {
    animation: pulseWave 1.2s infinite ease-in-out;
}
.wave-2 {
    animation: pulseWave 1.2s infinite ease-in-out 0.3s;
}

@keyframes pulseWave {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

.muted-pulse {
    animation: none !important;
}

/* ==========================================================================
   PAGE CONTAINER & CARD LAYOUT
   ========================================================================== */
.page-container {
    width: 100%;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: relative;
    z-index: 5;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 28px;
    width: 100%;
    max-width: 420px;
    height: 90vh;
    max-height: 720px;
    box-shadow: var(--card-shadow);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

/* Confetti Overlay */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: confettiFall 4s linear infinite;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(740px) rotate(720deg);
        opacity: 0;
    }
}

/* Header Section */
.header-section {
    text-align: center;
    width: 100%;
    z-index: 3;
}

.main-title {
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #111111;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.sub-title {
    font-family: var(--font-handwritten);
    font-weight: normal;
    font-size: 2.2rem;
    color: var(--text-accent);
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    transform: rotate(-3deg);
    display: inline-block;
    margin-top: 4px;
}

/* Illustration Section */
.illustration-section {
    width: 100%;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3;
    padding: 10px 0;
}

.bears-img {
    max-width: 85%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 20px;
    filter: drop-shadow(0 6px 12px rgba(224, 76, 120, 0.15));
    animation: floatIllustration 4s ease-in-out infinite;
}

@keyframes floatIllustration {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* Footer Section & Buttons */
.footer-section {
    width: 100%;
    text-align: center;
    z-index: 3;
}

.question-text {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: -0.2px;
}

.buttons-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: 100%;
    position: relative;
    min-height: 60px;
}

.btn {
    font-family: var(--font-rounded);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 14px 0;
    width: 130px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    outline: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-yes {
    background: var(--btn-yes-bg);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(216, 43, 94, 0.35);
}

.btn-yes:hover {
    background: var(--btn-yes-hover);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 22px rgba(216, 43, 94, 0.45);
}

.btn-yes:active {
    transform: translateY(1px) scale(0.98);
}

/* Wrapper for No button to manage its relative flow */
.no-btn-wrapper {
    display: inline-block;
    width: 130px;
    height: 48px;
    position: relative;
}

.btn-no {
    background-color: #ffffff;
    color: var(--btn-no-color);
    border: 2px solid var(--btn-no-border);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    position: absolute;
    top: 0;
    left: 0;
    width: 130px;
    margin: 0;
    transition: none; /* Instant teleport so user cannot catch it */
}

/* Extra hover state when it's not teleporting or to style it nicely */
.btn-no.teleporting {
    box-shadow: 0 8px 24px rgba(209, 58, 98, 0.2);
    z-index: 100;
}

/* ==========================================================================
   RESPONSIVENESS ADJUSTMENTS
   ========================================================================== */
@media (max-height: 620px) {
    .card {
        height: 95vh;
        padding: 16px 16px;
    }
    .main-title {
        font-size: 1.8rem;
    }
    .sub-title {
        font-size: 1.9rem;
    }
    .bears-img {
        max-height: 180px;
    }
    .question-text {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    .btn {
        padding: 10px 0;
        width: 110px;
        font-size: 1rem;
    }
    .no-btn-wrapper, .btn-no {
        width: 110px;
        height: 42px;
    }
}

@media (max-width: 360px) {
    .card {
        border-radius: 20px;
        padding: 16px 12px;
    }
    .main-title {
        font-size: 1.6rem;
    }
    .sub-title {
        font-size: 1.7rem;
    }
    .bears-img {
        max-height: 160px;
    }
    .btn {
        width: 100px;
        font-size: 0.95rem;
    }
    .no-btn-wrapper, .btn-no {
        width: 100px;
        height: 40px;
    }
}

/* ==========================================================================
   BOTTOM NAVIGATION BAR STYLE
   ========================================================================== */
.navigation-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 420px;
    margin-top: 4px;
    margin-bottom: 4px;
    z-index: 10;
}

.nav-btn {
    font-family: var(--font-rounded);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 20px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.4);
    outline: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-accent);
    box-shadow: 0 4px 12px rgba(224, 76, 120, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 6px 15px rgba(224, 76, 120, 0.15);
}

.nav-btn:active {
    transform: translateY(1px);
}

.nav-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

