/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --canvas:       #ffffff;
    --canvas-off:   #f4f4f6;
    --canvas-pale:  #eeeef2;
    --ink:          #111118;
    --ink-mid:      #3b3b4a;
    --ink-soft:     #7070880;
    --ink-faint:    #9898ae;
    --green:        #00c73c;
    --green-dk:     #009e2f;
    --green-pale:   rgba(0,199,60,.10);
    --green-ring:   rgba(0,199,60,.25);
    --charcoal:     #1a1a24;
    --charcoal-mid: #2c2c3a;
    --charcoal-rim: #3e3e50;
    --divider:      #e2e2ea;
    --divider2:     #d0d0dc;
    --el1: 0 1px 4px rgba(17,17,24,.07);
    --el2: 0 3px 12px rgba(17,17,24,.11);
    --el3: 0 8px 28px rgba(17,17,24,.16);
    --rr:  8px;
    --rr2: 5px;
    --rr3: 14px;
    --pill: 999px;
}

html { font-size: 15px; }

body {
    background: var(--canvas-off);
    color: var(--ink);
    font-family: 'PingFang SC','Noto Sans SC','Hiragino Sans GB','Microsoft YaHei',
                 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

a { color: var(--green-dk); text-decoration: none; transition: color .16s; }
a:hover { color: var(--green); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
.cf::after { content: ''; display: table; clear: both; }

/* ===== OUTER CONTAINER ===== */
.outer-box {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 14px;
}

/* ===== TOP NAVIGATION BAR ===== */
.topbar {
    background: var(--charcoal);
    padding: 9px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.28);
}

.topbar .outer-box {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-anchor {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand-text {
    font-size: 1.38rem;
    font-weight: 900;
    color: var(--green);
    font-style: normal;
    letter-spacing: -.4px;
    text-decoration: none;
    border-bottom: none;
}

.newest-domain {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--charcoal-mid);
    border: 1.5px solid var(--charcoal-rim);
    border-radius: var(--pill);
    padding: 3px 14px;
}

.newest-domain .nd-tip {
    font-size: 0.67rem;
    color: rgba(255,255,255,.50);
    white-space: nowrap;
}

.newest-domain .nd-url {
    font-size: 1.06rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
}

/* ===== PROMO BANNER ===== */
.banner-row {
    margin: 4px 0 3px;
}
.banner-row img { border-radius: var(--rr); width: 100%; }

/* ===== CATEGORY NAVIGATION ===== */
.catbox {
    background: var(--canvas);
    border: 1.5px solid var(--divider2);
    border-radius: var(--rr);
    overflow: hidden;
    margin: 3px 0;
    box-shadow: var(--el1);
}

.catbox-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--divider);
    min-height: 38px;
}

.catbox-row:last-child { border-bottom: none; }

.zone-label {
    background: var(--charcoal);
    color: rgba(255,255,255,.80);
    font-size: .68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 2px;
    width: 62px;
    min-width: 62px;
    border-right: 1px solid var(--charcoal-rim);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .4px;
    flex-shrink: 0;
}

.zone-links {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    align-items: center;
    padding: 4px 8px;
    gap: 3px;
    flex: 1;
}

.zone-links a {
    font-size: .82rem;
    color: var(--ink-mid);
    padding: 4px 6px;
    border-radius: var(--rr2);
    transition: all .16s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    border: 1px solid transparent;
    text-decoration: none;
    display: block;
}

.zone-links a:hover {
    background: var(--green-pale);
    color: var(--green-dk);
    border-color: var(--green-ring);
}

.zone-links a.active {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
    font-weight: 700;
}

/* ===== SEARCH PANEL ===== */
.searchbar {
    background: var(--canvas);
    border: 1.5px solid var(--divider2);
    border-radius: var(--rr);
    padding: 8px 12px;
    margin: 3px 0;
    box-shadow: var(--el1);
}

.searchbar form {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
}

.searchbar input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1.5px solid var(--divider2);
    border-radius: var(--pill);
    padding: 0 14px;
    font-size: .88rem;
    color: var(--ink);
    background: var(--canvas-off);
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}

.searchbar input[type="text"]:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-ring);
    background: var(--canvas);
}

.searchbar input[type="text"]::placeholder { color: var(--ink-faint); }

