:root {
    --red: #e84a3c;
    --red-soft: #ff7465;
    --bg: #0c1219;
    --surface: #151e28;
    --surface-2: #1b2734;
    --line: rgba(255, 255, 255, .1);
    --text: #f5f7fa;
    --muted: #a8b4c1;
    --shadow: 0 20px 50px rgba(0, 0, 0, .26);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    color: var(--text);
    font-family: "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
    background: radial-gradient(900px 500px at 82% -10%, #33495f 0%, #111922 47%, var(--bg) 100%);
}

body {
    min-height: 100%;
    margin: 0;
}

body.is-lightbox-open {
    overflow: hidden;
}

a {
    color: inherit;
}

.site-shell {
    width: min(1380px, calc(100% - 48px));
    margin: auto;
    padding: 36px 0 44px;
}

.gallery-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #d0d8e0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.eyebrow span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 18px var(--red);
}

h1 {
    margin: 0;
    font-size: 43px;
    line-height: 1.08;
}

.gallery-count {
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
}

.gallery-count span {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(21, 30, 40, .72);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.photo-card {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.photo-card::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .68));
    opacity: .72;
}

.photo-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transform: scale(1.015);
    transition: transform .36s cubic-bezier(.16, 1, .3, 1), filter .36s cubic-bezier(.16, 1, .3, 1);
}

.photo-card span {
    position: absolute;
    right: 14px;
    bottom: 13px;
    left: 14px;
    z-index: 1;
    overflow: hidden;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    text-shadow: 0 1px 10px rgba(0, 0, 0, .58);
    white-space: nowrap;
}

.photo-card:hover,
.photo-card:focus-visible {
    border-color: rgba(232, 74, 60, .55);
    box-shadow: 0 24px 58px rgba(0, 0, 0, .34);
    outline: 0;
    transform: translateY(-4px);
}

.photo-card:hover img,
.photo-card:focus-visible img {
    filter: saturate(1.05) contrast(1.03);
    transform: scale(1.065);
}

.empty-state {
    padding: 58px 20px;
    border: 1px dashed var(--line);
    border-radius: 18px;
    background: rgba(21, 30, 40, .82);
    text-align: center;
}

.empty-state h2 {
    margin: 0 0 8px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

.site-footer {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

.site-footer a {
    color: #ffb0a7;
    text-decoration: none;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 28px 86px;
    background: rgba(7, 10, 14, .92);
}

.lightbox[hidden] {
    display: none;
}

.lightbox-stage {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-frame {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0;
}

.lightbox-frame img {
    max-width: 100%;
    max-height: calc(100vh - 128px);
    border-radius: 12px;
    background: #000;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .46);
    object-fit: contain;
}

.lightbox-frame figcaption {
    display: flex;
    gap: 12px;
    color: rgba(245, 247, 250, .9);
    text-align: center;
}

.lightbox-frame span {
    color: var(--muted);
}

.lightbox-close,
.lightbox-nav {
    position: fixed;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    background: rgba(21, 30, 40, .86);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 14px 35px rgba(0, 0, 0, .3);
}

.lightbox-close {
    top: 22px;
    right: 24px;
    width: 44px;
    height: 44px;
    font-size: 30px;
}

.lightbox-nav {
    top: 50%;
    width: 52px;
    height: 52px;
    font-size: 38px;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

@media (max-width: 760px) {
    .site-shell {
        width: min(100% - 28px, 1380px);
        padding-top: 26px;
    }

    .gallery-header {
        display: block;
    }

    h1 {
        font-size: 31px;
    }

    .gallery-count {
        margin-top: 14px;
    }

    .photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .photo-card {
        border-radius: 12px;
        aspect-ratio: 1 / 1;
    }

    .lightbox {
        padding: 18px 16px 68px;
    }

    .lightbox-frame img {
        max-height: calc(100vh - 150px);
    }

    .lightbox-nav {
        top: auto;
        bottom: 16px;
        width: 44px;
        height: 44px;
        font-size: 30px;
        transform: none;
    }

    .lightbox-prev {
        left: calc(50% - 58px);
    }

    .lightbox-next {
        right: calc(50% - 58px);
    }
}
