/**
 * Gallery Full-screen Styles
 * Fotografiescu Theme
 */

/* ========================================
   Page Load Animations
   ======================================== */

/* Initial hidden states for page load animation */
body.page-loading .header-logo-wrapper {
    opacity: 0;
}

body.page-loading .header-left,
body.page-loading .header-search,
body.page-loading .header-right .header-icon {
    opacity: 0;
    transform: translateY(-50px);
}

body.page-loading .image-info-overlay {
    opacity: 0;
    transform: translateX(100px);
}

/* Hide overlay while image is loading */
body:has(.main-image-loader.loading) .image-info-overlay {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.15s ease-out !important;
}

/* Show overlay when image is loaded */
body:not(:has(.main-image-loader.loading)) .image-info-overlay {
    transition: opacity 0.4s ease-in 0.1s !important;
}

body.page-loading .thumbnail-strip {
    opacity: 0;
    transform: translateY(100px);
}

body.page-loading .controls-bar {
    opacity: 0;
    transform: translateY(100px);
}

/* Fade in animation for logo */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Drop down with elastic animation */
@keyframes dropDownElastic {
    0% {
        opacity: 0;
        transform: translateY(-50px);
    }
    50% {
        opacity: 1;
        transform: translateY(10px);
    }
    70% {
        transform: translateY(-5px);
    }
    85% {
        transform: translateY(3px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bounce in from right with elasticity */
@keyframes bounceInFromRight {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }
    50% {
        opacity: 1;
        transform: translateX(-15px);
    }
    70% {
        transform: translateX(8px);
    }
    85% {
        transform: translateX(-4px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Bounce up from bottom with elasticity */
@keyframes bounceUpFromBottom {
    0% {
        opacity: 0;
        transform: translateY(100px);
    }
    50% {
        opacity: 1;
        transform: translateY(-15px);
    }
    70% {
        transform: translateY(8px);
    }
    85% {
        transform: translateY(-4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation classes */
.anim-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.anim-drop-down {
    animation: dropDownElastic 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.anim-bounce-right {
    animation: bounceInFromRight 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.anim-bounce-up {
    animation: bounceUpFromBottom 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* ========================================
   CSS Variables / Design Tokens
   ======================================== */
:root {
    /* Time-of-day Themes (set by JS) */
    --time-theme-bg: #121212;
    --time-theme-accent: #9B2335;
    --time-theme-warmth: 0;
    
    /* Morning (6am-12pm): warm, bright */
    /* Afternoon (12pm-6pm): neutral, clear */
    /* Evening (6pm-9pm): warm orange */
    /* Night (9pm-6am): cool, dark */
    
    /* Colors */
    --color-overlay: rgba(18, 18, 18, 0.4);
    --color-overlay-hover: rgba(18, 18, 18, 0.7);
    --color-text-primary: rgba(255, 255, 255, 1.0);
    --color-text-secondary: rgba(255, 255, 255, 0.8);
    --color-text-tertiary: rgba(255, 255, 255, 0.6);
    
    /* Crimson & Charcoal Palette */
    --color-accent: #9B2335;
    --color-accent-hover: #7B1E2D;
    --color-accent-light: #E8A0A0;
    --color-accent-rgb: 155, 35, 53;
    --color-like: #E8A0A0;
    --color-success: #2A7B6F;
    --color-warning: #C9A227;
    --color-border: rgba(255, 255, 255, 0.1);
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    
    /* Transitions */
    --transition-fast: 150ms;
    --transition-normal: 300ms;
    --transition-slow: 500ms;
    --transition-image: 800ms;
    --ui-fade-out: 500ms;
    --ui-fade-in: 300ms;
    
    /* Sizing */
    --header-height: 60px;
    --info-panel-width: 300px;
    --controls-height: 32px;
    --thumbnail-height: 80px;
}

/* ========================================
   Reset / Base
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

body.gallery-fullscreen {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #121212;
    color: var(--color-text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ========================================
   Gallery App Container
   ======================================== */
.gallery-app {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* ========================================
   Image Container
   Extends all the way down to controls bar
   Image displays under info-overlay and thumbnail strip (both have translucent backgrounds)
   ======================================== */
.image-container {
    position: absolute;
    top: var(--header-height);      /* 60px - starts below header */
    left: 0;
    right: 0;
    /* Image extends all the way to bottom - shows through all translucent overlays */
    bottom: 0;
    z-index: 1;
}

/* ========================================
   Image Info Overlay (Title & Description)
   Positioned directly above thumbnail strip
   Minimalistic design with big title
   ======================================== */
.image-info-overlay {
    position: fixed;
    /* Position snapped to top of thumbnail strip (no gap) */
    /* 32px controls + 80px thumbnails = 112px */
    bottom: calc(var(--controls-height, 32px) + var(--thumbnail-height, 80px));
    left: 0;
    right: 0;
    z-index: 20;
    pointer-events: auto;
    /* Match thumbnail strip background */
    background: var(--color-overlay);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px var(--space-lg) 24px calc(var(--space-xl) + 40px);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    /* Border - 2px top only, bottom connects seamlessly to thumbnail strip */
    border-top: 2px solid rgba(255, 255, 255, 0.15);
    border-bottom: none;
    /* Transitions - includes height changes with 0.7s accelerated animation */
    transition: opacity var(--ui-fade-out) ease-out, 
                bottom 0.5s cubic-bezier(0, 0, 0.2, 1),
                height 0.7s ease-in,
                min-height 0.7s ease-in,
                max-height 0.7s ease-in,
                padding-top 0.7s ease-in,
                padding-bottom 0.7s ease-in;
}



/* Idle mode animation - slide to bottom with elastic acceleration (1s duration) */
.image-info-overlay.idle-animating-down {
    transition: bottom 1s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                height 0.7s ease-in !important;
}

/* Active mode animation - slide back up with elastic acceleration */
.image-info-overlay.idle-animating-up {
    transition: bottom 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                height 0.7s ease-in !important;
}

/* Left side - info content */
.overlay-info {
    flex: 1;
    min-width: 0;
    max-width: 65%;
    transition: max-width 0.5s ease;
}

.overlay-title {
    font-size: 42px;
    font-weight: 300;
    color: white;
    margin: 0 0 var(--space-sm);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    line-height: 1.15;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: -0.02em;
    /* Allow title to wrap naturally */
    white-space: normal;
    word-wrap: break-word;
}

/* Smaller title on medium screens */
@media (max-width: 1200px) {
    .overlay-title {
        font-size: 32px;
    }
}

.overlay-description {
    font-size: 25px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 var(--space-md);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.5;
    /* 3 lines max in non-idle */
    max-height: 112px; /* 3 lines * 1.5 line-height * 25px */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    letter-spacing: 0.01em;
    width: 100%;
    transition: max-height 0.5s ease, width 0.5s ease;
}

/* Right side - actions */
.overlay-actions {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-shrink: 0;
}

/* Download button wrapper for vertical stacking */
.download-button-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 140px;
}

.overlay-action-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    text-decoration: none;
    width: 100%;
}

.overlay-action-btn .icon {
    width: 18px;
    height: 18px;
}

/* Button content row (icon + text) */
.overlay-action-btn .btn-text {
    display: inline;
}

/* Share button - same width, subtle style */
.btn-share {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-share:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Order Prints button - same style as share */
.btn-order {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-order:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Download button - smaller padding */
.btn-download {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 16px;
    font-size: 13px;
}

.btn-download .icon {
    width: 16px;
    height: 16px;
}

.btn-download:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Download resolution label inside button */
.download-resolution-label {
    font-size: 10px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    text-transform: lowercase;
    letter-spacing: 0.02em;
    margin-left: 4px;
}

/* Register section */
.register-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

/* Register button */
.btn-register {
    background: #000000;
    border: 2px solid #000000;
    color: #ffffff;
    padding: 10px 16px;
    font-size: 13px;
    transition: background 1s ease, color 1s ease, border-color 1s ease, transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.btn-register .icon {
    width: 16px;
    height: 16px;
}

.btn-register:hover {
    background: #ffffff;
    border-color: #000000;
    color: #000000;
    transform: scale(0.97);
    transition: background 1s ease, color 1s ease, border-color 1s ease, transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Register description text */
.register-description {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    line-height: 1.3;
    max-width: 160px;
}

/* Like button */
.btn-like {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px;
    width: auto;
    min-width: 44px;
}

.btn-like:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #EF4444;
}

.btn-like.liked {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #EF4444;
}

.btn-like.liked .icon {
    fill: #EF4444;
}

/* Buy button - accent */
.btn-buy-overlay {
    background: var(--color-accent);
    color: white;
}

.btn-buy-overlay:hover {
    background: var(--color-accent-hover);
}

/* Sale badge in overlay (legacy - now replaced by stock options) */
.overlay-sale-badge {
    background: var(--color-warning);
    color: #000;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========================================
   Stock Options Panel (For Sale Images)
   35% width, 2-column layout with centered button
   ======================================== */
.overlay-stock-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 35%;
    min-width: 340px;
    max-width: 480px;
    flex-shrink: 0;
    padding-left: 30px;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

/* Two-column grid for SIZE + LICENSE */
.stock-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.stock-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stock-option-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

/* Size Options - Vertical list */
.stock-sizes {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.size-option {
    display: grid;
    grid-template-columns: 18px 1fr auto auto;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.size-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 0, 0, 0.6);
}

.size-option:has(input:checked) {
    background: rgba(155, 35, 53, 0.12);
    border-color: var(--color-accent);
}

/* Radio button styling */
.size-option input[type="radio"],
.license-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.15s ease;
    margin: 0;
}

.size-option input[type="radio"]:checked,
.license-option input[type="radio"]:checked {
    border-color: var(--color-accent);
    background: var(--color-accent);
}

.size-option input[type="radio"]:checked::after,
.license-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
}

.size-name {
    font-size: 12px;
    font-weight: 500;
    color: white;
    white-space: nowrap;
}

.size-dimensions {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.45);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    white-space: nowrap;
}

.size-price {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-accent);
    text-align: right;
    min-width: 28px;
}

/* License Options - Vertical list */
.stock-licenses {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.license-option {
    display: grid;
    grid-template-columns: 18px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.license-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 0, 0, 0.6);
}

.license-option:has(input:checked) {
    background: rgba(155, 35, 53, 0.12);
    border-color: var(--color-accent);
}

.license-name {
    font-size: 12px;
    font-weight: 500;
    color: white;
}

.license-extra {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-accent);
}

/* Add to Cart Row - Centered */
.stock-cart-row {
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

/* Add to Cart Button */
.stock-add-to-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    background: #6A1927;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.stock-add-to-cart-btn:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(155, 35, 53, 0.3);
}

.stock-add-to-cart-btn:active {
    transform: translateY(0);
}

.stock-add-to-cart-btn .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.stock-add-to-cart-btn .btn-text {
    /* No flex: 1, let it be natural width */
}

.stock-add-to-cart-btn .btn-price {
    font-weight: 700;
    font-size: 14px;
    padding-left: 6px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

/* Add to Cart - Success State */
.stock-add-to-cart-btn.added {
    background: var(--color-success);
    pointer-events: none;
}

.stock-add-to-cart-btn.added .btn-text::before {
    content: '\2713 ';
}

/* Stock Section Visibility Logic */
/* When stock section is visible (not hidden), hide download section */
.overlay-stock-section:not(.hidden) ~ .overlay-actions,
.image-info-overlay:has(.overlay-stock-section:not(.hidden)) .overlay-actions {
    display: none !important;
}

/* When stock section is hidden, it should not take space */
.overlay-stock-section.hidden {
    display: none !important;
}

/* Ensure overlay-info takes proper width based on what's visible */
.image-info-overlay:has(.overlay-stock-section:not(.hidden)) .overlay-info {
    flex: 1;
    max-width: 65%;
}

.image-info-overlay:has(.overlay-actions:not(.hidden)):not(:has(.overlay-stock-section:not(.hidden))) .overlay-info {
    flex: 1;
    max-width: 65%;
}

/* Cart Badge Bounce Animation */
@keyframes cartBounce {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.4);
    }
    50% {
        transform: scale(0.9);
    }
    75% {
        transform: scale(1.2);
    }
}

.badge.bounce {
    animation: cartBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Hide stock section in idle mode */
body.idle .overlay-stock-section {
    opacity: 0;
    pointer-events: none;
}

/* Hide actions in zen/idle mode */
body.idle .overlay-actions {
    opacity: 0;
    pointer-events: none;
}

/* Technical/EXIF info in overlay - spaced out */
.overlay-technical {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm) var(--space-lg);
    margin-top: var(--space-md);
    transition: opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease;
    max-height: 100px;
    overflow: hidden;
}

.overlay-tech-separator {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.25);
    margin: 0 var(--space-xs);
}

.overlay-tech-separator:empty {
    display: block;
}

.overlay-tech-row {
    display: contents;
}

.overlay-tech-item {
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    letter-spacing: 0.02em;
}

/* Icons for camera, lens, date, location */
.overlay-tech-item[data-icon]:not(:empty)::before {
    content: attr(data-icon) ' ';
    margin-right: 4px;
}

.overlay-tech-item:empty {
    display: none;
}

/* Hide technical section when empty */
.overlay-technical:empty {
    display: none;
}

/* Idle/zen mode - overlay slides down to just above controls bar */
body.idle .image-info-overlay {
    bottom: 32px; /* New controls bar height - just above controls */
    opacity: 1;
    pointer-events: none;
}

body.idle .thumbnail-strip {
    /* transform and opacity are controlled by JavaScript for smooth animations */
    pointer-events: none;
}

body.idle .overlay-actions {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* In idle mode, dim technical info and category to 70% */
body.idle .overlay-technical,
body.idle .overlay-category-row {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

/* In idle mode, expand overlay-info to full width */
body.idle .overlay-info {
    max-width: 100%;
}

/* In idle mode, show full description - full page width */
body.idle .overlay-description {
    -webkit-line-clamp: unset;
    max-height: 500px; /* Large enough for any description */
    overflow: visible;
    /* Full page width minus padding */
    width: calc(100vw - 120px);
    max-width: none;
}

.image-display {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.current-image,
.next-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity var(--transition-image) ease-out;
}

.current-image.active,
.next-image.active {
    opacity: 1;
}

/* Navigation zones (left/right click areas) */
.nav-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    z-index: 15;
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* Left zone - arrow cursor, text on right side fixed to zone edge */
.nav-zone-left {
    left: 0;
    justify-content: flex-start;
    padding-left: 50px;
}

/* Right zone - arrow cursor, text on left side fixed to zone edge */
.nav-zone-right {
    right: 0;
    justify-content: flex-end;
    padding-right: 50px;
}

/* Custom arrow cursors with opacity controlled by CSS variable */
.nav-zone-left {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'%3E%3C/polyline%3E%3C/svg%3E") 16 16, w-resize;
}

.nav-zone-right {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E") 16 16, e-resize;
}

/* Navigation hint text - follows cursor as tooltip */
.nav-hint {
    position: fixed;
    font-size: 12px;
    font-weight: 500;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: var(--nav-opacity, 0);
    transition: opacity 0.15s ease;
    pointer-events: none;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 6px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    white-space: nowrap;
    z-index: 100;
    transform: translate(var(--tooltip-x, 0), var(--tooltip-y, -50%));
    top: var(--cursor-y, 50%);
    left: var(--cursor-x, 0);
}

/* Left zone: tooltip appears on RIGHT side of cursor */
.nav-zone-left .nav-hint {
    --tooltip-x: 30px; /* Offset to right of cursor */
}

/* Right zone: tooltip appears on LEFT side of cursor */
.nav-zone-right .nav-hint {
    --tooltip-x: calc(-100% - 30px); /* Offset to left of cursor */
}

/* Visual arrow indicator - DISABLED (using cursor instead) */
.nav-zone::before {
    display: none;
}

.nav-zone-left::before {
    left: var(--cursor-x, 25%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'%3E%3C/polyline%3E%3C/svg%3E");
}

.nav-zone-right::before {
    left: var(--cursor-x, 75%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
}

/* ========================================
   Navigation Loading State
   ======================================== */
.nav-zone.loading {
    opacity: 0.5 !important;
    cursor: wait !important;
    pointer-events: none;
}

.nav-zone.loading .nav-hint {
    display: none;
}

/* Loading tooltip shown on hover */
.nav-zone.loading::after {
    content: 'LOADING...';
    position: fixed;
    left: var(--cursor-x, 50%);
    top: var(--cursor-y, 50%);
    transform: translate(var(--tooltip-x, -50%), -50%);
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: var(--nav-opacity, 0);
    transition: opacity 0.15s ease;
    pointer-events: none;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

.nav-zone-left.loading::after {
    --tooltip-x: 30px;
}

.nav-zone-right.loading::after {
    --tooltip-x: calc(-100% - 30px);
}

/* Small loading spinner for nav zones */
.nav-zone.loading .nav-loading-spinner {
    display: block;
}

/* ========================================
   Idle Loading Indicator (Glowing Spinner)
   ======================================== */
.idle-loading-indicator {
    position: absolute;
    top: -45px; /* Above overlay content */
    right: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 25;
}

.idle-loading-indicator.visible {
    opacity: 1;
}

.idle-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: idleSpinnerRotate 1s linear infinite;
    
    /* Glow effect - works on dark AND light backgrounds */
    box-shadow: 
        0 0 12px rgba(255, 255, 255, 0.5),
        0 0 24px rgba(100, 180, 255, 0.4),
        0 0 36px rgba(100, 180, 255, 0.2);
    
    /* Dark outline for light backgrounds */
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.6));
}

.idle-loading-text {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.3),
        0 1px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

@keyframes idleSpinnerRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pulse animation for glow */
.idle-loading-indicator.visible .idle-spinner {
    animation: 
        idleSpinnerRotate 1s linear infinite,
        idleSpinnerGlow 2s ease-in-out infinite;
}

/* Text fade pulse */
.idle-loading-indicator.visible .idle-loading-text {
    animation: idleTextPulse 2s ease-in-out infinite;
}

@keyframes idleSpinnerGlow {
    0%, 100% {
        box-shadow: 
            0 0 12px rgba(255, 255, 255, 0.5),
            0 0 24px rgba(100, 180, 255, 0.4),
            0 0 36px rgba(100, 180, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 0 18px rgba(255, 255, 255, 0.7),
            0 0 32px rgba(100, 180, 255, 0.6),
            0 0 48px rgba(100, 180, 255, 0.3);
    }
}

@keyframes idleTextPulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

/* Fit mode - show entire image */
.image-fit-mode .current-image,
.image-fit-mode .next-image {
    object-fit: contain;
    background: #121212;
}

/* Pan mode for portrait/tall images */
.image-pan-mode .current-image,
.image-pan-mode .next-image {
    object-fit: cover;
    object-position: center top;
    transition: object-position 0.15s ease-out;
}

/* Pan hint for first-time users */
.pan-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 25;
    pointer-events: none;
}

.pan-hint-content {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    padding: 20px 32px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.pan-hint-text {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
}

.pan-hint-arrow {
    font-size: 20px;
    opacity: 0.7;
}

.pan-hint-up {
    animation: bounceUp 1s ease infinite;
}

.pan-hint-down {
    animation: bounceDown 1s ease infinite;
}

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

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

/* ========================================
   Landscape Mode (grouped portraits)
   ======================================== */
.landscape-mode .image-display {
    display: flex;
    align-items: center;
    justify-content: center;
}

.landscape-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    height: 100%;
    padding: 0;
}

.landscape-group .landscape-image {
    height: 100%;
    max-height: 100vh;
    width: auto;
    object-fit: contain;
    flex: 1;
    min-width: 0;
}

/* 2 images side by side */
.landscape-group[data-count="2"] .landscape-image {
    max-width: 50%;
}

/* 3 images side by side */
.landscape-group[data-count="3"] .landscape-image {
    max-width: 33.33%;
}

/* Thumbnail composite for groups */
.thumbnail-group {
    position: relative;
    height: 100%;
    width: auto;
}

.thumbnail-composite {
    display: flex;
    gap: 2px;
    height: 100%;
}

.thumbnail-composite img {
    height: 100%;
    width: auto;
    object-fit: cover;
}

/* Group indicator badge */
.thumbnail-group::after {
    content: attr(data-count);
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(139, 92, 246, 0.9);
    color: white;
    font-size: 9px;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1.2;
}

/* Landscape mode button active */
#view-landscape.active {
    background: rgba(139, 92, 246, 0.3);
    color: #A78BFA;
}

/* Hide navigation zones in landscape mode */
.landscape-mode .nav-zone {
    display: none;
}

/* Ken Burns Effect */
.current-image.ken-burns {
    animation: ken-burns 20s ease-out infinite;
}

@keyframes ken-burns {
    0% {
        transform: scale(1) translate(0, 0);
    }
    50% {
        transform: scale(1.1) translate(-2%, -1%);
    }
    100% {
        transform: scale(1) translate(0, 0);
    }
}

/* Fade transition between images */
.image-transition-fade .current-image {
    transition: opacity var(--transition-image) ease-out;
}

/* Slide transitions */
.image-transition-slide-left .next-image {
    transform: translateX(100%);
}

.image-transition-slide-left .next-image.active {
    transform: translateX(0);
}

/* Zoom transition */
.image-transition-zoom .next-image {
    transform: scale(0.9);
    opacity: 0;
}

.image-transition-zoom .next-image.active {
    transform: scale(1);
    opacity: 1;
}

.image-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    z-index: 0;
}

/* Progress Indicator - transparent background, only bar is visible */
.progress-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 5px;
    background: transparent;
    border-radius: 0;
    z-index: 100;
    opacity: 1;
}

.progress-bar {
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0;
    width: 0%;
    transition: width 100ms linear;
}

/* ========================================
   Header Bar - Integrated Search Layout
   ======================================== */
.header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-lg);
    background: #000000;
    z-index: 1000;
    transition: background 0.4s ease;
}

/* No background change on hover */
.header-bar:hover {
    background: #000000;
}

/* Logo wrapper - far left, shifted 30px left */
.header-logo-wrapper {
    flex-shrink: 0;
    position: relative;
    z-index: 1001;
    margin-left: -30px;
    transition: all 2.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.4s ease;
    position: relative;
    gap: 12px;
}

/* Camera Icon - visible by default, with glow transition */
.header-logo .logo-icon {
    width: 26px;
    height: 26px;
    opacity: 1;
    transform: scale(1);
    margin-left: 35px;
    filter: drop-shadow(0 0 0 transparent);
    transition: opacity 0.5s ease, transform 0.5s ease, filter 1s ease;
    color: white;
}

.header-logo .logo-img {
    height: 34px;
    width: auto;
    transition: opacity 1.5s ease, transform 1.5s ease-out;
    margin-left: 8px;
    transform: scale(1);
}

/* Default state - hide dark logo, show white logo */
.header-logo .logo-default {
    opacity: 0;
    transition: opacity 1.5s ease, transform 1.5s ease-out;
}

.header-logo .logo-hover {
    position: absolute;
    left: calc(35px + 26px + 12px); /* margin-left of icon + icon width + gap */
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    transition: opacity 1.5s ease, transform 1.5s ease-out;
}

/* Logo stays white on hover */
.header-bar:hover .header-logo .logo-default {
    opacity: 0;
    transition: opacity 1.5s ease, transform 1.5s ease-out;
}

.header-bar:hover .header-logo .logo-hover {
    opacity: 1;
    transition: opacity 1.5s ease, transform 1.5s ease-out;
}

/* Glow on header-bar hover for logo-icon (subtle white glow) */
.header-bar:hover .header-logo .logo-icon {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
    transition: opacity 0.5s ease, transform 0.5s ease, filter 1s ease;
}

/* Menu icon margin */
.icon-menu {
    margin-left: 10px;
}

/* Header left icons */
.header-left {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    flex-shrink: 0;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 3s ease;
}

/* White icons with glow transition */
.header-left .header-icon {
    color: white;
    filter: drop-shadow(0 0 0 transparent);
    transition: filter 1s ease, color var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
}

.header-left .header-icon .icon {
    filter: none;
}

/* Glow on header-bar hover */
.header-bar:hover .header-left .header-icon {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

/* More glow (15% more) on direct button hover */
.header-bar .header-left .header-icon:hover {
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.35));
}

/* Header right icons - always on far right */
.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 3s ease;
    margin-left: auto;
}

/* White icons with glow transition */
.header-right .header-icon {
    color: white;
    filter: drop-shadow(0 0 0 transparent);
    transition: filter 1s ease, color var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
}

.header-right .header-icon .icon {
    filter: none;
}

/* Glow on header-bar hover */
.header-bar:hover .header-right .header-icon {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

/* More glow (15% more) on direct button hover */
.header-bar .header-right .header-icon:hover {
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.35));
}

/* ========================================
   Mega Menu
   ======================================== */
.mega-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(18, 18, 18, 0.70);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    overflow: hidden;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                opacity 0.3s ease;
}