.searchbar button {
    height: 36px;
    padding: 0 12px;
    border: 1.5px solid var(--divider2);
    border-radius: var(--pill);
    background: var(--canvas-off);
    color: var(--ink-mid);
    font-size: .80rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .16s;
    flex-shrink: 0;
}

.searchbar button:hover {
    background: var(--canvas-pale);
    border-color: var(--divider2);
    color: var(--ink);
}

.searchbar button[value="1"] {
    background: var(--charcoal);
    color: #fff;
    border-color: var(--charcoal);
}
.searchbar button[value="1"]:hover { background: var(--charcoal-mid); }

.searchbar button[value="2"] {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}
.searchbar button[value="2"]:hover { background: var(--green-dk); border-color: var(--green-dk); }

/* ===== HOT KEYWORD BLOCKS ===== */
.keyword-block {
    background: var(--canvas);
    border: 1.5px solid var(--divider2);
    border-radius: var(--rr);
    padding: 7px 12px;
    margin: 3px 0;
    box-shadow: var(--el1);
}

.keyword-block h4 {
    font-size: .79rem;
    font-weight: 700;
    color: var(--ink-mid);
    margin-bottom: 5px;
}

.kw-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.kw-list .kw {
    display: inline-block;
    background: var(--canvas-off);
    color: var(--ink-mid);
    border: 1px solid var(--divider2);
    border-radius: var(--pill);
    padding: 2px 11px;
    font-size: .76rem;
    text-decoration: none;
    transition: all .16s;
}

.kw-list .kw:hover {
    background: var(--green-pale);
    color: var(--green-dk);
    border-color: var(--green-ring);
}

/* ===== CONTENT BLOCK ===== */
.content-block {
    background: var(--canvas);
    border: 1.5px solid var(--divider2);
    border-radius: var(--rr3);
    padding: 12px 12px 10px;
    margin: 4px 0;
    box-shadow: var(--el1);
}

.block-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--canvas-pale);
    position: relative;
}

.block-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 38px;
    height: 2px;
    background: var(--green);
    border-radius: 2px;
}

.block-title h3 {
    font-size: .98rem;
    font-weight: 800;
    color: var(--ink);
}

.block-title h3 a { color: var(--ink); }
.block-title h3 a:hover { color: var(--green-dk); }

.block-title h4 {
    font-size: .95rem;
    font-weight: 800;
    color: var(--ink);
}

/* ===== MEDIA GRID ===== */
.media-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.media-grid li {
    border-radius: var(--rr);
    overflow: hidden;
    border: 1px solid var(--divider);
    background: var(--canvas-off);
    transition: box-shadow .2s, transform .2s;
}

.media-grid li:hover {
    box-shadow: var(--el3);
    transform: translateY(-2px);
}

.media-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--canvas-pale);
}

.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.media-thumb:hover img { transform: scale(1.05); }

.media-label {
    padding: 5px 7px 7px;
}

.media-label h5 {
    font-size: .78rem;
    font-weight: 500;
    color: var(--ink-mid);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.media-label h5 a { color: var(--ink-mid); }
.media-label h5 a:hover { color: var(--green-dk); }

/* ===== PAGINATION ===== */
.pagenav {
    margin: 14px 0 6px;
    display: flex;
    justify-content: center;
}

.pagenav-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.pagenav-inner a.pn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--canvas);
    border: 1.5px solid var(--divider2);
    border-radius: var(--rr2);
    font-size: .84rem;
    color: var(--ink-mid);
    text-decoration: none;
    transition: all .16s;
}

.pagenav-inner a.pn:hover {
    background: var(--green-pale);
    border-color: var(--green);
    color: var(--green-dk);
}

.pagenav-inner a.pn-here {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--charcoal);
    border: 1.5px solid var(--charcoal);
    border-radius: var(--rr2);
    font-size: .84rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
}

/* ===== FOOTER ===== */
.flink-box {
    background: var(--canvas);
    border: 1.5px solid var(--divider2);
    border-radius: var(--rr);
    padding: 9px 13px;
    margin: 4px 0;
    box-shadow: var(--el1);
}

