/* CSS Variables - Apple-Inspired Liquid Glass Design */
:root {
    /* Primary Colors - Softer, More Apple-like */
    --primary-red: #ff6b9d;
    --secondary-red: #ff8fab;
    --light-red: #ffb3c6;
    --dark-red: #e55a87;
    --accent-pink: #ff9ff3;
    
    /* Apple-Style Neutrals */
    --soft-white: rgba(255, 255, 255, 0.98);
    --pure-white: #ffffff;
    --apple-gray: #f5f5f7;
    --text-primary: #1d1d1f;
    --text-secondary: #424245;
    --text-light: #86868b;
    --text-white: #ffffff;
    
    /* Enhanced Liquid Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-bg-strong: rgba(255, 255, 255, 0.18);
    --glass-bg-premium: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-border-strong: rgba(255, 255, 255, 0.4);
    --glass-shadow: rgba(255, 107, 157, 0.12);
    --glass-shadow-strong: rgba(255, 107, 157, 0.2);
    
    /* Apple-Style Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-red) 0%, var(--secondary-red) 50%, var(--accent-pink) 100%);
    --gradient-light: linear-gradient(135deg, var(--light-red) 0%, var(--primary-red) 100%);
    --gradient-glass: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25) 0%, 
        rgba(255, 255, 255, 0.15) 40%, 
        rgba(255, 255, 255, 0.08) 100%);
    --gradient-glass-premium: linear-gradient(135deg,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0.20) 30%,
        rgba(255, 107, 157, 0.08) 70%,
        rgba(255, 107, 157, 0.12) 100%);
    --gradient-liquid: linear-gradient(135deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.25) 25%,
        rgba(255, 107, 157, 0.15) 50%,
        rgba(255, 159, 243, 0.2) 75%,
        rgba(255, 255, 255, 0.3) 100%);
    
    /* Enhanced Backdrop Blur */
    --backdrop-blur: blur(40px) saturate(180%) brightness(1.1);
    --backdrop-blur-strong: blur(60px) saturate(200%) brightness(1.15);
    --backdrop-blur-subtle: blur(25px) saturate(150%) brightness(1.05);
    --backdrop-blur-premium: blur(80px) saturate(220%) brightness(1.2);
    
    /* Apple-Style Easing */
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --ease-smooth: cubic-bezier(0.215, 0.61, 0.355, 1);
    --ease-apple: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-apple-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-apple-in-out: cubic-bezier(0.76, 0, 0.24, 1);
    
    /* Apple-Style Shadows */
    --shadow-light: rgba(255, 107, 157, 0.15);
    --shadow-medium: rgba(0, 0, 0, 0.08);
    --shadow-strong: rgba(0, 0, 0, 0.12);
    --shadow-premium: 0 8px 32px rgba(255, 107, 157, 0.15), 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-glass: 0 8px 32px rgba(31, 38, 135, 0.37), 0 1px 2px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 2rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Enhanced scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    border-radius: 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-red), var(--accent-pink));
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    overflow-x: hidden;
    background: 
        /* Apple-style layered gradients for depth */
        radial-gradient(ellipse at 20% 10%, rgba(255, 107, 157, 0.15) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 90%, rgba(255, 159, 243, 0.12) 0%, transparent 40%),
        radial-gradient(ellipse at 60% 30%, rgba(255, 179, 198, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, 
            rgba(255, 255, 255, 0.95) 0%, 
            rgba(255, 250, 252, 0.9) 25%, 
            rgba(254, 245, 248, 0.85) 50%, 
            rgba(255, 248, 251, 0.9) 75%, 
            rgba(255, 255, 255, 0.95) 100%),
        /* Subtle texture overlay */
        linear-gradient(45deg,
            rgba(255, 107, 157, 0.02) 0%,
            transparent 25%,
            rgba(255, 159, 243, 0.015) 50%,
            transparent 75%,
            rgba(255, 179, 198, 0.02) 100%),
        var(--apple-gray);
    min-height: 100vh;
    position: relative;
    /* Apple-style text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 107, 157, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 159, 243, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(255, 179, 198, 0.03) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

/* Selection Style */
::selection {
    background: rgba(255, 107, 157, 0.2);
    color: var(--dark-red);
}

::-moz-selection {
    background: rgba(255, 107, 157, 0.2);
    color: var(--dark-red);
}

/* Focus Styles */
*:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 107, 157, 0.3);
    transition: box-shadow 0.2s ease;
}

*:focus:not(:focus-visible) {
    box-shadow: none;
}

*:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 107, 157, 0.4),
                0 0 12px rgba(255, 107, 157, 0.2);
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    will-change: transform;
    contain: layout style paint;
}

.gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 30% 20%, 
            rgba(255, 107, 157, 0.06) 0%, 
            rgba(255, 159, 243, 0.045) 20%, 
            rgba(255, 179, 198, 0.03) 40%, 
            rgba(229, 90, 135, 0.015) 60%, 
            transparent 100%),
        radial-gradient(ellipse at 70% 80%, 
            rgba(255, 139, 171, 0.05) 0%, 
            rgba(255, 107, 157, 0.035) 25%, 
            rgba(255, 179, 198, 0.02) 50%, 
            transparent 100%),
        radial-gradient(circle at 50% 50%,
            rgba(255, 107, 157, 0.02) 0%,
            transparent 70%);
    animation: gradientShift 20s ease-in-out infinite;
    mix-blend-mode: soft-light;
    filter: blur(1px);
}

@keyframes gradientShift {
    0%, 100% { 
        background: radial-gradient(ellipse at 30% 20%, 
            rgba(255, 107, 157, 0.08) 0%, 
            rgba(255, 159, 243, 0.06) 25%, 
            rgba(255, 179, 198, 0.04) 50%, 
            rgba(229, 90, 135, 0.02) 75%, 
            transparent 100%),
        radial-gradient(ellipse at 70% 80%, 
            rgba(255, 139, 171, 0.06) 0%, 
            rgba(255, 107, 157, 0.04) 35%, 
            rgba(255, 179, 198, 0.02) 70%, 
            transparent 100%);
        filter: hue-rotate(0deg) brightness(1);
    }
    25% {
        filter: hue-rotate(5deg) brightness(1.05);
    }
    33% {
        background: radial-gradient(ellipse at 70% 30%, 
            rgba(255, 159, 243, 0.08) 0%, 
            rgba(255, 107, 157, 0.06) 25%, 
            rgba(255, 179, 198, 0.04) 50%, 
            rgba(229, 90, 135, 0.02) 75%, 
            transparent 100%),
        radial-gradient(ellipse at 30% 70%, 
            rgba(255, 179, 198, 0.06) 0%, 
            rgba(255, 139, 171, 0.04) 35%, 
            rgba(255, 107, 157, 0.02) 70%, 
            transparent 100%);
    }
    50% {
        filter: hue-rotate(-5deg) brightness(0.98);
    }
    66% {
        background: radial-gradient(ellipse at 50% 50%, 
            rgba(255, 107, 157, 0.08) 0%, 
            rgba(255, 179, 198, 0.06) 25%, 
            rgba(255, 159, 243, 0.04) 50%, 
            rgba(229, 90, 135, 0.02) 75%, 
            transparent 100%),
        radial-gradient(ellipse at 20% 40%, 
            rgba(255, 139, 171, 0.06) 0%, 
            rgba(255, 107, 157, 0.04) 35%, 
            rgba(255, 179, 198, 0.02) 70%, 
            transparent 100%);
    }
    75% {
        filter: hue-rotate(3deg) brightness(1.02);
    }
}

/* Floating Hearts */
.floating-hearts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-hearts::before,
.floating-hearts::after {
    content: '♥';
    position: absolute;
    color: var(--light-red);
    font-size: 2rem;
    opacity: 0.3;
    animation: floatHeart 20s linear infinite;
}

.floating-hearts::before {
    left: 10%;
    animation-delay: -5s;
}

.floating-hearts::after {
    right: 10%;
    animation-delay: -15s;
}

