/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Quicksand', sans-serif;
    background: #fff;
    color: #4a2040;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: none;
}

/* ===== CUSTOM CURSOR ===== */
#custom-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    font-size: 1.8rem;
    transform: translate(-50%, -50%);
    transition: left 0.06s ease, top 0.06s ease;
    filter: drop-shadow(0 2px 6px rgba(225, 29, 99, 0.4));
}

/* ===== CLICK BURST ===== */
.burst-emoji {
    position: fixed;
    font-size: 1.4rem;
    pointer-events: none;
    z-index: 9998;
    animation: burstOut 0.7s ease-out forwards;
}

@keyframes burstOut {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--dx), var(--dy)) scale(0.2);
        opacity: 0;
    }
}

/* ===== FLOATING EMOJIS ===== */
#floating-emojis {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

.float-emoji {
    position: absolute;
    bottom: -60px;
    font-size: 1.6rem;
    opacity: 0;
    animation: floatUp var(--dur) linear forwards;
    pointer-events: none;
    z-index: 3;
}

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

    10% {
        opacity: 0.85;
    }

    90% {
        opacity: 0.6;
    }

    100% {
        opacity: 0;
        transform: translateY(-110vh) rotate(360deg) scale(1.2);
    }
}

/* ===== DANGLING TEXTS ===== */
#dangle-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    overflow: hidden;
}

.dangle-text {
    position: absolute;
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(0.95rem, 2.5vw, 1.4rem);
    font-weight: 600;
    color: #e11d63;
    white-space: nowrap;
    pointer-events: none;
    text-shadow: 0 1px 8px rgba(225, 29, 99, 0.15);
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    border: 2px solid rgba(225, 29, 99, 0.15);
    backdrop-filter: blur(4px);
}

.dangle-from-top {
    top: -60px;
    animation: swingFromTop 5s ease-in-out forwards;
}

.dangle-from-bottom {
    bottom: -60px;
    animation: swingFromBottom 5s ease-in-out forwards;
}

@keyframes swingFromTop {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 0;
    }

    12% {
        transform: translateY(150px) rotate(10deg);
        opacity: 1;
    }

    24% {
        transform: translateY(87px) rotate(-7deg);
    }

    36% {
        transform: translateY(90px) rotate(5deg);
    }

    48% {
        transform: translateY(37px) rotate(-3deg);
    }

    65% {
        transform: translateY(140px) rotate(0deg);
        opacity: 1;
    }

    85% {
        opacity: 0.6;
    }

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

@keyframes swingFromBottom {
    0% {
        transform: translateY(100%) rotate(0deg);
        opacity: 0;
    }

    12% {
        transform: translateY(-180px) rotate(-10deg);
        opacity: 1;
    }

    24% {
        transform: translateY(-145px) rotate(7deg);
    }

    36% {
        transform: translateY(-70px) rotate(-5deg);
    }

    48% {
        transform: translateY(-97px) rotate(3deg);
    }

    65% {
        transform: translateY(-168px) rotate(0deg);
        opacity: 1;
    }

    85% {
        opacity: 0.6;
    }

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

/* ===== CONFETTI ===== */
#confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 22px;
    border-radius: 3px;
    animation: confettiFall var(--fall-dur) ease-in forwards;
}

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

    100% {
        transform: translateY(110vh) translateX(var(--drift)) rotate(720deg) scale(0.5);
        opacity: 0.3;
    }
}

.confetti-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.confetti-star {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 12px solid currentColor;
}

/* ===== STEPS (SECTIONS) ===== */
.step {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease;
    z-index: 2;
    text-align: center;
    background: #fff;
}

.step:not(.active) {
    pointer-events: none;
    display: none;
}

.step.active {
    opacity: 1;
    visibility: visible;
}

/* ===== TYPOGRAPHY ===== */
.mega-text {
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(2rem, 7vw, 4.5rem);
    font-weight: 700;
    color: #e11d63;
    line-height: 1.3;
    text-shadow: 0 2px 20px rgba(225, 29, 99, 0.15);
}

.welcome-heading {
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    color: #e11d63;
    animation: fadeScale 1s ease forwards;
}

.welcome-sub {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.3rem;
    color: #b04070;
    font-weight: 500;
    animation: fadeUp 1.2s ease forwards;
}

.gf-name {
    color: #f43f5e;
    text-decoration: underline;
    text-decoration-style: wavy;
    text-underline-offset: 6px;
}

.loading-label {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    color: #b04070;
    font-weight: 500;
    letter-spacing: 1px;
}

.choice-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: #e11d63;
}

