/* ============================================================
   ACG小屋 — Main Stylesheet
   Pure Frontend ACG Media Browser
   Theme: Cherry Blossom / Glassmorphism / Neon Glow
   ============================================================ */

/* ----------------------------------------------------------
   CSS Custom Properties
   ---------------------------------------------------------- */
:root {
    /* Primary palette */
    --pink: #FFB7C5;
    --pink-light: #FFDFD3;
    --pink-dark: #E8879B;
    --sakura: #FFC0CB;
    --sakura-dark: #F4A0B0;

    /* Accent colors */
    --purple: #C9A7EB;
    --purple-light: #DCC8F5;
    --purple-dark: #A07CC5;
    --blue: #89CFF0;
    --blue-dark: #5BA4CF;

    /* Seasonal accents */
    --spring-color: #FFB7C5;
    --spring-glow: #FF69B4;
    --summer-color: #87CEEB;
    --summer-glow: #00BFFF;
    --autumn-color: #F4A460;
    --autumn-glow: #FF8C00;
    --winter-color: #B0E0E6;
    --winter-glow: #87CEEB;

    /* Background */
    --bg-deep: #0D0D1A;
    --bg-mid: #1A1A2E;
    --bg-light: #252540;
    --bg-card: rgba(30, 30, 55, 0.6);
    --bg-card-hover: rgba(40, 40, 70, 0.75);

    /* Glass */
    --glass-bg: rgba(26, 26, 46, 0.75);
    --glass-border: rgba(255, 183, 197, 0.2);
    --glass-border-hover: rgba(255, 183, 197, 0.5);
    --glass-blur: 12px;

    /* Text */
    --text-primary: #F0E6F6;
    --text-secondary: #C0B0D0;
    --text-muted: #8880A0;
    --text-bright: #FFFFFF;

    /* Shadows & Glows */
    --glow-pink: 0 0 15px rgba(255, 105, 180, 0.4);
    --glow-pink-strong: 0 0 30px rgba(255, 105, 180, 0.6);
    --glow-purple: 0 0 15px rgba(201, 167, 235, 0.4);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 8px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 183, 197, 0.15);

    /* Layout */
    --sidebar-width: 250px;
    --topbar-height: 80px;
    --border-radius-sm: 8px;
    --border-radius: 14px;
    --border-radius-lg: 20px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Font */
    --font-cn: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    --font-serif: 'Noto Serif SC', 'SimSun', 'STSong', serif;
}

/* ----------------------------------------------------------
   Reset & Base
   ---------------------------------------------------------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-cn);
    background: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--pink); text-decoration: none; }
a:hover { color: var(--pink-light); }

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    color: inherit;
}

ul, ol { list-style: none; }

/* ----------------------------------------------------------
   Starfield Canvas (background)
   ---------------------------------------------------------- */
#starfield-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

/* ----------------------------------------------------------
   Sakura Petals
   ---------------------------------------------------------- */
#sakura-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.sakura-petal {
    position: absolute;
    top: -60px;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 40% 40%, #FFC0CB, #FF69B4);
    border-radius: 50% 0 50% 0;
    opacity: 0.6;
    animation: sakuraFall linear infinite;
    filter: blur(0.5px);
}

.sakura-petal:nth-child(3n) {
    width: 14px;
    height: 14px;
    background: radial-gradient(circle at 40% 40%, #FFDFD3, #FFB7C5);
    animation-duration: 10s;
}

.sakura-petal:nth-child(3n+1) {
    width: 18px;
    height: 18px;
    border-radius: 0 50% 0 50%;
    animation-duration: 13s;
}

.sakura-petal:nth-child(5n) {
    width: 24px;
    height: 24px;
    background: radial-gradient(circle at 40% 40%, #FFC0CB, #E8879B);
    animation-duration: 16s;
    opacity: 0.4;
}

@keyframes sakuraFall {
    0% {
        transform: translateY(-60px) rotate(0deg) translateX(0);
        opacity: 0.7;
    }
    25% {
        transform: translateY(25vh) rotate(90deg) translateX(40px);
        opacity: 0.6;
    }
    50% {
        transform: translateY(50vh) rotate(180deg) translateX(-30px);
        opacity: 0.5;
    }
    75% {
        transform: translateY(75vh) rotate(270deg) translateX(50px);
        opacity: 0.3;
    }
    100% {
        transform: translateY(105vh) rotate(360deg) translateX(-20px);
        opacity: 0;
    }
}

/* ----------------------------------------------------------
   App Layout
   ---------------------------------------------------------- */
#app {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "sidebar topbar"
        "sidebar content";
    min-height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
}

/* ----------------------------------------------------------
   Top Bar / Title
   ---------------------------------------------------------- */
#top-bar {
    grid-area: topbar;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: var(--topbar-height);
    padding: 10px 20px;
    position: relative;
}

