@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #9333ea;
    --secondary: #ea580c;
    --accent: #16a34a;
}

body {
    font-family: 'Fredoka', sans-serif;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Smooth Scrolling & Overflow Fix */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

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

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

::-webkit-scrollbar-thumb {
    background: #d8b4fe;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c084fc;
}

/* Blobs for background */
.blob {
    position: absolute;
    filter: blur(40px);
    z-index: -1;
    opacity: 0.6;
    animation: moveBlob 10s infinite alternate;
}

@keyframes moveBlob {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(20px, -20px) scale(1.1);
    }
}

/* Mobile Menu Animation */
.mobile-menu {
    transition: transform 0.3s ease-in-out;
    transform: translateX(100%);
}

.mobile-menu.open {
    transform: translateX(0);
}

/* Text Selection Color */
::selection {
    background: #f9a8d4;
    color: #fff;
}

/* --- New Features --- */

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader-fruit {
    font-size: 4rem;
    animation: bounceFruit 1s infinite alternate;
}

@keyframes bounceFruit {
    from {
        transform: translateY(0) scale(1);
    }

    to {
        transform: translateY(-20px) scale(1.1);
    }
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* Fallback */
    height: 100dvh;
    /* Mobile override */
    background: rgba(0, 0, 0, 0.95);
    /* Darker for better focus */
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 0;
    /* Remove padding to avoid box-model issues */
    overflow: hidden;
    /* Prevent internal scroll */
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox img {
    max-width: 90vw;
    /* Strict limit */
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: max(20px, env(safe-area-inset-top));
    /* Respect notch */
    right: 20px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    width: 44px;
    /* Minimum touch target */
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
    z-index: 10001;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lightbox-close:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

body.no-scroll {
    overflow: hidden !important;
    height: 100vh;
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 20px;
        right: 20px;
        font-size: 2rem;
    }

    .lightbox img {
        max-width: 95vw;
        max-height: 70vh;
    }
}

/* Winter Badge */
.winter-badge {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0284c7;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 1rem;
    vertical-align: middle;
    box-shadow: 0 0 10px rgba(186, 230, 253, 0.5);
    /* margin-left removed for flex gap */
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}