.mega-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mega-menu.closing {
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                opacity 0.25s ease;
}

.mega-menu-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 40px 40px;
}

/* Row 1: Navigation Columns */
.mega-menu-row.columns-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mega-menu-column {
    display: flex;
    flex-direction: column;
}

.mega-menu-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mega-menu-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mega-menu-links li a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s ease, padding-left 0.2s ease, background 0.2s ease;
    display: block;
    padding: 6px 10px;
    margin: -6px -10px;
    border-radius: 6px;
    cursor: pointer;
}

.mega-menu-links li a:hover {
    color: white;
    padding-left: 16px;
    background: rgba(155, 35, 53, 0.15);
}

/* Row 2: Featured Collections */
.mega-menu-row.featured-row {
    padding-top: 10px;
}

.mega-menu-row.featured-row .mega-menu-title {
    margin-bottom: 20px;
    border-bottom: none;
    padding-bottom: 0;
}

.featured-collections {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.featured-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.featured-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    background-size: cover;
    background-position: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px 8px 0 0;
}

.featured-label {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    border-radius: 0 0 8px 8px;
}

.featured-card:hover .featured-label {
    background: var(--color-accent);
}

/* Mega Menu - Idle State */
body.idle .mega-menu {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* Keep menu visible if it was open before idle */
.mega-menu.open.idle-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Menu toggle button - center the icon */
#menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
}

#menu-toggle .icon {
    margin: 0 auto;
}

/* Menu toggle button - active state */
#menu-toggle.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-accent);
}

#menu-toggle.active .icon {
    color: var(--color-accent);
}

/* Integrated search bar - fills remaining space */
.header-search {
    flex: 1;
    min-width: 0;
    margin: 0 var(--space-md);
    position: relative;
    transition: opacity 3s ease;
}

.header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
    position: relative;
}

.header-icon:hover {
    color: var(--color-text-primary);
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
}

.header-icon .icon {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

.header-icon .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    background: var(--color-accent);
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.hidden {
    display: none !important;
}

/* ========================================
   Header Search Bar (Integrated)
   ======================================== */
.header-search .search-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 6px var(--space-md);
    transition: border-color 0.4s ease;
    flex-wrap: wrap;
    box-shadow: none;
    filter: none;
}

/* Ensure no glow on search input wrapper */
.header-search .search-input-wrapper:focus,
.header-search .search-input-wrapper:focus-within {
    box-shadow: none;
    filter: none;
    outline: none;
}

.header-search .search-input:focus {
    box-shadow: none;
    filter: none;
    outline: none;
}

/* Container for inline filter tags */
.search-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.search-tags-container:empty {
    display: none;
}

/* Inline tag chip inside search bar - simplified */
.search-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 4px;
    background: transparent;
    border: none;
    font-size: 12px;
    color: rgba(155, 35, 53, 0.9);
    white-space: nowrap;
}

/* Different colors for different filter types */
.search-tag[data-type="colors"] {
    color: rgba(236, 72, 153, 0.9);
}

.search-tag[data-type="models"] {
    color: rgba(139, 92, 246, 0.9);
}

.search-tag[data-type="moods"] {
    color: rgba(34, 197, 94, 0.9);
}

.search-tag[data-type="search"] {
    color: rgba(251, 191, 36, 0.9);
}

