/* ===== CSS Variables ===== */
:root {
    --pink-50: #fdf2f8;
    --pink-100: #fce7f3;
    --pink-200: #fbcfe8;
    --pink-300: #f9a8d4;
    --pink-400: #f472b6;
    --pink-500: #ec4899;
    --pink-600: #db2777;
    --pink-700: #be185d;
    
    --purple-300: #d8b4fe;
    --purple-400: #c084fc;
    --purple-500: #a855f7;
    
    --rose-400: #fb7185;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    
    --font-display: 'Playfair Display', serif;
    --font-body: 'Quicksand', sans-serif;
    
    --shadow-soft: 0 8px 32px rgba(236, 72, 153, 0.3);
    --shadow-glow: 0 0 40px rgba(236, 72, 153, 0.4);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
    touch-action: manipulation;
}

body {
    font-family: var(--font-body);
    position: relative;
}

/* ===== Animated Background ===== */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        #fce4ec 0%,
        #f8bbd9 20%,
        #f48fb1 40%,
        #f06292 60%,
        #ec407a 80%,
        #e91e63 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -2;
}

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

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at top left, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(168, 85, 247, 0.2) 0%, transparent 50%);
    z-index: -1;
}

/* ===== Particles ===== */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    pointer-events: none;
    animation: floatParticle linear infinite;
    opacity: 0.8;
}

.particle.heart {
    font-size: 20px;
    filter: drop-shadow(0 0 8px rgba(236, 72, 153, 0.5));
}

.particle.sparkle {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8);
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
        transform: translateY(90vh) rotate(36deg) scale(1);
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-20vh) rotate(360deg) scale(0.5);
        opacity: 0;
    }
}

/* ===== Main Content ===== */
.main-content {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 10;
}

/* ===== Glassmorphism Card ===== */
.card {
    position: relative;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 50px 40px;
    max-width: 420px;
    width: 100%;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset,
        var(--shadow-glow);
    animation: cardFloat 4s ease-in-out infinite;
    overflow: hidden;
}

.card-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 60%
    );
    animation: shine 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shine {
    0%, 100% { transform: translateX(-100%) rotate(45deg); }
    50% { transform: translateX(100%) rotate(45deg); }
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ===== Decorative Hearts ===== */
.card-hearts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.deco-heart {
    position: absolute;
    font-size: 24px;
    animation: decoFloat 3s ease-in-out infinite;
}

.deco-heart-1 { top: 10%; left: 5%; animation-delay: 0s; }
.deco-heart-2 { top: 15%; right: 8%; animation-delay: 0.5s; }
.deco-heart-3 { bottom: 15%; left: 8%; animation-delay: 1s; }
.deco-heart-4 { bottom: 10%; right: 5%; animation-delay: 1.5s; }

@keyframes decoFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.7; }
    50% { transform: translateY(-10px) scale(1.1); opacity: 1; }
}

/* ===== Card Content ===== */
.card-content {
    position: relative;
    text-align: center;
    z-index: 2;
}

/* ===== Heart Icon ===== */
.heart-icon {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.heart-main {
    font-size: 60px;
    animation: heartPulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 4px 20px rgba(236, 72, 153, 0.5));
    z-index: 3;
}

@keyframes heartPulse {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.15); }
    30% { transform: scale(1); }
    45% { transform: scale(1.1); }
}

.heart-glow {
    position: absolute;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 0.8; }
}

.heart-rings {
    position: absolute;
    width: 100%;
    height: 100%;
}

.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: ringExpand 3s ease-out infinite;
}

.ring-1 { animation-delay: 0s; }
.ring-2 { animation-delay: 1s; }
.ring-3 { animation-delay: 2s; }

@keyframes ringExpand {
    0% { width: 40px; height: 40px; opacity: 0.8; }
    100% { width: 120px; height: 120px; opacity: 0; }
}

/* ===== Question Text ===== */
.question-text {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    line-height: 1.3;
    margin-bottom: 12px;
}

