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

:root {
    /* Apple System Colors - Following HIG */
    --system-blue: #007AFF;
    --system-blue-dark: #0A84FF;
    --system-cyan: #32D74B;
    --system-gray: #8E8E93;
    --system-gray-2: #AEAEB2;
    --system-gray-3: #C7C7CC;
    --system-gray-4: #D1D1D6;
    --system-gray-5: #E5E5EA;
    --system-gray-6: #F2F2F7;
    
    /* Semantic Colors */
    --primary: var(--system-blue);
    --primary-dark: var(--system-blue-dark);
    --secondary: var(--system-cyan);
    
    /* Background Colors (not pure white/black per HIG) */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F2F2F7;
    --bg-tertiary: #FFFFFF;
    
    /* Text Colors (proper contrast) */
    --text-primary: #000000;
    --text-secondary: #3C3C43;
    --text-tertiary: #8E8E93;
    
    /* Spacing - 8pt grid system */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
    
    /* Typography */
    --font-size-large-title: 34px;
    --font-size-title-1: 28px;
    --font-size-title-2: 22px;
    --font-size-title-3: 20px;
    --font-size-headline: 17px;
    --font-size-body: 17px;
    --font-size-callout: 16px;
    --font-size-subhead: 15px;
    --font-size-footnote: 13px;
    --font-size-caption-1: 12px;
    --font-size-caption-2: 11px;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.47059; /* Apple's standard line height */
    font-size: var(--font-size-body);
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation - Following HIG */
nav {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    padding: var(--spacing-md) var(--spacing-lg);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    will-change: transform;
    transform: translateZ(0);
}

nav ul.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--spacing-xl);
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-app-store {
    display: flex;
    align-items: center;
}

/* App Store badge in navigation */
nav .app-store-badge {
    height: 32px;
}

/* Hamburger menu button */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.hamburger-menu span {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-maze-grid {
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.nav-logo-text {
    font-size: 18px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Rounded', 'SF Rounded', 'Helvetica Neue', sans-serif;
    letter-spacing: -0.18px;
    color: var(--text-primary);
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--font-size-subhead);
    letter-spacing: -0.24px; /* Apple's letter spacing */
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: background-color 0.2s ease, color 0.2s ease;
    min-height: 44px; /* Minimum touch target per HIG */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

nav a:hover,
nav a:focus {
    background-color: var(--system-gray-6);
    color: var(--primary);
}

nav a:active {
    background-color: var(--system-gray-5);
}

/* Container - Following 8pt grid */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
}

/* Hero Section - Following HIG color and spacing */
.hero {
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-lg);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('Background/17.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    filter: blur(3px);
    -webkit-filter: blur(3px);
    pointer-events: none;
    z-index: 0;
    will-change: transform;
    transform: translateZ(0);
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3); /* Dark overlay for text readability */
    pointer-events: none;
    z-index: 1;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    position: relative;
    z-index: 2;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px; /* Matches SwiftUI hStackSpacing: 12 (desktop) */
    margin-bottom: 4px; /* Matches SwiftUI vStackSpacing: 4 (desktop) */
}

.maze-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.maze-grid {
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    will-change: transform;
    transform: translateZ(0);
}

.animated-path {
    will-change: stroke-dashoffset;
    transform: translateZ(0);
}

.logo-text {
    font-size: 24px; /* Matches SwiftUI titleFontSize: 24 (desktop) */
    margin: 0;
    margin-top: 13px; /* Slightly lower position */
    font-weight: 700; /* Matches SwiftUI .bold */
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Rounded', 'SF Rounded', 'Helvetica Neue', sans-serif;
    letter-spacing: -0.24px;
    color: white;
}

.logo-tagline {
    font-size: 12px; /* Matches SwiftUI taglineFontSize: 12 (desktop) */
    font-weight: 500; /* Matches SwiftUI .medium */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: -0.08px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Rounded', 'SF Rounded', 'Helvetica Neue', sans-serif;
}

.challenge-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    margin-top: 0px;
    margin-bottom: var(--spacing-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
    will-change: transform;
    transform: translateZ(0);
}

.badge-icon {
    height: 28px;
    width: auto;
    display: block;
    object-fit: contain;
}

.badge-text {
    font-size: 13px;
    font-weight: 600;
    color: white;
    letter-spacing: -0.1px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Rounded', 'SF Rounded', 'Helvetica Neue', sans-serif;
}

.hero-subtitle {
    font-size: var(--font-size-title-3);
    max-width: 600px;
    margin: var(--spacing-xl) auto 0;
    opacity: 0.95;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -0.24px;
    position: relative;
    z-index: 2;
}

