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

:root {
    --bg: #ffffff;
    --bg-soft: #f4f8f4;
    --bg-muted: #e8f0e8;
    --green: #2e7d32;
    --green-dark: #1b5e20;
    --green-mid: #388e3c;
    --green-light: #4caf50;
    --green-bg: #e8f5e9;
    --teal: #00796b;
    --blue: #1565c0;
    --blue-light: #1976d2;
    --blue-bg: #e3f2fd;
    --accent: #e65100;
    --accent-dk: #bf360c;
    --txt: #1a2e1a;
    --txt2: #3d5a3d;
    --txt3: #7a9a7a;
    --line: #c8dcc8;
    --line2: #b0cbb0;
    --sh1: 0 1px 3px rgba(46,125,50,.08);
    --sh2: 0 2px 10px rgba(46,125,50,.12);
    --sh3: 0 4px 20px rgba(46,125,50,.16);
    --rad: 4px;
    --rad2: 3px;
    --rad3: 6px;
}

html { font-size: 15px; }

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

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

/* ===== MAIN WRAPPER ===== */
.site-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 14px;
}

/* ===== SITE HEADER ===== */
.site-header {
    background: var(--bg);
    border-bottom: 3px solid var(--green);
    padding: 10px 0;
    box-shadow: var(--sh1);
}

.site-header .site-container {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

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

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

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

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--green);
    border-radius: 3px;
    padding: 5px 14px;
}

.domain-badge .badge-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,.75);
    white-space: nowrap;
}

.domain-badge .badge-domain {
    font-size: 1.08rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
}

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

/* ===== CATEGORY NAV PANEL ===== */
.nav-wrapper {
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-top: 3px solid var(--green);
    border-radius: var(--rad);
    overflow: hidden;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

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

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

.nav-zone-tag {
    background: var(--green);
    color: rgba(255,255,255,.9);
    font-size: .68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 2px;
    width: 64px;
    min-width: 64px;
    border-right: 1px solid rgba(255,255,255,.15);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

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

.nav-links-grid a {
    font-size: .81rem;
    color: var(--txt2);
    padding: 3px 5px;
    border-radius: var(--rad2);
    transition: all .16s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    border: 1px solid transparent;
    text-decoration: none;
    display: block;
}

.nav-links-grid a:hover {
    background: var(--green-bg);
    color: var(--green);
    border-color: #a5d6a7;
    text-decoration: none;
}

.nav-links-grid a.active {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
    font-weight: 700;
    text-decoration: none;
}

/* ===== SEARCH BLOCK ===== */
.search-section {
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: var(--rad);
    padding: 8px 12px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

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

.search-section input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1.5px solid var(--line2);
    border-radius: var(--rad2);
    padding: 0 11px;
    font-size: .87rem;
    color: var(--txt);
    background: var(--bg-soft);
    outline: none;
    transition: border-color .18s;
}

.search-section input[type="text"]:focus {
    border-color: var(--green);
    background: var(--bg);
}

.search-section button {
    height: 36px;
    padding: 0 11px;
    border: none;
    border-radius: var(--rad2);
    background: var(--green);
    color: #fff;
    font-size: .81rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .16s;
    flex-shrink: 0;
}

.search-section button:hover { background: var(--green-dark); }

.search-section button[value="1"] { background: var(--blue); }
.search-section button[value="1"]:hover { background: var(--blue-light); }

.search-section button[value="2"] { background: var(--teal); }
.search-section button[value="2"]:hover { background: #00695c; }

/* ===== HOT TAGS ===== */
.hot-tags-block {
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: var(--rad);
    padding: 7px 12px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

.hot-tags-block h4 {
    font-size: .78rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 5px;
}

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

.tag-list .tag-item {
    display: inline-block;
    background: var(--bg-soft);
    color: var(--txt2);
    border: 1px solid var(--line2);
    border-radius: 3px;
    padding: 2px 9px;
    font-size: .75rem;
    text-decoration: none;
    transition: all .16s;
}

.tag-list .tag-item:hover {
    background: var(--green-bg);
    color: var(--green);
    border-color: #81c784;
    text-decoration: none;
}

/* ===== CONTENT SECTION ===== */
.content-block {
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: var(--rad3);
    padding: 12px 12px 10px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

.content-block-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 7px;
    border-bottom: 2px solid var(--green);
}

.content-block-hd h3 {
    font-size: .96rem;
    font-weight: 800;
    color: var(--green-dark);
}

.content-block-hd h3 a { color: var(--green-dark); text-decoration: none; }
.content-block-hd h3 a:hover { color: var(--green); }

.content-block-hd h4 {
    font-size: .93rem;
    font-weight: 800;
    color: var(--green-dark);
}

/* ===== 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(--rad);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    transition: box-shadow .2s, transform .2s;
}

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

.media-cover {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--bg-muted);
}

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

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

.media-info {
    padding: 5px 7px 6px;
}

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

.media-info h5 a { color: var(--txt); text-decoration: none; }
.media-info h5 a:hover { color: var(--green); }

/* ===== PAGINATION ===== */
.pager-wrap {
    margin: 12px 0 5px;
    display: flex;
    justify-content: center;
}

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

.pager-btns a.pb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--bg);
    border: 1.5px solid var(--line2);
    border-radius: var(--rad2);
    font-size: .83rem;
    color: var(--txt2);
    text-decoration: none;
    transition: all .16s;
}

.pager-btns a.pb:hover {
    background: var(--green-bg);
    border-color: var(--green);
    color: var(--green);
    text-decoration: none;
}

.pager-btns a.pb-active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--green);
    border: 1.5px solid var(--green);
    border-radius: var(--rad2);
    font-size: .83rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
}