@keyframes floatHeart {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(0.5);
        opacity: 0;
        filter: blur(2px);
    }
    10% {
        opacity: 0.3;
        filter: blur(0px);
        transform: translateY(80vh) rotate(36deg) scale(1);
    }
    30% {
        transform: translateY(60vh) rotate(108deg) scale(1.1) translateX(20px);
    }
    50% {
        transform: translateY(40vh) rotate(180deg) scale(0.9) translateX(-20px);
    }
    70% {
        transform: translateY(20vh) rotate(252deg) scale(1.05) translateX(10px);
    }
    90% {
        opacity: 0.3;
        filter: blur(0px);
        transform: translateY(5vh) rotate(324deg) scale(0.95);
    }
    100% {
        transform: translateY(-100px) rotate(360deg) scale(0.5);
        opacity: 0;
        filter: blur(2px);
    }
}

/* Floating Spheres */
.floating-spheres {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.sphere {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg,
        rgba(255, 107, 157, 0.3) 0%,
        rgba(255, 159, 243, 0.2) 50%,
        rgba(255, 107, 157, 0.1) 100%);
    opacity: 0.12;
    animation: floatSphere 30s var(--ease-smooth) infinite;
    box-shadow: 
        0 0 0 0.5px rgba(255, 255, 255, 0.3) inset,
        0 12px 40px rgba(255, 107, 157, 0.25),
        0 6px 20px rgba(255, 107, 157, 0.15),
        inset 0 -20px 30px rgba(255, 255, 255, 0.2),
        inset 0 20px 30px rgba(255, 107, 157, 0.1);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transform-style: preserve-3d;
}

.sphere::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 15%;
    width: 30%;
    height: 30%;
    background: radial-gradient(circle at center,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%);
    border-radius: 50%;
    filter: blur(2px);
}

.sphere:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: -8s;
}

.sphere:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: -15s;
}

.sphere:nth-child(3) {
    bottom: 20%;
    left: 50%;
    animation-delay: -22s;
}

@keyframes floatSphere {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) scale(1) translateX(0px); 
        opacity: 0.12;
        filter: brightness(1) blur(0px);
    }
    15% {
        transform: translateY(-15px) rotate(45deg) scale(1.05) translateX(10px);
        opacity: 0.18;
    }
    25% {
        transform: translateY(-30px) rotate(90deg) scale(1.1) translateX(15px);
        opacity: 0.22;
        filter: brightness(1.1) blur(0.5px);
    }
    40% {
        transform: translateY(-45px) rotate(135deg) scale(1.02) translateX(5px);
        opacity: 0.20;
    }
    50% { 
        transform: translateY(-60px) rotate(180deg) scale(0.9) translateX(-5px); 
        opacity: 0.18;
        filter: brightness(0.95) blur(0px);
    }
    65% {
        transform: translateY(-45px) rotate(225deg) scale(0.95) translateX(-10px);
        opacity: 0.20;
    }
    75% {
        transform: translateY(-30px) rotate(270deg) scale(1.1) translateX(-15px);
        opacity: 0.22;
        filter: brightness(1.05) blur(0.5px);
    }
    90% {
        transform: translateY(-15px) rotate(315deg) scale(1.05) translateX(-5px);
        opacity: 0.18;
    }
}

/* Glass Effect Mixin - Apple Style */
.glass-effect {
    background: var(--gradient-glass-premium);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 
        0 0 0 0.5px rgba(255, 255, 255, 0.25) inset,
        0 0 0 1px rgba(0, 0, 0, 0.03),
        0 12px 40px rgba(255, 107, 157, 0.08),
        0 8px 24px rgba(255, 107, 157, 0.06),
        0 4px 12px rgba(0, 0, 0, 0.04),
        inset 0 2px 2px rgba(255, 255, 255, 0.5),
        inset 0 -1px 2px rgba(255, 107, 157, 0.05);
    position: relative;
    transform: translateZ(0);
    will-change: transform, box-shadow;
    transition: all 0.4s var(--ease-apple);
}

.glass-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.25) 30%,
        rgba(255, 255, 255, 0.1) 60%,
        rgba(255, 107, 157, 0.15) 100%);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    pointer-events: none;
    opacity: 0.8;
}

.glass-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.7) 50%,
        transparent 100%);
    opacity: 0.6;
    pointer-events: none;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: 
        radial-gradient(ellipse at 50% 0%, 
            rgba(255, 107, 157, 0.06) 0%, 
            rgba(255, 179, 198, 0.04) 30%, 
            transparent 60%),
        radial-gradient(ellipse at 0% 50%, 
            rgba(255, 159, 243, 0.04) 0%, 
            transparent 40%),
        radial-gradient(ellipse at 100% 50%, 
            rgba(255, 179, 198, 0.04) 0%, 
            transparent 40%),
        radial-gradient(ellipse at center, 
            rgba(255, 107, 157, 0.03) 0%, 
            rgba(255, 240, 245, 0.01) 50%, 
            transparent 100%);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg at 50% 50%,
        transparent 0deg,
        rgba(255, 107, 157, 0.02) 60deg,
        transparent 120deg,
        rgba(255, 159, 243, 0.02) 180deg,
        transparent 240deg,
        rgba(255, 179, 198, 0.02) 300deg,
        transparent 360deg);
    animation: rotateGradient 60s linear infinite;
    pointer-events: none;
}

@keyframes rotateGradient {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-content {
    max-width: 800px;
    padding: 3rem 2rem;
    background: var(--gradient-glass-premium);
    backdrop-filter: var(--backdrop-blur-strong);
    -webkit-backdrop-filter: var(--backdrop-blur-strong);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    box-shadow: 
        0 0 0 0.5px rgba(255, 255, 255, 0.35) inset,
        0 0 0 1px rgba(0, 0, 0, 0.02),
        0 30px 80px rgba(255, 107, 157, 0.12),
        0 20px 40px rgba(255, 107, 157, 0.08),
        0 8px 20px rgba(0, 0, 0, 0.04),
        inset 0 3px 3px rgba(255, 255, 255, 0.6),
        inset 0 -2px 3px rgba(255, 107, 157, 0.03);
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    animation: glassFloat 8s ease-in-out infinite;
}

@keyframes glassFloat {
    0%, 100% { transform: translateY(0px) translateZ(0); }
    50% { transform: translateY(-5px) translateZ(0); }
}

.hero-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 34px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.2) 30%,
        rgba(255, 107, 157, 0.1) 70%,
        rgba(255, 107, 157, 0.2) 100%);
    z-index: -1;
    filter: blur(1px);
}

.hero-title {
    font-size: 4.2rem;
    font-weight: 200;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    background: linear-gradient(135deg,
        #ff6b9d 0%,
        #ff8fab 25%,
        #ff9ff3 50%,
        #ff6b9d 75%,
        #ff8fab 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    letter-spacing: -2px;
    line-height: 1.1;
    animation: titleGlow 4s var(--ease-apple-out) infinite alternate, 
               gradientMove 12s ease infinite;
    text-shadow: 0 0 40px rgba(255, 107, 157, 0.25);
    position: relative;
    /* Apple-style text rendering */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "kern" 1, "liga" 1;
}

/* Apple-style refined animations */
@keyframes gradientMove {
    0%, 100% { 
        background-position: 0% 50%; 
        transform: scale(1);
    }
    50% { 
        background-position: 100% 50%; 
        transform: scale(1.002);
    }
}

.hero-title::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    background: linear-gradient(135deg, 
        rgba(255, 107, 157, 0.2) 0%, 
        rgba(255, 159, 243, 0.2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(10px);
    opacity: 0.5;
}

@keyframes titleGlow {
    0% {
        filter: drop-shadow(0 0 12px rgba(255, 107, 157, 0.25)) brightness(1);
        transform: translateY(0px) scale(1);
    }
    25% {
        filter: drop-shadow(0 0 18px rgba(255, 107, 157, 0.35)) brightness(1.02);
        transform: translateY(-0.5px) scale(1.001);
    }
    50% {
        filter: drop-shadow(0 0 24px rgba(255, 107, 157, 0.4)) brightness(1.04);
        transform: translateY(-1px) scale(1.003);
    }
    75% {
        filter: drop-shadow(0 0 20px rgba(255, 107, 157, 0.38)) brightness(1.03);
        transform: translateY(-0.8px) scale(1.002);
    }
    100% {
        filter: drop-shadow(0 0 16px rgba(255, 107, 157, 0.3)) brightness(1.01);
        transform: translateY(-0.5px) scale(1.001);
    }
}

.hero-subtitle {
    font-size: 1.75rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 300;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    position: relative;
    display: inline-block;
    letter-spacing: -0.5px;
    line-height: 1.4;
    /* Apple-style text rendering */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.hero-subtitle::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--primary-red) 50%,
        transparent 100%);
    transition: transform 0.6s var(--ease-apple);
}

