* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --vh: 1vh;
    --font-primary: 'Poppins', sans-serif;
    --font-cursive: 'Dancing Script', cursive;
    --font-handwriting: 'Pacifico', cursive;
    --text-color-primary: #333;
    --text-color-secondary: #555;
    --text-color-accent: #ff2e63;
}

body {
    background: linear-gradient(135deg, #ffafcc, #ffc8dd, #cdb4db, #bde0fe, #a2d2ff, #ffafcc);
    background-size: 400% 400%;
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: auto !important;
    overflow-x: hidden;
    width: 100%;
    animation: gradientShift 15s ease infinite;
    touch-action: manipulation;
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }
}

/* Hearts floating in background */
.hearts-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.heart {
    position: absolute;
    background-color: #ff6b8b;
    border-radius: 50%;
    animation: float 15s infinite linear;
    opacity: 0.7;
    will-change: transform;
}

.heart:before, .heart:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: inherit;
    border-radius: 50%;
}

.heart:before {
    top: -50%;
    left: 0;
}

.heart:after {
    top: 0;
    left: -50%;
}

.heart-1 { width: 40px; height: 40px; top: 10%; left: 10%; animation-delay: 0s; background-color: #ff6b8b; }
.heart-2 { width: 60px; height: 60px; top: 20%; right: 15%; animation-delay: 2s; background-color: #ffafcc; }
.heart-3 { width: 30px; height: 30px; bottom: 30%; left: 15%; animation-delay: 4s; background-color: #cdb4db; }
.heart-4 { width: 50px; height: 50px; bottom: 15%; right: 20%; animation-delay: 6s; background-color: #a2d2ff; }
.heart-5 { width: 35px; height: 35px; top: 40%; left: 5%; animation-delay: 8s; background-color: #ffc8dd; }
.heart-6 { width: 45px; height: 45px; top: 60%; right: 10%; animation-delay: 10s; background-color: #ff9ebb; }
.heart-7 { width: 25px; height: 25px; top: 70%; left: 20%; animation-delay: 12s; background-color: #bde0fe; }
.heart-8 { width: 55px; height: 55px; top: 30%; left: 70%; animation-delay: 14s; background-color: #ff8fab; }

/* Main container */
.container, .success-container {
    max-width: 1000px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.5);
    padding: 50px;
    text-align: center;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.4);
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-height: 90vh;
    margin: 20px auto;
}

.container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    animation: sparkle 20s linear infinite;
}

.success-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255, 182, 193, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 192, 203, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.success-container {
    display: none;
}

.header {
    margin-bottom: 40px;
}

.title {
    font-family: var(--font-cursive);
    font-size: 3.5rem;
    margin-bottom: 10px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.1);
    background: linear-gradient(45deg, #ff2e63, #ff6b8b, #ff2e63);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% 200%;
    animation: gradientText 3s ease infinite;
}

.subtitle {
    font-family: var(--font-handwriting);
    font-size: 1.5rem;
    color: #ff8fab;
    margin-top: 10px;
}

.name-highlight {
    color: #ff2e63;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 5px;
}

/* Message Section */
.message-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 50px;
    gap: 40px;
}

.message-box {
    flex: 1;
    min-width: 300px;
    text-align: left;
    padding: 30px;
    background: linear-gradient(145deg, #fff5f7, #ffeef2);
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(255, 107, 139, 0.2), inset 0 0 20px rgba(255, 255, 255, 0.8);
    border-left: 8px solid #ff6b8b;
    position: relative;
    overflow: hidden;
}

.message-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, #ff2e63, #ff6b8b, #ffafcc, #ff6b8b, #ff2e63);
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
}

.message-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.header-heart {
    color: #ff4d7e;
    font-size: 1.8rem;
    animation: heartbeat 1.5s infinite;
}

.message-title {
    font-family: var(--font-cursive);
    font-size: 2.2rem;
    color: #ff2e63;
}

.message-text {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--text-color-primary);
    margin-bottom: 25px;
}

.message-text strong {
    color: #ff2e63;
    font-weight: 700;
}

.heart-animation {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.heart-animation i {
    font-size: 2.2rem;
    color: #ff4d7e;
    animation: heartbeat 1.5s infinite;
    text-shadow: 0 0 10px rgba(255, 77, 126, 0.5);
}

.heart-animation i:nth-child(1) { animation-delay: 0s; }
.heart-animation i:nth-child(2) { animation-delay: 0.3s; }
.heart-animation i:nth-child(3) { animation-delay: 0.6s; }
.heart-animation i:nth-child(4) { animation-delay: 0.9s; }
.heart-animation i:nth-child(5) { animation-delay: 1.2s; }

.sparkle-effect {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.sparkle-effect i {
    font-size: 1.5rem;
    color: #ffd700;
    animation: sparkleSpin 2s infinite;
}

/* Photo Column - UPDATED */
.photo-column {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 25px;
    margin-top: 20px;
}

.photo-frame {
    width: 100%;
    max-width: 280px;
    height: 320px;
    background: linear-gradient(135deg, #ffc8dd, #ffafcc, #ff9ebb);
    border-radius: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 20px 40px rgba(255, 107, 139, 0.4), inset 0 0 30px rgba(255, 255, 255, 0.6);
    border: 12px solid white;
    position: relative;
    overflow: hidden;
    animation: gentleGlow 3s ease-in-out infinite;
    will-change: transform, box-shadow;
}

.photo-frame::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, #ff6b8b, #ffafcc, #cdb4db, #bde0fe, #ff6b8b);
    background-size: 400% 400%;
    z-index: -1;
    animation: gradientShift 8s ease infinite;
    border-radius: 35px;
}

.photo-top { margin-top: 10px; }
.photo-bottom { margin-top: 5px; }

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Polaroid Effect - UPDATED for more image space */
.polaroid-effect {
    background: white;
    padding: 5px 5px 11px; /* Reduced padding for more image space */
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transform: rotate(3deg);
    width: 90%;
    height: 92%; /* Use more height for image */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Image Container - UPDATED */
.polaroid-image {
    width: 100%;
    height: 210px; /* Increased height for better image display */
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 5px; /* Reduced margin */
    overflow: hidden;
}

.polaroid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Use 'contain' if you want full image without cropping */
    object-position: center center;
    border-radius: 5px;
    transition: transform 0.5s ease;
}

.polaroid-image:hover img {
    transform: scale(1.05);
}

.photo-hearts {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.photo-hearts i {
    color: #ff4d7e;
    font-size: 1rem; /* Reduced size */
    animation: floatUp 3s infinite;
}

.photo-hearts i:nth-child(1) { animation-delay: 0s; }
.photo-hearts i:nth-child(2) { animation-delay: 1s; }
.photo-hearts i:nth-child(3) { animation-delay: 2s; }

/* Photo Text - UPDATED: Reduced size and thickness */
.photo-text {
    font-family: var(--font-handwriting);
    font-size: 1.1rem; /* Reduced from 1.4rem */
    color: #666; /* Slightly lighter */
    margin-top: 6px; /* Reduced spacing */
    text-align: center;
    font-weight: 400; /* Normal weight instead of bold */
    line-height: 1.2;
    padding: 0 8px;
    opacity: 0.9;
    transition: all 0.3s ease;
}

/* Hover effect for caption */
.polaroid-effect:hover .photo-text {
    opacity: 1;
    color: #ff2e63;
    transform: translateY(-2px);
}

.question-section {
    padding: 30px;
    background: linear-gradient(to right, #ffafcc, #ffc8dd, #ffafcc);
    background-size: 200% 100%;
    border-radius: 25px;
    margin-top: 30px;
    box-shadow: 0 15px 35px rgba(255, 107, 139, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.6);
    animation: gradientShift 5s ease infinite;
    position: relative;
    overflow: hidden;
}

.question-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><rect width="20" height="20" fill="none"/><path d="M10,5 Q12.5,2.5 15,5 Q12.5,7.5 10,10 Q7.5,7.5 5,5 Q7.5,2.5 10,5 Z" fill="rgba(255,255,255,0.1)"/></svg>');
    z-index: 0;
}

.question {
    font-family: var(--font-cursive);
    font-size: 3.5rem;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.question-subtitle {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 40px;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.buttons-wrapper {
    position: relative;
    min-height: 200px;
    margin: 50px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    z-index: 1;
}

.yes-button-container {
    position: relative;
    z-index: 2;
}

.no-button-container {
    position: relative;
    z-index: 3;
}

.btn {
    padding: 22px 60px;
    font-size: 1.8rem;
    font-weight: 700;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    min-width: 200px;
    touch-action: manipulation;
    min-height: 70px;
}

.btn:focus {
    outline: 3px solid #ff2e63;
    outline-offset: 3px;
    box-shadow: 0 0 0 5px rgba(255, 46, 99, 0.3);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transition: 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.yes-btn {
    background: linear-gradient(to right, #ff2e63, #ff6b8b, #ff2e63);
    background-size: 200% 100%;
    color: white;
    animation: gradientShift 3s ease infinite;
    border: 3px solid rgba(255, 255, 255, 0.7);
    position: relative;
    z-index: 1000;
}

.yes-btn:hover:not(.celebrating) {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 40px rgba(255, 46, 99, 0.5);
}

.no-btn {
    background: linear-gradient(to right, #a2d2ff, #bde0fe, #a2d2ff);
    background-size: 200% 100%;
    color: #333;
    border: 3px solid rgba(255, 255, 255, 0.7);
    animation: gradientShift 4s ease infinite;
    transition: transform 0.1s linear;
    position: relative;
    z-index: 1001;
}

.no-btn:hover:not(.running) {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(162, 210, 255, 0.4);
}

.no-btn.running {
    animation: gentlePulse 1.5s infinite, gradientShift 3s ease infinite !important;
    transition: transform 0.1s ease !important;
    box-shadow: 0 15px 35px rgba(162, 210, 255, 0.6) !important;
    position: absolute !important;
}

.instructions {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 15px;
    color: white;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.instructions i {
    margin-right: 10px;
    color: #ffeb3b;
}

.footer-note {
    margin-top: 35px;
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.footer-note i {
    margin: 0 15px;
    color: #ffeb3b;
    animation: spin 4s linear infinite;
}

/* Success Content */
.success-content {
    animation: fadeIn 1.2s ease;
    position: relative;
    z-index: 1;
}

.success-header {
    margin-bottom: 40px;
}

.success-title {
    font-family: var(--font-cursive);
    font-size: 3.8rem;
    margin-bottom: 25px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
    background: linear-gradient(45deg, #ff2e63, #ff6b8b, #ffafcc, #ff6b8b, #ff2e63);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 300% 300%;
    animation: gradientText 4s ease infinite;
}

.success-hearts {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 30px;
}

.success-hearts i {
    font-size: 3rem;
    color: #ff6b8b;
    animation: bounce 2s infinite;
    text-shadow: 0 0 15px rgba(255, 107, 139, 0.5);
}

.success-hearts i:nth-child(1) { animation-delay: 0s; }
.success-hearts i:nth-child(2) { animation-delay: 0.2s; }
.success-hearts i:nth-child(3) { animation-delay: 0.4s; }
.success-hearts i:nth-child(4) { animation-delay: 0.6s; }
.success-hearts i:nth-child(5) { animation-delay: 0.8s; }

.success-message {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 50px;
    margin-bottom: 50px;
}

.message-bubble {
    flex: 1;
    min-width: 350px;
    background: linear-gradient(to bottom right, #fff9fb, #fff5f7);
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(255, 107, 139, 0.25), inset 0 0 30px rgba(255, 255, 255, 0.9);
    border: 2px solid #ffc8dd;
    position: relative;
}

.message-bubble::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background-color: #fff9fb;
    border-top: 2px solid #ffc8dd;
    border-left: 2px solid #ffc8dd;
    transform: translateX(-50%) rotate(45deg);
}

.bubble-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.bubble-header i {
    color: #ff4d7e;
    font-size: 1.8rem;
}

.bubble-header h3 {
    font-family: var(--font-cursive);
    font-size: 2.2rem;
    color: #ff2e63;
}

.success-text {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-color-primary);
    text-align: left;
}

.seal {
    position: absolute;
    bottom: -15px;
    right: 20px;
    background: linear-gradient(to right, #ff6b8b, #ffafcc);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.success-animation {
    flex: 1;
    min-width: 350px;
    position: relative;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 25px;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 200, 221, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.floating-hearts {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.floating-heart {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #ff6b8b;
    transform: rotate(45deg);
    animation: floating-heart 10s infinite linear;
    opacity: 0.7;
}

.floating-heart:before, .floating-heart:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: inherit;
    border-radius: 50%;
}

.floating-heart:before {
    top: -10px;
    left: 0;
}

.floating-heart:after {
    top: 0;
    left: -10px;
}

@keyframes floating-heart {
    0% {
        transform: rotate(45deg) translateY(0) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: rotate(45deg) translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Valentine Photo Section */
.valentine-photo {
    margin: 30px 0;
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
}

.photo-glow-frame {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffc8dd, #ffafcc, #ff9ebb, #ffc8dd);
    padding: 8px;
    box-shadow: 0 0 40px rgba(255, 107, 139, 0.6),
                0 0 80px rgba(255, 107, 139, 0.3),
                inset 0 0 30px rgba(255, 255, 255, 0.8);
    animation: photoGlow 3s ease-in-out infinite;
    border: 3px solid white;
    display: inline-block;
}

.wendy-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: brightness(1.05) saturate(1.1);
    display: block;
}

.wendy-photo:hover {
    transform: scale(1.03);
    filter: brightness(1.1) saturate(1.2);
}

.photo-decoration {
    position: absolute;
    top: -15px;
    right: -15px;
    animation: floatDecoration 3s infinite ease-in-out;
    z-index: 3;
}

.photo-decoration i {
    display: block;
    font-size: 1.5rem;
    color: #ff4d7e;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(255, 77, 126, 0.5);
    animation: heartbeat 1.5s infinite;
}

.photo-decoration i:nth-child(1) { animation-delay: 0s; }
.photo-decoration i:nth-child(2) { animation-delay: 0.5s; }
.photo-decoration i:nth-child(3) { animation-delay: 1s; }

.photo-caption {
    font-family: var(--font-cursive);
    font-size: 2rem;
    color: #ff2e63;
    margin-top: 20px;
    text-align: center;
    background: linear-gradient(45deg, #ff2e63, #ff6b8b, #ff2e63);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% 200%;
    animation: gradientText 3s ease infinite;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    display: block;
    width: 100%;
}

.photo-glow-frame::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 50%;
    animation: rotateSparkle 4s linear infinite;
    z-index: -1;
}

.romantic-quote {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 20px;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #ffafcc;
    position: relative;
    z-index: 2;
    width: 100%;
}

.romantic-quote p {
    font-style: italic;
    color: #666;
    line-height: 1.6;
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 10px;
}

.quote-author {
    text-align: right;
    margin-top: 10px;
    font-weight: bold;
    color: #ff6b8b;
    display: block;
}

.celebration {
    background: linear-gradient(to right, rgba(255, 175, 204, 0.8), rgba(255, 200, 221, 0.8));
    padding: 25px;
    border-radius: 20px;
    margin: 40px 0;
    backdrop-filter: blur(10px);
}

.countdown {
    color: white;
}

.countdown h3 {
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.countdown h3 i {
    margin-right: 10px;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    min-width: 100px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.countdown-item span {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff2e63;
    display: block;
}

.countdown-item small {
    color: #666;
    font-size: 1rem;
}

.success-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.back-btn {
    background: linear-gradient(to right, #a2d2ff, #bde0fe);
    color: #333;
    border: 3px solid rgba(255, 255, 255, 0.7);
}

.back-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(162, 210, 255, 0.4);
}

/* Confetti container */
#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-25px) rotate(10deg);
    }
    50% {
        transform: translateY(-10px) rotate(0deg);
    }
    75% {
        transform: translateY(-25px) rotate(-10deg);
    }
}

@keyframes floatUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-30px);
        opacity: 0;
    }
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes gradientText {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes sparkleSpin {
    0%, 100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(180deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes gentleGlow {
    0%, 100% {
        box-shadow: 0 20px 40px rgba(255, 107, 139, 0.4), inset 0 0 30px rgba(255, 255, 255, 0.6);
    }
    50% {
        box-shadow: 0 20px 50px rgba(255, 107, 139, 0.6), inset 0 0 40px rgba(255, 255, 255, 0.8);
    }
}

@keyframes celebrateYes {
    0% {
        transform: scale(1);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    }
    25% {
        transform: scale(1.3) rotate(5deg);
        box-shadow: 0 25px 50px rgba(255, 46, 99, 0.6);
    }
    50% {
        transform: scale(1.2) rotate(-5deg);
        box-shadow: 0 20px 45px rgba(255, 46, 99, 0.7);
    }
    75% {
        transform: scale(1.3) rotate(5deg);
        box-shadow: 0 25px 50px rgba(255, 46, 99, 0.6);
    }
    100% {
        transform: scale(1.25);
        box-shadow: 0 22px 45px rgba(255, 46, 99, 0.5);
    }
}

.yes-btn.celebrating {
    animation: celebrateYes 2s ease-in-out;
    background: linear-gradient(to right, #4CAF50, #8BC34A, #4CAF50) !important;
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes photoGlow {
    0%, 100% {
        box-shadow: 0 0 40px rgba(255, 107, 139, 0.6),
                    0 0 80px rgba(255, 107, 139, 0.3),
                    inset 0 0 30px rgba(255, 255, 255, 0.8);
    }
    50% {
        box-shadow: 0 0 60px rgba(255, 107, 139, 0.8),
                    0 0 100px rgba(255, 107, 139, 0.4),
                    inset 0 0 40px rgba(255, 255, 255, 0.9);
    }
}

@keyframes floatDecoration {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

@keyframes rotateSparkle {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Custom scrollbar */
.container::-webkit-scrollbar,
.success-container::-webkit-scrollbar {
    width: 8px;
}

.container::-webkit-scrollbar-track,
.success-container::-webkit-scrollbar-track {
    background: rgba(255, 175, 204, 0.1);
    border-radius: 4px;
}

.container::-webkit-scrollbar-thumb,
.success-container::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #ff6b8b, #ffafcc);
    border-radius: 4px;
}

.container::-webkit-scrollbar-thumb:hover,
.success-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #ff2e63, #ff6b8b);
}

/* ========== MOBILE SCROLL FIXES ========== */
@media (max-width: 768px) {
    /* Reset body for mobile scrolling */
    body {
        overflow-y: auto !important;
        height: auto !important;
        position: relative !important;
        display: block !important;
        padding: 10px;
        animation: gradientShift 30s ease infinite; /* Slower animation */
    }
    
    /* Fix containers for mobile */
    .container, .success-container {
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
        position: relative !important;
        margin: 10px auto !important;
        padding: 25px 20px;
        width: 95%;
        max-width: 95%;
    }
    
    /* Fix hearts background on mobile */
    .hearts-background {
        position: absolute !important;
        height: auto;
        min-height: 100%;
    }
    
    /* Reduce animation complexity */
    .heart, .floating-heart {
        animation-duration: 20s !important;
        animation-timing-function: linear !important;
    }
    
    /* Reduce number of floating hearts on mobile */
    .hearts-background .heart:nth-child(n+5) {
        display: none;
    }
    
    /* Responsive typography */
    .title, .success-title {
        font-size: 2.8rem;
    }
    
    .message-section {
        flex-direction: column;
        gap: 30px;
    }
    
    .photo-column {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        gap: 20px;
    }
    
    /* Mobile photo adjustments */
    .photo-frame {
        max-width: 100%;
        height: 280px;
    }
    
    .polaroid-effect {
        width: 95%;
        height: 95%;
        padding: 8px 8px 18px;
    }
    
    .polaroid-image {
        height: 160px;
        margin-bottom: 8px;
    }
    
    /* Mobile text adjustments */
    .photo-text {
        font-size: 1rem;
        margin-top: 5px;
        font-weight: 400;
    }
    
    .photo-hearts i {
        font-size: 0.9rem;
    }
    
    .buttons-wrapper {
        flex-direction: column;
        min-height: 300px;
        gap: 20px;
        margin: 30px 0;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        padding: 20px 30px;
        font-size: 1.6rem;
        min-height: 60px;
    }
    
    .question {
        font-size: 2.8rem;
    }
    
    .success-message {
        gap: 30px;
    }
    
    .message-bubble, .success-animation {
        min-width: 100%;
    }
    
    .countdown-timer {
        gap: 15px;
    }
    
    .countdown-item {
        min-width: 70px;
        padding: 15px;
    }
    
    .countdown-item span {
        font-size: 2rem;
    }
    
    .photo-glow-frame {
        width: 180px;
        height: 180px;
    }
    
    .photo-caption {
        font-size: 1.7rem;
    }
    
    .photo-decoration i {
        font-size: 1.2rem;
    }
    
    /* Disable some heavy effects on low-power devices */
    @media (max-width: 480px) and (orientation: portrait) {
        body {
            animation: none !important;
            background: linear-gradient(135deg, #ffafcc, #cdb4db, #a2d2ff) !important;
        }
        
        .container::before, .success-container::before {
            display: none;
        }
        
        .heart {
            display: none;
        }
        
        .no-btn.running {
            animation: gentlePulse 2s infinite !important;
        }
    }
    
    /* Improve touch targets */
    .btn {
        min-height: 60px;
        padding: 18px 25px;
        margin: 8px 0;
    }
    
    /* Make sure content doesn't overflow */
    .message-section, .success-message {
        width: 100%;
        overflow-x: hidden;
    }
}

@media (max-width: 480px) {
    .container, .success-container {
        padding: 20px 15px;
    }
    
    .title, .success-title {
        font-size: 2.2rem;
    }
    
    .btn {
        font-size: 1.5rem;
        padding: 18px 20px;
    }
    
    .question {
        font-size: 2.2rem;
    }
    
    /* Small mobile photo adjustments */
    .photo-frame {
        height: 250px;
    }
    
    .polaroid-effect {
        padding: 6px 6px 15px;
    }
    
    .polaroid-image {
        height: 140px;
        margin-bottom: 6px;
    }
    
    .photo-text {
        font-size: 0.9rem;
        margin-top: 4px;
    }
    
    .photo-hearts i {
        font-size: 0.8rem;
    }
    
    .photo-glow-frame {
        width: 150px;
        height: 150px;
    }
    
    .photo-caption {
        font-size: 1.5rem;
    }
}

/* For touch devices - ensure scrolling works */
@media (hover: none) and (pointer: coarse) {
    html, body {
        -webkit-overflow-scrolling: touch !important;
        overflow-scrolling: touch !important;
    }
    
    .container, .success-container {
        -webkit-overflow-scrolling: touch !important;
        overflow-scrolling: touch !important;
    }
    
    /* Disable hover effects on touch devices */
    .btn:hover {
        transform: none !important;
    }
    
    .yes-btn:hover:not(.celebrating) {
        transform: none !important;
    }
    
    .no-btn:hover:not(.running) {
        transform: none !important;
    }
    
    .polaroid-effect:hover .photo-text {
        transform: none !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}