/* App Store Download Section */
.app-store-section {
    background: var(--bg-primary);
    padding: var(--spacing-2xl) var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

/* App Store Download Badge */
.app-store-badge-link {
    display: inline-block;
    cursor: default;
    transition: transform 0.2s ease, opacity 0.2s ease;
    will-change: transform;
    transform: translateZ(0);
}

.app-store-badge-link:hover {
    transform: translateY(-2px) translateZ(0);
    opacity: 0.9;
}

.app-store-badge-link:active {
    transform: translateY(0) translateZ(0);
}

.app-store-badge {
    height: 40px;
    width: auto;
    display: block;
    max-width: 100%;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.95;
}

/* Section Styling - Following HIG */
section {
    background: var(--bg-primary);
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-2xl) var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.08);
    border: 0.5px solid rgba(0, 0, 0, 0.05);
}

section h2 {
    color: var(--primary);
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-title-1);
    font-weight: 700;
    letter-spacing: -0.36px;
    line-height: 1.28571;
}

section h3 {
    color: var(--text-primary);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-title-3);
    font-weight: 600;
    letter-spacing: -0.24px;
    line-height: 1.4;
}

section ul {
    list-style: none;
    padding-left: 0;
}

section ul li {
    margin-bottom: var(--spacing-sm);
    padding-left: var(--spacing-lg);
    position: relative;
    font-size: var(--font-size-body);
    line-height: 1.47059;
    color: var(--text-primary);
}

section ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 600;
}

/* Screenshots Gallery - Horizontal Scrollable */
.screenshots-scroll {
    display: flex;
    gap: var(--spacing-lg);
    overflow-x: auto;
    overflow-y: hidden;
    padding: var(--spacing-md) var(--spacing-sm);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--system-gray-4) transparent;
    will-change: scroll-position;
    transform: translateZ(0);
}

.screenshots-scroll::-webkit-scrollbar {
    height: 8px;
}

.screenshots-scroll::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.screenshots-scroll::-webkit-scrollbar-thumb {
    background: var(--system-gray-4);
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.screenshots-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--system-gray-3);
}

.screenshot-item {
    position: relative;
    flex-shrink: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg-secondary);
    padding: var(--spacing-sm);
    cursor: pointer;
    will-change: transform;
    transform: translateZ(0);
}

.screenshot-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
}

/* iPhone screenshots - portrait orientation */
.iphone-screenshots .screenshot-item {
    width: 280px;
    max-width: 280px;
}

/* iPad screenshots - landscape orientation */
.ipad-screenshots .screenshot-item {
    width: 480px;
    max-width: 480px;
}

/* Features Grid - Following HIG spacing and colors */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.feature-card {
    background: var(--bg-secondary);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 0.5px solid rgba(0, 0, 0, 0.05);
    will-change: transform;
    transform: translateZ(0);
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.15);
}

.feature-card h4 {
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-headline);
    font-weight: 600;
    letter-spacing: -0.24px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: var(--font-size-body);
    line-height: 1.47059;
    margin: 0;
}

/* Contact Form - Following HIG */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-subhead);
    letter-spacing: -0.08px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--spacing-md);
    border: 0.5px solid var(--system-gray-4);
    border-radius: var(--radius-md);
    font-size: var(--font-size-body);
    font-family: inherit;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 44px; /* Minimum touch target per HIG */
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.47059;
}

.btn {
    background: var(--primary);
    color: white;
    padding: var(--spacing-md) var(--spacing-xl);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-body);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 44px; /* Minimum touch target per HIG */
    letter-spacing: -0.24px;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 122, 255, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Form Messages */
.form-message {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: var(--font-size-body);
    line-height: 1.47059;
}

.form-message.success {
    background-color: rgba(52, 199, 89, 0.1);
    color: #34C759;
    border: 0.5px solid rgba(52, 199, 89, 0.3);
}

.form-message.error {
    background-color: rgba(255, 59, 48, 0.1);
    color: #FF3B30;
    border: 0.5px solid rgba(255, 59, 48, 0.3);
}

/* Privacy Policy - Following HIG typography */
.privacy-content {
    line-height: 1.47059; /* Apple's standard line height */
    color: var(--text-primary);
}

.privacy-content p {
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-body);
}

.privacy-content ul {
    margin-left: var(--spacing-xl);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.privacy-content li {
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-body);
    line-height: 1.47059;
}

/* Footer - Following HIG */
footer {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    text-align: center;
    padding: var(--spacing-xl);
    margin-top: var(--spacing-3xl);
    border-top: 0.5px solid rgba(0, 0, 0, 0.1);
}

footer p {
    font-size: var(--font-size-footnote);
    color: var(--text-tertiary);
    margin: 0;
}

/* Disable hover effects on touch devices for better performance */
@media (hover: none) and (pointer: coarse) {
    .screenshot-item:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .feature-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .app-store-badge-link:hover {
        transform: none;
        opacity: 1;
    }
    
    .app-store-section {
        padding: var(--spacing-xl) var(--spacing-md);
        margin: var(--spacing-lg) 0;
    }
}

