/* =============================================================
   Media Vault — Visual System ("Aurora Noir")
   A dark gallery theme: layered ambient glows, refined
   glassmorphism, and a violet -> cyan signature gradient.
   Category language: music = rose, movie = emerald, drama = amber.

   Class names mirror the markup in index.html and the nodes that
   app.js injects at runtime. If you rename something here, rename
   it there too.
   ============================================================= */

/* ---------- Design tokens ---------- */
:root {
    /* Surfaces */
    --bg: #07070b;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-hover: rgba(255, 255, 255, 0.06);
    --hairline: rgba(255, 255, 255, 0.09);
    --hairline-strong: rgba(255, 255, 255, 0.16);

    /* Signature gradient + its stops */
    --brand-1: #a78bfa;
    --brand-2: #818cf8;
    --brand-3: #22d3ee;
    --brand: linear-gradient(120deg, #a78bfa 0%, #818cf8 45%, #22d3ee 100%);

    /* Category accents */
    --music: #fb7185;
    --movie: #34d399;
    --drama: #fbbf24;

    /* Text */
    --text: #f5f7fa;
    --text-dim: #9aa6b8;
    --text-faint: #687587;

    /* Motion + shape */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --t: 0.28s var(--ease);
    --r-lg: 16px;
    --r-md: 11px;
    --r-sm: 7px;

    /* Category hover glows */
    --glow-music: 0 12px 34px -10px rgba(251, 113, 133, 0.40);
    --glow-movie: 0 12px 34px -10px rgba(52, 211, 153, 0.36);
    --glow-drama: 0 12px 34px -10px rgba(251, 191, 36, 0.34);
}

/* ---------- Reset + base ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background-color: var(--bg);
    /* Three soft auroras anchored to the corners for depth */
    background-image:
        radial-gradient(55rem 55rem at 10% -12%, rgba(167, 139, 250, 0.11), transparent 60%),
        radial-gradient(50rem 50rem at 105% 2%, rgba(34, 211, 238, 0.09), transparent 55%),
        radial-gradient(48rem 48rem at 50% 118%, rgba(99, 102, 241, 0.08), transparent 55%);
    background-attachment: fixed;
    color: var(--text);
    font-family: 'Outfit', 'Noto Sans TC', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem 4rem;
}

/* ---------- Niceties: selection, scrollbar, focus ---------- */
::selection {
    background: rgba(167, 139, 250, 0.32);
    color: #fff;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid transparent;
    border-radius: 99px;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.22);
    background-clip: padding-box;
}

:focus-visible {
    outline: 2px solid var(--brand-1);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Ambient background layers ---------- */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 0),
        radial-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 0);
    background-size: 32px 32px;
    background-position: 0 0, 16px 16px;
    mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 80%);
    z-index: -2;
}

.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.10;
    z-index: -1;
    animation: drift 16s infinite alternate ease-in-out;
}
.blob-1 { width: 420px; height: 420px; background: var(--brand-1); top: -12%; left: -8%; }
.blob-2 { width: 520px; height: 520px; background: var(--brand-3); bottom: -16%; right: -10%; animation-delay: -5s; }
.blob-3 { width: 320px; height: 320px; background: var(--brand-2); top: 42%; left: 50%; transform: translate(-50%, -50%); animation-delay: -10s; }

@keyframes drift {
    from { transform: scale(1) translate(0, 0); }
    to   { transform: scale(1.12) translate(28px, 22px); }
}

/* ---------- Typography ---------- */
h1 {
    font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    background: var(--brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

p {
    color: var(--text-dim);
    font-size: 0.92rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.05rem;
    border: none;
    border-radius: var(--r-md);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--t);
}

a.btn { text-decoration: none; }

.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary {
    background: var(--brand);
    color: #0a0a12;
    box-shadow: 0 6px 18px -6px rgba(129, 140, 248, 0.55);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 9px 24px -6px rgba(129, 140, 248, 0.7);
}

.btn-secondary {
    background: var(--surface-hover);
    color: var(--text);
    border: 1px solid var(--hairline);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--hairline-strong);
}

.btn-youtube {
    background: #ff0033;
    color: #fff;
    box-shadow: 0 6px 18px -6px rgba(255, 0, 51, 0.55);
}
.btn-youtube:hover { transform: translateY(-1px); box-shadow: 0 9px 24px -6px rgba(255, 0, 51, 0.7); }