.question-text .highlight {
    display: inline-block;
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #fce4ec 50%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerText 3s ease-in-out infinite;
}

@keyframes shimmerText {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 35px;
    font-weight: 500;
}

/* ===== Cute Name Styling for Hira ===== */
.name-greeting {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 8px;
    font-weight: 500;
}

.wife-name {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 
        0 0 10px rgba(255, 105, 180, 0.8),
        0 0 20px rgba(255, 105, 180, 0.6),
        0 0 30px rgba(255, 105, 180, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.2);
    animation: nameGlow 2s ease-in-out infinite alternate;
}

@keyframes nameGlow {
    from { 
        text-shadow: 
            0 0 10px rgba(255, 105, 180, 0.8),
            0 0 20px rgba(255, 105, 180, 0.6),
            0 0 30px rgba(255, 105, 180, 0.4);
    }
    to { 
        text-shadow: 
            0 0 15px rgba(255, 105, 180, 1),
            0 0 30px rgba(255, 105, 180, 0.8),
            0 0 45px rgba(255, 105, 180, 0.6),
            0 0 60px rgba(168, 85, 247, 0.4);
    }
}

.wife-name-success {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--rose-600);
    font-size: 1.5rem;
    text-shadow: 0 2px 10px rgba(225, 29, 72, 0.3);
}

.wife-name-big {
    display: block;
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--rose-600);
    margin-bottom: 8px;
    text-shadow: 0 2px 15px rgba(225, 29, 72, 0.3);
    animation: namePulse 2s ease-in-out infinite;
}

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

/* ===== Buttons ===== */
.buttons-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    position: relative;
    min-height: 140px;
}

.btn {
    position: relative;
    padding: 18px 48px;
    border: none;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

/* Yes Button */
.btn-yes {
    background: linear-gradient(135deg, var(--rose-500) 0%, var(--pink-600) 50%, var(--purple-500) 100%);
    background-size: 200% 200%;
    color: white;
    box-shadow: 
        0 8px 30px rgba(244, 63, 94, 0.4),
        0 0 0 2px rgba(255, 255, 255, 0.2) inset;
    animation: yesGradient 3s ease infinite, yesGlow 2s ease-in-out infinite alternate;
    min-width: 240px;
}

@keyframes yesGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes yesGlow {
    from { box-shadow: 0 8px 30px rgba(244, 63, 94, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.2) inset; }
    to { box-shadow: 0 8px 40px rgba(244, 63, 94, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.3) inset, 0 0 20px rgba(168, 85, 247, 0.3); }
}

.btn-yes:active {
    transform: scale(0.95);
}

.btn-sparkle {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: sparkleMove 2s infinite;
}

@keyframes sparkleMove {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* No Button */
.btn-no {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    transition: all 0.15s ease;
}

.btn-no.escaping {
    position: fixed;
    z-index: 1000;
}

.btn-no.shrinking {
    animation: noShrink 0.3s ease forwards;
}

@keyframes noShrink {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(var(--shrink-scale, 0.8)); }
}

.hint {
    margin-top: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

/* ===== Touch Indicator ===== */
.touch-indicator {
    position: fixed;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.3) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: 999;
    transition: opacity 0.2s;
}

.touch-indicator.active {
    opacity: 1;
}

/* ===== Success Screen ===== */
.success-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.success-screen.active {
    display: flex;
}

.success-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 50%, #f48fb1 100%);
    animation: successBgPulse 4s ease-in-out infinite;
}

@keyframes successBgPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