.search-tag[data-type="category"] {
    color: rgba(20, 184, 166, 0.9);
}

.search-tag[data-type="tags"] {
    color: rgba(249, 115, 22, 0.9);
}

.search-tag[data-type="status"] {
    color: rgba(156, 163, 175, 0.9);
}

/* Remove button inside tag */
.search-tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    padding: 0;
    background: transparent;
    border: none;
    color: inherit;
    font-size: 12px;
    font-weight: normal;
    line-height: 1;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.search-tag-remove:hover {
    opacity: 1;
}

/* Max filters reached indicator */
.search-tags-container.max-reached .search-tag:last-child {
    opacity: 0.7;
}

/* Max filters toast animation */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

.header-search .search-input-wrapper .icon {
    width: 18px;
    height: 18px;
    color: white;
    flex-shrink: 0;
    transition: color 0.4s ease;
}

.header-search .search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 14px;
    font-weight: 500;
    min-width: 0;
    transition: color 0.4s ease;
}

.header-search .search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    transition: color 0.4s ease;
}

.header-search .search-clear {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: var(--space-xs);
    transition: color 0.4s ease;
}

/* ========================================
   Search Suggestions Dropdown
   - Shows alternative search terms
   - Appears when search would return 0 results
   ======================================== */
.search-suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(30, 30, 35, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease;
    z-index: 1001;
    backdrop-filter: blur(20px);
}

.search-suggestions-dropdown.visible {
    max-height: 300px;
    opacity: 1;
    visibility: visible;
}

.suggestions-list {
    padding: 8px 0;
}

.suggestion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.suggestion-item:hover,
.suggestion-item:focus {
    background: rgba(155, 35, 53, 0.3);
    outline: none;
}

.suggestion-term {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.suggestion-count {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

/* No Results Indicator */
.search-no-results-indicator {
    display: none;
    color: #ef4444;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.search-no-results-indicator.visible {
    display: inline;
    opacity: 1;
}

/* Red border when search has no results */
.search-input-wrapper.no-results {
    border-color: rgba(239, 68, 68, 0.5) !important;
}

/* Flash animation when Enter is blocked */
.search-input-wrapper.search-blocked {
    animation: searchBlockedFlash 0.5s ease;
}

@keyframes searchBlockedFlash {
    0%, 100% { border-color: rgba(255, 255, 255, 0.2); }
    25%, 75% { border-color: rgba(239, 68, 68, 0.8); }
    50% { border-color: rgba(239, 68, 68, 1); }
}

/* Border highlight on header-bar hover */
.header-bar:hover .header-search .search-input-wrapper {
    border-color: rgba(255, 255, 255, 0.4);
}

/* ========================================
   Search Filters Panel (Dropdown)
   - Positioned below search bar
   - Same width as search bar
   - Curved border, transparent bg
   ======================================== */
.search-filters-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    z-index: 999;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, filter 1s ease;
    opacity: 0;
    pointer-events: none;
    filter: drop-shadow(0 0 0 transparent);
}

.search-filters-panel.expanded {
    max-height: calc(100vh - var(--header-height) - 100px);
    opacity: 1;
    pointer-events: auto;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.25));
}

.search-filters-content {
    background: rgba(20, 20, 25, 0.6);
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: var(--space-md) var(--space-lg);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
    max-height: calc(100vh - var(--header-height) - 120px);
    overflow-y: auto;
}

.search-filters-panel.expanded .search-filters-content {
    opacity: 1;
    transform: translateY(0);
}

/* Scrollbar styling for filters */
.search-filters-content::-webkit-scrollbar {
    width: 5px;
}

.search-filters-content::-webkit-scrollbar-track {
    background: transparent;
}

.search-filters-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.search-filters-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Hide in idle mode */
body.idle .header-search,
body.idle .search-filters-panel {
    opacity: 0;
    pointer-events: none;
}

/* Active filters */
.active-filters {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: var(--space-sm);
}

.active-filters-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
}

.clear-all-btn {
    background: transparent;
    border: none;
    color: rgba(96, 165, 250, 0.8);
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.clear-all-btn:hover {
    background: rgba(155, 35, 53, 0.15);
    color: #60a5fa;
}

/* Filter Rows */
.filter-row {
    margin-bottom: 6px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

/* Hover opacity for search filters content */
.header-bar:hover .search-filters-content {
    background: rgba(20, 20, 25, 0.8);
}

/* Filter separator (vertical line) */
.filter-separator {
    display: inline-block;
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 10px;
    vertical-align: middle;
}

/* Orientation filter chips */
.orientation-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.orientation-chip .orientation-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.orientation-chip .orientation-label {
    font-size: 11px;
}

.orientation-chip .orientation-count {
    font-size: 9px;
    opacity: 0.6;
    margin-left: 2px;
}

.orientation-chip.active {
    background: rgba(155, 35, 53, 0.2);
    border-color: rgba(155, 35, 53, 0.4);
    color: rgba(255, 255, 255, 0.9);
}

.orientation-chip:not(.active) {
    opacity: 0.5;
}

/* Tags row - 10% smaller */
.filter-row-tags .filter-label {
    font-size: 9px;
}

.filter-row-tags .filter-chip {
    font-size: 10px;
    padding: 1px 5px;
}

.filter-label {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-xs);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.filter-chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 1px 6px;
    height: auto;
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
}

.filter-chip.active {
    background: rgba(155, 35, 53, 0.2);
    border-color: rgba(155, 35, 53, 0.4);
    color: #60a5fa;
}

/* Color Chips - pill style with colored background */
.filter-chip.color-chip {
    background: var(--chip-bg, rgba(255, 255, 255, 0.06));
    border-color: var(--chip-border, transparent);
    color: var(--chip-text, #fff);
    font-size: 10px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    padding: 1px 8px;
}

.filter-chip.color-chip:hover {
    /* REMOVED transform: scale(1.05) to prevent layout shift */
    box-shadow: 0 0 10px var(--chip-bg, rgba(255, 255, 255, 0.2));
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-chip.color-chip.active {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8), 0 0 15px var(--chip-bg, rgba(155, 35, 53, 0.5));
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

/* Active Filters */
.active-filters {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-md);
}

.active-filters-label {
    font-size: 12px;
    color: var(--color-text-tertiary);
}

.active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    flex: 1;
}

.clear-all-btn {
    background: transparent;
    border: none;
    color: var(--color-accent);
    font-size: 12px;
    cursor: pointer;
}

.clear-all-btn:hover {
    text-decoration: underline;
}

/* ========================================
   Info Panel (horizontal bar - slides up)
   ======================================== */
.info-panel {
    position: fixed;
    bottom: calc(var(--controls-height, 32px) + var(--thumbnail-height, 80px));
    left: 0;
    right: 0;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 960; /* Above thumbnail-strip (950) */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* Animation - slide up from bottom */
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    pointer-events: none;
}

.info-panel:not(.hidden) {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.info-panel.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

/* Info panel content - horizontal layout */
.info-panel .info-panel-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 100%;
    padding: 0 40px;
    gap: 0;
}

/* Info items */
.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    height: 100%;
    white-space: nowrap;
}

.info-item:first-child {
    padding-left: 0;
}

.info-item:last-child {
    padding-right: 0;
}

/* Vertical dividers */
.info-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

/* Labels */
.info-item .info-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
    margin-right: 6px;
}

/* Values */
.info-item .info-value {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

/* Icons in stats */
.info-item .info-icon {
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

/* Separator dot */
.info-item .info-separator {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 4px;
}

/* Stats section */
.info-stats {
    gap: 12px;
}

/* Keywords/Tags section */
.info-keywords {
    flex: 1;
    min-width: 100px;
    max-width: 300px;
    overflow: hidden;
}

.info-tags {
    display: flex;
    gap: 6px;
    overflow: hidden;
}

.info-tags .tag {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
}

/* Colors section */
.info-color-swatches {
    display: flex;
    gap: 4px;
}

.info-color-swatches .color-swatch {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* When info panel is open, move image-info-overlay up */
body:has(.info-panel:not(.hidden)) .image-info-overlay {
    bottom: calc(var(--controls-height, 32px) + var(--thumbnail-height, 80px) + 50px);
}

/* Keep info panel and overlay visible in idle when panel is open */
body.idle:has(.info-panel:not(.hidden)) .info-panel {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

body.idle:has(.info-panel:not(.hidden)) .image-info-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Toggle button active state */
#info-panel-toggle.active {
    color: var(--color-accent);
    background: rgba(155, 35, 53, 0.2);
}

#comments-panel-toggle.active {
    color: var(--color-accent);
    background: rgba(155, 35, 53, 0.2);
}

/* Section labels - minimal style */
.info-label,
.keywords-label,
.categories-label,
.exif-label {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
    opacity: 0.7;
}

.image-title {
    font-size: 16px;
    font-weight: 400;
    margin: 0 0 var(--space-sm);
    color: var(--color-text-primary);
}

.image-description {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0 0 var(--space-md);
    line-height: 1.5;
}

.image-stats {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.stat {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-text-tertiary);
    font-size: 12px;
}

.stat .icon {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

/* Sale Badge */
.sale-badge {
    display: inline-block;
    background: var(--color-warning);
    color: #000;
    font-size: 11px;
    font-weight: 600;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 4px;
    margin-bottom: var(--space-md);
}

/* Action Buttons - flat, minimal */
.image-actions {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    color: var(--color-text-tertiary);
    transition: all var(--transition-fast);
}

.action-icon:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--color-text-primary);
}

.action-icon .icon {
    width: 16px;
    height: 16px;
}

.action-icon.liked .icon {
    fill: var(--color-like);
    color: var(--color-like);
}

/* Like Heart Animation */
.action-icon.like-animate {
    animation: like-pop 0.4s ease-out;
}

@keyframes like-pop {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Heart burst particles (pseudo-elements) */
.action-icon.liked::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--color-like) 0%, transparent 70%);
    opacity: 0;
    animation: like-burst 0.5s ease-out;
}

@keyframes like-burst {
    0% { 
        transform: scale(0.5);
        opacity: 0.8;
    }
    100% { 
        transform: scale(2);
        opacity: 0;
    }
}

.action-buy {
    background: var(--color-accent);
    color: white;
}

.action-buy:hover {
    background: var(--color-accent-hover);
}

/* Keywords */
.image-keywords,
.image-categories {
    margin-bottom: var(--space-lg);
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.keyword-tag {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--color-text-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.keyword-tag:hover {
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--color-text-secondary);
}

.category-link {
    color: var(--color-text-secondary);
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.category-link:hover {
    color: var(--color-text-primary);
}

/* Info Label (shared style) */
.info-label {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
    opacity: 0.7;
}

/* Mood & Style */
.image-mood-style {
    margin-bottom: var(--space-lg);
}

.mood-style-content {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.mood-tag,
.style-tag {
    background: transparent;
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: rgba(167, 139, 250, 0.9);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: capitalize;
    letter-spacing: 0.02em;
}

.style-tag {
    border-color: rgba(155, 35, 53, 0.3);
    color: rgba(96, 165, 250, 0.9);
}

/* Colors Display */
.image-colors {
    margin-bottom: var(--space-lg);
}

.color-swatches-display {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.color-swatch-item {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: default;
    transition: transform var(--transition-fast);
}

.color-swatch-item:hover {
    transform: scale(1.15);
}

/* Technical Info */
.image-technical {
    margin-bottom: var(--space-lg);
}

.technical-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.tech-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.tech-label {
    color: var(--color-text-tertiary);
    opacity: 0.7;
}

.tech-value {
    color: var(--color-text-secondary);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 10px;
}

/* EXIF Info */
.image-exif {
    margin-bottom: var(--space-lg);
}

.exif-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.exif-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 11px;
    color: var(--color-text-tertiary);
}

.exif-icon {
    font-size: 12px;
    width: 18px;
    text-align: center;
    opacity: 0.6;
}

.exif-value {
    flex: 1;
    opacity: 0.9;
}

/* ========================================
   Keywords Bar - HIDDEN (moved to search panel)
   ======================================== */
.keywords-bar {
    display: none;
}

/* ========================================
   Thumbnail Strip
   ======================================== */
.thumbnail-strip {
    position: fixed;
    bottom: 32px; /* New controls bar height */
    left: 0;
    right: 0;
    height: var(--thumbnail-height);
    background: var(--color-overlay);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 950;
    overflow: hidden;
    transition: opacity var(--ui-fade-out), transform var(--transition-normal), height var(--transition-normal);
    display: flex;
    align-items: center;
    /* Border separates from info overlay above */
    border-top: 2px solid rgba(255, 255, 255, 0.15);
}

.thumbnail-strip.hidden {
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
}

/* Idle mode animation - slide down with elastic acceleration */
.thumbnail-strip.idle-animating-down {
    transition: transform 1s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.5s ease !important;
}

/* Active mode animation - slide back up with elastic acceleration */
.thumbnail-strip.idle-animating-up {
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.3s ease !important;
}

.thumbnail-track {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: auto;
    align-items: center;
    flex: 1;
}

.thumbnail-strip:hover .thumbnail-track {
    scroll-behavior: auto;
}

.thumbnail-track::-webkit-scrollbar {
    display: none;
}

/* Natural dimension thumbnails */
.thumbnail {
    flex-shrink: 0;
    height: calc(var(--thumbnail-height) - var(--space-md) - 4px);
    width: auto;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: rgba(255, 255, 255, 0.05);
    padding: 0;
    display: flex;
}

.thumbnail:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: var(--color-accent);
}

.thumbnail img {
    height: 100%;
    width: auto;
    object-fit: cover;
}



/* ========================================
   Controls Bar (Bottom) - Redesigned v2.1
   Gallery position bar + controls on right
   ======================================== */
.controls-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-sm);
    background: var(--color-overlay);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: background var(--transition-normal), opacity var(--ui-fade-out);
    gap: var(--space-sm);
}

.controls-bar:hover {
    background: var(--color-overlay-hover);
}

/* Gallery position bar inside controls - spans most of width */
.controls-bar .gallery-position-bar {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    flex: 1;
    height: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    padding: 0 var(--space-md);
    z-index: auto;
}