.hero-content:hover .hero-subtitle::after {
    transform: translateX(-50%) scaleX(1);
}

.scroll-indicator {
    margin-top: 4rem;
    animation: bounce 2s infinite;
    position: relative;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 0;
    background: linear-gradient(to bottom,
        transparent 0%,
        var(--primary-red) 100%);
    animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
    0%, 100% { height: 0; opacity: 0; }
    50% { height: 20px; opacity: 1; }
}

.scroll-indicator span {
    font-size: 0.9rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 1rem;
}

.scroll-arrow {
    width: 2px;
    height: 40px;
    background: var(--primary-red);
    margin: 0 auto;
    position: relative;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: -5px;
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--primary-red);
    border-bottom: 2px solid var(--primary-red);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 100% { 
        transform: translateY(0) scale(1); 
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
    }
    20% { 
        transform: translateY(0) scale(1, 0.98); 
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
    }
    40% { 
        transform: translateY(-10px) scale(1, 1.02); 
        animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    }
    50% { 
        transform: translateY(-8px) scale(1, 1.01); 
    }
    60% { 
        transform: translateY(-5px) scale(1, 1); 
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
    }
    80% { 
        transform: translateY(0) scale(1, 0.99); 
        animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    }
}

/* Counter Section */
/* Apple-style Counter Section */
.counter-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    /* Apple-style content centering */
    max-width: 1400px;
    margin: 0 auto;
}

.counter-content {
    text-align: center;
    padding: 4rem 3rem;
    border-radius: 32px;
    background: var(--gradient-glass-premium);
    backdrop-filter: var(--backdrop-blur-strong);
    -webkit-backdrop-filter: var(--backdrop-blur-strong);
    border: 1px solid var(--glass-border);
    box-shadow: 
        0 0 0 0.5px rgba(255, 255, 255, 0.4) inset,
        0 0 0 1px rgba(0, 0, 0, 0.02),
        0 30px 90px rgba(255, 107, 157, 0.15),
        0 20px 50px rgba(255, 107, 157, 0.1),
        0 10px 25px rgba(0, 0, 0, 0.05),
        inset 0 3px 3px rgba(255, 255, 255, 0.65),
        inset 0 -2px 3px rgba(255, 107, 157, 0.06);
    max-width: 900px;
    width: 100%;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    transition: all 0.5s var(--ease-apple);
}

.counter-content:hover {
    transform: translateY(-2px) translateZ(0);
    box-shadow: 
        0 0 0 0.5px rgba(255, 255, 255, 0.5) inset,
        0 0 0 1px rgba(0, 0, 0, 0.02),
        0 35px 100px rgba(255, 107, 157, 0.18),
        0 25px 60px rgba(255, 107, 157, 0.12),
        0 12px 30px rgba(0, 0, 0, 0.06),
        inset 0 3px 3px rgba(255, 255, 255, 0.7),
        inset 0 -2px 3px rgba(255, 107, 157, 0.08);
}

.counter-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 34px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.2) 40%,
        rgba(255, 107, 157, 0.1) 70%,
        rgba(255, 107, 157, 0.25) 100%);
    z-index: -1;
    filter: blur(1px);
}

.section-title {
    font-size: 3.2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    font-weight: 200;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4rem;
    text-align: center;
    position: relative;
    letter-spacing: -1.5px;
    line-height: 1.2;
    animation: sectionTitleFloat 6s var(--ease-apple-out) infinite;
    /* Apple-style text rendering */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
    animation: underlineGlow 2s ease-in-out infinite alternate;
}

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

@keyframes underlineGlow {
    0% { box-shadow: 0 0 5px rgba(255, 107, 157, 0.5); }
    100% { box-shadow: 0 0 15px rgba(255, 107, 157, 0.8); }
}

.counter-display {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.counter-item {
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.04) 100%);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 
        0 0 0 0.5px rgba(255, 255, 255, 0.2) inset,
        0 6px 20px rgba(255, 107, 157, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.03),
        inset 0 2px 2px rgba(255, 255, 255, 0.25);
    transition: all 0.4s var(--ease-spring);
    position: relative;
    overflow: hidden;
}

.counter-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.15) 50%,
        transparent 100%);
    transition: left 0.6s var(--ease-apple);
}

.counter-item:hover::before {
    left: 100%;
}

.counter-item:hover {
    transform: translateY(-3px) scale(1.02) translateZ(0);
    box-shadow: 
        0 0 0 0.5px rgba(255, 255, 255, 0.3) inset,
        0 15px 40px rgba(255, 107, 157, 0.18),
        0 8px 20px rgba(255, 107, 157, 0.12),
        0 3px 8px rgba(0, 0, 0, 0.04),
        inset 0 2px 2px rgba(255, 255, 255, 0.35);
}

.counter-item:active {
    transform: translateY(1px) scale(0.98) translateZ(0);
    transition: all 0.08s ease;
    box-shadow: 
        0 0 0 0.5px rgba(255, 255, 255, 0.2) inset,
        0 2px 8px rgba(255, 107, 157, 0.15),
        0 1px 4px rgba(0, 0, 0, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

/* Ripple Effect on Click */
.counter-item {
    position: relative;
    overflow: hidden;
}

.counter-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.2) 40%,
        transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
    opacity: 0;
    pointer-events: none;
}

.counter-item:active::after {
    width: 300%;
    height: 300%;
    opacity: 1;
}

.counter-item {
    text-align: center;
}

.counter-number {
    display: block;
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-red);
    transition: all 0.4s var(--ease-spring);
    position: relative;
}

.counter-number.updating {
    animation: numberPulse 0.4s var(--ease-spring);
}

@keyframes numberPulse {
    0% { 
        transform: scale(1) translateY(0);
        filter: brightness(1);
    }
    25% { 
        transform: scale(1.15) translateY(-2px);
        filter: brightness(1.1);
    }
    50% { 
        transform: scale(1.1) translateY(-1px);
        filter: brightness(1.15);
    }
    75% { 
        transform: scale(1.05) translateY(0);
        filter: brightness(1.05);
    }
    100% { 
        transform: scale(1) translateY(0);
        filter: brightness(1);
    }
}

.counter-label {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    display: block;
}

.counter-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-top: 1rem;
}

/* Apple-style Timeline Section */
.timeline-section {
    padding: 8rem 0 10rem 0;
    position: relative;
    /* Apple-style section background */
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(255, 107, 157, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 159, 243, 0.03) 0%, transparent 50%);
}

.timeline-wrapper {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Apple-style Timeline Layout */
.timeline-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 3rem;
    margin-top: 5rem;
    padding: 0 1rem;
    /* Apple-style content centering */
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Categories Layout */
.categories-container {
    display: flex;
    flex-direction: column;
    gap: 5rem;
    margin-top: 3rem;
}

.category-section {
    position: relative;
    padding: 2rem 0;
}

.category-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 1rem;
    background: var(--gradient-glass);
    backdrop-filter: var(--backdrop-blur-subtle);
    -webkit-backdrop-filter: var(--backdrop-blur-subtle);
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-premium);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.category-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 8px rgba(255, 107, 157, 0.3));
}

.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.category-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

.albums-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 3rem;
    padding: 0 1rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Apple-Style Liquid Glass Memory Card */
.memory-card {
    /* Enhanced liquid glass background */
    background: var(--gradient-glass-premium);
    backdrop-filter: var(--backdrop-blur-premium);
    -webkit-backdrop-filter: var(--backdrop-blur-premium);
    
    /* Apple-style border and shape */
    border: 1px solid var(--glass-border-strong);
    border-radius: 28px;
    padding: 2.5rem;
    
    /* Premium multi-layer shadows */
    box-shadow: 
        /* Inner glow */
        0 0 0 1px rgba(255, 255, 255, 0.6) inset,
        /* Outer border */
        0 0 0 1px rgba(255, 107, 157, 0.08),
        /* Main depth shadows */
        0 32px 80px rgba(255, 107, 157, 0.12),
        0 16px 40px rgba(255, 107, 157, 0.08),
        0 8px 16px rgba(0, 0, 0, 0.04),
        0 2px 8px rgba(0, 0, 0, 0.02),
        /* Inner highlights */
        inset 0 2px 4px rgba(255, 255, 255, 0.95),
        inset 0 -1px 2px rgba(255, 107, 157, 0.02);
    
    /* Apple-style smooth transitions */
    transition: all 0.6s var(--ease-apple-out);
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow, backdrop-filter;
    
    /* Advanced positioning for depth */
    isolation: isolate;
}

