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

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #ffeef8 0%, #fff0f5 25%, #ffe4ec 50%, #ffd6e7 75%, #ffcce0 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    font-family: 'Georgia', 'Times New Roman', serif;
    overflow-x: hidden;
}

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

/* ===== Floating Hearts Background ===== */
.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.floating-heart {
    position: absolute;
    font-size: 20px;
    animation: floatUp 8s ease-in-out infinite;
    opacity: 0.6;
}

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

.floating-heart.float-left {
    animation: floatUpLeft 9s ease-in-out infinite;
}

.floating-heart.float-right {
    animation: floatUpRight 7s ease-in-out infinite;
}

@keyframes floatUpLeft {
    0% {
        transform: translate(100vw, 100vh) rotate(0deg);
        opacity: 0;
    }
    15% { opacity: 0.7; }
    85% { opacity: 0.7; }
    100% {
        transform: translate(-50px, -100px) rotate(-360deg);
        opacity: 0;
    }
}

@keyframes floatUpRight {
    0% {
        transform: translate(-50px, 100vh) rotate(0deg);
        opacity: 0;
    }
    15% { opacity: 0.5; }
    85% { opacity: 0.5; }
    100% {
        transform: translate(100vw, -100px) rotate(360deg);
        opacity: 0;
    }
}

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

.card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    animation: cardEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, cardFloat 3s ease-in-out 0.8s infinite, cardShimmer 4s ease-in-out 1s infinite;
    border-radius: 30px;
    padding: 50px 60px;
    text-align: center;
    box-shadow: 
        0 20px 60px rgba(255, 105, 180, 0.3),
        0 0 100px rgba(255, 182, 193, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    max-width: 500px;
    position: relative;
    overflow: visible;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: cardSweep 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes cardSweep {
    0% { left: -50%; }
    100% { left: 150%; }
}

@keyframes cardShimmer {
    0%, 100% { box-shadow: 0 20px 60px rgba(255, 105, 180, 0.3), 0 0 100px rgba(255, 182, 193, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.8); }
    50% { box-shadow: 0 25px 70px rgba(255, 105, 180, 0.4), 0 0 120px rgba(255, 182, 193, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.8); }
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

.hearts-decoration {
    font-size: 30px;
    margin: 10px 0;
    animation: heartBeat 1.5s ease-in-out infinite;
}

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

.title {
    font-size: 2.2rem;
    color: #d63384;
    margin: 20px 0 30px;
    text-shadow: 2px 2px 4px rgba(255, 105, 180, 0.3);
    line-height: 1.4;
    animation: titleGlow 2.5s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { text-shadow: 2px 2px 4px rgba(255, 105, 180, 0.3); }
    50% { text-shadow: 2px 2px 8px rgba(255, 105, 180, 0.5), 0 0 20px rgba(255, 182, 193, 0.3); }
}

/* ===== Buttons ===== */
.buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
    font-weight: bold;
}

/* Yes Button - Pulsing Glow */
.btn-yes {
    background: linear-gradient(135deg, #ff6b95 0%, #ff8fab 50%, #ff6b95 100%);
    background-size: 200% 200%;
    color: white;
    box-shadow: 
        0 5px 20px rgba(255, 107, 149, 0.5),
        0 0 40px rgba(255, 107, 149, 0.3);
    animation: 
        yesGlow 2s ease-in-out infinite,
        yesPulse 1s ease-in-out infinite,
        gradientMove 3s ease infinite;
}

@keyframes yesGlow {
    0%, 100% {
        box-shadow: 
            0 5px 20px rgba(255, 107, 149, 0.5),
            0 0 40px rgba(255, 107, 149, 0.3);
    }
    50% {
        box-shadow: 
            0 5px 30px rgba(255, 107, 149, 0.8),
            0 0 60px rgba(255, 107, 149, 0.5),
            0 0 80px rgba(255, 107, 149, 0.3);
    }
}

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

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

.btn-yes:hover {
    transform: scale(1.1);
    box-shadow: 
        0 10px 40px rgba(255, 107, 149, 0.7),
        0 0 80px rgba(255, 107, 149, 0.4);
}

/* No Button - Escaping */
.btn-no {
    background: #f0f0f0;
    color: #999;
    position: relative;
    transition: all 0.2s ease;
}

.btn-no:hover {
    background: #e0e0e0;
}

.btn-no.escaping {
    position: fixed;
    z-index: 1000;
    animation: noButtonWiggle 0.5s ease-in-out infinite;
}

@keyframes noButtonWiggle {
    0%, 100% { transform: translate(0, 0) rotate(-2deg); }
    25% { transform: translate(4px, -3px) rotate(2deg); }
    50% { transform: translate(-3px, 3px) rotate(-2deg); }
    75% { transform: translate(-4px, -2px) rotate(2deg); }
}

.no-hint {
    font-size: 0.9rem;
    color: #c77;
    margin-top: 24px;
    font-style: italic;
    opacity: 0;
    animation: hintFadeIn 1s ease-out 2s forwards;
}

@keyframes hintFadeIn {
    to { opacity: 0.85; }
}

/* ===== Gallery Container ===== */
.gallery-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #fff5f8 0%, #ffe8f0 50%, #ffd9e8 100%);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 40px 20px;
}

.gallery-container.active {
    opacity: 1;
    visibility: visible;
}

.gallery-content {
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.gallery-title {
    font-size: 2.5rem;
    color: #d63384;
    margin-bottom: 40px;
    animation: titleBounce 0.6s ease-out;
}

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

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    top: -20px;
    animation: confettiFall 4s linear forwards;
}

.confetti-piece:nth-child(odd) {
    width: 6px;
    height: 6px;
}

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

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Photo Gallery - Two Rows, Auto-Scroll ===== */
.photo-gallery {
    padding: 20px 0 30px;
    margin: 0 -20px;
}

.photo-row {
    overflow: hidden;
    padding: 12px 0;
}

.photo-row-inner {
    display: flex;
    gap: 25px;
    width: max-content;
}

.photo-row--left .photo-row-inner {
    animation: scrollLeft 45s linear infinite;
}

.photo-row--right .photo-row-inner {
    animation: scrollRight 45s linear infinite;
}

@keyframes scrollLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes scrollRight {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

.photo-card {
    flex: 0 0 280px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.2);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateX(50px);
}

.gallery-container.active .photo-row-inner .photo-card {
    animation: cardSlideIn 0.6s ease-out forwards;
    animation-delay: var(--delay, 0.2s);
}

@keyframes cardSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.photo-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 50px rgba(255, 105, 180, 0.3);
}

