/* ============================================
   Valentine's Day Page for Megan
   A playful, fun, and cute design
   ============================================ */

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

body {
    font-family: 'Quicksand', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #ffb6c1 0%, #ff91a4 30%, #ff69b4 60%, #ff85a2 100%);
    overflow-x: hidden;
}

/* ============================================
   Floating Hearts Background
   ============================================ */

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

.floating-heart {
    position: absolute;
    font-size: 20px;
    animation: floatUp linear 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;
    }
}

/* ============================================
   Question State
   ============================================ */

.question-state {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.question-state.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.question-content {
    text-align: center;
    padding: 40px;
    background: rgba(255, 220, 230, 0.95);
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(255, 100, 150, 0.4);
    max-width: 90%;
    animation: gentleBounce 3s ease-in-out infinite;
    border: 3px solid rgba(255, 105, 180, 0.3);
}

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

.main-question {
    font-size: clamp(2rem, 6vw, 3.5rem);
    color: #e75480;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(231, 84, 128, 0.2);
}

.sub-text {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: #d4768a;
    margin-bottom: 40px;
}

/* ============================================
   Buttons
   ============================================ */

.buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    position: relative;
    min-height: 80px;
}

.btn {
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.yes-btn {
    padding: 20px 60px;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.4);
}

.yes-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(255, 107, 157, 0.5);
    background: linear-gradient(135deg, #ff5588 0%, #ff7799 100%);
}

.no-btn {
    padding: 12px 35px;
    font-size: 1rem;
    background: #ffccdd;
    color: #cc6688;
    box-shadow: 0 5px 15px rgba(255, 100, 150, 0.3);
    transition: all 0.15s ease;
}

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

.no-btn.running {
    position: fixed;
    z-index: 100;
}

.no-btn.hopping {
    animation: hop 0.3s ease;
}

@keyframes hop {
    0% { transform: translateY(0) rotate(0deg); }
    30% { transform: translateY(-30px) rotate(-10deg); }
    50% { transform: translateY(-40px) rotate(5deg) scale(1.1); }
    70% { transform: translateY(-20px) rotate(-5deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

.no-btn.shrinking {
    animation: shrinkAway 0.5s ease forwards;
}

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

.nice-try {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: #e75480;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nice-try.show {
    opacity: 1;
    animation: wiggle 0.5s ease;
}

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

/* ============================================
   Slideshow (inline with content)
   ============================================ */

.slideshow-container {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.slideshow-container.active {
    display: flex;
}

.slideshow-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.slideshow-image {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 20px 80px rgba(150, 50, 80, 0.5);
    border: 4px solid rgba(255, 255, 255, 0.8);
    animation: slideIn 0.6s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateX(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}

.slideshow-progress {
    width: 100%;
    max-width: 500px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    margin-top: 30px;
    overflow: hidden;
}

.slideshow-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #fff, #ffd0e0);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.skip-slideshow {
    font-family: 'Quicksand', sans-serif;
    margin-top: 20px;
    padding: 12px 25px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.skip-slideshow:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

/* ============================================
   Celebration State
   ============================================ */

.celebration-state {
    min-height: 100vh;
    padding: 40px 20px;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease, transform 1s ease;
    pointer-events: none;
    position: relative;
    z-index: 5;
}

.celebration-state.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.celebration-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Heart Explosion */
.heart-explosion {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 100;
}

.explosion-heart {
    position: absolute;
    font-size: 30px;
    animation: explode 1.5s ease-out forwards;
}

@keyframes explode {
    0% {
        transform: translate(0, 0) scale(0);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(1) rotate(var(--rot));
        opacity: 0;
    }
}

/* Message Section */
.message-section {
    text-align: center;
    padding: 60px 20px;
    animation: fadeInUp 1s ease 0.5s both;
}

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

.yay-text {
    font-size: clamp(3rem, 10vw, 5rem);
    color: white;
    margin-bottom: 20px;
    animation: celebrateBounce 0.6s ease;
    text-shadow: 3px 3px 6px rgba(200, 50, 100, 0.5);
}

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

.no-attempts-message {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    font-style: italic;
}

.love-message {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    color: white;
    font-weight: 600;
    margin-bottom: 30px;
    line-height: 1.4;
    text-shadow: 2px 2px 4px rgba(200, 50, 100, 0.5);
    min-height: 1.5em;
}

.love-message .typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: white;
    margin-left: 5px;
    animation: blink 0.7s infinite;
    vertical-align: middle;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.heart-divider {
    font-size: 1.5rem;
    letter-spacing: 10px;
    animation: pulse 2s ease infinite;
}

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

/* ============================================
   Photo Gallery - Scattered Photos Style
   ============================================ */

.gallery-section {
    padding: 40px 0;
    animation: fadeInUp 1s ease 1s both;
}

.gallery-title {
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: white;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(200, 50, 100, 0.5);
}

.photo-gallery {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Photo Style */
.photo-item {
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(150, 50, 80, 0.4);
    transform: rotate(var(--rotation));
    transition: all 0.4s ease;
    cursor: pointer;
    overflow: hidden;
    animation: floatIn 0.8s ease backwards;
    animation-delay: var(--delay);
    border: 4px solid rgba(255, 255, 255, 0.8);
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: scale(0) rotate(var(--rotation)) translateY(100px);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(var(--rotation)) translateY(0);
    }
}

.photo-item:hover {
    transform: rotate(0deg) scale(1.1);
    box-shadow: 0 20px 60px rgba(255, 100, 150, 0.5);
    z-index: 10;
    border-color: white;
}

.photo-item img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    display: block;
}

/* ============================================
   Music Control
   ============================================ */

.music-control {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 50;
    animation: fadeInUp 1s ease 1.5s both;
}

.music-btn {
    font-family: 'Quicksand', sans-serif;
    padding: 15px 25px;
    font-size: 1rem;
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.music-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 107, 157, 0.5);
}

.music-btn.paused {
    background: linear-gradient(135deg, #ccc 0%, #aaa 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Lightbox
   ============================================ */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.2);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    transform: scale(1.2) rotate(90deg);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .question-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .buttons-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .yes-btn {
        padding: 18px 50px;
    }
    
    .photo-item img {
        width: 220px;
        height: 220px;
    }
    
    .music-control {
        bottom: 20px;
        right: 20px;
    }
    
    .music-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .main-question {
        font-size: 1.8rem;
    }
    
    .photo-item img {
        width: 160px;
        height: 160px;
    }
}

/* ============================================
   Sparkle Effect (bonus!)
   ============================================ */

.sparkle {
    position: fixed;
    pointer-events: none;
    font-size: 20px;
    animation: sparkle 1s ease forwards;
    z-index: 1000;
}

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

/* ============================================
   Confetti
   ============================================ */

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 200;
    overflow: hidden;
}

.confetti {
    position: absolute;
    top: -20px;
    width: 15px;
    height: 15px;
    animation: confettiFall linear forwards;
}

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

/* ============================================
   Click Hearts
   ============================================ */

.click-heart {
    position: fixed;
    pointer-events: none;
    font-size: 30px;
    animation: clickHeartFloat 1.5s ease-out forwards;
    z-index: 150;
}

@keyframes clickHeartFloat {
    0% {
        opacity: 1;
        transform: scale(0) translateY(0);
    }
    20% {
        transform: scale(1.2) translateY(-20px);
    }
    100% {
        opacity: 0;
        transform: scale(0.8) translateY(-150px) rotate(20deg);
    }
}