/* ===== FOOTER ===== */
.footer-links-section {
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: var(--rad);
    padding: 9px 12px;
    margin: 3px 0;
    box-shadow: var(--sh1);
}

.friend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.friend-links dd { display: inline; }

.friend-links a {
    display: inline-block;
    font-size: .76rem;
    color: var(--txt3);
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    text-decoration: none;
    transition: all .16s;
}

.friend-links a:hover { color: var(--green); border-color: var(--green); text-decoration: none; }

.copyright-bar {
    text-align: center;
    padding: 8px 0 12px;
    color: var(--txt3);
    font-size: .75rem;
}

/* ===== DETAIL PAGE ===== */
.detail-title-bar {
    line-height: 1.8;
    text-align: center;
    padding: 12px 15px;
    font-size: .96rem;
    margin: 3px 0;
    word-break: break-all;
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-left: 4px solid var(--green);
    border-radius: var(--rad);
    box-shadow: var(--sh1);
}

.detail-title-bar a {
    color: var(--green);
    font-weight: 700;
    margin-right: 6px;
    text-decoration: none;
}

.detail-meta {
    font-size: .89rem;
    line-height: 1.95;
    padding: 14px 17px;
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: var(--rad);
    box-shadow: var(--sh1);
    margin: 3px 0;
}

.preview-container {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.preview-container picture,
.preview-container img {
    width: 100%;
    height: auto;
    border-radius: var(--rad2);
    display: block;
}

/* ===== DOWNLOAD BUTTONS ===== */
.action-btns {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 11px 0;
}

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

.action-btn:hover {
    background: var(--green-dark);
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}

.client-hint {
    text-align: center;
    padding: 6px;
    font-size: .81rem;
}

.client-hint a { color: var(--green-dark); font-weight: 600; text-decoration: none; }
.client-hint a:hover { color: var(--green); }

/* ===== SHARE BAR ===== */
.share-strip {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--bg-soft);
    border: 1.5px solid var(--line);
    border-radius: var(--rad);
    padding: 8px 12px;
    margin: 3px 0;
    flex-wrap: wrap;
}

.share-strip .share-lbl { font-size: .76rem; color: var(--txt3); white-space: nowrap; }
.share-strip .share-url { font-size: .78rem; color: var(--txt2); flex: 1; min-width: 0; word-break: break-all; }

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

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

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

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

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

    .brand-name-text { font-size: 1.05rem; }
    .domain-badge .badge-domain { font-size: .9rem; }

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

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

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

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

    .search-section form {
        flex-wrap: nowrap;
        gap: 4px;
    }

    .search-section input[type="text"] {
        height: 34px;
        font-size: .78rem;
        padding: 0 6px;
    }

    .search-section button {
        height: 34px;
        padding: 0 6px;
        font-size: .73rem;
    }

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

    .media-cover { aspect-ratio: 600 / 350; }
    .media-info h5 { font-size: .71rem; }
    .content-block { padding: 9px 9px 7px; }
    .action-btn { padding: 9px 14px; font-size: .83rem; }
}

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

@media (max-width: 380px) {
    .nav-zone-tag { font-size: 10px; }
    .nav-links-grid a { font-size: 12px; }
    .search-section button { padding: 0 5px; font-size: .67rem; }
}