.controls-bar .gallery-position-progress {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
    margin-right: var(--space-md);
}

.controls-bar .gallery-position-progress::after {
    content: '';
    display: block;
    height: 100%;
    background: rgba(155, 35, 53, 0.8);
    width: var(--progress, 0%);
    transition: width 300ms ease;
}

.controls-bar .gallery-position-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    white-space: nowrap;
}

.controls-right {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    flex-shrink: 0;
    height: 100%;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 2px;
    height: 24px;
}

.control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 100%;
    background: transparent;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.control-btn:hover {
    color: var(--color-text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.control-btn.active {
    color: var(--color-accent);
    background: rgba(155, 35, 53, 0.2);
}

.control-btn .icon {
    width: 14px;
    height: 14px;
}

/* Play button slightly larger */
#slideshow-toggle {
    width: 28px;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

#slideshow-toggle .icon {
    width: 14px;
    height: 14px;
}

/* DEPRECATED - controls-left and controls-center removed */
.controls-left,
.controls-center {
    display: none !important;
}

.image-counter {
    display: none; /* Now using gallery-position-label */
}

/* Speed Control */
.speed-control {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 2px 6px;
}

.speed-btn {
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    color: var(--color-text-tertiary);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.speed-btn:hover {
    color: var(--color-text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.speed-display {
    font-size: 12px;
    color: var(--color-text-secondary);
    min-width: 28px;
    text-align: center;
}

/* ========================================
   Watermark Overlay (Sale Images)
   ======================================== */
.image-container[data-for-sale="true"] .current-image::after,
.image-container[data-for-sale="true"] .next-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 100px,
            rgba(255, 255, 255, 0.03) 100px,
            rgba(255, 255, 255, 0.03) 200px
        );
    pointer-events: none;
    z-index: 5;
}

/* Watermark text overlay */
.watermark-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 48px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.08);
    text-transform: uppercase;
    letter-spacing: 20px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 6;
    user-select: none;
}

/* ========================================
   Grid View Mode
   ======================================== */
.grid-container {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: var(--controls-height);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-md);
    padding: var(--space-lg);
    overflow-y: auto;
    background: #121212;
}

.grid-item {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.grid-item:hover {
    transform: scale(1.02);
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.grid-item:hover .grid-item-overlay {
    opacity: 1;
}

.grid-item-title {
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    color: white;
}

.grid-item-badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    background: var(--color-warning);
    color: black;
    border-radius: 4px;
    margin-top: var(--space-xs);
}

.grid-item-liked {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    color: var(--color-like);
    font-size: 16px;
}

.grid-item-viewed {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    width: 20px;
    height: 20px;
    background: rgba(16, 185, 129, 0.8);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-item.viewed {
    opacity: 0.7;
}

.grid-item.viewed:hover {
    opacity: 1;
}

/* View mode body classes */
body.view-grid .info-panel,
body.view-grid .keywords-bar,
body.view-grid .thumbnail-strip {
    display: none;
}

body.view-filmstrip .thumbnail-strip {
    display: block !important;
}

/* ========================================
   Loading States
   ======================================== */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: opacity var(--transition-normal);
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.spinner-ring {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    font-size: 14px;
    color: var(--color-text-tertiary);
}

/* Skeleton Loading */
.skeleton-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
    padding: var(--space-lg);
    overflow: hidden;
}

.skeleton-grid.hidden {
    display: none;
}

.skeleton-item {
    aspect-ratio: 4/3;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 8px;
}

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

/* ========================================
   Modals
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    opacity: 1;
    transition: opacity var(--transition-normal);
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal {
    background: #1a1a1a;
    border-radius: 16px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modal-in 0.3s ease-out;
}

.modal.hidden {
    display: none;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-sm { width: 100%; max-width: 400px; }
.modal-md { width: 100%; max-width: 600px; }
.modal-lg { width: 100%; max-width: 800px; }
.modal-xl { width: 100%; max-width: 1200px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--color-text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--color-text-tertiary);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    color: var(--color-text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.modal-close .icon {
    width: 20px;
    height: 20px;
}

.modal-close-outside {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    z-index: 10;
}

.modal-body {
    padding: var(--space-lg);
    overflow-y: auto;
}

/* Form Styles */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

.form-group input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-primary);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.1);
}

/* Buttons */
.btn {
    padding: var(--space-sm) var(--space-lg);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.btn-primary {
    background: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: 12px;
}

.auth-footer {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.auth-footer a {
    color: var(--color-accent);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Form Error */
.form-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--color-like);
    color: var(--color-like);
    padding: var(--space-sm) var(--space-md);
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: var(--space-md);
}

/* Logged-in user icon */
.header-icon.logged-in {
    color: var(--color-success);
}

body.user-logged-in .header-icon.logged-in::after {
    content: '';
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    border: 2px solid #1a1a1a;
}

/* Dashboard Tabs */
.dashboard-tabs {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-sm);
}

.tab-btn {
    background: transparent;
    border: none;
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text-tertiary);
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    color: var(--color-text-primary);
}

.tab-btn.active {
    color: var(--color-accent);
    background: rgba(155, 35, 53, 0.1);
}

.tab-panel.hidden {
    display: none;
}

/* Purchase Modal */
.purchase-preview {
    width: 100%;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: var(--space-lg);
    overflow: hidden;
}

.purchase-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.license-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.license-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.license-option:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.license-option.selected {
    border-color: var(--color-accent);
    background: rgba(155, 35, 53, 0.1);
}

.purchase-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-md);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

/* Share Modal */
.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.share-btn {
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
}

.share-link {
    display: flex;
    gap: var(--space-sm);
}

.share-link input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-primary);
    font-size: 13px;
}

/* Cart Modal */
.cart-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: var(--space-lg);
}

.cart-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.cart-item-license {
    font-size: 12px;
    color: var(--color-text-tertiary);
}

.cart-item-price {
    font-weight: 600;
}

.cart-summary {
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

/* Color Browse Modal */
.color-browse-hint {
    text-align: center;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-lg);
}

.color-browse-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-md);
}

.color-browse-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: transparent;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.color-browse-item:hover {
    border-color: var(--color);
    background: rgba(255, 255, 255, 0.05);
}

.color-swatch-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.color-name {
    font-size: 12px;
    color: var(--color-text-secondary);
}

/* Journeys Placeholder */
.journeys-placeholder {
    text-align: center;
    padding: var(--space-xl);
    color: var(--color-text-tertiary);
}

.journeys-placeholder h4 {
    margin: var(--space-md) 0 var(--space-sm);
    color: var(--color-text-primary);
}

.journeys-placeholder p {
    font-size: 14px;
}

/* ========================================
   Comments Panel (toggleable, right side)
   Opens as continuation of info panel
   ======================================== */
.comments-panel {
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    width: 360px;
    background: rgba(15, 15, 15, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    z-index: 899; /* Below info panel */
    transform: translateX(0);
    transition: transform var(--transition-normal), opacity var(--transition-normal);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.comments-panel.hidden {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}

.comments-header {
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.comments-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
}

.comments-empty {
    text-align: center;
    color: var(--color-text-tertiary);
    padding: var(--space-xl);
}

.comment {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-border);
}

.comment:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.comment-author {
    font-weight: 500;
    font-size: 13px;
}

.comment-date {
    font-size: 11px;
    color: var(--color-text-tertiary);
}

.comment-content {
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
    word-wrap: break-word;
}

.comment-delete {
    background: none;
    border: none;
    color: var(--color-like);
    font-size: 11px;
    cursor: pointer;
    padding: 0;
    margin-top: var(--space-xs);
}

.comment-delete:hover {
    text-decoration: underline;
}

.comment-form {
    padding: var(--space-md);
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: var(--space-sm);
    align-items: flex-end;
}

.comment-form textarea {
    flex: 1;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: var(--space-sm);
    color: var(--color-text-primary);
    font-size: 13px;
    resize: none;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

@media (max-width: 767px) {
    .comments-panel {
        width: 100%;
        top: var(--header-height);
    }
}

/* ========================================
   Progress Widget
   ======================================== */
.progress-widget {
    padding: var(--space-lg);
    background: var(--color-surface);
    border-radius: 12px;
}

.progress-widget h4 {
    margin: 0 0 var(--space-md);
    font-size: 14px;
    color: var(--color-text-secondary);
}

.progress-stats {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.progress-stat {
    text-align: center;
}

.progress-stat .stat-value {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: var(--color-accent);
}

.progress-stat .stat-label {
    font-size: 11px;
    color: var(--color-text-tertiary);
}

.progress-milestone {
    text-align: center;
}

.progress-bar-container {
    height: 6px;
    background: var(--color-border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.progress-bar-fill {
    height: 100%;
    background: var(--color-accent);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--color-text-tertiary);
}

.progress-complete {
    text-align: center;
    color: var(--color-warning);
}

/* ========================================
   Badges
   ======================================== */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--space-md);
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-md);
    background: var(--color-surface);
    border-radius: 12px;
    transition: transform var(--transition-fast);
}

.badge-item:hover {
    transform: translateY(-2px);
}

.badge-item.locked {
    opacity: 0.4;
    filter: grayscale(1);
}

.badge-item .badge-icon {
    font-size: 32px;
    margin-bottom: var(--space-sm);
}

.badge-item .badge-name {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.badge-item .badge-date,
.badge-item .badge-hint {
    font-size: 10px;
    color: var(--color-text-tertiary);
}

.badges-empty {
    text-align: center;
    color: var(--color-text-tertiary);
    padding: var(--space-xl);
}

/* Badge Toast */
.toast-badge {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
}

.badge-toast-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.badge-toast-content .badge-icon {
    font-size: 36px;
}

.badge-toast-content .badge-info {
    display: flex;
    flex-direction: column;
}

.badge-toast-content .badge-info strong {
    font-size: 11px;
    text-transform: uppercase;
    opacity: 0.8;
}

.badge-toast-content .badge-name {
    font-size: 16px;
    font-weight: 600;
}

.badge-toast-content .badge-desc {
    font-size: 12px;
    opacity: 0.9;
}

/* ========================================
   Toast Notifications
   ======================================== */
.toast-container {
    position: fixed;
    bottom: calc(var(--controls-height) + var(--space-lg));
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--color-overlay-hover);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 10px;
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text-primary);
    font-size: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    animation: toast-in 0.3s ease-out;
}

.toast.toast-out {
    animation: toast-out 0.3s ease-in forwards;
}

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

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

.toast .icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.toast-success .icon {
    color: var(--color-success);
}

.toast-error .icon {
    color: var(--color-like);
}

.toast-warning .icon {
    color: var(--color-warning);
}

.toast-info .icon {
    color: var(--color-accent);
}