#top-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 5%;
    width: 90%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--glass-border),
        var(--pink),
        var(--glass-border),
        transparent
    );
}

.title-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    background: linear-gradient(
        135deg,
        var(--pink-light) 0%,
        var(--pink) 30%,
        var(--purple-light) 60%,
        var(--pink) 80%,
        var(--pink-light) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmerTitle 4s ease-in-out infinite;
    text-shadow: none;
    filter: drop-shadow(0 0 10px rgba(255, 183, 197, 0.4));
}

@keyframes shimmerTitle {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

.title-decoration {
    font-size: 1.4rem;
    color: var(--pink);
    animation: decoFloat 2s ease-in-out infinite;
    opacity: 0.8;
}

.title-deco-right {
    animation-delay: 0.5s;
}

@keyframes decoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-4px) rotate(10deg); }
}

.subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    margin-top: 2px;
}

/* ----------------------------------------------------------
   Sidebar
   ---------------------------------------------------------- */
#sidebar {
    grid-area: sidebar;
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-right: 1px solid var(--glass-border);
    z-index: 10;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 2px 0 30px rgba(0, 0, 0, 0.3);
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px 14px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 8px 18px 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 12px;
}

.sidebar-icon {
    font-size: 1.1rem;
}

/* Nav menu */
.nav-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-divider {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    margin: 8px 4px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--border-radius);
    transition:
        background var(--transition),
        transform var(--transition),
        box-shadow var(--transition);
    position: relative;
    overflow: hidden;
    text-align: left;
    font-size: 0.92rem;
}

.nav-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.03));
    border-radius: inherit;
    transition: opacity var(--transition);
    opacity: 0;
}

.nav-btn:hover::before {
    opacity: 1;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(3px);
}

.nav-btn:active {
    transform: translateX(1px) scale(0.98);
}

.nav-btn.active {
    background: rgba(255, 183, 197, 0.12);
    box-shadow: inset 0 0 0 1px var(--glass-border-hover), var(--glow-pink);
}

.nav-btn .nav-emoji {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.nav-btn .nav-label {
    font-weight: 500;
    letter-spacing: 0.05em;
    flex: 1;
}

.nav-btn .nav-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Season-specific button glows */
.spring-btn.active {
    box-shadow: inset 0 0 0 1px rgba(255, 183, 197, 0.5), 0 0 20px rgba(255, 105, 180, 0.35);
    background: rgba(255, 183, 197, 0.13);
}

.summer-btn.active {
    box-shadow: inset 0 0 0 1px rgba(135, 206, 235, 0.5), 0 0 20px rgba(0, 191, 255, 0.3);
    background: rgba(135, 206, 235, 0.1);
}

.autumn-btn.active {
    box-shadow: inset 0 0 0 1px rgba(244, 164, 96, 0.5), 0 0 20px rgba(255, 140, 0, 0.3);
    background: rgba(244, 164, 96, 0.1);
}

.winter-btn.active {
    box-shadow: inset 0 0 0 1px rgba(176, 224, 230, 0.5), 0 0 20px rgba(135, 206, 235, 0.3);
    background: rgba(176, 224, 230, 0.1);
}

.allfiles-btn.active {
    box-shadow: inset 0 0 0 1px rgba(201, 167, 235, 0.5), 0 0 20px rgba(201, 167, 235, 0.3);
    background: rgba(201, 167, 235, 0.12);
}

/* Sidebar footer */
.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    margin-top: auto;
}

