/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=Noto+Serif+SC:wght@400;600;700&family=Noto+Sans+SC:wght@300;400;500&display=swap');

/* CSS Variables */
:root {
    --warm-apricot: #F5E6CA;
    --light-orange: #FFDAB9;
    --cream-white: #FFF8F0;
    --mist-cyan: #B0E0E6;
    --warm-brown: #8B6B5B;
}

/* Base Styles */
body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.8;
    background: linear-gradient(135deg, var(--cream-white) 0%, var(--warm-apricot) 50%, var(--light-orange) 100%);
    color: var(--warm-brown);
}

/* Custom Font Classes */
.font-handwriting {
    font-family: 'Ma Shan Zheng', 'Noto Serif SC', cursive;
}

/* Noise Overlay */
#noise-overlay {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

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

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

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 3s ease-in-out infinite alternate;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Card Hover Effect */
.card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(139, 107, 91, 0.2);
}

/* Album Pages */
.album-page {
    display: none;
}

.album-page.active {
    display: block;
    animation: fadeIn 0.6s ease-in-out;
}

/* Page Dots */
.page-dot {
    transition: all 0.3s ease;
}

.page-dot.active {
    background-color: var(--warm-brown);
}

/* Memory Card Effects */
.memory-card[data-type="slide-up"] .memory-overlay {
    transition: opacity 0.5s ease;
}

.memory-card[data-type="slide-up"].active .memory-overlay {
    opacity: 1;
}

.memory-card[data-type="fade-in"] .memory-overlay {
    transition: opacity 0.6s ease;
}

.memory-card[data-type="fade-in"].active .memory-overlay {
    opacity: 1;
}

.memory-card[data-type="expand"].active img {
    height: 50% !important;
}

.memory-card[data-type="expand"].active .memory-content {
    display: block;
    animation: slideUp 0.5s ease;
}

.memory-card[data-type="blur"].active img {
    filter: blur(0);
}

.memory-card[data-type="blur"].active .memory-overlay {
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* Modal */
#wish-modal {
    display: none;
}

#wish-modal.open {
    display: flex;
    animation: fadeIn 0.3s ease;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: rgba(255, 218, 185, 0.6);
    color: var(--warm-brown);
}

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

::-webkit-scrollbar-track {
    background: var(--cream-white);
}

::-webkit-scrollbar-thumb {
    background: var(--mist-cyan);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--warm-brown);
}

/* Utility Classes for Responsiveness */
.hidden {
    display: none;
}

/* Light Spot Effects */
.light-spot {
    animation: float 8s ease-in-out infinite;
}

/* Footer */
footer {
    background: rgba(255, 248, 240, 0.5);
}

.footer {
    padding: 40px 20px;
    text-align: center;
    color: var(--warm-brown);
}

.footer .container {
    max-width: 700px;
    margin: 0 auto;
}

.footer p {
    font-size: 14px;
    line-height: 1.8;
}

/* Banner Section */
#banner {
    position: relative;
    z-index: 1;
}

#banner img {
    filter: brightness(1.05) saturate(1.1);
    transition: transform 0.8s ease-out;
}

#banner:hover img {
    transform: scale(1.02);
}

/* Youth Badge */
#youth-badge {
    box-shadow: 0 4px 20px rgba(139, 107, 91, 0.15);
    backdrop-filter: blur(10px);
}

/* Navigation */
#main-nav {
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(139, 107, 91, 0.1);
}

#main-nav li a {
    position: relative;
    transition: all 0.3s ease;
}

#main-nav li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--warm-brown);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

#main-nav li a:hover::after {
    width: 100%;
}