.toast-message {
    flex: 1;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--color-text-tertiary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.toast-close:hover {
    color: var(--color-text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.toast-close .icon {
    width: 14px;
    height: 14px;
}

/* ========================================
   Cursor Follower
   Custom cursor that dims to 20% on idle
   ======================================== */
/* Cursor follower - DISABLED */
.cursor-follower {
    display: none;
}

/* Cursor dot */
.cursor-follower::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5), 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Cursor ring */
.cursor-follower::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

/* Show cursor when active */
.cursor-follower.active {
    opacity: 1;
}

/* Expand ring on click */
.cursor-follower.clicking::after {
    transform: translate(-50%, -50%) scale(0.8);
}

/* Hide cursor over interactive elements */
.cursor-follower.on-interactive::after {
    transform: translate(-50%, -50%) scale(1.5);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Hide default cursor in gallery - but show custom cursors on nav zones */
.gallery-app {
    cursor: default;
}

/* Restore cursor on specific interactive elements for accessibility */
.gallery-app button,
.gallery-app a,
.gallery-app input,
.gallery-app textarea,
.gallery-app select,
.gallery-app .modal {
    cursor: pointer;
}

.gallery-app input,
.gallery-app textarea {
    cursor: text;
}

/* Idle state - dim cursor to 20% */
body.idle .cursor-follower {
    opacity: 0.2 !important;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Active state - cursor returns to full opacity */
body:not(.idle) .cursor-follower.active {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ========================================
   Navigation Zones - Idle Fade
   ======================================== */
/* Idle state - fade out navigation zones */
body.idle .nav-zone {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease-out;
}

/* Active state - navigation zones visible */
body:not(.idle) .nav-zone {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.4s ease-in;
}

/* ========================================
   Idle State (Auto-hide UI)
   - Slideshow plays automatically
   - Header bar and controls bar stay visible but fade to 50%
   - Only thumbnail strip and info overlay animate position
   ======================================== */
/* Header stays in place, fades to 50% */
body.idle .header-bar {
    /* No position change */
}

body.idle .header-bar .header-left,
body.idle .header-bar .header-search,
body.idle .header-bar .header-right {
    opacity: 0.5;
    transition: opacity 3s ease;
    pointer-events: auto;
}

/* Logo icon fades to 50% */
body.idle .header-logo .logo-icon {
    opacity: 0.5;
    transition: opacity 3s ease;
}

/* Logo image stays at 100% */
body.idle .header-logo .logo-img {
    opacity: 1;
}

/* Keep white logo visible in idle */
body.idle .header-logo .logo-default {
    opacity: 0;
}

body.idle .header-logo .logo-hover {
    opacity: 1;
}

/* Search bar fades with header */
body.idle .header-search {
    /* opacity handled above */
}

/* Hide search filters panel in idle */
body.idle .search-filters-panel {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Controls bar fades to 50% in 3s */
body.idle .controls-bar {
    opacity: 0.5;
    transition: opacity 3s ease;
    pointer-events: auto;
}

/* Info panel and comments panel hide in idle ONLY if they have .hidden class */
body.idle .info-panel.hidden,
body.idle .comments-panel {
    opacity: 0;
    pointer-events: none;
}

/* ========================================
   Responsive Design
   ======================================== */

/* NOTE: Old tablet breakpoint removed - now handled by new tablet breakpoint (768px-1279px) at end of file */
/* Desktop adjustments for smaller screens (1280px - 1440px) */

/* Mobile (< 768px) */
@media (max-width: 767px) {
    :root {
        --header-height: 44px;
        --mobile-search-height: 40px;
        --controls-height: 40px;
        --info-panel-width: 100%;
        --thumbnail-height: 70px;
    }
    
    /* ========================================
       HEADER BAR - Mobile Redesign
       - Menu (hamburger) 4px from left edge
       - Logo immediately next to menu
       - Icons 10% smaller
       - Fast/Full Res shows opposite mode
       
       HTML Structure:
       header-bar > header-logo-wrapper, header-left, header-search, header-right
       Need to reorder: header-left first, then logo-wrapper
       ======================================== */
    .header-bar {
        padding: 0 !important;
        padding-right: 4px !important;
        height: var(--header-height);
        background: #000000;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }
    
    .header-bar:hover {
        background: #000000;
    }
    
    /* Header left - Menu button, must come FIRST (before logo) */
    .header-left {
        order: -10;
        gap: 0;
        margin: 0 !important;
        padding: 0 !important;
        padding-left: 4px !important;
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }
    
    /* Menu button - visible on mobile, 4px from left */
    .header-left #menu-toggle {
        display: flex;
        margin: 0;
    }
    
    /* Logo wrapper - AFTER menu (order -5, less negative than header-left) */
    .header-logo-wrapper {
        order: -5;
        margin: 0 !important;
        margin-left: 4px !important;
        margin-right: 0 !important;
        padding: 0 !important;
        flex-shrink: 0;
    }
    
    .header-logo {
        gap: 0;
        padding: 0;
        margin: 0;
    }
    
    /* Hide camera icon on mobile */
    .header-logo .logo-icon {
        display: none;
    }
    
    /* Hide black/default logo completely on mobile */
    .header-logo .logo-default {
        display: none !important;
        opacity: 0;
    }
    
    /* Logo text - compact, no extra margins */
    .header-logo .logo-img {
        height: 16px;
        margin: 0;
        padding: 0;
    }
    
    /* Only show white/hover logo */
    .header-logo .logo-hover {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        opacity: 1;
        margin: 0;
        display: block;
    }
    
    .header-bar:hover .header-logo .logo-default {
        display: none !important;
        opacity: 0;
    }
    
    .header-bar:hover .header-logo .logo-hover {
        opacity: 1;
    }
    
    /* Search bar - order 0 (after logo) */
    .header-search {
        order: 0;
    }
    
    /* Header right - order 1 (last) */
    .header-right {
        order: 1;
    }
    
    /* Resolution toggle - styled like header icons on mobile
       Shows opposite label: when in Fast mode shows "Full Res", vice versa */
    /* Hide resolution toggle on mobile - force full res */
    .header-right .resolution-toggle {
        display: none !important;
    }
    
    /* Header icons - 10% smaller on mobile (32px -> 29px) */
    .header-icon {
        width: 29px;
        height: 29px;
        min-width: 29px;
        min-height: 29px;
        color: var(--color-text-secondary);
    }
    
    .header-icon .icon {
        width: 14px;
        height: 14px;
        filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5));
    }
    
    .header-left .header-icon,
    .header-right .header-icon {
        color: var(--color-text-secondary);
    }
    
    .header-left .header-icon .icon,
    .header-right .header-icon .icon {
        filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5));
    }
    
    .header-bar:hover .header-left .header-icon,
    .header-bar:hover .header-right .header-icon {
        color: var(--color-text-secondary);
    }
    
    .header-left {
        gap: 4px;
    }
    
    /* Header right - stays on far right with resolution toggle */
    .header-right {
        gap: 4px;
        margin-left: auto;
        order: 1;
        display: flex;
        align-items: center;
    }
    
    /* ========================================
       SEARCH BAR - Very transparent until focused
       - Default: barely visible (30% opacity border only)
       - On focus: visible background
       ======================================== */
    .header-search {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        margin: 0;
        padding: var(--space-xs) var(--space-sm);
        background: transparent;
        z-index: 999;
    }
    
    /* Default: very transparent, minimal visibility */
    .header-search .search-input-wrapper {
        background: rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        padding: 4px var(--space-sm);
        transition: background 0.3s ease, border-color 0.3s ease;
        box-shadow: none !important;
        filter: none !important;
    }
    
    /* On focus: visible background - NO glow */
    .header-search .search-input-wrapper:focus-within {
        background: rgba(0, 0, 0, 0.7);
        border-color: rgba(255, 255, 255, 0.4);
        box-shadow: none !important;
        filter: none !important;
    }
    
    /* Remove any glow from search input on mobile */
    .header-search .search-input,
    .header-search .search-input:focus {
        box-shadow: none !important;
        filter: none !important;
        outline: none !important;
        -webkit-appearance: none;
    }
    
    .header-search .search-input-wrapper .icon {
        width: 16px;
        height: 16px;
        color: rgba(255, 255, 255, 0.4);
    }
    
    .header-search .search-input-wrapper:focus-within .icon {
        color: rgba(255, 255, 255, 0.7);
    }
    
    .header-search .search-input {
        font-size: 13px;
        color: var(--color-text-primary);
    }
    
    .header-search .search-input::placeholder {
        color: rgba(255, 255, 255, 0.3);
    }
    
    .header-search .search-input-wrapper:focus-within .search-input::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }
    
    .header-search .search-clear {
        color: rgba(255, 255, 255, 0.4);
    }
    
    .header-search .search-input-wrapper:focus-within .search-clear {
        color: rgba(255, 255, 255, 0.6);
    }
    
    /* Search suggestions dropdown - mobile positioning */
    .search-suggestions-dropdown {
        position: fixed;
        top: calc(var(--header-height) + var(--mobile-search-height) + 4px);
        left: var(--space-sm);
        right: var(--space-sm);
        margin-top: 0;
        max-height: 200px;
        overflow-y: auto;
    }
    
    .suggestion-item {
        padding: 12px 16px;
    }
    
    /* No results indicator - mobile */
    .search-no-results-indicator {
        font-size: 10px;
    }
    
    /* Search filters panel on mobile - positioned below search bar, same width */
    .search-filters-panel {
        position: fixed;
        top: calc(var(--header-height) + var(--mobile-search-height) + 4px);
        left: var(--space-sm);
        right: var(--space-sm);
        max-height: calc(100vh - var(--header-height) - var(--mobile-search-height) - var(--controls-height) - var(--thumbnail-height) - 20px);
    }
    
    .search-filters-content {
        border-radius: 12px;
        padding: 6px;
        max-height: calc(100vh - var(--header-height) - var(--mobile-search-height) - var(--controls-height) - var(--thumbnail-height) - 40px);
    }
    
    /* ========================================
       ALL FILTER CHIPS - Uniform size for ALL states
       Same size whether active, inactive, disabled, hover
       Override desktop transform: scale(1.05) on color chips
       Include [disabled] attribute selector for browser defaults
       ======================================== */
    .filter-chip,
    .filter-chip.active,
    .filter-chip.disabled,
    .filter-chip[disabled],
    .filter-chip:disabled,
    .filter-chip:hover,
    .filter-chip.color-chip,
    .filter-chip.color-chip.active,
    .filter-chip.color-chip.disabled,
    .filter-chip.color-chip[disabled],
    .filter-chip.color-chip:disabled,
    .filter-chip.color-chip:hover,
    .filter-chip.orientation-chip,
    .filter-chip.orientation-chip.active,
    .filter-chip.orientation-chip.disabled,
    .filter-chip.orientation-chip[disabled],
    .filter-chip.orientation-chip:disabled,
    .filter-chip.orientation-chip:hover,
    .search-filters-panel .filter-chip,
    .search-filters-panel .filter-chip.active,
    .search-filters-panel .filter-chip.disabled,
    .search-filters-panel .filter-chip[disabled],
    .search-filters-panel .filter-chip:disabled,
    .search-filters-panel .filter-chip:hover,
    button.filter-chip,
    button.filter-chip.active,
    button.filter-chip.disabled,
    button.filter-chip[disabled],
    button.filter-chip:disabled,
    button.filter-chip:hover {
        padding: 3px 6px !important;
        font-size: 10px !important;
        border-radius: 3px !important;
        white-space: nowrap !important;
        line-height: 1.2 !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        transform: none !important;
        -webkit-transform: none !important;
        -ms-transform: none !important;
        box-shadow: none !important;
        font-weight: 400 !important;
    }
    
    /* Filter status row - always one row, auto-fit */
    .filter-row[data-filter="status"] .filter-chips,
    #filter-status {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    
    .filter-row[data-filter="status"] .filter-chips::-webkit-scrollbar,
    #filter-status::-webkit-scrollbar {
        display: none !important;
    }
    
    /* Status chips - same size, just flex-shrink for fitting */
    .filter-row[data-filter="status"] .filter-chip,
    .filter-row[data-filter="status"] .filter-chip.active,
    .filter-row[data-filter="status"] .filter-chip.disabled,
    .filter-row[data-filter="status"] .filter-chip[disabled],
    .filter-row[data-filter="status"] .filter-chip:disabled,
    #filter-status .filter-chip,
    #filter-status .filter-chip.active,
    #filter-status .filter-chip.disabled,
    #filter-status .filter-chip[disabled],
    #filter-status .filter-chip:disabled {
        padding: 3px 6px !important;
        font-size: 10px !important;
        flex-shrink: 0 !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    /* Category chips with counts - fixed width to prevent layout shift */
    .filter-chip .chip-count {
        font-size: 9px !important;
        margin-left: 3px !important;
        padding: 0 2px !important;
        min-width: 20px !important;
        width: 20px !important;
        height: 14px !important;
        line-height: 14px !important;
    }
    
    /* Color chips - same size as other chips */
    .filter-chip.color-chip,
    .filter-chip.color-chip.active,
    .filter-chip.color-chip.disabled,
    .filter-chip.color-chip[disabled],
    .filter-chip.color-chip:disabled,
    .filter-chip.color-chip:hover {
        padding: 3px 6px !important;
        font-size: 10px !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    /* Orientation chips - same size as other chips */
    .orientation-chip,
    .orientation-chip.active,
    .orientation-chip.disabled,
    .orientation-chip[disabled],
    .orientation-chip:disabled,
    .orientation-chip:hover,
    .filter-chip.orientation-chip,
    .filter-chip.orientation-chip.active,
    .filter-chip.orientation-chip.disabled,
    .filter-chip.orientation-chip[disabled],
    .filter-chip.orientation-chip:disabled,
    .filter-chip.orientation-chip:hover {
        padding: 3px 6px !important;
        gap: 3px !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    .orientation-chip .orientation-icon {
        width: 10px !important;
        height: 10px !important;
    }
    
    .orientation-chip .orientation-label {
        font-size: 9px !important;
    }
    
    .orientation-chip .orientation-count {
        font-size: 8px !important;
    }
    
    .color-swatches {
        gap: 2px !important;
    }
    
    .color-swatch {
        width: 14px !important;
        height: 14px !important;
    }
    
    .active-filters {
        padding-top: 3px !important;
        margin-top: 3px !important;
        gap: 2px !important;
    }
    
    .active-filters-label {
        font-size: 7px !important;
    }
    
    .clear-all-btn {
        font-size: 8px !important;
        padding: 1px 3px !important;
    }
    
    /* Active filter tags smaller */
    .active-filter {
        padding: 1px 4px 1px 6px !important;
        font-size: 8px !important;
        border-radius: 10px !important;
        gap: 3px !important;
    }
    
    .active-filter .remove-filter {
        width: 12px !important;
        height: 12px !important;
        font-size: 10px !important;
    }
    
    /* Filter row and label spacing */
    .filter-row {
        margin-bottom: 2px !important;
    }
    
    .filter-label {
        font-size: 7px !important;
        margin-bottom: 1px !important;
        line-height: 1 !important;
    }
    
    .filter-chips {
        gap: 2px !important;
    }
    
    /* Search tags in search bar - compact on mobile */
    .search-tags-container {
        gap: 2px !important;
        flex-wrap: nowrap !important;
        overflow: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
        height: auto !important;
        max-height: 20px !important;
        align-items: center !important;
    }
    
    .search-tag {
        padding: 1px 4px !important;
        font-size: 10px !important;
        gap: 2px !important;
        line-height: 1 !important;
        height: 16px !important;
        display: inline-flex !important;
        align-items: center !important;
    }
    
    .search-tag-label {
        font-size: 10px !important;
        line-height: 1 !important;
    }
    
    .search-tag-remove {
        width: 8px !important;
        height: 8px !important;
        font-size: 12px !important;
        line-height: 1 !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Search input wrapper - much smaller padding */
    .header-search .search-input-wrapper {
        padding: 3px 8px !important;
        min-height: 28px !important;
        gap: 4px !important;
    }
    
    .header-search .search-input {
        height: 20px !important;
        line-height: 20px !important;
    }
    
    /* ========================================
       IMAGE CONTAINER - Ends above thumbnails
       Main image should not extend behind overlay/thumbs
       Starts below header (search bar overlays the image)
       ======================================== */
    .image-container {
        top: var(--header-height);
        bottom: calc(var(--controls-height) + var(--thumbnail-height));
    }
    
    /* Hide navigation zones on mobile (use swipe) */
    .nav-zone {
        display: none !important;
    }
    
    .nav-hint {
        display: none !important;
    }
    
    .pan-hint {
        display: none !important;
    }
    
    /* ========================================
       IMAGE INFO OVERLAY - Mobile Redesign
       - Positioned directly above thumbnail strip
       - Stacked layout: Title, Description, Technical, Category
       - Buttons at bottom: full width, 4 equal columns
       ======================================== */
    .image-info-overlay {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-xs);
        padding: var(--space-sm) var(--space-md);
        /* Position directly above thumbnail strip */
        bottom: calc(var(--controls-height) + var(--thumbnail-height)) !important;
        left: 0;
        right: 0;
        /* Transitions - with elastic acceleration for height changes */
        transition: opacity var(--ui-fade-out) ease-out, 
                    bottom 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    height 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    min-height 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    max-height 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    padding-top 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    padding-bottom 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }
    
    /* Inner elements transition for smooth content changes with elastic */
    .image-info-overlay > * {
        transition: opacity 0.3s ease,
                    max-height 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    height 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    margin 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    padding 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }
    
    /* Idle mode - overlay moves to bottom (above controls bar) */
    body.idle .image-info-overlay {
        bottom: var(--controls-height) !important;
    }
    
    /* Idle mode animation - slide down with elastic acceleration */
    .image-info-overlay.idle-animating-down {
        transition: bottom 1s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    height 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    padding 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    opacity 0.5s ease-out !important;
    }
    
    /* Active mode animation - slide back up with elastic acceleration */
    .image-info-overlay.idle-animating-up {
        transition: bottom 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    height 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    padding 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    opacity 0.4s ease-in !important;
    }
    
    /* Thumbnail strip - elastic animation for idle */
    .thumbnail-strip {
        transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    opacity 0.4s ease !important;
    }
    
    /* Idle mode - thumbnails slide down and hide */
    body.idle .thumbnail-strip {
        transform: translateY(100%) !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    /* Idle mode animation - thumbnails slide down with elastic */
    .thumbnail-strip.idle-animating-down {
        transition: transform 1s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    opacity 0.5s ease !important;
    }
    
    /* Active mode animation - thumbnails slide up with elastic */
    .thumbnail-strip.idle-animating-up {
        transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    opacity 0.3s ease !important;
    }
    
    .overlay-info {
        max-width: 100% !important;
        width: 100% !important;
        /* Smooth transitions for content changes */
        transition: max-width 0.5s ease,
                    opacity 0.3s ease;
    }
    
    /* Title - bigger, prominent - 15% smaller for mobile */
    .overlay-title {
        font-size: 22px !important;
        font-weight: 400;
        margin-bottom: 5px;
        line-height: 1.2;
        width: 100% !important;
        /* Elastic transition for height changes when images change */
        transition: height 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    max-height 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    opacity 0.3s ease;
    }
    
    /* Description - FULL WIDTH on mobile, readable, 2 lines in non-idle - 15% smaller */
    .overlay-description {
        font-size: 14px !important;
        max-height: 44px;
        -webkit-line-clamp: 2;
        line-height: 1.5;
        margin-bottom: var(--space-sm);
        color: rgba(255, 255, 255, 0.65);
        width: 100% !important;
        max-width: 100% !important;
        /* Elastic transition for height changes when images change */
        transition: max-height 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    height 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    opacity 0.3s ease;
    }
    
    /* Description full width in idle mode on mobile too */
    body.idle .overlay-info {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    body.idle .overlay-title {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
    }
    
    body.idle .overlay-description {
        -webkit-line-clamp: unset !important;
        max-height: none !important;
        overflow: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        /* Smooth expansion animation */
        transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s ease;
    }
    
    /* Technical info - VISIBLE on mobile, selective items only - 15% smaller */
    .overlay-technical {
        display: flex !important;
        flex-wrap: wrap;
        gap: 4px var(--space-sm);
        margin-top: var(--space-xs);
        max-height: none;
    }
    
    /* Hide specific tech items on mobile - show only lens, filesize, resolution, date */
    .overlay-technical #overlay-camera,
    .overlay-technical #overlay-focal,
    .overlay-technical #overlay-aperture,
    .overlay-technical #overlay-shutter,
    .overlay-technical #overlay-iso,
    .overlay-technical #overlay-location {
        display: none;
    }
    
    /* Hide separators after hidden items */
    .overlay-technical #overlay-camera + .overlay-tech-separator,
    .overlay-technical #overlay-iso + .overlay-tech-separator {
        display: none;
    }
    
    .overlay-tech-item {
        font-size: 9px !important;
        color: rgba(255, 255, 255, 0.5);
    }
    
    .overlay-tech-separator {
        height: 8px;
        margin: 0 2px;
        background: rgba(255, 255, 255, 0.2);
    }
    
    /* Category row - visible, good size */
    .overlay-category-row {
        font-size: 13px;
        margin-top: var(--space-xs);
        max-height: 24px;
        color: rgba(255, 255, 255, 0.7);
    }
    
    /* Actions - full width row, all buttons inline
       HTML Structure:
       overlay-actions > btn-like(hidden), overlay-download-section > download-button-wrapper > btn-share,
                        btn-order, btn-download, register-section > btn-register
       Need to flatten the structure with display:contents */
    .overlay-actions {
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: stretch;
        gap: var(--space-sm);
        padding-top: var(--space-sm);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        flex-wrap: nowrap;
    }
    
    /* Flatten nested containers - make children act as direct flex items */
    .overlay-actions .overlay-download-section {
        display: contents;
    }
    
    .overlay-actions .download-button-wrapper {
        display: contents;
    }
    
    .overlay-actions .register-section {
        display: contents;
    }
    
    /* Hide like button on mobile (usually hidden anyway) */
    .overlay-actions .btn-like {
        display: none !important;
    }
    
    /* All buttons - equal width, inline */
    .overlay-actions .overlay-action-btn,
    .overlay-actions .btn-share,
    .overlay-actions .btn-order,
    .overlay-actions .btn-download,
    .overlay-actions .btn-register {
        flex: 1 1 0;
        min-width: 0;
        padding: 12px;
        width: auto;
        height: 44px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .overlay-action-btn .btn-text {
        display: none;
    }
    
    .overlay-action-btn .icon {
        width: 20px;
        height: 20px;
    }
    
    /* Hide extra info on mobile */
    .download-info,
    .download-resolution-label,
    .register-full-res,
    .register-description,
    .overlay-download-section .download-info {
        display: none;
    }
    
    /* ========================================
       STOCK OPTIONS PANEL - Mobile (For Sale Images)
       Single column, compact layout
       ======================================== */
    .overlay-stock-section {
        width: 100%;
        min-width: unset;
        max-width: unset;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: var(--space-sm);
        gap: 12px;
    }
    
    /* Keep 2 columns on mobile but tighter */
    .stock-options-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .stock-column {
        gap: 4px;
    }
    
    .stock-option-label {
        font-size: 9px;
        margin-bottom: 2px;
    }
    
    .stock-sizes,
    .stock-licenses {
        gap: 3px;
    }
    
    .size-option {
        grid-template-columns: 14px 1fr auto auto;
        gap: 6px;
        padding: 6px 8px;
    }
    
    .size-option input[type="radio"],
    .license-option input[type="radio"] {
        width: 12px;
        height: 12px;
    }
    
    .size-name,
    .license-name {
        font-size: 11px;
    }
    
    .size-dimensions {
        font-size: 9px;
    }
    
    .size-price {
        font-size: 11px;
        min-width: 24px;
    }
    
    .license-option {
        grid-template-columns: 14px 1fr auto;
        gap: 6px;
        padding: 6px 8px;
    }
    
    .license-extra {
        font-size: 10px;
    }
    
    .stock-cart-row {
        padding-top: 4px;
    }
    
    .stock-add-to-cart-btn {
        padding: 10px 20px;
        font-size: 12px;
        gap: 8px;
    }
    
    .stock-add-to-cart-btn .icon {
        width: 14px;
        height: 14px;
    }
    
    .stock-add-to-cart-btn .btn-price {
        font-size: 12px;
        padding-left: 4px;
    }
    
    /* ========================================
       THUMBNAIL STRIP - Larger size (70px)
       ======================================== */
    .thumbnail-strip {
        height: var(--thumbnail-height);
    }
    
    .thumbnail-track {
        padding: var(--space-xs) var(--space-sm);
        gap: var(--space-xs);
    }
    
    /* Fix thumbnail sizing - consistent height */
    .thumbnail {
        height: calc(var(--thumbnail-height) - 12px);
        min-width: 55px;
        flex-shrink: 0;
    }
    
    /* Loading thumbnail - same size as loaded */
    .thumbnail.loading {
        height: calc(var(--thumbnail-height) - 12px);
        min-width: 55px;
        aspect-ratio: 1;
    }
    
    .thumbnail img {
        height: 100%;
        width: auto;
        object-fit: cover;
    }
    
    /* ========================================
       INFO PANEL - Mobile adjustments
       ======================================== */
    .info-panel {
        height: 40px;
        bottom: calc(var(--controls-height) + var(--thumbnail-height));
    }
    
    .info-panel .info-panel-content {
        padding: 0 var(--space-md);
    }
    
    .info-item {
        padding: 0 var(--space-sm);
    }
    
    .info-keywords {
        display: none;
    }
    
    /* When info panel is open on mobile */
    body:has(.info-panel:not(.hidden)) .image-info-overlay {
        bottom: calc(var(--controls-height) + var(--thumbnail-height) + 40px);
    }
    
    /* ========================================
       CONTROLS BAR - Mobile
       ======================================== */
    .controls-bar {
        height: var(--controls-height);
        padding: 0 var(--space-sm);
    }
    
    .controls-center {
        position: relative;
        left: auto;
        transform: none;
    }
    
    .controls-left,
    .controls-right {
        gap: var(--space-xs);
    }
    
    .control-btn {
        width: 28px;
        height: 28px;
    }
    
    .control-btn .icon {
        width: 14px;
        height: 14px;
    }
    
    /* ========================================
       IDLE MODE - Mobile Adjustments
       - Overlay stays above thumbnails (not sliding down)
       - Thumbnails STAY VISIBLE in idle on mobile
       - JS clears inline styles on mobile, CSS takes over
       ======================================== */
    body.idle .image-info-overlay {
        /* Keep overlay above thumbnails on mobile */
        bottom: calc(var(--controls-height) + var(--thumbnail-height));
        opacity: 0.9;
        pointer-events: none;
        /* Smooth transition maintained in idle */
        transition: opacity 0.5s ease,
                    bottom 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Hide overlay actions completely in idle mode - use max-height for animation */
    body.idle .overlay-actions {
        max-height: 0 !important;
        opacity: 0;
        pointer-events: none;
        overflow: hidden;
        padding: 0 !important;
        margin: 0 !important;
        border: none;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s ease,
                    padding 0.3s ease,
                    margin 0.3s ease;
    }
    
    /* Overlay actions visible state - smooth transition with max-height */
    .overlay-actions {
        max-height: 200px; /* Large enough for content */
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s ease,
                    padding 0.3s ease,
                    margin 0.3s ease;
    }
    
    /* Thumbnails hidden in idle mode on mobile - handled above with elastic animation */
    
    /* Dim technical info in idle */
    body.idle .overlay-technical,
    body.idle .overlay-category-row {
        opacity: 0.5;
    }
    
    /* Controls bar stays visible in idle on mobile */
    body.idle .controls-bar {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Logo stays 100% visible in idle on mobile */
    body.idle .header-logo-wrapper {
        opacity: 1 !important;
    }
    
    body.idle .header-logo .logo-hover {
        opacity: 1 !important;
    }
    
    .image-counter {
        font-size: 11px;
        min-width: 50px;
    }
    
    .speed-control {
        display: none;
    }
    
    /* Hide some controls on mobile */
    .view-modes,
    #btn-color-journey,
    #btn-photo-journey,
    #comments-panel-toggle,
    #info-panel-toggle {
        display: none;
    }
    
    /* Keywords Bar */
    .keywords-bar {
        right: 0;
        bottom: calc(var(--controls-height) + var(--thumbnail-height));
        padding: var(--space-xs) var(--space-sm);
    }
    
    .keyword-chip {
        padding: var(--space-xs) var(--space-sm);
        font-size: 11px;
    }
    
    /* Grid View */
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
        padding: var(--space-sm);
    }
    
    /* Modals */
    .modal {
        margin: var(--space-sm);
        max-height: calc(100vh - var(--space-lg));
    }
    
    .modal-sm,
    .modal-md,
    .modal-lg {
        max-width: calc(100vw - var(--space-lg));
    }
    
    .color-browse-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: var(--space-sm);
    }
    
    .color-swatch-large {
        width: 36px;
        height: 36px;
    }
    
    .color-name {
        font-size: 10px;
    }
    
    /* Toast */
    .toast-container {
        left: var(--space-sm);
        right: var(--space-sm);
        transform: none;
    }
    
    .toast {
        width: 100%;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .controls-center {
        display: none;
    }
    
    .color-browse-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Touch-friendly */
@media (hover: none) and (pointer: coarse) {
    .header-icon,
    .control-btn,
    .action-icon,
    .filter-chip,
    .keyword-chip,
    .thumbnail {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Disable hover effects */
    .grid-item:hover {
        transform: none;
    }
    
    .grid-item-overlay {
        opacity: 1;
    }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 767px) {
    :root {
        --info-panel-width: 100%;
    }
    
    .info-panel {
        height: 40px;
    }
    
    .info-panel .info-panel-content {
        padding: 0 16px;
    }
    
    .info-item {
        padding: 0 10px;
    }
    
    .info-keywords,
    .info-colors {
        display: none; /* Hide on mobile */
    }
    
    .header-logo {
        font-size: 16px;
    }
}


/* ========================================
   Dashboard Styles
   ======================================== */
.profile-header {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.profile-info h3 {
    margin: 0 0 var(--space-xs);
}

.profile-info p {
    margin: 0;
    color: var(--color-text-tertiary);
}

.profile-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.downloads-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.download-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-surface);
    border-radius: 8px;
}

.download-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.download-info {
    flex: 1;
}

.download-info h4 {
    margin: 0 0 var(--space-xs);
    font-size: 14px;
}

.download-meta {
    font-size: 12px;
    color: var(--color-text-tertiary);
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--space-md);
}

.achievements-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.badge-count {
    font-size: 14px;
    color: var(--color-accent);
}

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

.settings-form select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-primary);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}

.danger-zone {
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
}

.btn-danger-outline {
    color: var(--color-like);
    border-color: var(--color-like);
    background: transparent;
}

.empty-state {
    text-align: center;
    padding: var(--space-xl);
    color: var(--color-text-tertiary);
}

/* ========================================
   Shop / Purchase Styles
   ======================================== */
.purchase-preview {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.purchase-preview img {
    max-width: 200px;
    max-height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: var(--space-sm);
}

.purchase-preview h4 {
    margin: 0;
    font-size: 14px;
}

.license-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.license-option {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.license-option:hover {
    border-color: var(--color-text-tertiary);
}

.license-option.selected {
    border-color: var(--color-accent);
    background: rgba(37, 99, 235, 0.1);
}

.license-option input {
    display: none;
}

.license-info {
    flex: 1;
}

.license-name {
    display: block;
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.license-desc {
    font-size: 12px;
    color: var(--color-text-tertiary);
}

.license-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-accent);
}

.purchase-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
    border-top: 1px solid var(--color-border);
    margin-bottom: var(--space-md);
    font-size: 18px;
    font-weight: 600;
}

/* Cart Styles */
.cart-empty {
    text-align: center;
    padding: var(--space-xl);
    color: var(--color-text-tertiary);
}

.cart-empty .hint {
    font-size: 13px;
    margin-top: var(--space-sm);
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    max-height: 300px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-surface);
    border-radius: 8px;
}