.btn-imdb {
    background: #f5c518;
    color: #000;
    box-shadow: 0 6px 18px -6px rgba(245, 197, 24, 0.55);
}
.btn-imdb:hover { transform: translateY(-1px); box-shadow: 0 9px 24px -6px rgba(245, 197, 24, 0.7); }

.btn-wikipedia {
    background: var(--surface-hover);
    color: #fff;
    border: 1px solid var(--hairline);
}
.btn-wikipedia:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--hairline-strong);
}

.btn-musicbrainz {
    background: #ba478f;
    color: #fff;
    box-shadow: 0 6px 18px -6px rgba(186, 71, 143, 0.55);
}
.btn-musicbrainz:hover {
    transform: translateY(-1px);
    box-shadow: 0 9px 24px -6px rgba(186, 71, 143, 0.7);
}

/* ---------- Navbar ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 7, 11, 0.7);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--hairline);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.55rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.3px;
}

.brand span span {
    background: var(--brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-spin {
    font-size: 1.45rem;
    background: var(--brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: spin 12s linear infinite;
}

.nav-subtitle {
    font-size: 0.85rem;
    color: var(--text-faint);
    font-weight: 600;
}

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

/* ---------- Hero ---------- */
.hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.75rem;
    align-items: center;
    margin: 0.75rem 0 1.5rem;
    padding: 1.3rem 1.85rem;
    border-radius: var(--r-lg);
    background: var(--surface);
    border: 1px solid var(--hairline);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: relative;
    overflow: hidden;
}

/* Soft gradient wash + a thin top highlight line */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.06), rgba(34, 211, 238, 0.05));
    pointer-events: none;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.badge {
    background: rgba(167, 139, 250, 0.12);
    border: 1px solid rgba(167, 139, 250, 0.28);
    color: #c4b5fd;
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    font-size: 0.74rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.hero-content p {
    font-size: 0.96rem;
    max-width: 580px;
}

/* Stats dashboard */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    position: relative;
    z-index: 1;
}

.stat-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    padding: 0.65rem 0.55rem;
    text-align: center;
    cursor: pointer;
    transition: var(--t);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--brand);
    opacity: 0;
    transition: var(--t);
}

.stat-card:hover {
    border-color: var(--hairline-strong);
    transform: translateY(-3px);
}
.stat-card:hover::before { opacity: 0.07; }

.stat-num {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 0.15rem;
    background: var(--brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.stat-label {
    font-size: 0.76rem;
    color: var(--text-dim);
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
}

/* ---------- Gallery controls ---------- */
.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 0.2rem;
    padding: 0.3rem;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    backdrop-filter: blur(10px);
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 0.5rem 1rem;
    border-radius: var(--r-sm);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--t);
}

.filter-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.filter-btn.active {
    color: #0a0a12;
    background: var(--brand);
    box-shadow: 0 4px 14px -4px rgba(129, 140, 248, 0.6);
}

.search-bar {
    position: relative;
    flex: 1;
    max-width: 360px;
    min-width: 220px;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-faint);
    font-size: 0.88rem;
    transition: var(--t);
    pointer-events: none;
}

.search-bar input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.3rem;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--t);
}

.search-bar input::placeholder { color: var(--text-faint); }

.search-bar input:focus {
    outline: none;
    border-color: rgba(167, 139, 250, 0.55);
    background: var(--surface-hover);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.12);
}

.search-bar input:focus + i { color: var(--brand-1); }

/* ---------- Media grid + cards ---------- */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
    gap: 1.35rem;
}

.media-card {
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    overflow: hidden;
    cursor: pointer;
    backdrop-filter: blur(14px);
    transition: var(--t);
    animation: card-in 0.45s var(--ease) both;
}

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

/* Hairline gradient frame (drawn with a masked border) */
.media-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: var(--r-lg);
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.01));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.media-card:hover { transform: translateY(-5px); }

.media-card[data-category="music"]:hover { box-shadow: var(--glow-music); border-color: rgba(251, 113, 133, 0.35); }
.media-card[data-category="movie"]:hover { box-shadow: var(--glow-movie); border-color: rgba(52, 211, 153, 0.35); }
.media-card[data-category="drama"]:hover { box-shadow: var(--glow-drama); border-color: rgba(251, 191, 36, 0.35); }

.card-img-wrapper {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111019;
}

.card-img-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(7, 7, 11, 0.55), transparent 45%);
    pointer-events: none;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.media-card:hover .card-img-wrapper img { transform: scale(1.06); }

.card-badges {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
    pointer-events: none;
}