.memory-card.aos-animate {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Apple-style hover effects and pseudo-elements */
.memory-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 30px;
    background: var(--gradient-liquid);
    z-index: -1;
    opacity: 0;
    transition: all 0.5s var(--ease-apple-out);
    filter: blur(1px);
}

.memory-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 28px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 107, 157, 0.02) 100%);
    opacity: 0;
    transition: all 0.4s var(--ease-apple-out);
    pointer-events: none;
    z-index: 1;
}

.memory-card:hover {
    transform: translateY(-12px) scale(1.02) perspective(1000px) rotateX(2deg);
    backdrop-filter: var(--backdrop-blur-premium) brightness(1.05);
    -webkit-backdrop-filter: var(--backdrop-blur-premium) brightness(1.05);
    box-shadow: 
        /* Enhanced inner glow */
        0 0 0 1px rgba(255, 255, 255, 0.8) inset,
        /* Stronger outer border */
        0 0 0 1px rgba(255, 107, 157, 0.12),
        /* Elevated shadows */
        0 48px 120px rgba(255, 107, 157, 0.15),
        0 24px 60px rgba(255, 107, 157, 0.1),
        0 12px 24px rgba(0, 0, 0, 0.06),
        0 4px 12px rgba(0, 0, 0, 0.04),
        /* Enhanced inner highlights */
        inset 0 3px 6px rgba(255, 255, 255, 1),
        inset 0 -2px 4px rgba(255, 107, 157, 0.03);
    border-color: rgba(255, 255, 255, 0.6);
}

.memory-card:hover::before {
    opacity: 0.6;
    filter: blur(0px);
    transform: scale(1.01);
}

.memory-card:hover::after {
    opacity: 1;
}

.memory-card:active {
    transform: translateY(-6px) scale(1.015) perspective(1000px) rotateX(1deg);
    transition: all 0.15s var(--ease-apple-in-out);
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-date {
    background: linear-gradient(135deg,
        #ff6b9d 0%,
        #ff8fab 50%,
        #ff9ff3 100%);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 
        0 8px 24px rgba(255, 107, 157, 0.35),
        0 4px 12px rgba(255, 107, 157, 0.25),
        inset 0 2px 2px rgba(255, 255, 255, 0.4),
        inset 0 -1px 2px rgba(255, 107, 157, 0.2);
    white-space: nowrap;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--ease-apple);
}

.card-date::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%);
    transition: left 0.6s var(--ease-apple);
}

.card-date:hover::before {
    left: 100%;
}

.card-date:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(255, 107, 157, 0.4),
        0 5px 15px rgba(255, 107, 157, 0.3),
        inset 0 2px 2px rgba(255, 255, 255, 0.5),
        inset 0 -1px 2px rgba(255, 107, 157, 0.25);
}

.photo-counter {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Card Content */
.card-title {
    font-size: 1.4rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
}

.card-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Photo Gallery in Card */
.card-gallery {
    position: relative;
    margin-bottom: 1rem;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

/* Allow gallery to expand based on content */
.card-gallery .gallery-container {
    height: auto;
    min-height: 320px;
    max-height: 480px;
}

.gallery-container {
    position: relative;
    width: 100%;
    min-height: 280px;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.05);
    outline: none;
    display: flex;
    align-items: center;
}

.gallery-container:focus {
    box-shadow: 0 0 0 2px rgba(255, 107, 157, 0.5);
}

.gallery-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: center;
}

.gallery-slide {
    flex: 0 0 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
}

.gallery-image {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    transition: all 0.3s ease;
    display: block;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(255, 107, 157, 0.2);
}

.gallery-image {
    transition: all 0.4s var(--ease-apple);
}

.gallery-image:hover {
    transform: scale(1.05) translateY(-2px) rotate(0.5deg);
    box-shadow: 0 12px 40px rgba(255, 107, 157, 0.35),
                0 6px 20px rgba(255, 107, 157, 0.25);
    filter: brightness(1.05) contrast(1.05);
}

.gallery-image:active {
    transform: scale(0.96) rotate(-0.5deg);
    transition: all 0.08s ease;
    filter: brightness(0.98) contrast(1.02);
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.3);
}

/* Loading Shimmer Effect */
.gallery-image.loading {
    position: relative;
    overflow: hidden;
}

.gallery-image.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%);
    animation: imageShimmer 1.5s infinite;
}

@keyframes imageShimmer {
    to { left: 100%; }
}

/* Click Animation */
.gallery-slide.clicked .gallery-image {
    transform: scale(0.95);
    transition: all 0.15s ease;
    box-shadow: 0 2px 10px rgba(255, 107, 157, 0.6);
}

/* Loading State for Images */
.image-container {
    position: relative;
    background: linear-gradient(90deg, 
        rgba(255, 107, 157, 0.1) 0%, 
        rgba(255, 107, 157, 0.2) 50%, 
        rgba(255, 107, 157, 0.1) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}

.image-container.loaded {
    background: none;
    animation: none;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.gallery-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-image.loaded {
    opacity: 1;
}

/* Add a subtle click ripple effect */
.gallery-slide {
    position: relative;
    overflow: hidden;
}

.gallery-slide::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 107, 157, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    pointer-events: none;
    opacity: 0;
}

.gallery-slide.clicked::after {
    width: 300px;
    height: 300px;
    opacity: 1;
}

.gallery-slide.clicked {
    animation: clickPulse 0.6s ease;
}

@keyframes clickPulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

/* Gallery Navigation */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 251, 253, 0.9) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 107, 157, 0.15);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    opacity: 0;
    font-size: 1.3rem;
    color: var(--primary-red);
    font-weight: 600;
    box-shadow: 
        0 4px 16px rgba(255, 107, 157, 0.15),
        0 2px 8px rgba(255, 107, 157, 0.1);
}

.card-gallery:hover .gallery-nav {
    opacity: 0.9;
}

.gallery-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-nav {
    transition: all 0.35s var(--ease-spring);
}

.gallery-nav:hover {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(255, 251, 253, 0.98) 100%);
    transform: translateY(-50%) scale(1.15) rotate(5deg);
    box-shadow: 
        0 8px 32px rgba(255, 107, 157, 0.3),
        0 4px 16px rgba(255, 107, 157, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 107, 157, 0.25);
}

.gallery-nav:active {
    transform: translateY(-50%) scale(0.92) rotate(-2deg);
    transition: all 0.1s ease;
}

.gallery-nav.prev {
    left: 10px;
}

.gallery-nav.next {
    right: 10px;
}

/* Gallery Indicators */
.gallery-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0 1rem;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 107, 157, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--primary-red);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
}

.indicator:hover {
    background: var(--primary-red);
    transform: scale(1.1);
}

/* Click to View More */
.view-more {
    text-align: center;
    padding: 1.2rem;
    background: linear-gradient(135deg, 
        rgba(255, 107, 157, 0.04) 0%, 
        rgba(255, 159, 243, 0.02) 100%);
    color: var(--primary-red);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.35s var(--ease-apple);
    border-top: 1px solid rgba(255, 107, 157, 0.08);
    margin: 1rem -2rem -2rem -2rem;
    border-radius: 0 0 22px 22px;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.view-more::before {
    content: '→';
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%) translateX(0);
    opacity: 0;
    transition: all 0.35s var(--ease-apple);
    font-size: 1.1rem;
}

.view-more:hover::before {
    transform: translateY(-50%) translateX(-5px);
    opacity: 1;
}

.view-more::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.4s var(--ease-apple);
}

.view-more:hover::after {
    width: 100%;
}