.footer-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

/* ----------------------------------------------------------
   Main Content Area
   ---------------------------------------------------------- */
#content {
    grid-area: content;
    padding: 8px 24px 40px 24px;
    min-height: calc(100vh - var(--topbar-height));
    position: relative;
    z-index: 2;
}

/* Breadcrumb bar */
#breadcrumb-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    flex-wrap: wrap;
    animation: fadeSlideIn 0.3s ease;
}

.breadcrumb-btn {
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 0.82rem;
    color: var(--pink-light);
    background: rgba(255, 183, 197, 0.08);
    transition: all var(--transition);
    white-space: nowrap;
}

.breadcrumb-btn:hover {
    background: rgba(255, 183, 197, 0.18);
    color: var(--text-bright);
}

.breadcrumb-sep {
    color: var(--text-muted);
    font-size: 0.85rem;
}

#breadcrumb-trail {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.breadcrumb-segment {
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb-segment .breadcrumb-btn {
    font-size: 0.8rem;
    padding: 5px 10px;
}

.breadcrumb-segment .breadcrumb-sep {
    font-size: 0.8rem;
}

.breadcrumb-up-btn {
    margin-left: auto;
    padding: 6px 14px;
    border-radius: var(--border-radius-sm);
    font-size: 0.82rem;
    background: rgba(201, 167, 235, 0.12);
    color: var(--purple-light);
    transition: all var(--transition);
    white-space: nowrap;
}

.breadcrumb-up-btn:hover {
    background: rgba(201, 167, 235, 0.25);
    color: var(--text-bright);
}

/* View header */
#view-header {
    text-align: center;
    margin-bottom: 24px;
}

#view-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

#view-description {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Content area */
#content-area {
    min-height: 300px;
}

/* ----------------------------------------------------------
   Hidden utility
   ---------------------------------------------------------- */
.hidden {
    display: none !important;
}

/* ----------------------------------------------------------
   Empty States
   ---------------------------------------------------------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    animation: fadeSlideIn 0.5s ease;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: decoFloat 3s ease-in-out infinite;
}

.empty-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ----------------------------------------------------------
   Loading Skeleton
   ---------------------------------------------------------- */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.skeleton-card {
    height: 260px;
    border-radius: var(--border-radius);
    background: linear-gradient(
        110deg,
        var(--bg-mid) 30%,
        var(--bg-light) 50%,
        var(--bg-mid) 70%
    );
    background-size: 200% 100%;
    animation: shimmerSkeleton 1.5s ease-in-out infinite;
}

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

/* ----------------------------------------------------------
   Media Grid (Season View)
   ---------------------------------------------------------- */
#media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    animation: fadeSlideIn 0.4s ease;
}

.media-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
    aspect-ratio: 3 / 4;
}

.media-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--glass-border-hover);
}

.media-card:active {
    transform: translateY(-2px) scale(0.98);
}

.media-card .card-image-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.media-card img,
.media-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.media-card:hover img,
.media-card:hover video {
    transform: scale(1.08);
}

.media-card .card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 14px 12px 14px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    opacity: 0;
    transform: translateY(10px);
    transition:
        opacity var(--transition),
        transform var(--transition);
}

.media-card:hover .card-overlay {
    opacity: 1;
    transform: translateY(0);
}

.card-overlay .card-filename {
    font-size: 0.82rem;
    color: var(--text-bright);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-overlay .card-type-badge {
    display: inline-block;
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 183, 197, 0.7);
    color: var(--text-bright);
    margin-top: 4px;
}

.card-overlay .card-type-badge.video-badge {
    background: rgba(137, 207, 240, 0.7);
}

/* Video indicator icon on card */
.media-card .video-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.85);
    pointer-events: none;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
    transition: transform var(--transition), opacity var(--transition);
}

.media-card:hover .video-indicator {
    transform: translate(-50%, -50%) scale(1.15);
}

/* GIF badge */
.media-card .gif-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--pink-light);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    backdrop-filter: blur(4px);
    transition: opacity var(--transition);
}

/* ----------------------------------------------------------
   File List / Table (All Files View)
   ---------------------------------------------------------- */
