/* ===================================
   Valentine's Day Website Styles
   For Tanya Sharma 💕
   =================================== */

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

body {
    background: linear-gradient(135deg, #FFF8E7 0%, #FFE4E8 50%, #FFF8E7 100%);
    min-height: 100vh;
}

/* Glassmorphism Card */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 182, 193, 0.3);
    box-shadow: 0 8px 32px rgba(196, 30, 58, 0.1);
}

/* Floating Hearts Animation */
.floating-heart {
    position: absolute;
    font-size: 20px;
    animation: floatUp linear forwards;
    pointer-events: none;
    opacity: 0;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.5);
        opacity: 0;
    }

    10% {
        opacity: 0.7;
    }

    90% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-100vh) rotate(720deg) scale(1);
        opacity: 0;
    }
}

/* Fade In Animation */
.animate-fade-in {
    animation: fadeIn 1.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Pulse Animation */
#yes-btn {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(196, 30, 58, 0.3),
            0 0 40px rgba(255, 105, 180, 0.2);
    }

    50% {
        box-shadow: 0 0 30px rgba(196, 30, 58, 0.5),
            0 0 60px rgba(255, 105, 180, 0.4);
    }
}

/* No Button - Evasive Styles with Highlight */
#no-btn {
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    cursor: not-allowed;
}

#no-btn:hover {
    background: #f0f0f0;
}

#no-btn.highlight-move {
    background: linear-gradient(135deg, #FFB6C1 0%, #FF69B4 100%);
    color: white;
    box-shadow: 0 0 20px rgba(255, 105, 180, 0.6), 0 0 40px rgba(255, 105, 180, 0.3);
    transform: scale(1.1);
}

/* Gallery Item Styles */
.gallery-item {
    position: relative;
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(196, 30, 58, 0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Countdown Timer Styles */
#countdown>div {
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.1);
}

/* Success Screen Animations */
#success-screen {
    background: linear-gradient(-45deg, #C41E3A, #FF69B4, #FFB6C1, #FF1493);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Sparkle Effect */
.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: sparkle 1s ease-in-out forwards;
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Music Button Animation */
#music-toggle {
    animation: musicPulse 3s ease-in-out infinite;
}

@keyframes musicPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

#music-toggle:hover {
    animation: none;
    transform: scale(1.1);
}

/* Heart Rain for Success Screen */
.heart-rain {
    position: absolute;
    animation: heartFall linear forwards;
    font-size: 24px;
    pointer-events: none;
}

@keyframes heartFall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .floating-heart {
        font-size: 14px;
    }

    #countdown>div {
        padding: 0.5rem;
    }

    .gallery-item {
        border-radius: 1rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #FFF8E7;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #FFB6C1, #C41E3A);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #FF69B4, #C41E3A);
}

/* Text Selection */
::selection {
    background: #FFB6C1;
    color: #C41E3A;
}

/* Loading Animation for Images */
.gallery-item img {
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Heart Shape Clip Path - Diamond/Heart approximation */
.heart-clip {
    clip-path: polygon(50% 100%, 0% 35%, 25% 0%, 50% 15%, 75% 0%, 100% 35%);
    position: relative;
    border: none;
}

/* Circle Clip Path */
.circle-clip {
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
}

/* Hexagon shape for variety */
.hex-clip {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

/* Floating Photo Animation */
.photo-float {
    animation: photoFloat 6s ease-in-out infinite;
    animation-delay: var(--float-delay, 0s);
}

@keyframes photoFloat {

    0%,
    100% {
        transform: translateY(0) rotate(var(--base-rotate, 0deg));
    }

    50% {
        transform: translateY(-15px) rotate(calc(var(--base-rotate, 0deg) + 2deg));
    }
}

/* Envelope & Letter Animations */
.envelope-closed {
    transform: scale(0.7) translateY(30px);
    opacity: 0;
}

.envelope-open {
    transform: scale(1) translateY(0);
    opacity: 1;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.envelope-flap-closed {
    transform: perspective(500px) rotateX(0deg);
    transform-origin: top;
    transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.envelope-flap-open {
    transform: perspective(500px) rotateX(180deg);
    transform-origin: top;
}

.letter-hidden {
    opacity: 0;
    transform: translateY(80px) scale(0.95);
}

.letter-visible {
    opacity: 1;
    transform: translateY(-20px) scale(1);
    transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s;
}

/* Letter paper texture effect */
#letter {
    background: linear-gradient(to bottom, #fffef9 0%, #fff9f0 100%);
    box-shadow:
        inset 0 0 30px rgba(196, 30, 58, 0.05),
        0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Love items fade in animation */
#letter p {
    opacity: 0;
    transform: translateX(-20px);
    animation: loveItemFadeIn 0.5s ease forwards;
}

#letter p:nth-child(1) {
    animation-delay: 2s;
}

#letter p:nth-child(2) {
    animation-delay: 3s;
}

#letter p:nth-child(3) {
    animation-delay: 4s;
}

#letter p:nth-child(4) {
    animation-delay: 5s;
}

#letter p:nth-child(5) {
    animation-delay: 6s;
}

#letter p:nth-child(6) {
    animation-delay: 7s;
}

#letter p:nth-child(7) {
    animation-delay: 8s;
}

#letter p:nth-child(8) {
    animation-delay: 9s;
}

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

/* Shake Animation for Locked Button */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Locked Button Style */
#love-letter-btn.locked {
    background: linear-gradient(to right, #9ca3af, #6b7280) !important;
    cursor: not-allowed;
    opacity: 0.7;
}

#love-letter-btn.locked:hover {
    transform: scale(1) !important;
    box-shadow: none !important;
}

/* Countdown Highlight Animation */
@keyframes countdownHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(196, 30, 58, 0.7);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 25px 10px rgba(196, 30, 58, 0.4);
        transform: scale(1.05);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(196, 30, 58, 0);
        transform: scale(1);
    }
}

.countdown-highlight {
    animation: countdownHighlight 1s ease-out;
}

/* Toast/Popup Notification */
.locked-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(196, 30, 58, 0.3);
    z-index: 1000;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 2px solid rgba(196, 30, 58, 0.2);
    max-width: 90vw;
}

.locked-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.locked-toast h3 {
    color: #C41E3A;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.locked-toast p {
    color: #6b7280;
    font-size: 0.9rem;
}

.locked-toast .countdown-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: #C41E3A;
    margin: 0.75rem 0;
}

.locked-toast .close-toast {
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(to right, #C41E3A, #FF69B4);
    color: white;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    font-weight: 500;
    transition: transform 0.2s ease;
}

.locked-toast .close-toast:hover {
    transform: scale(1.05);
}