.view-more:hover {
    background: linear-gradient(135deg, 
        rgba(255, 107, 157, 0.1) 0%, 
        rgba(255, 159, 243, 0.08) 100%);
    color: var(--dark-red);
    transform: translateY(-1px);
    box-shadow: 
        0 -2px 8px rgba(255, 107, 157, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Music Control */
.music-control {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.music-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg,
        #ff6b9d 0%,
        #ff8fab 30%,
        #ff9ff3 60%,
        #ff6b9d 100%);
    background-size: 150% 150%;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 
        0 0 0 0.5px rgba(255, 255, 255, 0.4) inset,
        0 12px 40px rgba(255, 107, 157, 0.35),
        0 6px 20px rgba(255, 107, 157, 0.25),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 2px 2px rgba(255, 255, 255, 0.4),
        inset 0 -2px 2px rgba(255, 107, 157, 0.15);
    transition: all 0.4s var(--ease-apple);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    position: relative;
    overflow: hidden;
    animation: backgroundMove 10s ease infinite;
}

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

.music-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, 
        rgba(255, 107, 157, 0.8) 0deg, 
        rgba(255, 159, 243, 0.6) 90deg, 
        rgba(255, 107, 157, 0.8) 180deg, 
        rgba(255, 159, 243, 0.6) 270deg, 
        rgba(255, 107, 157, 0.8) 360deg);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.music-btn:hover::before {
    opacity: 1;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.music-btn:hover {
    transform: scale(1.12) rotate(5deg) translateZ(0);
    box-shadow: 
        0 0 0 0.5px rgba(255, 255, 255, 0.5) inset,
        0 18px 50px rgba(255, 107, 157, 0.4),
        0 10px 25px rgba(255, 107, 157, 0.3),
        0 4px 10px rgba(0, 0, 0, 0.12),
        inset 0 3px 3px rgba(255, 255, 255, 0.5),
        inset 0 -2px 3px rgba(255, 107, 157, 0.2);
    background-position: 100% 50%;
}

.music-btn:active {
    transform: scale(0.95) rotate(-2deg) translateZ(0);
    transition: all 0.08s ease;
    box-shadow: 
        0 0 0 0.5px rgba(255, 255, 255, 0.3) inset,
        0 4px 12px rgba(255, 107, 157, 0.3),
        0 2px 6px rgba(255, 107, 157, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.3),
        inset 0 -1px 1px rgba(255, 107, 157, 0.1);
}

/* Subtle Inner Glow */
.music-btn::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 30%;
    height: 30%;
    background: radial-gradient(circle,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.3) 40%,
        transparent 70%);
    border-radius: 50%;
    filter: blur(4px);
    opacity: 0.8;
    pointer-events: none;
    animation: glowPulse 4s ease infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.music-btn.playing {
    animation: pulse 2s infinite;
}

.music-tooltip {
    position: absolute;
    bottom: 75px;
    right: 50%;
    transform: translateX(50%);
    background: linear-gradient(135deg, 
        rgba(255, 107, 157, 0.95) 0%, 
        rgba(255, 139, 171, 0.9) 100%);
    color: white;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(255, 107, 157, 0.4),
        0 4px 12px rgba(255, 107, 157, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: musicTooltipShow 0.4s ease-out forwards, musicTooltipPulse 2s ease-in-out 0.4s infinite;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.music-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(255, 107, 157, 0.95);
}

.music-tooltip.fade-out {
    animation: musicTooltipHide 0.3s ease-in forwards;
}

@keyframes pulse {
    0% { 
        transform: scale(1) rotate(0deg); 
        box-shadow: 
            0 8px 30px rgba(255, 107, 157, 0.4),
            0 4px 15px rgba(255, 107, 157, 0.3);
        filter: brightness(1) saturate(1);
    }
    25% {
        transform: scale(1.05) rotate(2deg);
        filter: brightness(1.05) saturate(1.1);
    }
    50% { 
        transform: scale(1.1) rotate(5deg); 
        box-shadow: 
            0 20px 60px rgba(255, 107, 157, 0.5),
            0 10px 30px rgba(255, 107, 157, 0.4),
            0 0 40px rgba(255, 107, 157, 0.2);
        filter: brightness(1.1) saturate(1.2);
    }
    75% {
        transform: scale(1.05) rotate(2deg);
        filter: brightness(1.05) saturate(1.1);
    }
    100% { 
        transform: scale(1) rotate(0deg); 
        box-shadow: 
            0 8px 30px rgba(255, 107, 157, 0.4),
            0 4px 15px rgba(255, 107, 157, 0.3);
        filter: brightness(1) saturate(1);
    }
}

@keyframes tooltipPulse {
    0%, 100% { 
        transform: scale(1) translateY(0);
        opacity: 0.95;
    }
    50% { 
        transform: scale(1.05) translateY(-3px);
        opacity: 1;
    }
}

@keyframes musicTooltipShow {
    from {
        opacity: 0;
        transform: translateX(50%) translateY(10px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(50%) translateY(0) scale(1);
    }
}

@keyframes musicTooltipPulse {
    0%, 100% { 
        transform: translateX(50%) scale(1);
        opacity: 1;
    }
    50% { 
        transform: translateX(50%) scale(1.05);
        opacity: 0.9;
    }
}

@keyframes musicTooltipHide {
    from {
        opacity: 1;
        transform: translateX(50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(50%) translateY(-10px) scale(0.8);
    }
}

/* Photo Modal */
.photo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    overflow: hidden;
}

/* Hide scrollbars when modal is open */
body.modal-open {
    overflow: hidden;
    height: 100vh;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(255, 251, 253, 0.95) 100%);
    backdrop-filter: var(--backdrop-blur-strong);
    -webkit-backdrop-filter: var(--backdrop-blur-strong);
    border: 1px solid rgba(255, 107, 157, 0.15);
    border-radius: 28px;
    padding: 2rem;
    width: min(95vw, 1100px);
    height: min(95vh, 850px);
    box-shadow: 
        0 30px 90px rgba(255, 107, 157, 0.3),
        0 15px 45px rgba(255, 107, 157, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(255, 107, 157, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 30px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.2) 30%,
        rgba(255, 107, 157, 0.1) 70%,
        rgba(255, 107, 157, 0.3) 100%);
    z-index: -1;
    filter: blur(1px);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--primary-red);
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 107, 157, 0.1);
}

.modal-header {
    margin-bottom: 1.5rem;
    text-align: center;
    flex-shrink: 0;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 251, 253, 0.9) 100%);
    border-radius: 18px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 20px rgba(255, 107, 157, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.modal-header h3 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(255, 107, 157, 0.1);
    letter-spacing: 0.5px;
}

.modal-header p {
    color: #444;
    line-height: 1.6;
    font-size: 1.05rem;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

.photo-gallery {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.gallery-container {
    position: relative;
    margin-bottom: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.photo-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    margin: 0.5rem 0;
    position: relative;
    overflow: visible;
    padding: 0.5rem;
    box-sizing: border-box;
}

.photo-display img {
    max-width: calc(100% - 1rem);
    max-height: calc(100vh - 200px);
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.gallery-nav:hover {
    transform: translateY(-50%) scale(1.1);
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.gallery-nav.prev {
    left: 15px;
}

.gallery-nav.next {
    right: 15px;
}

.photo-thumbnails {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: nowrap;
    margin-top: 0.8rem;
    flex-shrink: 0;
    padding: 0.5rem 0;
    max-height: 80px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.photo-thumbnails::-webkit-scrollbar {
    display: none;
}

.thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
    opacity: 1;
    transform: scale(1.15) rotate(-2deg);
    box-shadow: 
        0 4px 15px rgba(255, 107, 157, 0.4),
        0 2px 8px rgba(255, 107, 157, 0.3);
    filter: brightness(1.1);
}

/* Footer Section */
.footer-section {
    padding: 6rem 0;
    text-align: center;
    position: relative;
    background: 
        linear-gradient(180deg,
            transparent 0%,
            rgba(255, 107, 157, 0.02) 50%,
            rgba(255, 179, 198, 0.04) 100%),
        linear-gradient(135deg, 
            rgba(255, 107, 157, 0.03) 0%, 
            rgba(255, 159, 243, 0.02) 50%,
            rgba(255, 179, 198, 0.03) 100%);
    overflow: hidden;
}

.footer-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 107, 157, 0.2) 25%,
        rgba(255, 159, 243, 0.3) 50%,
        rgba(255, 107, 157, 0.2) 75%,
        transparent 100%);
    animation: shimmerLine 4s ease infinite;
}

@keyframes shimmerLine {
    0%, 100% { opacity: 0.5; transform: scaleX(0.8); }
    50% { opacity: 1; transform: scaleX(1); }
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 3rem;
    background: var(--gradient-glass);
    backdrop-filter: var(--backdrop-blur-strong);
    -webkit-backdrop-filter: var(--backdrop-blur-strong);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    box-shadow: 
        0 20px 60px rgba(255, 107, 157, 0.25),
        0 8px 32px rgba(255, 107, 157, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(255, 107, 157, 0.08);
    position: relative;
    overflow: hidden;
}

.footer-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 34px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.2) 40%,
        rgba(255, 107, 157, 0.1) 70%,
        rgba(255, 107, 157, 0.3) 100%);
    z-index: -1;
    filter: blur(1px);
}

