.wallpaper-shell {
    min-height: 100vh;
}

.wallpaper-page {
    background: rgba(4, 9, 11, 0.92);
}

.wallpaper-hero {
    position: relative;
    overflow: hidden;
    padding: 54px 62px 30px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(90deg, rgba(4, 7, 9, 0.94), rgba(4, 7, 9, 0.5)),
        url("../images/generated/dark-city-hero.png") center right / cover no-repeat;
}

.wallpaper-hero > * {
    position: relative;
    z-index: 2;
}

.hero-panel {
    position: relative;
    min-height: 540px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #04090b;
}

.hero-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
    transition: opacity 900ms ease;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero-slide.active,
.hero-slide.is-visible {
    opacity: 1;
}

/* For Myspace themes in hero: tile seamless background pattern cleanly without stretching */
.type-myspace .hero-slide,
.myspace-hero .hero-slide {
    background-repeat: repeat !important;
    background-size: 220px auto !important;
    background-position: top left !important;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(4, 7, 9, 0.96) 0%, rgba(4, 7, 9, 0.85) 45%, rgba(4, 7, 9, 0.4) 80%),
        linear-gradient(0deg, rgba(3, 6, 8, 0.96), rgba(3, 6, 8, 0.5) 30%, transparent 70%);
    pointer-events: none;
}

.hero-copy {
    position: relative;
    z-index: 2;
    width: min(580px, 92%);
    margin-left: 62px;
    padding-top: 50px;
    padding-bottom: 50px;
}

.hero-wallpaper-name {
    position: absolute;
    bottom: 35px;
    right: 40px;
    z-index: 3;
    text-align: right;
    padding: 12px 20px;
    background: rgba(4, 7, 9, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.hero-name-label {
    color: var(--muted);
    text-transform: uppercase;
    font: 500 12px/1.2 "IBM Plex Mono", monospace;
    display: block;
    margin-bottom: 6px;
}

.hero-wallpaper-name a {
    color: var(--cold);
    text-decoration: none;
    font: 500 20px/1.3 "Barlow Condensed", sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.hero-wallpaper-name a:hover {
    color: var(--white);
}

.wallpaper-hero h1 {
    max-width: 780px;
    margin: 22px 0 22px;
    color: var(--white);
    text-transform: uppercase;
    font: 700 clamp(58px, 7vw, 104px)/0.95 "Barlow Condensed", sans-serif;
    letter-spacing: 2px;
}

.wallpaper-hero p:last-child {
    max-width: 650px;
    margin: 0;
    color: #c7ced1;
    font-size: 15px;
    line-height: 1.9;
}

.filter-panel {
    padding: 26px 30px;
    border-bottom: 1px solid var(--line);
    background: rgba(6, 12, 15, 0.86);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
}

.filter-row label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.filter-row label.search-box {
    flex: 1 1 240px;
}

.filter-row span {
    color: var(--muted);
    text-transform: uppercase;
    font: 500 12px/1 "IBM Plex Mono", monospace;
}

.filter-row input,
.filter-row select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    color: var(--text);
    border: 1px solid var(--line-bright);
    border-radius: 0;
    background: rgba(2, 7, 9, 0.74);
    font: 500 13px/1 "IBM Plex Mono", monospace;
}

.filter-row button {
    min-height: 46px;
    padding: 0 22px;
    color: #0b0f12;
    text-transform: uppercase;
    border: 1px solid var(--line-bright);
    background: linear-gradient(180deg, #f3f5f4, #b8c1c6);
    font: 600 12px/1 "IBM Plex Mono", monospace;
    cursor: pointer;
    margin-left: auto;
}

.result-meter {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 18px;
    color: var(--muted);
    text-transform: uppercase;
    font-size: 12px;
}

.result-meter strong {
    color: var(--white);
    font: 600 28px/1 "Barlow Condensed", sans-serif;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    padding: 30px;
}

.archive-card {
    position: relative;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01));
}

.archive-card::after {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: "";
    border: 1px solid rgba(255,255,255,0.025);
}

.archive-card.is-hidden {
    display: none;
}

.archive-thumb {
    display: block;
    border: 1px solid var(--line-bright);
    background: #030608;
    overflow: hidden;
}

/* Myspace theme card thumbnails: repeat background pattern cleanly without stretching */
.type-myspace .archive-thumb {
    background-repeat: repeat;
    background-size: 140px auto;
    background-position: top left;
    aspect-ratio: 1.32;
}

.type-myspace .archive-thumb img {
    object-fit: scale-down;
    background-color: transparent;
}

.archive-thumb img {
    width: 100%;
    aspect-ratio: 1.32;
    object-fit: cover;
    filter: grayscale(0.2) contrast(1.05) brightness(0.92);
    transition: transform 180ms ease, filter 180ms ease, opacity 350ms ease;
}

.archive-thumb img.lz:not(.did-load) {
    opacity: 0.25;
    filter: brightness(0.6);
}

.archive-thumb img.did-load {
    opacity: 1;
}

.archive-card:hover .archive-thumb img {
    transform: scale(1.035);
    filter: grayscale(0.2) contrast(1.1) brightness(0.95);
}

.archive-meta {
    padding-top: 16px;
}

.archive-meta p {
    margin: 0 0 8px;
    color: var(--cold);
    font-size: 13px;
}

.archive-meta h2 {
    margin: 0;
    color: var(--white);
    text-transform: uppercase;
    font: 600 24px/1 "Barlow Condensed", sans-serif;
    letter-spacing: 2px;
}

.archive-meta span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.archive-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 15px;
}