.cart-item-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    margin: 0 0 var(--space-xs);
    font-size: 14px;
}

.cart-item-license {
    font-size: 12px;
    color: var(--color-text-tertiary);
    text-transform: capitalize;
}

.cart-item-price {
    font-weight: 500;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--color-text-tertiary);
    font-size: 20px;
    cursor: pointer;
    padding: var(--space-xs);
}

.cart-item-remove:hover {
    color: var(--color-like);
}

.cart-summary {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-md);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

/* Cart count badge */
#cart-count {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--color-accent);
    color: white;
    font-size: 10px;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

#cart-count.hidden {
    display: none;
}

/* ========================================
   Photo Journeys
   ======================================== */
.journeys-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.journey-card {
    background: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.journey-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.journey-card-image {
    position: relative;
    aspect-ratio: 16/9;
}

.journey-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.journey-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
}

.journey-count {
    font-size: 12px;
    color: var(--color-text-secondary);
}

.journey-card-info {
    padding: var(--space-md);
}

.journey-card-info h4 {
    margin: 0 0 var(--space-xs);
    font-size: 16px;
}

.journey-card-info p {
    margin: 0;
    font-size: 13px;
    color: var(--color-text-tertiary);
    line-height: 1.4;
}

/* Journey Player (fullscreen) */
.journey-player {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.journey-player.hidden {
    display: none;
}

.journey-player-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.journey-player-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.journey-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-lg);
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.journey-progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
}