.success-content {
    position: relative;
    text-align: center;
    z-index: 2;
    animation: successBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes successBounce {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.success-emoji {
    font-size: 80px;
    animation: emojiWiggle 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes emojiWiggle {
    0%, 100% { transform: rotate(-5deg) scale(1); }
    25% { transform: rotate(5deg) scale(1.1); }
    50% { transform: rotate(-5deg) scale(1); }
    75% { transform: rotate(5deg) scale(1.05); }
}

.success-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--pink-600);
    text-shadow: 0 4px 20px rgba(236, 72, 153, 0.3);
    margin-bottom: 10px;
}

.success-subtitle {
    font-size: 1.4rem;
    color: var(--pink-500);
    margin-bottom: 30px;
    font-weight: 500;
}

.success-message-box {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px 35px;
    margin-bottom: 25px;
    box-shadow: 0 8px 30px rgba(236, 72, 153, 0.2);
}

.success-message {
    font-size: 1.2rem;
    color: var(--pink-700);
    line-height: 1.6;
}

.highlight-text {
    font-weight: 700;
    color: var(--rose-600);
    font-size: 1.4rem;
}

.love-meter {
    position: relative;
    width: 250px;
    height: 30px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 15px;
    margin: 0 auto 25px;
    overflow: hidden;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.love-meter-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--pink-400), var(--rose-500), var(--purple-500));
    border-radius: 15px;
    animation: meterFill 2s ease-out forwards 0.5s;
}

@keyframes meterFill {
    0% { width: 0; }
    100% { width: 100%; }
}

.love-meter-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.final-message {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--pink-600);
    animation: finalPulse 2s ease-in-out infinite;
}

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

.success-hearts-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-hearts-success {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ===== Confetti ===== */
.confetti {
    position: fixed;
    pointer-events: none;
    animation: confettiFall linear forwards;
    z-index: 1000;
}

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

/* ===== Responsive Design ===== */
@media (max-width: 480px) {
    .card {
        padding: 40px 25px;
        border-radius: 28px;
        margin: 10px;
    }
    
    .question-text {
        font-size: 1.8rem;
    }
    
    .question-text .highlight {
        font-size: 2.3rem;
    }
    
    .heart-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 25px;
    }
    
    .heart-main {
        font-size: 50px;
    }
    
    .btn {
        padding: 16px 40px;
        font-size: 1.05rem;
    }
    
    .btn-yes {
        min-width: 200px;
    }
    
    .success-title {
        font-size: 2.8rem;
    }
    
    .success-emoji {
        font-size: 60px;
    }
    
    .success-message-box {
        padding: 20px 25px;
    }
    
    .success-message {
        font-size: 1.1rem;
    }
    
    .final-message {
        font-size: 1.3rem;
    }
}

@media (max-width: 360px) {
    .question-text {
        font-size: 1.6rem;
    }
    
    .question-text .highlight {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
}

/* ===== Growing Yes Button Effect ===== */
.btn-yes.growing {
    animation: yesGrow 0.3s ease forwards, yesGradient 3s ease infinite;
}

@keyframes yesGrow {
    0% { transform: scale(1); }
    100% { transform: scale(var(--grow-scale, 1.1)); }
}

/* ===== Password Gate ===== */
.password-gate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.password-gate.hidden {
    display: none;
}

.password-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 45px 35px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        var(--shadow-glow);
    animation: cardFloat 4s ease-in-out infinite;
}

.password-icon {
    font-size: 50px;
    margin-bottom: 20px;
    animation: lockBounce 2s ease-in-out infinite;
}

@keyframes lockBounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

.password-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
}

.password-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 25px;
}

.password-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.password-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.15);
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: white;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}

.password-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.password-input:focus {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.3);
}

.password-btn {
    padding: 16px 30px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--rose-500) 0%, var(--pink-600) 50%, var(--purple-500) 100%);
    background-size: 200% 200%;
    color: white;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(244, 63, 94, 0.4);
    transition: all 0.3s ease;
    animation: yesGradient 3s ease infinite;
}

.password-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(244, 63, 94, 0.5);
}

.password-btn:active {
    transform: scale(0.95);
}

.password-hint {
    margin-top: 15px;
    font-size: 0.95rem;
    color: #ffcdd2;
    min-height: 24px;
    font-weight: 500;
}

.main-content.hidden {
    display: none;
}

.main-content.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