#file-list-container {
    animation: fadeSlideIn 0.3s ease;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

#file-table {
    width: 100%;
    border-collapse: collapse;
}

#file-table thead {
    background: rgba(255, 255, 255, 0.03);
}

#file-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

#file-table td {
    padding: 10px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

#file-table tbody tr {
    transition: background var(--transition-fast);
    cursor: pointer;
}

#file-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

#file-table tbody tr:active {
    background: rgba(255, 255, 255, 0.02);
}

#file-table .col-icon { width: 40px; text-align: center; }
#file-table .col-icon .file-icon { font-size: 1.3rem; }
#file-table .col-name { min-width: 200px; }
#file-table .col-type { width: 90px; }
#file-table .col-size { width: 100px; }
#file-table .col-date { width: 160px; }

.file-row-folder .file-name {
    color: var(--blue);
    font-weight: 500;
}

.file-row-image .file-name {
    color: var(--text-primary);
}

.file-row-video .file-name {
    color: var(--purple-light);
}

.file-row-gif .file-name {
    color: var(--pink-light);
}

.file-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-arrow {
    font-size: 0.7rem;
    color: var(--blue);
    margin-left: auto;
    opacity: 0;
    transform: translateX(-5px);
    transition: all var(--transition);
}

#file-table tbody tr:hover .folder-arrow {
    opacity: 1;
    transform: translateX(0);
}

.col-type .type-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.06);
}

.col-size, .col-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ----------------------------------------------------------
   Lightbox
   ---------------------------------------------------------- */
#lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lightboxFadeIn 0.25s ease;
}

#lightbox.hidden {
    display: none;
}

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

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: lightboxZoomIn 0.3s ease;
}

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

#lightbox-media-container {
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 0 60px rgba(255, 105, 180, 0.15);
}

#lightbox-image {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--border-radius);
    user-select: none;
}

#lightbox-video {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: var(--border-radius);
    outline: none;
}

.lightbox-close-btn {
    position: absolute;
    top: -40px;
    right: -10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-bright);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lightbox-close-btn:hover {
    background: rgba(255, 80, 80, 0.6);
    border-color: rgba(255, 80, 80, 0.7);
    transform: rotate(90deg);
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-bright);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 2;
}

.lightbox-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(255, 183, 197, 0.2);
}

.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }

#lightbox-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 12px;
    padding: 8px 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

#lightbox-filename {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

#lightbox-counter {
    color: var(--text-muted);
    font-size: 0.78rem;
    flex-shrink: 0;
    margin-left: 16px;
}

/* ----------------------------------------------------------
   Animations
   ---------------------------------------------------------- */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 105, 180, 0.2);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 105, 180, 0.4);
    }
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 183, 197, 0.25);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 183, 197, 0.45);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 183, 197, 0.25) transparent;
}

/* ----------------------------------------------------------
   Season-specific View Accents
   ---------------------------------------------------------- */
.view-spring #view-title { color: var(--spring-color); }
.view-summer #view-title { color: var(--summer-color); }
.view-autumn #view-title { color: var(--autumn-color); }
.view-winter #view-title { color: var(--winter-color); }
.view-files #view-title { color: var(--purple-light); }

/* ----------------------------------------------------------
   Responsive Design
   ---------------------------------------------------------- */
@media (max-width: 900px) {
    #app {
        grid-template-columns: 1fr;
        grid-template-areas:
            "topbar"
            "content";
    }

    #sidebar {
        position: fixed;
        left: -280px;
        width: 260px;
        transition: left var(--transition);
        z-index: 100;
    }

    #sidebar.mobile-open {
        left: 0;
        box-shadow: 4px 0 40px rgba(0, 0, 0, 0.6);
    }

    #content {
        padding: 8px 12px 30px 12px;
    }

    #media-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .app-title {
        font-size: 1.6rem;
    }

    .lightbox-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    .lightbox-prev { left: -45px; }
    .lightbox-next { right: -45px; }
}

@media (max-width: 500px) {
    #media-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    #file-table .col-size,
    #file-table .col-date {
        display: none;
    }

    .app-title {
        font-size: 1.3rem;
        letter-spacing: 0.15em;
    }
}