.journey-progress-fill {
    height: 100%;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

.journey-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.journey-buttons {
    display: flex;
    gap: var(--space-md);
}

.journey-buttons button {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.journey-buttons button:hover {
    background: rgba(255,255,255,0.2);
}

body.journey-mode {
    overflow: hidden;
}

body.journey-mode .gallery-container {
    display: none;
}

/* No Results Message */
/* Thumbnails loading state */
.thumbnails-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 var(--space-lg);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.thumbnails-loading span {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.no-results-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md, 1rem);
    padding: var(--space-xl, 2rem);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    width: 100%;
    height: 100%;
    min-height: 80px;
}

.no-results-message span {
    font-size: 0.9rem;
    opacity: 0.8;
}

.clear-filters-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-filters-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Active filter visual feedback */
.filter-chip.active {
    background: var(--color-accent, #9B2335) !important;
    color: white !important;
    border-color: transparent !important;
}

.color-chip.active {
    box-shadow: 0 0 0 3px white, 0 0 0 5px rgba(155, 35, 53, 0.8) !important;
    /* REMOVED transform: scale(1.15) to prevent layout shift */
    z-index: 5;
    outline: none;
}

/* Filter count badge */
.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--color-accent, #9B2335);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9px;
    margin-left: 6px;
}

/* Chip count badge (inside chip) */
/* FIXED: Use fixed width to prevent layout shift on hover when counts change */
.chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Fixed width to accommodate up to 3 digits (999) without layout shift */
    min-width: 24px;
    width: 24px;
    height: 16px;
    padding: 0 2px;
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 8px;
    margin-left: 6px;
    /* Smooth transition for count changes */
    transition: background-color 0.2s ease, color 0.2s ease;
    /* Prevent text from affecting width */
    text-align: center;
    flex-shrink: 0;
}

.filter-chip.active .chip-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Disabled filter chip styles */
/* IMPORTANT: Disabled chips should maintain same dimensions as enabled chips */
.filter-chip.disabled,
.color-chip.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    filter: grayscale(60%);
    /* Prevent size changes - keep same padding/height as normal state */
}

/* Keep count badge visible but grayed out on disabled chips */
.filter-chip.disabled .chip-count {
    opacity: 0.5;
}

/* Prevent click but allow hover for tooltip */
.filter-chip.disabled,
.color-chip.disabled {
    pointer-events: auto;
}

.filter-chip.disabled:hover,
.color-chip.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Color chip disabled - additional styling */
.color-chip.disabled {
    filter: grayscale(80%);
    opacity: 0.3;
}

/* Disabled chip tooltip */
.filter-chip.disabled::after,
.color-chip.disabled::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.7rem;
    white-space: nowrap;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
}

.filter-chip.disabled:hover::after,
.color-chip.disabled:hover::after {
    opacity: 1;
}

/* Ensure relative positioning for tooltip */
.filter-chip,
.color-chip {
    position: relative;
}

/* Color chips - flexbox for inline count display */
.color-chip {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

/* Smart filter transition */
.filter-chip,
.color-chip {
    transition: opacity 0.2s ease, filter 0.2s ease, transform 0.15s ease;
}

/* ============================================
   ACTIVE FILTERS SECTION - Improved Styling
   ============================================ */

/* Container for active filters */
.active-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Header row with label and clear all */
.active-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.active-filters-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* Active filters list - flex wrap for tags */
.active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

/* Individual active filter tag */
.active-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 10px;
    background: rgba(155, 35, 53, 0.3);
    border: 1px solid rgba(155, 35, 53, 0.5);
    border-radius: 16px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    transition: all 0.15s ease;
}

.active-filter:hover {
    background: rgba(155, 35, 53, 0.4);
    border-color: rgba(155, 35, 53, 0.7);
}

/* Filter type indicator */
.active-filter[data-type="colors"] {
    background: rgba(236, 72, 153, 0.3);
    border-color: rgba(236, 72, 153, 0.5);
}

.active-filter[data-type="colors"]:hover {
    background: rgba(236, 72, 153, 0.4);
}

.active-filter[data-type="models"] {
    background: rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.5);
}

.active-filter[data-type="models"]:hover {
    background: rgba(139, 92, 246, 0.4);
}

.active-filter[data-type="moods"] {
    background: rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.5);
}

.active-filter[data-type="moods"]:hover {
    background: rgba(34, 197, 94, 0.4);
}

.active-filter[data-type="search"] {
    background: rgba(251, 191, 36, 0.3);
    border-color: rgba(251, 191, 36, 0.5);
}

.active-filter[data-type="search"]:hover {
    background: rgba(251, 191, 36, 0.4);
}

.active-filter[data-type="category"] {
    background: rgba(20, 184, 166, 0.3);
    border-color: rgba(20, 184, 166, 0.5);
}

.active-filter[data-type="category"]:hover {
    background: rgba(20, 184, 166, 0.4);
}

.active-filter[data-type="status"] {
    background: rgba(249, 115, 22, 0.3);
    border-color: rgba(249, 115, 22, 0.5);
}

.active-filter[data-type="status"]:hover {
    background: rgba(249, 115, 22, 0.4);
}

/* Remove button inside active filter */
.remove-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s ease;
}

.remove-filter:hover {
    background: rgba(239, 68, 68, 0.8);
    color: white;
    transform: scale(1.1);
}

/* Clear all button */
.clear-all-btn {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: rgba(239, 68, 68, 0.8);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.clear-all-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.6);
    color: rgba(239, 68, 68, 1);
}

/* ============================================
   HOVER PREVIEW TOOLTIP
   ============================================ */

/* Preview tooltip that shows on hover */
.filter-preview-tooltip {
    position: fixed;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.filter-preview-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.filter-preview-tooltip .preview-count {
    color: #60A5FA;
    font-weight: 700;
}

.filter-preview-tooltip .preview-action {
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
}

.filter-preview-tooltip.will-remove {
    border-color: rgba(239, 68, 68, 0.5);
}

.filter-preview-tooltip.will-remove .preview-count {
    color: #F87171;
}

.filter-preview-tooltip.will-add {
    border-color: rgba(34, 197, 94, 0.5);
}

.filter-preview-tooltip.will-add .preview-count {
    color: #4ADE80;
}

/* ========================================
   Chip Count Badge Animations & Preview States
   ======================================== */

/* Count badge animation when updating */
.chip-count.updating {
    animation: countPulse 0.3s ease;
}

@keyframes countPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Preview state - shows what count WOULD be */
.chip-count.preview {
    background: rgba(155, 35, 53, 0.3);
    color: #60A5FA;
}

/* Preview will-disable state (on hover of another chip) */
.filter-chip.preview-will-disable,
.color-chip.preview-will-disable {
    opacity: 0.4;
    border-style: dashed;
}

.filter-chip.preview-will-disable .chip-count,
.color-chip.preview-will-disable .chip-count {
    background: rgba(239, 68, 68, 0.3);
    color: #EF4444;
}

/* ========================================
   Zero Results Toast
   ======================================== */
.zero-results-toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(239, 68, 68, 0.95);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideDownIn 0.3s ease;
    backdrop-filter: blur(10px);
}

.zero-results-toast .toast-icon {
    font-size: 18px;
}

.zero-results-toast strong {
    color: #FCA5A5;
}

.zero-results-toast.fade-out {
    animation: slideUpOut 0.3s ease forwards;
}

@keyframes slideDownIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideUpOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* ========================================
   Search Suggestions Dropdown
   ======================================== */
.search-suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: rgba(20, 20, 25, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.search-suggestions-dropdown.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.suggestion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item:focus {
    background: rgba(155, 35, 53, 0.2);
    outline: none;
}

.suggestion-term {
    color: white;
    font-size: 13px;
    font-weight: 500;
}

.suggestion-count {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

/* ========================================
   Search "No Results" Inline Indicator
   ======================================== */
.search-no-results-indicator {
    color: #EF4444;
    font-size: 11px;
    font-weight: 500;
    margin-left: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.search-no-results-indicator.visible {
    opacity: 1;
}

/* Search input wrapper states */
.search-input-wrapper.no-results {
    border-color: rgba(239, 68, 68, 0.4) !important;
}

.search-input-wrapper.search-blocked {
    animation: searchBlockedFlash 0.5s ease;
}

@keyframes searchBlockedFlash {
    0%, 100% { border-color: rgba(255, 255, 255, 0.3); }
    25%, 75% { border-color: rgba(239, 68, 68, 0.8); }
}

/* ========================================
   Orientation Chip Disabled State
   ======================================== */
.orientation-chip.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.orientation-chip.disabled .chip-count {
    background: rgba(239, 68, 68, 0.3);
}

/* ========================================
   Color Chip Count Badge Positioning - INLINE like other chips
   ======================================== */
.color-chip .chip-count {
    /* Use inline positioning like other chips, not absolute floating */
    position: static;
    min-width: 20px;
    width: 20px;
    height: 14px;
    padding: 0 2px;
    font-size: 9px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-left: 4px;
}

/* ========================================
   NEW STYLES - Gallery Redesign v2.0
   Added: 2024-12-19
   ======================================== */

/* ========================================
   Overlay Category Styles (bottom row)
   ======================================== */

/* Category row - at bottom of overlay-info */
.overlay-category-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: var(--space-md);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    transition: opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease;
    max-height: 30px;
    overflow: hidden;
}

.overlay-category-row .overlay-category {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.overlay-category-row .overlay-subcategory::before {
    content: '>';
    margin-right: 8px;
    opacity: 0.5;
}

.overlay-category-row .overlay-subcategory {
    color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   Resolution Toggle
   ======================================== */
.resolution-toggle {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}

.resolution-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.resolution-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

.resolution-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ========================================
   Thumbnail Loader (Batch Loading)
   ======================================== */
.thumbnail-loader {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.thumbnail-loader.hidden {
    display: none;
}

.thumbnail-loader-fill {
    width: 100%;
    background: linear-gradient(to top, 
        rgba(155, 35, 53, 0.6) 0%,
        rgba(155, 35, 53, 0.3) 100%);
    animation: loaderFill 1.5s ease-in-out infinite;
}

@keyframes loaderFill {
    0% {
        height: 0%;
    }
    50% {
        height: 100%;
    }
    100% {
        height: 0%;
    }
}

/* ========================================
   Image Timer Bar (Idle Mode Only)
   Positioned at very bottom of page, below controls bar
   ======================================== */
.image-timer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: transparent;
    z-index: 1002; /* Above controls bar */
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.image-timer-bar.idle-only {
    /* Only visible in idle mode */
}

body.idle .image-timer-bar {
    opacity: 0.3;
}

.image-timer-progress {
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    width: 0%;
    transition: width 100ms linear;
}

/* ========================================
   Gallery Position Bar - MOVED INTO CONTROLS BAR
   See .controls-bar .gallery-position-bar above
   ======================================== */
/* Standalone gallery-position-bar is now inside controls-bar */

/* ========================================
   "What Next?" Panel
   ======================================== */
.what-next-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: calc(var(--header-height) + var(--space-xl)) var(--space-xl) var(--space-xl);
    overflow-y: auto;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.what-next-panel.hidden {
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
}

.what-next-close {
    position: fixed;
    top: calc(var(--header-height) + var(--space-md));
    right: var(--space-lg);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 2001;
}

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

.what-next-close .icon {
    width: 20px;
    height: 20px;
}

.what-next-content {
    width: 100%;
    max-width: 1400px;
}

.what-next-title {
    font-size: 32px;
    font-weight: 300;
    color: white;
    text-align: center;
    margin: 0 0 var(--space-xl);
}

.what-next-tags {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-md);
}

.what-next-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
}

.what-next-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.what-next-card .card-image {
    width: 100%;
    aspect-ratio: 16/10;
    background-size: cover;
    background-position: center;
    background-color: rgba(255, 255, 255, 0.05);
}

.what-next-card .card-label {
    padding: var(--space-sm) var(--space-md);
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

/* ========================================
   Unified Tooltip System
   ======================================== */
.tooltip-container {
    position: fixed;
    z-index: 10001;
    pointer-events: none;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tooltip-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-text {
    display: block;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ========================================
   First-Time Glow Effect
   ======================================== */
@keyframes subtleGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.15);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    }
}

@keyframes subtleGlowIcon {
    0%, 100% {
        filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.2));
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
    }
}

.first-time-glow {
    animation: subtleGlow 2s ease-in-out infinite;
}

.first-time-glow-icon {
    animation: subtleGlowIcon 2s ease-in-out infinite;
}

/* Remove glow on hover */
.first-time-glow:hover,
.first-time-glow-icon:hover {
    animation: none;
}

/* ========================================
   Directional Slide Transitions
   ======================================== */
.image-display {
    position: relative;
    overflow: hidden;
}

/* Slide left (going to next image) */
.slide-out-left {
    animation: slideOutLeft 600ms ease-in-out forwards;
}

.slide-in-right {
    animation: slideInRight 600ms ease-in-out forwards;
}

/* Slide right (going to previous image) */
.slide-out-right {
    animation: slideOutRight 600ms ease-in-out forwards;
}

.slide-in-left {
    animation: slideInLeft 600ms ease-in-out forwards;
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-20px);
        opacity: 0;
    }
}

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

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