.category-badge {
    padding: 0.25rem 0.6rem;
    border-radius: var(--r-sm);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0a0a12;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.media-card[data-category="music"] .category-badge { background: var(--music); }
.media-card[data-category="movie"] .category-badge { background: var(--movie); }
.media-card[data-category="drama"] .category-badge { background: var(--drama); }

.rating-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #ffce4d;
    padding: 0.25rem 0.55rem;
    border-radius: var(--r-sm);
    font-size: 0.74rem;
    font-weight: 700;
    backdrop-filter: blur(6px);
}

.card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1.1rem;
}

.card-title {
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 0.35rem;
    color: var(--text);
}

.card-creator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 0.6rem;
}
.card-creator i { font-size: 0.75rem; color: var(--text-faint); }

.card-desc {
    font-size: 0.83rem;
    line-height: 1.55;
    color: var(--text-dim);
    margin-bottom: 0.85rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.75rem;
    color: var(--text-faint);
}

.card-tags {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.16rem 0.45rem;
    border-radius: 5px;
    font-size: 0.68rem;
    color: var(--text-dim);
}

.card-year {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(5, 5, 9, 0.72);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-card {
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    background: #0d0d15;
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.7);
    transform: scale(0.96) translateY(8px);
    transition: transform 0.3s var(--ease);
}

.modal-overlay.active .modal-card { transform: scale(1) translateY(0); }

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    width: 2.1rem;
    height: 2.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--hairline);
    border-radius: 50%;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--t);
}
.modal-close:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: rotate(90deg);
}

.modal-detail-hero {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 1.5rem;
    padding: 1.75rem;
    background: linear-gradient(180deg, rgba(167, 139, 250, 0.06), transparent 70%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-detail-img {
    aspect-ratio: 3 / 4;
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.6);
}
.modal-detail-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-type-badge {
    align-self: flex-start;
    padding: 0.28rem 0.65rem;
    border-radius: var(--r-sm);
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.modal-detail-info h2 {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.modal-detail-creator {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.95rem;
    color: var(--text-dim);
    margin-bottom: 0.85rem;
}

.modal-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
}

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

.meta-label {
    font-size: 0.68rem;
    color: var(--text-faint);
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.meta-val {
    font-size: 0.95rem;
    font-weight: 700;
}

.meta-val.rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: #ffce4d;
}

.modal-detail-content { padding: 1.75rem; }

.modal-detail-section { margin-bottom: 1.75rem; }

.section-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
    color: var(--text);
}

.section-title i {
    background: var(--brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-desc-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--brand-1);
    padding: 1rem 1.25rem;
    border-radius: var(--r-md);
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-dim);
}

/* Tracklist / cast list */
.extra-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.5rem;
}

.extra-list li {
    display: flex;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--hairline);
    border-radius: var(--r-sm);
    font-size: 0.82rem;
    transition: var(--t);
}

.extra-list li:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--hairline-strong);
    transform: translateX(3px);
}

.extra-list-link,
.extra-item-content {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.5rem 0.7rem;
}

.extra-list-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.extra-list li i { font-size: 0.75rem; color: var(--text-faint); }

.extra-link-icon {
    margin-left: auto;
    font-size: 0.65rem !important;
    transition: var(--t);
}
.extra-list-link:hover .extra-link-icon {
    color: var(--text);
    transform: scale(1.15);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---------- Footer ---------- */
footer {
    position: relative;
    z-index: 10;
    margin-top: 3rem;
    padding: 1.75rem 0;
    border-top: 1px solid var(--hairline);
    background: rgba(6, 6, 10, 0.85);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-content p { font-size: 0.82rem; }

.footer-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    color: var(--text-faint);
    font-size: 1.1rem;
    text-decoration: none;
    transition: var(--t);
}
.footer-links a:hover { color: var(--text); transform: translateY(-2px); }

/* ---------- Empty state ---------- */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    padding: 3.5rem 1rem;
    color: var(--text-faint);
}

.empty-state i { font-size: 2.5rem; }
.empty-state p { margin-bottom: 0.5rem; }
.empty-state .help-text { font-size: 0.82rem; max-width: 420px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.75rem;
    }
    .hero-stats { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .gallery-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .search-bar { max-width: 100%; }
    .modal-detail-hero {
        grid-template-columns: 1fr;
        padding: 1.35rem;
    }
    .modal-detail-img { max-width: 190px; margin: 0 auto; }
    .modal-detail-content { padding: 1.35rem; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .nav-subtitle { display: none; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .filter-group {
        overflow-x: auto;
        white-space: nowrap;
    }
    .filter-btn { padding: 0.4rem 0.8rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