.flink-set {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.flink-set dd { display: inline; }

.flink-set a {
    display: inline-block;
    font-size: .77rem;
    color: var(--ink-faint);
    padding: 2px 9px;
    border-radius: 4px;
    border: 1px solid var(--divider);
    background: var(--canvas-off);
    text-decoration: none;
    transition: all .16s;
}

.flink-set a:hover { color: var(--green-dk); border-color: var(--green-ring); }

.bottom-notice {
    text-align: center;
    padding: 8px 0 14px;
    color: var(--ink-faint);
    font-size: .76rem;
}

/* ===== DETAIL PAGES ===== */
.detail-caption {
    line-height: 1.8;
    text-align: center;
    padding: 12px 15px;
    font-size: .98rem;
    margin: 4px 0;
    word-break: break-all;
    background: var(--canvas);
    border: 1.5px solid var(--divider2);
    border-left: 4px solid var(--green);
    border-radius: var(--rr);
    box-shadow: var(--el1);
}

.detail-caption a {
    color: var(--green-dk);
    font-weight: 700;
    margin-right: 6px;
}

.detail-info {
    font-size: .9rem;
    line-height: 1.95;
    padding: 15px 18px;
    background: var(--canvas);
    border: 1.5px solid var(--divider2);
    border-radius: var(--rr);
    box-shadow: var(--el1);
    margin: 4px 0;
}

.capture-area {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.capture-area picture,
.capture-area img {
    width: 100%;
    height: auto;
    border-radius: var(--rr2);
    display: block;
}

/* ===== DOWNLOAD BUTTONS ===== */
.dl-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.dl-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: var(--charcoal);
    color: #fff;
    border: none;
    border-radius: var(--pill);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, transform .14s;
    text-decoration: none;
}

.dl-pill:hover {
    background: var(--green);
    color: #fff;
    transform: translateY(-1px);
}

.client-note {
    text-align: center;
    padding: 7px;
    font-size: .82rem;
}

.client-note a { color: var(--ink-mid); font-weight: 600; }
.client-note a:hover { color: var(--green-dk); }

/* ===== SHARE URL BAR ===== */
.share-strip {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--canvas-off);
    border: 1.5px solid var(--divider2);
    border-radius: var(--rr);
    padding: 8px 13px;
    margin: 4px 0;
    flex-wrap: wrap;
}

.share-strip .ss-tag  { font-size: .77rem; color: var(--ink-faint); white-space: nowrap; }
.share-strip .ss-link { font-size: .79rem; color: var(--ink-mid); flex: 1; min-width: 0; word-break: break-all; }

.share-strip .ss-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--charcoal);
    color: #fff;
    border: none;
    border-radius: var(--pill);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .16s;
    flex-shrink: 0;
}

.share-strip .ss-copy:hover { background: var(--green); }

/* ===== VISIBILITY HELPERS ===== */
.pc-show { display: block; }
.mb-show { display: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .media-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .pc-show { display: none; }
    .mb-show { display: block; }
}

@media (max-width: 768px) {
    html { font-size: 14px; }

    .brand-text { font-size: 1.06rem; }
    .newest-domain .nd-url { font-size: .9rem; }

    .catbox-row { align-items: stretch; }

    .zone-label {
        width: 15%;
        min-width: 15%;
        max-width: 15%;
        font-size: 10px;
        padding: 4px 2px;
        letter-spacing: 0;
        line-height: 1.5;
        word-break: break-all;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .zone-links {
        width: 85%;
        flex: 1;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 3px;
        padding: 4px 5px;
        align-items: center;
    }

    .zone-links a {
        font-size: 13px;
        padding: 5px 2px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    /* Search: NO wrap, all in one row */
    .searchbar form { flex-wrap: nowrap; gap: 4px; }

    .searchbar input[type="text"] {
        height: 34px;
        font-size: .79rem;
        padding: 0 10px;
    }

    .searchbar button {
        height: 34px;
        padding: 0 7px;
        font-size: .74rem;
    }

    .media-grid { grid-template-columns: repeat(2, 1fr); gap: 7px; }

    .media-thumb { aspect-ratio: 600 / 350; }
    .media-label h5 { font-size: .72rem; }
    .content-block { padding: 9px 9px 7px; }
    .dl-pill { padding: 9px 16px; font-size: .84rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .zone-label { font-size: 10px; }
    .zone-links a { font-size: 13px; }
}

@media (max-width: 380px) {
    .zone-label { font-size: 10px; }
    .zone-links a { font-size: 12px; }
    .searchbar button { padding: 0 5px; font-size: .68rem; }
}