.photo-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.photo-placeholder {
    width: 280px;
    height: 300px;
    background: linear-gradient(135deg, #ffe4ec 0%, #ffd6e7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d63384;
    font-size: 1.2rem;
    position: relative;
}

.photo-placeholder::before {
    content: '💕';
    position: absolute;
    font-size: 3rem;
    opacity: 0.3;
}

.photo-placeholder span {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
}

/* ===== Celebration Hearts ===== */
.celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 200;
}

.celebration-heart {
    position: absolute;
    font-size: 30px;
    animation: celebrationFall 3s ease-out forwards;
}

@keyframes celebrationFall {
    0% {
        opacity: 1;
        transform: translateY(-50px) rotate(0deg) scale(0);
    }
    20% {
        transform: translateY(0) rotate(45deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(360deg) scale(0.5);
    }
}

/* ===== Sparkle Effect ===== */
.sparkle {
    position: fixed;
    pointer-events: none;
    font-size: 15px;
    animation: sparkle 1s ease-out forwards;
    z-index: 50;
}

@keyframes sparkle {
    0% {
        opacity: 1;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0) rotate(360deg);
    }
}

/* ===== Music Button ===== */
.music-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
    font-size: 24px;
    cursor: pointer;
    z-index: 300;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.music-btn.visible {
    opacity: 1;
    visibility: visible;
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.4);
}

.music-btn.muted {
    opacity: 0.6;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .card {
        padding: 30px 25px;
    }
    
    .title {
        font-size: 1.6rem;
    }
    
    .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .gallery-title {
        font-size: 1.8rem;
    }
    
    .photo-gallery {
        margin: 0 -10px;
    }
    
    .no-hint {
        font-size: 0.8rem;
        margin-top: 18px;
    }
}