.archive-tags span {
    padding: 7px 9px;
    color: #cbd5d9;
    text-transform: uppercase;
    border: 1px solid rgba(217,232,240,0.22);
    font-size: 10px;
}

.empty-state {
    margin: 30px;
    padding: 34px;
    border: 1px solid var(--line);
    background: var(--panel);
}

.empty-state h2 {
    margin: 0 0 12px;
    color: var(--cold);
    text-transform: uppercase;
    font: 500 14px/1.2 "IBM Plex Mono", monospace;
}

.empty-state p {
    max-width: 740px;
    margin: 0;
    color: #c7ced1;
    line-height: 1.8;
}

.hidden {
    display: none;
}

@media (max-width: 1180px) {
    .filter-row {
        grid-template-columns: repeat(3, 1fr);
    }

    .archive-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .wallpaper-hero {
        padding: 44px 24px 24px;
    }

    .filter-row,
    .archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .filter-panel,
    .archive-grid {
        padding: 18px;
    }

    .filter-row,
    .archive-grid {
        grid-template-columns: 1fr;
    }
}

/* Updates / intro box */
.updates-panel {
    padding: 30px;
    border-bottom: 1px solid var(--line);
}

.updates-box {
    max-width: 1100px;
    margin: 0 auto;
    padding: 26px 28px;
    border: 1px solid var(--line);
    background: rgba(6, 12, 15, 0.86);
}

.updates-box h2 {
    margin: 0 0 18px;
    color: var(--cold);
    text-transform: uppercase;
    font: 500 14px/1.2 "IBM Plex Mono", monospace;
    letter-spacing: 2px;
}

.updates-lead {
    max-width: 840px;
    margin: 0 0 12px;
    color: var(--white);
    font-size: 15px;
    line-height: 1.7;
}

.updates-text {
    max-width: 840px;
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 10px 28px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.updates-grid li {
    position: relative;
    padding-left: 14px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.6;
}

.updates-grid li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--cold);
}

.updates-box a {
    color: var(--cold);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.updates-box a:hover {
    color: var(--white);
}

.updates-note {
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--text);
    font-size: 12px;
    line-height: 1.6;
}

@media (max-width: 820px) {
    .updates-panel {
        padding: 24px 18px;
    }

    .updates-grid {
        grid-template-columns: 1fr;
    }
}