/* ===== LOADING/PROGRESS BAR ===== */
.progress-wrap {
    width: min(80%, 360px);
    height: 18px;
    background: #fce7f3;
    border-radius: 50px;
    overflow: hidden;
    border: 2px solid #f9a8d4;
    box-shadow: 0 2px 12px rgba(244, 63, 94, 0.15);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f472b6, #ec4899, #e11d63);
    border-radius: 50px;
    transition: width 0.15s linear;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-pct {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ec4899;
}

/* ===== LOADING CAT IMAGE ===== */
.loading-cat-img {
    width: min(220px, 55vw);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(225, 29, 99, 0.18);
    animation: gentleBounce 2s ease-in-out infinite;
}

@keyframes gentleBounce {

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

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

/* ===== BUTTONS ===== */
.btn {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 14px 36px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #f472b6, #ec4899, #e11d63);
    color: #fff;
    cursor: none;
    box-shadow: 0 4px 20px rgba(225, 29, 99, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(225, 29, 99, 0.45);
}

.btn:hover::before {
    transform: translateX(100%);
}

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

.pulse-btn {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(225, 29, 99, 0.3);
    }

    50% {
        box-shadow: 0 4px 40px rgba(225, 29, 99, 0.6), 0 0 60px rgba(244, 114, 182, 0.3);
    }
}

.bounce-btn {
    animation: bounceBtn 1s ease infinite;
}

@keyframes bounceBtn {

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

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

.glow-btn {
    animation: glowPulse 1.5s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(225, 29, 99, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(225, 29, 99, 0.7), 0 0 80px rgba(244, 63, 94, 0.3);
    }
}

.choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.btn-choice {
    font-size: 1rem;
    padding: 16px 28px;
    background: linear-gradient(135deg, #fda4af, #f43f5e);
}

.btn-love {
    font-size: 0.95rem;
    padding: 14px 24px;
    background: linear-gradient(135deg, #f9a8d4, #ec4899);
}

/* ===== YES / NO BUTTONS ===== */
.yesno-wrap {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-yes {
    font-size: 1.2rem;
    padding: 16px 40px;
    background: linear-gradient(135deg, #34d399, #10b981);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    transition: all 0.4s ease;
}

.btn-yes:hover {
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.5);
}

.btn-no {
    font-size: 1.2rem;
    padding: 16px 40px;
    background: linear-gradient(135deg, #fca5a5, #ef4444);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
    transition: all 0.4s ease;
}

.btn-no:hover {
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.5);
}

/* ===== MEDIA IMAGES ===== */
.media-img {
    max-width: min(85%, 400px);
    max-height: 45vh;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    object-fit: contain;
}

.center-media {
    display: block;
    margin: 0 auto;
}

.rose-img {
    width: 80px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(225, 29, 99, 0.4));
    animation: gentleBounce 2s ease-in-out infinite;
}

/* ===== HEART POUNDING ===== */
.heart-scene {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pounding-heart {
    font-size: 6rem;
    animation: heartPound 0.8s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(225, 29, 99, 0.5));
}

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

    15% {
        transform: scale(1.35);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.2);
    }

    60% {
        transform: scale(1);
    }

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

.heart-msg {
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    color: #e11d63;
    font-weight: 600;
    line-height: 1.6;
    max-width: 500px;
    animation: fadeUp 1s ease 0.5s both;
}

/* ===== ERROR DIALOG ===== */
.error-box {
    background: #fff;
    border: 2px solid #fca5a5;
    border-radius: 16px;
    padding: 2rem 2.5rem;
    box-shadow: 0 16px 50px rgba(239, 68, 68, 0.15);
    max-width: 420px;
    width: 90%;
    animation: shakeIn 0.5s ease;
}

.error-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-icon {
    font-size: 1.5rem;
}

.error-msg {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    color: #7f1d1d;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.error-ok-btn {
    width: 100%;
    background: linear-gradient(135deg, #fca5a5, #ef4444);
}

@keyframes shakeIn {
    0% {
        transform: translateX(-30px);
        opacity: 0;
    }

    25% {
        transform: translateX(20px);
    }

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

    75% {
        transform: translateX(5px);
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== SCARE STEP ===== */
.scare-step {
    background: #000 !important;
    padding: 0 !important;
}

.scare-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: scareZoom 0.3s ease forwards;
}

@keyframes scareZoom {
    0% {
        transform: scale(3);
        opacity: 0;
    }

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

/* ===== POPUPS (bhuheheheheh) ===== */
#popup-zone {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

.popup-text {
    position: absolute;
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 700;
    color: #e11d63;
    animation: popBounce 1s ease forwards;
    text-shadow: 0 2px 10px rgba(225, 29, 99, 0.3);
    pointer-events: none;
    white-space: nowrap;
}

@keyframes popBounce {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-10deg);
    }

    50% {
        opacity: 1;
        transform: scale(1.3) rotate(5deg);
    }

    100% {
        opacity: 0.8;
        transform: scale(1) rotate(0deg);
    }
}

/* ===== DANCE IMAGE ===== */
.dance-img {
    max-width: min(70%, 300px);
    border-radius: 20px;
    animation: danceWiggle 0.5s ease infinite alternate;
}

@keyframes danceWiggle {
    0% {
        transform: rotate(-5deg) scale(1);
    }

    100% {
        transform: rotate(5deg) scale(1.05);
    }
}

/* ===== SLIDESHOW (REDESIGNED) ===== */
#slideshow-frame {
    position: relative;
    width: 90vw;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.slide-card {
    position: absolute;
    max-width: 70%;
    max-height: 65%;
    object-fit: contain;
    border: 6px solid white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(225, 29, 99, 0.25);
}

/* 4 different entrance animations */
.slide-enter-1 {
    animation: slideZoomSpin 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.slide-enter-2 {
    animation: slideDropBounce 0.7s ease forwards;
}

.slide-enter-3 {
    animation: slideSpiralIn 0.7s ease forwards;
}

.slide-enter-4 {
    animation: slideFlipIn 0.7s ease forwards;
}

.slide-exit {
    animation: slideExit 0.4s ease forwards;
}

@keyframes slideZoomSpin {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }

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

@keyframes slideDropBounce {
    0% {
        opacity: 0;
        transform: translateY(-120vh) rotate(15deg);
    }

    60% {
        opacity: 1;
        transform: translateY(20px) rotate(-5deg);
    }

    80% {
        transform: translateY(-10px) rotate(2deg);
    }

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

@keyframes slideSpiralIn {
    0% {
        opacity: 0;
        transform: translateX(-120vw) rotate(-90deg) scale(0.3);
    }

    100% {
        opacity: 1;
        transform: translateX(0) rotate(0deg) scale(1);
    }
}

@keyframes slideFlipIn {
    0% {
        opacity: 0;
        transform: perspective(800px) rotateY(90deg) scale(0.5);
    }

    100% {
        opacity: 1;
        transform: perspective(800px) rotateY(0deg) scale(1);
    }
}

@keyframes slideExit {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: scale(0.3) rotate(45deg) translateY(50vh);
    }
}

/* Mini photos that scatter to background */
.slide-mini {
    position: absolute;
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 3px solid white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0.7;
    transition: all 0.6s ease;
}

/* ===== FINALE ===== */
.finale-text {
    font-size: clamp(2rem, 6vw, 3.5rem);
}

.glow-text {
    animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
    0% {
        text-shadow: 0 0 10px rgba(225, 29, 99, 0.3);
    }

    100% {
        text-shadow: 0 0 30px rgba(225, 29, 99, 0.7), 0 0 60px rgba(244, 63, 94, 0.3);
    }
}

.finale-btns {
    margin-top: 0.5rem;
}

.closing-msg {
    font-size: clamp(1.8rem, 5vw, 3rem);
    animation: fadeScale 1.5s ease forwards, textGlow 2s ease-in-out infinite alternate;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeScale {
    0% {
        opacity: 0;
        transform: scale(0.7);
    }

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

@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

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

.wobble-in {
    animation: wobbleIn 1s ease forwards;
}

@keyframes wobbleIn {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-15deg);
    }

    50% {
        transform: scale(1.1) rotate(3deg);
    }

    70% {
        transform: scale(0.95) rotate(-1deg);
    }

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

.pop-in {
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

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

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

.fade-up {
    animation: fadeUp 1s ease forwards;
}

.transition-spin {
    animation: transitionSpin 2s ease forwards;
}

@keyframes transitionSpin {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }

    60% {
        opacity: 1;
        transform: scale(1.1) rotate(10deg);
    }

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

.sparkle {
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.2) drop-shadow(0 0 15px rgba(244, 63, 94, 0.4));
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #fce7f3;
}

::-webkit-scrollbar-thumb {
    background: #f9a8d4;
    border-radius: 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .step {
        padding: 1.2rem;
        gap: 1rem;
    }

    .btn {
        padding: 12px 28px;
        font-size: 1rem;
    }

    .pounding-heart {
        font-size: 4rem;
    }

    .error-box {
        padding: 1.5rem;
    }

    .choice-group {
        flex-direction: column;
        align-items: center;
    }

    .slide-card {
        max-width: 85%;
        max-height: 55%;
    }

    .slide-mini {
        width: 50px;
        height: 50px;
    }
}