@keyframes slideInLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Overlay info slides with image */
.overlay-info.slide-out-left {
    animation: slideOutLeft 400ms ease-out forwards;
}

.overlay-info.slide-in-right {
    animation: slideInRight 400ms ease-out forwards;
}

.overlay-info.slide-out-right {
    animation: slideOutRight 400ms ease-out forwards;
}

.overlay-info.slide-in-left {
    animation: slideInLeft 400ms ease-out forwards;
}

/* Text content swish animations for title, description, technical, category */
.overlay-title.swish-out-left,
.overlay-description.swish-out-left,
.overlay-technical.swish-out-left,
.overlay-category-row.swish-out-left {
    animation: textSwishOutLeft 250ms ease-out forwards;
}

.overlay-title.swish-in-right,
.overlay-description.swish-in-right,
.overlay-technical.swish-in-right,
.overlay-category-row.swish-in-right {
    animation: textSwishInRight 250ms ease-out forwards;
}

.overlay-title.swish-out-right,
.overlay-description.swish-out-right,
.overlay-technical.swish-out-right,
.overlay-category-row.swish-out-right {
    animation: textSwishOutRight 250ms ease-out forwards;
}

.overlay-title.swish-in-left,
.overlay-description.swish-in-left,
.overlay-technical.swish-in-left,
.overlay-category-row.swish-in-left {
    animation: textSwishInLeft 250ms ease-out forwards;
}

/* Text swish keyframes - subtle and fast */
@keyframes textSwishOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-15px);
        opacity: 0;
    }
}

@keyframes textSwishInRight {
    from {
        transform: translateX(15px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes textSwishOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(15px);
        opacity: 0;
    }
}

@keyframes textSwishInLeft {
    from {
        transform: translateX(-15px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   Updated Idle Mode Styles
   ======================================== */
/* Logo at 20% in idle */
body.idle .header-logo-wrapper {
    opacity: 0.2;
    transition: opacity 3s ease;
}

/* Search at 80% in idle */
body.idle .header-search {
    opacity: 0.8 !important;
    pointer-events: auto !important;
}

/* Restore on hover */
body.idle .header-logo-wrapper:hover {
    opacity: 1;
    transition: opacity 0.3s ease;
}

body.idle .header-search:hover {
    opacity: 1 !important;
    transition: opacity 0.3s ease;
}

/* ========================================
   Controls Bar - Simplified Layout
   (Already updated in HTML, CSS adjustments)
   ======================================== */
.controls-center {
    /* Center the play/pause button */
    flex: 0;
}

.controls-right .view-modes {
    /* View modes grouped on right */
    margin-left: auto;
}

/* ========================================
   DEPRECATED STYLES
   Kept for reference, can be removed later
   ======================================== */



/* DEPRECATED: Speed control - REMOVED from HTML
.speed-control { display: none !important; }
.speed-btn { display: none !important; }
.speed-display { display: none !important; }
*/

/* DEPRECATED: Journey buttons - REMOVED from HTML
#btn-random { display: none !important; }
#btn-color-journey { display: none !important; }
#btn-photo-journey { display: none !important; }
#btn-zen { display: none !important; }
*/

/* DEPRECATED: Slideshow/Landscape view modes - REMOVED from HTML
#view-slideshow { display: none !important; }
#view-landscape { display: none !important; }
*/

/* ========================================
   Gallery Loading System
   - Progress bar under header
   - Main image loader
   - Thumbnail skeleton loaders
   ======================================== */

/* Overall Progress Bar (under header) */
.gallery-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1001;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.3s ease;
}

.gallery-loading-bar.complete {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

.gallery-loading-bar.hidden {
    display: none;
}

.gallery-loading-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #9B2335 0%, #C94D5A 50%, #9B2335 100%);
    background-size: 200% 100%;
    animation: progressShimmer 1.5s ease-in-out infinite;
    transition: width 0.3s ease;
    border-radius: 0 2px 2px 0;
}

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

/* Complete state - flash green */
.gallery-loading-bar.complete .gallery-loading-progress {
    background: #22C55E;
    width: 100%;
}

/* Main Image Loader (centered spinner with progress) */
.main-image-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-image-loader.loading {
    opacity: 1;
}

/* Progress ring container */
.main-loader-spinner {
    position: relative;
    width: 64px;
    height: 64px;
}

/* SVG progress ring */
.main-loader-spinner svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.main-loader-spinner .progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3;
}

.main-loader-spinner .progress-ring-fill {
    fill: none;
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 163; /* 2 * PI * 26 (radius) */
    stroke-dashoffset: 163;
    transition: stroke-dashoffset 0.1s ease-out;
}

/* Progress percentage text */
.main-loader-spinner .progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Indeterminate mode (when progress not available) */
.main-loader-spinner.indeterminate .progress-ring-fill {
    stroke-dasharray: 40 123;
    stroke-dashoffset: 0;
    animation: spinLoader 1s linear infinite;
}

.main-loader-spinner.indeterminate .progress-text {
    display: none;
}

@keyframes spinLoader {
    to { stroke-dashoffset: -163; }
}

/* Thumbnail Loading States */
.thumbnail.loading {
    position: relative;
    overflow: hidden;
}

.thumbnail.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 100%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    z-index: 1;
}

.thumbnail.loading img {
    opacity: 0;
}

.thumbnail.loaded img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

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

/* Thumbnail error state (after max retries) */
.thumbnail.error {
    position: relative;
    background: rgba(239, 68, 68, 0.1);
}

.thumbnail.error::after {
    content: '?';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    color: rgba(239, 68, 68, 0.6);
    z-index: 2;
}

.thumbnail.error img {
    opacity: 0.3;
    filter: grayscale(100%);
}

/* Hide loading bar in page-loading state (initial animation takes priority) */
body.page-loading .gallery-loading-bar {
    opacity: 0;
}

/* ========================================
   RESPONSIVE BREAKPOINTS - RESTRUCTURED
   ========================================
   
   Mobile:       < 768px   (existing styles above)
   Tablet:       768px - 1279px (NEW)
   Desktop:      1280px - 2047px (standard)
   Large Desktop: >= 2048px (NEW)
   
   ======================================== */

/* ========================================
   TABLET BREAKPOINT (768px - 1279px)
   - Filter panel: 90% width, overlay style
   - Touch-optimized: 44px min tap targets
   - Swipe gestures for navigation
   - Medium thumbnail size
   ======================================== */
@media (min-width: 768px) and (max-width: 1279px) {
    
    /* ----- ROOT VARIABLES FOR TABLET ----- */
    :root {
        --thumbnail-height: 80px;
        --controls-height: 44px;
    }
    
    /* ----- HEADER ADJUSTMENTS ----- */
    .gallery-header {
        padding: 0 16px;
    }
    
    .header-logo {
        font-size: 18px;
    }
    
    /* ----- SEARCH & FILTER PANEL ----- */
    /* Match desktop styles with 95% width */
    #search-filters-panel {
        position: fixed;
        top: var(--header-height, 56px);
        left: 2.5%;
        right: 2.5%;
        width: 95%;
        max-width: none;
        max-height: calc(100vh - var(--header-height, 56px) - 120px);
        overflow-y: auto;
        background: rgba(20, 20, 20, 0.98);
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
        z-index: 1000;
        padding: 20px;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        /* Hidden by default on tablet */
        display: none;
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    
    /* Show filter panel when expanded */
    #search-filters-panel.expanded {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Remove border from search filters content */
    .search-filters-content {
        border: none;
    }
    
    /* Search input - inherit desktop base styles */
    /* No overrides needed - uses base styles */
    
    /* ----- FILTER CHIPS - 20% BIGGER than desktop ----- */
    .filter-chip {
        padding: 2px 8px;
        font-size: 13px;
        border-radius: 5px;
        touch-action: manipulation;
    }
    
    /* Filter section labels - 20% bigger */
    .filter-section-label {
        font-size: 12px;
        margin-bottom: 10px;
        margin-top: 17px;
    }
    
    /* Filter groups - horizontal flow with wrapping */
    #filter-categories,
    #filter-tags,
    #filter-models,
    #filter-moods {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    /* Status filter row */
    .filter-status-row {
        display: flex;
        gap: 5px;
        flex-wrap: wrap;
    }
    
    .filter-status-row .filter-chip {
        flex: 1;
        min-width: 84px;
        justify-content: center;
    }
    
    /* Orientation chips - 20% bigger */
    .orientation-chip {
        gap: 5px;
    }
    
    .orientation-chip .orientation-icon {
        width: 17px;
        height: 17px;
    }
    
    .orientation-chip .orientation-label {
        font-size: 13px;
    }
    
    /* Color chips - 20% bigger */
    .color-chip {
        width: auto;
        min-width: 38px;
        height: 28px;
        min-height: 28px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 4px 8px;
    }
    
    /* Color chip count badge - 20% bigger, inline like other chips */
    .color-chip .chip-count {
        font-size: 11px;
        text-indent: 0;
        position: static;
        min-width: 24px;
        width: 24px;
        height: 17px;
        padding: 0 3px;
        margin-left: 5px;
    }
    
    #filter-colors {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    /* Count badges - 20% bigger than desktop, fixed width to prevent layout shift */
    .chip-count {
        font-size: 12px;
        min-width: 28px;
        width: 28px;
        height: 19px;
        padding: 0 3px;
        margin-left: 7px;
    }
    
    /* ----- GALLERY CONTAINER ----- */
    .gallery-image-container {
        touch-action: pan-x pan-y;
    }
    
    /* Enable swipe hint on tablet */
    .gallery-image-container::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 10px;
        right: 10px;
        height: 4px;
        background: linear-gradient(90deg, 
            rgba(255,255,255,0.3) 0%, 
            transparent 20%, 
            transparent 80%, 
            rgba(255,255,255,0.3) 100%);
        border-radius: 2px;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    
    .gallery-image-container.swipe-hint::after {
        opacity: 1;
    }
    
    /* ----- THUMBNAILS - INHERIT DESKTOP STYLES ----- */
    /* No overrides needed - uses base desktop styles */
    /* Base styles provide:
       - .thumbnail-strip: height from --thumbnail-height variable
       - .thumbnail: natural width based on image aspect ratio
       - .thumbnail img: height 100%, width auto
    */
    
    /* ----- IMAGE INFO OVERLAY - INHERIT DESKTOP STYLES ----- */
    /* No overrides needed - uses base desktop styles */
    /* Base styles provide:
       - padding: 30px var(--space-lg) 24px calc(var(--space-xl) + 40px)
       - bottom: calc(var(--controls-height) + var(--thumbnail-height))
       - .overlay-title: font-size 42px (32px on <1200px)
       - .overlay-description: font-size 25px
       - .overlay-actions: gap var(--space-lg)
    */
    
    /* ----- NAVIGATION ARROWS ----- */
    .gallery-nav {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .gallery-nav.nav-prev {
        left: 15px;
    }
    
    .gallery-nav.nav-next {
        right: 15px;
    }
    
    /* ----- CONTROLS BAR ----- */
    .gallery-controls {
        padding: 6px 16px;
    }
    
    .control-btn {
        min-width: 38px;
        min-height: 38px;
        padding: 8px;
    }
    
    /* ----- POSITION BAR ----- */
    .gallery-position-bar {
        height: 4px;
    }
    
    /* ----- IDLE MODE ADJUSTMENTS ----- */
    body.idle .image-info-overlay {
        bottom: calc(var(--thumbnail-height, 80px) + 10px);
    }
    
    body.idle .thumbnail-strip {
        opacity: 0.7;
    }
    
    /* ----- TOASTS ----- */
    .zero-results-toast {
        top: 80px;
        padding: 14px 28px;
        font-size: 15px;
    }
    
    /* ----- SCROLLBAR STYLING ----- */
    #search-filters-panel::-webkit-scrollbar {
        width: 6px;
    }
    
    #search-filters-panel::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 3px;
    }
    
    #search-filters-panel::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 3px;
    }
    
    #search-filters-panel::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.3);
    }
}

/* ========================================
   Desktop (1280px - 2047px)
   Standard desktop displays - uses base styles
   ======================================== */
@media (min-width: 1280px) and (max-width: 2047px) {
    
    /* This breakpoint explicitly uses base/default styles */
    /* The base styles define the desktop appearance:
       - --thumbnail-height: 80px
       - --controls-height: 32px  
       - .image-info-overlay: full width, bottom positioned
       - .thumbnail-strip: 80px height at bottom
    */
    
    /* No overrides needed - base styles ARE the desktop styles */
}


/* ========================================
   LARGE DESKTOP BREAKPOINT (>= 2048px)
   - Same layout as desktop
   - Proportionally larger elements
   - Larger thumbnails, text, spacing
   ======================================== */
/* ========================================
   Large Desktop (2048px+)
   Large/4K displays - matches base styles
   ======================================== */
@media (min-width: 2048px) {
    
    /* Match base styles - same appearance as 1280-2047px */
    /* Previously had scaled-up values, now uses base values */
    
    /* No overrides needed - inherits base styles */
    /* This ensures consistent appearance across all desktop sizes */
}