/* Responsive - Following HIG breakpoints and spacing */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 24px;
        --spacing-2xl: 32px;
        --spacing-3xl: 48px;
    }

    .container {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .hero {
        padding: var(--spacing-2xl) var(--spacing-md);
    }
    
    /* Reduce blur on mobile for better performance */
    .hero::before {
        filter: blur(1px);
        -webkit-filter: blur(1px);
    }

    .logo-wrapper {
        gap: var(--spacing-sm);
    }

    .maze-grid {
        width: 50px;
        height: 50px;
    }

    .maze-grid .animated-path {
        stroke-width: 1.5; /* Matches SwiftUI pathLineWidth: 1.5 (iPhone) */
    }
    
    .logo-text {
        font-size: 18px; /* Matches SwiftUI titleFontSize: 18 (iPhone) */
    }
    
    .logo-tagline {
        font-size: 10px; /* Matches SwiftUI taglineFontSize: 10 (iPhone) */
    }
    
    .challenge-badge {
        padding: 6px 12px;
        margin-top: 4px;
    }
    
    .challenge-badge {
        margin-top: 4px;
    }
    
    .badge-icon {
        height: 24px;
    }
    
    .badge-text {
        font-size: 11px;
    }

    .hero-subtitle {
        font-size: var(--font-size-headline);
    }
    
    .app-store-badge {
        height: 35px;
    }

    section {
        padding: var(--spacing-xl) var(--spacing-lg);
        margin: var(--spacing-lg) 0;
    }

    section h2 {
        font-size: var(--font-size-title-2);
    }

    section h3 {
        font-size: var(--font-size-headline);
    }

    nav {
        padding: var(--spacing-md);
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        position: relative;
    }
    
    .nav-logo {
        margin-bottom: 0;
    }
    
    .hamburger-menu {
        display: flex;
    }
    
    /* Hide navigation menu in header on mobile - only show in hamburger menu */
    nav ul.nav-menu {
        display: flex;
        position: absolute;
        top: calc(100% + var(--spacing-sm));
        right: 0;
        width: 200px;
        min-width: 180px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px) saturate(180%);
        -webkit-backdrop-filter: blur(10px) saturate(180%);
        flex-direction: column;
        gap: var(--spacing-xs);
        padding: var(--spacing-sm);
        border-radius: var(--radius-lg);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        margin: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px) scale(0.95) translateZ(0);
        pointer-events: none;
        transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
        will-change: opacity, transform;
    }
    
    nav ul.nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1) translateZ(0);
        pointer-events: all;
        transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0s;
    }
    
    /* Reduce backdrop filters on mobile for better performance */
    nav {
        backdrop-filter: blur(10px) saturate(180%);
        -webkit-backdrop-filter: blur(10px) saturate(180%);
        background-color: rgba(255, 255, 255, 0.7);
    }
    
    .challenge-badge {
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        background: rgba(255, 255, 255, 0.25);
    }
    
    nav ul.nav-menu.active a {
        color: var(--text-primary);
        white-space: nowrap;
    }
    
    nav ul.nav-menu.active a:hover,
    nav ul.nav-menu.active a:focus {
        background-color: var(--system-gray-6);
        color: var(--primary);
    }
    
    nav ul.nav-menu.active a:active {
        background-color: var(--system-gray-5);
    }

    nav ul.nav-menu li {
        width: 100%;
    }

    nav ul.nav-menu a {
        width: 100%;
        justify-content: flex-start;
        padding: var(--spacing-sm) var(--spacing-md);
        border-radius: var(--radius-md);
        font-size: var(--font-size-body);
    }
    
    .nav-app-store {
        width: 100%;
        justify-content: center;
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    nav .app-store-badge {
        height: 30px;
    }

    .features {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .screenshots-scroll {
        padding: var(--spacing-sm);
        gap: var(--spacing-md);
    }

    .iphone-screenshots .screenshot-item {
        width: 240px;
        max-width: 240px;
    }

    .ipad-screenshots .screenshot-item {
        width: 400px;
        max-width: 400px;
    }

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

    .lightbox-prev {
        left: var(--spacing-md);
    }

    .lightbox-next {
        right: var(--spacing-md);
    }

    .lightbox-close {
        top: var(--spacing-md);
        right: var(--spacing-md);
    }
    
    /* Reduce backdrop filters on mobile for better performance */
    .lightbox {
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
    
    .lightbox-close,
    .lightbox-nav {
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
}

/* Hidden class for single-page navigation */
.hidden {
    display: none;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    animation: fadeIn 0.3s ease;
    will-change: opacity;
    transform: translateZ(0);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
    will-change: transform, opacity;
    transform: translateZ(0);
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: var(--spacing-xl);
    right: var(--spacing-xl);
    color: white;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.2s ease, background 0.2s ease;
    z-index: 1001;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
}

.lightbox-close:hover {
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    cursor: pointer;
    z-index: 1001;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
    padding: 0;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

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

.lightbox-prev {
    left: var(--spacing-xl);
}

.lightbox-next {
    right: var(--spacing-xl);
}

.lightbox-nav svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.lightbox-caption {
    position: absolute;
    bottom: var(--spacing-xl);
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: var(--font-size-body);
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-width: 80%;
    display: none; /* Hidden by default since we're not showing captions */
}