.footer-title {
    font-size: 2.5rem;
    color: var(--primary-red);
    margin-bottom: 2rem;
    font-weight: 300;
}

.footer-text {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 1.8;
}

.hearts-animation {
    margin-top: 2rem;
    height: 50px;
    position: relative;
    overflow: hidden;
}

.hearts-animation::before,
.hearts-animation::after {
    content: '♥ ♥ ♥';
    position: absolute;
    color: var(--light-red);
    font-size: 1.5rem;
    animation: heartMove 8s linear infinite;
    width: 100%;
}

.hearts-animation::before {
    animation-delay: -4s;
}

@keyframes heartMove {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* Apple-style responsive breakpoints */
@media (max-width: 834px) { /* iPad Air size */
    .hero-content {
        padding: 3rem 2rem;
        border-radius: 32px;
        margin: 0 1rem;
    }
    
    .hero-title {
        font-size: 3.4rem;
        letter-spacing: -1.5px;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 2.6rem;
        letter-spacing: -1px;
    }
}

@media (max-width: 768px) { /* Standard tablet */
    .hero-content {
        padding: 2.5rem 1.5rem;
        border-radius: 28px;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .counter-content {
        padding: 3rem 2rem;
        border-radius: 28px;
    }
    
    .counter-display {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .counter-item {
        padding: 1rem 0.5rem;
    }
    
    .counter-number {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2.3rem;
    }
    
    .timeline-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .categories-container {
        gap: 3rem;
    }
    
    .category-header {
        padding: 1.5rem 1rem;
        margin-bottom: 2rem;
    }
    
    .category-icon {
        font-size: 2.5rem;
    }
    
    .category-title {
        font-size: 2rem;
    }
    
    .category-description {
        font-size: 1rem;
    }
    
    .albums-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .memory-card {
        max-width: 100%;
        padding: 1.5rem;
    }
    
    .card-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .gallery-container {
        min-height: 220px;
        max-height: 350px;
    }
    
    .modal-content {
        width: 95vw;
        padding: 1rem;
        max-height: 95vh;
    }
    
    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .gallery-nav.prev {
        left: -20px;
    }
    
    .gallery-nav.next {
        right: -20px;
    }
    
    .music-control {
        bottom: 1rem;
        right: 1rem;
    }
    
    .music-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .music-tooltip {
        bottom: 65px;
        font-size: 0.75rem;
        padding: 6px 12px;
    }
    
    .footer-title {
        font-size: 2rem;
    }
    
    .footer-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) { /* iPhone size */
    .container {
        padding: 0 1rem;
    }
    
    /* Optimized mobile background */
    body {
        background: 
            radial-gradient(ellipse at 20% 10%, rgba(255, 107, 157, 0.08) 0%, transparent 40%),
            radial-gradient(ellipse at 80% 90%, rgba(255, 159, 243, 0.06) 0%, transparent 40%),
            linear-gradient(135deg, 
                rgba(255, 255, 255, 0.98) 0%, 
                rgba(255, 250, 252, 0.95) 50%, 
                rgba(254, 245, 248, 0.98) 100%);
    }
    
    .hero-content {
        padding: 2rem 1.5rem;
        border-radius: 24px;
        margin: 0 0.5rem;
    }
    
    .hero-title {
        font-size: 2.4rem;
        letter-spacing: -1px;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        line-height: 1.3;
    }
    
    .section-title {
        font-size: 2.2rem;
        letter-spacing: -0.5px;
    }
    
    .counter-content {
        padding: 2.5rem 1.5rem;
        border-radius: 24px;
    }
    
    .counter-display {
        gap: 1rem;
        grid-template-columns: 1fr 1fr;
    }
    
    .counter-item {
        padding: 1rem 0.5rem;
        border-radius: 16px;
    }
    
    .counter-number {
        font-size: 2rem;
    }
    
    .counter-label {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2.5rem;
    }
    
    .timeline-container {
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .memory-card {
        padding: 1.2rem;
        border-radius: 20px;
    }
    
    .gallery-container {
        min-height: 200px;
        max-height: 320px;
    }
    
    .card-date {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    .card-description {
        font-size: 0.9rem;
    }
    
    .gallery-nav {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        border-radius: 20px;
    }
    
    .photo-display {
        min-height: 250px;
        flex: 1;
        margin: 0.3rem 0;
    }
    
    .photo-display img {
        max-height: calc(95vh - 200px);
        border-radius: 12px;
    }
    
    .footer-content {
        padding: 2.5rem 1.5rem;
        border-radius: 24px;
    }
    
    .footer-title {
        font-size: 1.8rem;
    }
    
    .footer-text {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .music-btn {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .sphere {
        width: 60px;
        height: 60px;
        opacity: 0.1;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .timeline-image {
        display: block !important;
        visibility: visible !important;
        transition: transform 0.2s ease;
    }
    
    .timeline-image:active {
        transform: scale(0.95);
    }
    
    /* Show navigation buttons on touch devices but with different styling */
    .gallery-nav {
        opacity: 0.6;
        background: rgba(255, 255, 255, 0.95);
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
    
    .gallery-nav:active {
        opacity: 1;
        transform: translateY(-50%) scale(0.9);
    }
    
    .photo-display {
        touch-action: pan-x;
        min-height: 60vh !important;
    }
    
    .photo-display img {
        max-height: calc(100vh - 250px) !important;
        max-width: calc(100vw - 2rem) !important;
    }
    
    /* Mobile modal photo optimization */
    .modal-content {
        height: 100vh !important;
        max-height: 100vh !important;
    }
    
    .photo-gallery {
        height: 100% !important;
        flex: 1 !important;
        min-height: 0 !important;
    }
    
    .photo-display {
        flex: 1 !important;
        min-height: 0 !important;
        height: auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .counter-item:active,
    .music-btn:active {
        transform: scale(0.95);
    }
    
    .thumbnail:active {
        transform: scale(0.9);
    }
    
    /* Reduce animations on touch devices for better performance */
    .floating-spheres {
        display: none;
    }
    
    .gradient-bg {
        animation-duration: 30s;
    }
    
    .hero-title,
    .section-title {
        animation: none;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .gradient-bg,
    .floating-hearts,
    .sphere {
        animation: none !important;
    }
}

/* High performance mode for lower-end devices */
@media (max-width: 480px) and (max-resolution: 1.5dppx) {
    .gradient-bg {
        animation-duration: 30s;
    }
    
    .floating-hearts::before,
    .floating-hearts::after {
        animation-duration: 30s;
    }
    
    .sphere {
        animation-duration: 45s;
    }
    
    .backdrop-blur,
    .backdrop-blur-strong {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .floating-hearts::before,
    .floating-hearts::after {
        animation-duration: 30s;
    }
    
    /* Ensure touch events work properly */
    .card-gallery {
        touch-action: pan-x;
    }
    
    .gallery-container {
        touch-action: pan-x;
    }
}

/* Additional UI/UX Optimizations */
.gallery-image {
    cursor: pointer;
}

/* Ensure images fit properly in container */
.card-gallery .gallery-image {
    width: auto !important;
    max-width: 100%;
    height: auto !important;
    max-height: calc(100% - 16px);
    object-fit: scale-down !important;
    margin: 0 auto;
}

.memory-card {
    cursor: default;
}

.memory-card .gallery-container {
    cursor: pointer;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    .card-gallery .gallery-container {
        min-height: 260px !important;
        max-height: 380px !important;
    }
    
    .gallery-image {
        object-fit: contain !important;
        height: auto !important;
    }
    
    .view-more {
        margin: 1rem -1.5rem -1.5rem -1.5rem !important;
        border-radius: 0 0 18px 18px !important;
    }
    
    .modal-header {
        background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.98) 0%, 
            rgba(255, 251, 253, 0.95) 100%) !important;
    }
    
    .gallery-nav {
        opacity: 0.8 !important;
    }
}

@media (max-width: 480px) {
    .card-gallery .gallery-container {
        min-height: 220px !important;
        max-height: 340px !important;
    }
    
    .view-more {
        margin: 1rem -1.2rem -1.2rem -1.2rem !important;
        padding: 1rem !important;
        font-size: 0.9rem !important;
    }
    
    .modal-header {
        padding: 0.8rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .modal-header h3 {
        font-size: 1.4rem !important;
    }
    
    .modal-header p {
        font-size: 0.9rem !important;
    }
    
    .photo-display {
        min-height: 200px !important;
    }
    
    .photo-display img {
        max-height: calc(95vh - 180px) !important;
    }
}

/* Additional Modal Styles for Mobile */
@media (max-width: 768px) {
    .modal-content {
        width: 98vw !important;
        height: 95vh !important;
        padding: 1rem;
        border-radius: 18px;
        display: flex;
        flex-direction: column;
    }
    
    .modal-header {
        flex-shrink: 0;
        margin-bottom: 0.8rem;
    }
    
    .modal-header h3 {
        font-size: 1.5rem;
    }
    
    .photo-gallery {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    
    .photo-display {
        flex: 1;
        min-height: 0;
        margin: 0;
        padding: 0.25rem;
    }
    
    .photo-display img {
        max-width: calc(100vw - 3rem);
        max-height: calc(95vh - 180px);
        border-radius: 12px;
    }
    
    .photo-thumbnails {
        flex-shrink: 0;
        margin-top: 0.5rem;
        padding: 0.5rem 0;
        max-height: 70px;
    }
    
    .gallery-nav {
        background: rgba(0, 0, 0, 0.4) !important;
        border: 1px solid rgba(255, 255, 255, 0.3);
        width: 44px !important;
        height: 44px !important;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98vw !important;
        height: 95vh !important;
        padding: 0.8rem;
        border-radius: 16px;
    }
    
    .modal-header {
        margin-bottom: 0.6rem;
        padding: 0.6rem;
    }
    
    .modal-header h3 {
        font-size: 1.3rem;
        margin-bottom: 0.3rem;
    }
    
    .modal-header p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .photo-display {
        padding: 0.2rem;
    }
    
    .photo-display img {
        max-width: calc(100vw - 2.5rem) !important;
        max-height: calc(100vh - 180px) !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
        border-radius: 10px;
    }
    
    .photo-thumbnails {
        gap: 0.3rem;
        padding: 0.3rem 0;
        max-height: 60px;
    }
    
    .thumbnail {
        width: 40px;
        height: 40px;
    }
    
    .gallery-nav {
        width: 38px !important;
        height: 38px !important;
        font-size: 1.1rem;
        background: rgba(0, 0, 0, 0.5) !important;
    }
    
    .gallery-nav.prev {
        left: 5px !important;
    }
    
    .gallery-nav.next {
        right: 5px !important;
    }
}

/* Extra small screens (iPhone SE, etc.) */
@media (max-width: 375px) and (max-height: 667px) {
    .modal-content {
        width: 100vw !important;
        height: 100vh !important;
        padding: 0.5rem !important;
        border-radius: 0 !important;
    }
    
    .modal-header {
        padding: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .modal-header h3 {
        font-size: 1.2rem !important;
    }
    
    .modal-header p {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }
    
    .photo-display {
        padding: 0.1rem !important;
        margin: 0 !important;
    }
    
    .photo-display img {
        max-width: calc(100vw - 1.5rem) !important;
        max-height: calc(100vh - 140px) !important;
        border-radius: 8px !important;
    }
    
    .photo-thumbnails {
        max-height: 50px !important;
        padding: 0.2rem 0 !important;
    }
    
    .thumbnail {
        width: 35px !important;
        height: 35px !important;
    }
}

/* ================================
   NEW PHOTO STREAM VIEWER STYLES
   ================================ */

.photo-stream-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s var(--ease-apple-out);
    backdrop-filter: var(--backdrop-blur-premium);
    -webkit-backdrop-filter: var(--backdrop-blur-premium);
}

.photo-stream-viewer.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.stream-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.9) 100%),
        linear-gradient(135deg, rgba(255, 107, 157, 0.05) 0%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 1;
}

.stream-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

/* Stream Header */
.stream-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2rem 3rem 1.5rem 3rem;
    background: linear-gradient(to bottom, 
        rgba(0, 0, 0, 0.6) 0%, 
        rgba(0, 0, 0, 0.3) 70%, 
        transparent 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 3;
}

.stream-info {
    flex: 1;
    margin-right: 2rem;
}

.stream-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-white);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.stream-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.stream-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.photo-counter {
    font-size: 1rem;
    color: rgba(33, 37, 41, 0.9);
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.85) 0%,
        rgba(255, 255, 255, 0.65) 50%,
        rgba(255, 255, 255, 0.75) 100%);
    border-radius: 20px;
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 4px 16px rgba(255, 107, 157, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s var(--ease-apple);
}

.stream-close {
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stream-close {
    transition: all 0.3s var(--ease-apple);
    font-size: 1.5rem;
}

.stream-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.08) rotate(90deg);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.stream-close:active {
    transform: scale(0.92) rotate(45deg);
    transition: all 0.08s ease;
    background: rgba(255, 255, 255, 0.2);
}

/* Photo Stream */
.photo-stream {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Enable horizontal swipe gestures */
    touch-action: pan-x;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.photo-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    /* Ensure smooth dragging */
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

/* Disable transition during swiping for smooth dragging */
.photo-stream.swiping .photo-track {
    transition: none;
}

.photo-slide {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
}

.photo-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3),
                0 8px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    will-change: transform, filter;
}

.photo-slide img:hover {
    transform: scale(1.02);
}

/* Navigation Arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 4;
    opacity: 0.8;
}

.nav-arrow {
    font-size: 1.8rem;
    font-weight: 300;
}

.nav-arrow:hover {
    background: rgba(255, 255, 255, 0.22);
    opacity: 1;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.nav-arrow:active {
    transform: translateY(-50%) scale(0.94);
    transition: all 0.08s ease;
    background: rgba(255, 255, 255, 0.18);
}

.prev-arrow:hover {
    transform: translateY(-50%) translateX(-2px) scale(1.08);
}

.next-arrow:hover {
    transform: translateY(-50%) translateX(2px) scale(1.08);
}

.prev-arrow:active {
    transform: translateY(-50%) translateX(2px) scale(0.94);
}

.next-arrow:active {
    transform: translateY(-50%) translateX(-2px) scale(0.94);
}

.prev-arrow {
    left: 2rem;
}

.next-arrow {
    right: 2rem;
}

.nav-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Stream Progress */
.stream-progress {
    padding: 1.5rem 3rem 2rem 3rem;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.6) 0%, 
        rgba(0, 0, 0, 0.3) 70%, 
        transparent 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 3;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-red), var(--secondary-red));
    border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
}

.stream-thumbnails {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.stream-thumbnails::-webkit-scrollbar {
    display: none;
}

.stream-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.stream-thumbnail {
    transition: all 0.35s var(--ease-spring);
    position: relative;
}

.stream-thumbnail:hover {
    transform: scale(1.12) rotate(2deg);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.stream-thumbnail:active {
    transform: scale(0.95) rotate(-1deg);
    transition: all 0.08s ease;
}

.stream-thumbnail.active {
    border-color: var(--primary-red);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4),
                0 0 0 3px rgba(255, 107, 157, 0.25);
    transform: scale(1.15) rotate(0deg);
}

.stream-thumbnail.active::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 10px;
    padding: 3px;
    background: var(--gradient-primary);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    opacity: 0.8;
    animation: borderGlow 2s ease infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.4; }
}

/* Loading Animation */
.photo-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--primary-red);
    border-radius: 50%;
    animation: photoLoading 1s linear infinite;
}

@keyframes photoLoading {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Touch Feedback */
.photo-stream.swiping {
    cursor: grabbing;
}

.photo-stream.swiping .photo-slide img {
    pointer-events: none;
}

/* Fade Animations */
.photo-stream-viewer.entering {
    animation: streamEnter 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.photo-stream-viewer.leaving {
    animation: streamLeave 0.3s cubic-bezier(0.55, 0.06, 0.68, 0.19) forwards;
}

@keyframes streamEnter {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: var(--backdrop-blur-strong);
        -webkit-backdrop-filter: var(--backdrop-blur-strong);
    }
}

@keyframes streamLeave {
    from {
        opacity: 1;
        backdrop-filter: var(--backdrop-blur-strong);
        -webkit-backdrop-filter: var(--backdrop-blur-strong);
    }
    to {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .stream-header {
        padding: 1.5rem 2rem 1rem 2rem;
    }

    .stream-title {
        font-size: 1.8rem;
    }

    .stream-description {
        font-size: 1rem;
    }

    .stream-controls {
        gap: 1rem;
    }

    .photo-counter {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .stream-close {
        width: 40px;
        height: 40px;
    }

    .nav-arrow {
        width: 50px;
        height: 50px;
    }

    .prev-arrow {
        left: 1.5rem;
    }

    .next-arrow {
        right: 1.5rem;
    }

    .stream-progress {
        padding: 1rem 2rem 1.5rem 2rem;
    }

    .stream-thumbnail {
        width: 50px;
        height: 50px;
    }

    .photo-slide {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .stream-header {
        padding: 1rem 1.5rem 0.8rem 1.5rem;
    }

    .stream-title {
        font-size: 1.5rem;
    }

    .stream-description {
        font-size: 0.9rem;
    }

    .photo-counter {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    .stream-close {
        width: 36px;
        height: 36px;
    }

    .nav-arrow {
        width: 44px;
        height: 44px;
    }

    .prev-arrow {
        left: 1rem;
    }

    .next-arrow {
        right: 1rem;
    }

    .stream-progress {
        padding: 0.8rem 1.5rem 1rem 1.5rem;
    }

    .stream-thumbnails {
        gap: 0.5rem;
    }

    .stream-thumbnail {
        width: 44px;
        height: 44px;
    }

    .photo-slide {
        padding: 0.5rem;
    }
}

/* Extra Small Screens */
@media (max-width: 375px) {
    .stream-header {
        padding: 0.8rem 1rem 0.6rem 1rem;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .stream-info {
        margin-right: 0;
    }

    .stream-controls {
        justify-content: space-between;
    }

    .stream-title {
        font-size: 1.3rem;
    }

    .stream-description {
        font-size: 0.8rem;
    }

    .nav-arrow {
        width: 40px;
        height: 40px;
    }

    .prev-arrow {
        left: 0.8rem;
    }

    .next-arrow {
        right: 0.8rem;
    }

    .stream-thumbnail {
        width: 40px;
        height: 40px;
    }
}

/* ===== IMAGE SAVE FUNCTIONALITY ===== */

/* Ensure thumbnails container is always visible */
.stream-progress {
    display: block !important;
    visibility: visible !important;
}

.stream-thumbnails {
    display: flex !important;
    visibility: visible !important;
    min-height: 70px; /* Ensure minimum height even with one thumbnail */
}

/* Long press feedback styles */
.gallery-image, 
.photo-slide img, 
.photo-slide-image,
.stream-thumbnail,
.save-enabled {
    /* Enable context menu for long press save */
    -webkit-touch-callout: default;
    -webkit-user-select: none;
    user-select: none;
    
    /* Smooth transitions for feedback */
    transition: transform 0.2s var(--ease-apple), 
                opacity 0.2s var(--ease-apple),
                filter 0.2s var(--ease-apple);
    
    /* Cursor indicates interactive element */
    cursor: pointer;
}

/* Long press visual feedback */
.gallery-image:active, 
.photo-slide img:active, 
.photo-slide-image:active,
.stream-thumbnail:active,
.save-enabled:active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* Desktop hover effects */
@media (hover: hover) and (pointer: fine) {
    .gallery-image:hover, 
    .photo-slide img:hover, 
    .photo-slide-image:hover,
    .stream-thumbnail:hover,
    .save-enabled:hover {
        transform: scale(1.02);
        filter: brightness(1.1);
    }
}

/* Mobile specific enhancements */
@media (max-width: 768px) {
    .gallery-image, 
    .photo-slide img, 
    .photo-slide-image,
    .stream-thumbnail,
    .save-enabled {
        /* Ensure proper touch handling */
        -webkit-touch-callout: default;
        -webkit-tap-highlight-color: rgba(255, 107, 157, 0.2);
        
        /* Improve touch responsiveness */
        touch-action: manipulation;
    }
    
    /* Long press hint - subtle visual cue */
    .gallery-image::after {
        content: '';
        position: absolute;
        top: 8px;
        right: 8px;
        width: 16px;
        height: 16px;
        background: rgba(255, 255, 255, 0.8);
        border-radius: 50%;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7,10 12,15 17,10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>');
        background-position: center;
        background-repeat: no-repeat;
        background-size: 12px;
    }
    
    /* Show download hint on hover/focus for supported devices */
    .image-container:hover .gallery-image::after,
    .gallery-image:focus::after {
        opacity: 0.7;
    }
}

/* Enhanced visual feedback for successful long press */
@keyframes saveHint {
    0% { 
        transform: scale(1) rotate(0deg); 
        opacity: 0.8; 
    }
    50% { 
        transform: scale(0.95) rotate(-2deg); 
        opacity: 0.6; 
    }
    100% { 
        transform: scale(1) rotate(0deg); 
        opacity: 0.8; 
    }
}

.long-press-feedback {
    animation: saveHint 0.6s ease-out;
}

/* Accessibility improvements */
.gallery-image:focus,
.photo-slide img:focus,
.photo-slide-image:focus,
.stream-thumbnail:focus,
.save-enabled:focus {
    outline: 3px solid var(--primary-red);
    outline-offset: 2px;
}

/* Print styles - ensure images are printable */
@media print {
    .gallery-image, 
    .photo-slide img,
    .photo-slide-image {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }
}

/* ================================
   PERFORMANCE OPTIMIZATION STYLES
   ================================ */

/* Pending load state - images waiting to be loaded */
.pending-load {
    background: linear-gradient(135deg, 
        rgba(255, 107, 157, 0.1) 0%, 
        rgba(255, 107, 157, 0.05) 50%, 
        rgba(255, 107, 157, 0.1) 100%);
    background-size: 200% 200%;
    animation: shimmer 2s ease-in-out infinite;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Shimmer animation for loading state */
@keyframes shimmer {
    0% {
        background-position: -200% -200%;
    }
    100% {
        background-position: 200% 200%;
    }
}

/* Loading state */
.loading {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 107, 157, 0.3);
    border-top: 2px solid var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 2;
}

/* Spin animation for loading indicator */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loaded state */
.loaded {
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Error state */
.error {
    background: rgba(255, 0, 0, 0.1);
    position: relative;
}

.error::before {
    content: '⚠️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    z-index: 2;
}

/* Optimize thumbnail loading states */
.stream-thumbnail.pending-load {
    min-height: 60px;
    background: rgba(255, 107, 157, 0.1);
    border-radius: 8px;
}

.stream-thumbnail.loading {
    opacity: 0.5;
}

.stream-thumbnail.loaded {
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* Performance-conscious transitions */
.gallery-image,
.photo-slide-image,
.stream-thumbnail {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .pending-load,
    .loading::after {
        animation: none;
    }
    
    .loaded {
        animation: none;
    }
    
    .gallery-image,
    .photo-slide-image,
    .stream-thumbnail {
        transition: none;
    }
}

/* Mobile performance optimizations */
@media (max-width: 768px) {
    .pending-load {
        min-height: 150px;
        background-size: 100% 100%;
        animation-duration: 1.5s;
    }
    
    .loading::after {
        width: 16px;
        height: 16px;
        margin: -8px 0 0 -8px;
        border-width: 1.5px;
    }
    
    /* Optimize for touch devices */
    .gallery-image,
    .photo-slide-image,
    .stream-thumbnail {
        transform-origin: center center;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Performance notification animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Performance monitoring debug panel (development only) */
.debug-performance-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 11px;
    line-height: 1.4;
    z-index: 9999;
    max-width: 300px;
    display: none;
}

.debug-performance-panel.active {
    display: block;
}

.debug-performance-panel .metric {
    margin: 2px 0;
}

.debug-performance-panel .metric-label {
    color: #ffb3d1;
    font-weight: bold;
}

/* Image loading quality indicators */
.image-quality-low {
    filter: blur(1px) brightness(0.9);
    transition: filter 0.3s ease;
}

.image-quality-normal {
    filter: none;
    transition: filter 0.3s ease;
}

.image-quality-high {
    filter: none;
    transition: filter 0.3s ease;
}

/* Connection quality indicator */
.connection-indicator {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    z-index: 9999;
    display: none;
}

.connection-indicator.slow {
    background: rgba(255, 193, 7, 0.9);
    color: black;
    display: block;
}

.connection-indicator.offline {
    background: rgba(220, 53, 69, 0.9);
    display: block;
}
