/* ===== Variables ===== */
:root {
    --red: #c41e3a;
    --gold: #d4af37;
    --dark: #0a0a0f;
    --white: #ffffff;
    --gray: rgba(255, 255, 255, 0.6);
    --font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--dark);
    color: var(--white);
    overflow-x: hidden;
    line-height: 1.6;
}

body.locked {
    overflow: hidden;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Snowfall ===== */
#snowCanvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 24px;
}

.hero-content {
    max-width: 600px;
    width: 100%;
}

/* ===== Gift Box - Bigger & Centered ===== */
.gift-wrapper {
    position: relative;
    width: 280px;
    margin: 0 auto 48px;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gift-box {
    position: relative;
    filter: drop-shadow(0 0 30px rgba(196, 30, 58, 0.3));
}

.gift-body {
    width: 280px;
    height: 200px;
    background: linear-gradient(145deg, #d42a4c, var(--red));
    border-radius: 12px 12px 16px 16px;
    position: relative;
    overflow: hidden;
}

.body-ribbon {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 45px;
    height: 100%;
    background: linear-gradient(90deg, #b8962e, var(--gold), #b8962e);
    transition: opacity 0.4s ease;
}

.gift-lid {
    width: 300px;
    height: 50px;
    background: linear-gradient(145deg, #e63950, #d42a4c);
    border-radius: 10px;
    position: absolute;
    top: 0;
    left: -10px;
    z-index: 5;
    transition: transform 0.4s ease, opacity 0.4s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.lid-ribbon {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 50px;
    height: 100%;
    background: linear-gradient(90deg, #b8962e, var(--gold), #b8962e);
    border-radius: 6px 6px 0 0;
    transition: opacity 0.4s ease;
}

/* ===== Draggable Bow - Bigger ===== */
.ribbon-pull {
    position: absolute;
    top: -70px;
    left: 50%;
    transform: translateX(-50%);
    cursor: grab;
    z-index: 10;
    touch-action: none;
    transition: transform 0.15s ease;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.4));
}

.ribbon-pull:active {
    cursor: grabbing;
}

.ribbon-pull.dragging {
    transition: none;
}

.bow {
    position: relative;
    width: 120px;
    height: 80px;
    transition: transform 0.2s ease;
}

.bow-loop {
    position: absolute;
    width: 48px;
    height: 55px;
    background: linear-gradient(135deg, var(--gold), #c9a227);
    border-radius: 50%;
    top: 5px;
    box-shadow: inset -3px -3px 8px rgba(0,0,0,0.2);
}

.bow-loop.left {
    left: 10px;
    transform: rotate(-20deg);
}

.bow-loop.right {
    right: 10px;
    transform: rotate(20deg);
}

.bow-knot {
    position: absolute;
    width: 36px;
    height: 36px;
    background: linear-gradient(145deg, #c9a227, #a07f1f);
    border-radius: 50%;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: inset -2px -2px 6px rgba(0,0,0,0.3);
}

.bow-tail {
    position: absolute;
    width: 22px;
    height: 50px;
    background: linear-gradient(180deg, var(--gold), #b8962e);
    border-radius: 6px;
    top: 50px;
}

.bow-tail.left {
    left: 32px;
    transform: rotate(15deg);
}

.bow-tail.right {
    right: 32px;
    transform: rotate(-15deg);
}

/* ===== Steps Indicator ===== */
.steps-indicator {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.step-dot.active {
    background: var(--gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.step-dot.complete {
    background: var(--gold);
}

.pull-hint {
    margin-top: 20px;
    font-size: 1rem;
    color: var(--gold);
    animation: pulseHint 1.5s ease-in-out infinite;
    transition: opacity 0.3s ease;
}

@keyframes pulseHint {
    0%, 100% { opacity: 0.6; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(5px); }
}

/* ===== Step States ===== */
/* Step 1: Untie the bow */
.gift-wrapper[data-step="1"] .bow {
    animation: wobble 0.5s ease;
}

@keyframes wobble {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

/* Step 2: Remove the ribbon */
.gift-wrapper[data-step="2"] .body-ribbon,
.gift-wrapper[data-step="2"] .lid-ribbon {
    opacity: 0.5;
}

.gift-wrapper[data-step="3"] .body-ribbon,
.gift-wrapper[data-step="3"] .lid-ribbon {
    opacity: 0;
}

/* Step 3: Open the lid */
.gift-wrapper[data-step="3"] .gift-lid {
    transform: translateY(-10px);
}

/* Unwrapped states */
.gift-wrapper.unwrapping .ribbon-pull {
    animation: bowFlyOff 0.6s ease forwards;
}

@keyframes bowFlyOff {
    0% { transform: translateX(-50%) translateY(0) rotate(0); opacity: 1; }
    100% { transform: translateX(-50%) translateY(-150px) rotate(-30deg); opacity: 0; }
}

.gift-wrapper.unwrapping .gift-lid {
    animation: lidFlyOff 0.6s ease 0.2s forwards;
}

@keyframes lidFlyOff {
    0% { transform: translateY(0) rotate(0); opacity: 1; }
    100% { transform: translateY(-120px) rotate(-25deg); opacity: 0; }
}

.gift-wrapper.unwrapping .body-ribbon,
.gift-wrapper.unwrapping .lid-ribbon {
    animation: ribbonFade 0.3s ease forwards;
}

@keyframes ribbonFade {
    to { opacity: 0; }
}

.gift-wrapper.unwrapped {
    animation: shrinkAway 0.4s ease forwards;
}

@keyframes shrinkAway {
    to { 
        transform: scale(0.8);
        opacity: 0;
        height: 0;
        margin: 0;
    }
}

/* ===== Typography ===== */
.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.title-line {
    display: block;
    color: var(--white);
    font-weight: 300;
}

.title-highlight {
    display: block;
    color: var(--gold);
    font-weight: 600;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 40px;
    font-weight: 300;
}

/* ===== Buttons ===== */
.cta-button {
    padding: 16px 40px;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 500;
    color: var(--white);
    background: var(--red);
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cta-button:hover {
    background: #a01830;
    transform: translateY(-2px);
}

/* ===== Hidden State ===== */
.hidden {
    opacity: 0;
    transform: translateY(20px);
}

.hero-title.show,
.hero-subtitle.show,
.cta-button.show {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ===== Special Event Section ===== */
.special-event-section {
    padding: 100px 24px;
    text-align: center;
    background: linear-gradient(180deg, transparent, rgba(155, 89, 182, 0.05), transparent);
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(155, 89, 182, 0.2);
    color: #bb86fc;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 100px;
    margin-bottom: 20px;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--gray);
    font-size: 1rem;
    margin-bottom: 40px;
    font-weight: 300;
}

.special-event-card {
    max-width: 400px;
    margin: 0 auto;
    padding: 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.special-event-card:hover {
    border-color: rgba(155, 89, 182, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.special-event-card.selected {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.05);
}

.event-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 16px;
}

.special-event-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.event-tagline {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.event-date {
    color: var(--gold);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.event-note {
    color: #bb86fc;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== Venue Section ===== */
.venue-section {
    padding: 80px 24px 120px;
    text-align: center;
}

.venue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.venue-card {
    padding: 28px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.venue-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}

.venue-card.selected {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.08);
}

.venue-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--dark);
    font-weight: 600;
}

.venue-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}

.venue-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.venue-card p {
    color: var(--gray);
    font-size: 0.85rem;
    font-weight: 300;
}

/* ===== Selected Venues ===== */
.selected-venues {
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.selected-venues.show {
    opacity: 1;
    transform: translateY(0);
}

.selected-venues h3 {
    color: var(--gold);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.selected-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.selected-tag {
    padding: 8px 16px;
    background: rgba(196, 30, 58, 0.15);
    color: var(--white);
    font-size: 0.85rem;
    border-radius: 100px;
}

.selected-tag.special {
    background: rgba(155, 89, 182, 0.2);
    color: #bb86fc;
}

/* ===== Final Section ===== */
.final-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 24px;
    text-align: center;
}

.final-content {
    max-width: 500px;
}

.heart-emoji {
    font-size: 64px;
    margin-bottom: 24px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.final-title {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 16px;
}

.final-question {
    font-size: 1.3rem;
    color: var(--gold);
    margin-bottom: 8px;
    font-weight: 500;
}

.date-info {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 40px;
}

/* ===== Answer Buttons ===== */
.answer-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.answer-btn {
    padding: 16px 40px;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.yes-btn {
    background: var(--red);
    color: var(--white);
}

.yes-btn:hover {
    background: #a01830;
    transform: translateY(-2px);
}

.maybe-btn {
    background: transparent;
    color: var(--gray);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.maybe-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--white);
}

/* ===== Overlays ===== */
.success-overlay,
.thinking-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.success-overlay.show,
.thinking-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.success-content,
.thinking-content {
    text-align: center;
    padding: 40px;
}

.success-emoji,
.sad-emoji {
    font-size: 80px;
    margin-bottom: 24px;
}

.success-content h2,
.thinking-content h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.success-content h2 {
    color: var(--gold);
}

.success-content p,
.thinking-content p {
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

/* ===== Countdown ===== */
.countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.countdown-item {
    text-align: center;
}

.countdown-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--gold);
}

.countdown-label {
    font-size: 0.75rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== Back Button ===== */
.back-btn {
    padding: 14px 32px;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--white);
    background: rgba(155, 89, 182, 0.3);
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: rgba(155, 89, 182, 0.5);
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .gift-wrapper {
        width: 220px;
    }
    
    .gift-body {
        width: 220px;
        height: 160px;
    }
    
    .gift-lid {
        width: 240px;
    }
    
    .body-ribbon, .lid-ribbon {
        width: 35px;
    }
    
    .bow {
        width: 100px;
        height: 65px;
    }
    
    .bow-loop {
        width: 38px;
        height: 45px;
    }
    
    .bow-knot {
        width: 28px;
        height: 28px;
    }
    
    .venue-grid {
        grid-template-columns: 1fr;
    }
    
    .answer-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .answer-btn {
        width: 100%;
    }
    
    .countdown {
        gap: 12px;
    }
    
    .countdown-number {
        font-size: 2rem;
    }
}

/* ===== Confetti ===== */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    z-index: 300;
    animation: fall 3s ease-out forwards;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}
