/* ===== Design Tokens ===== */
:root {
    --bg: #f5f5f5;
    --surface: #ffffff;
    --surface2: #fafafa;
    --red: #ff5533;
    --red-dark: #e04020;
    --red-light: #fff2ef;
    --red-mid: #ffbdad;
    --blue: #1a73e8;
    --blue-dark: #1558b0;
    --blue-light: #e8f0fd;
    --ink: #1a1a1a;
    --ink-mid: #333333;
    --ink-muted: #555555;
    --ink-dim: #888888;
    --border: #e0e0e0;
    --border-mid: #cccccc;
    --shadow-xs: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.10);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.13);
    --shadow-lg: 0 8px 28px rgba(0,0,0,0.16);
    --r-xs: 4px;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 18px;
    --r-xl: 36px;
    --max-w: 1200px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* ===== Layout ===== */
.ro { width: 100%; margin-bottom: 8px; }
.ri {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== Site Header ===== */
.gh-hd {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}
.gh-hd .ri {
    display: flex;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 18px;
    flex-wrap: nowrap;
}
.gh-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}
.gh-logo-lk { display: inline-block; }
.gh-site-nm {
    font-size: 22px;
    font-weight: 900;
    color: var(--red);
    letter-spacing: -0.5px;
    white-space: nowrap;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
    line-height: 1;
}
.gh-site-nm:hover { color: var(--red-dark); }

.gh-url-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--red-light);
    border: 1.5px solid var(--red-mid);
    border-radius: var(--r-xl);
    padding: 4px 14px 4px 10px;
    flex-shrink: 0;
}
.gh-url-lbl {
    font-size: 10px;
    color: var(--red-dark);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}
.gh-url-val {
    font-size: 16px;
    color: var(--red-dark);
    font-weight: 800;
    white-space: nowrap;
}

/* ===== Banner ===== */
.gh-bn { margin: 6px 0; }
.gh-bn a img { border-radius: var(--r-lg); width: 100%; }

/* ===== Category Navigation ===== */
.gh-nav {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--red);
    border-radius: var(--r-md);
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: var(--shadow-xs);
}
.gh-nav-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
}
.gh-nav-row:last-child { border-bottom: none; }

.gh-zone-nm {
    flex: 0 0 80px;
    background: var(--surface2);
    border-right: 1px solid var(--border);
    color: var(--red);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6px 4px;
    letter-spacing: 0.3px;
}
.gh-nav-lks {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 5px 8px;
    gap: 5px;
}
.gh-nav-lks a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 0;
    flex: 1 0 calc(12.5% - 5px);
    min-width: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    color: var(--ink-muted);
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.15s;
}
.gh-nav-lks a:hover {
    background: var(--red-light);
    color: var(--red-dark);
    border-color: var(--red-mid);
}
.gh-nav-lks a.active {
    background: var(--red);
    color: #fff;
    border-color: var(--red-dark);
    font-weight: 700;
}

/* ===== Search ===== */
.gh-sq {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 13px 18px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
}
.gh-sq-fm {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.gh-sq-fm input[type="text"] {
    flex: 1 1 200px;
    min-width: 0;
    padding: 10px 18px;
    border: 1.5px solid var(--border-mid);
    border-radius: var(--r-xl);
    font-size: 14px;
    color: var(--ink);
    background: var(--surface2);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.gh-sq-fm input[type="text"]::placeholder { color: var(--ink-dim); }
.gh-sq-fm input[type="text"]:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}
.gh-sq-fm button {
    padding: 10px 20px;
    border: none;
    border-radius: var(--r-xl);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.gh-sq-fm button:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.gh-sq-fm button[value="1"] { background: var(--blue); color: #fff; }
.gh-sq-fm button[value="1"]:hover { background: var(--blue-dark); }
.gh-sq-fm button[value="2"] { background: var(--red); color: #fff; }
.gh-sq-fm button[value="2"]:hover { background: var(--red-dark); }
.gh-sq-fm button:not([value]) {
    background: var(--surface2);
    color: var(--ink-muted);
    border: 1.5px solid var(--border-mid);
}

/* ===== Hot Tags ===== */
.gh-kw {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 11px 18px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-xs);
}
.gh-kw h4 {
    font-size: 12px;
    font-weight: 800;
    color: var(--red);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}
.gh-kw-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.gh-kw-tags a {
    display: inline-block;
    padding: 4px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    font-size: 12px;
    color: var(--ink-muted);
    font-weight: 500;
    transition: all 0.15s;
}
.gh-kw-tags a:hover {
    background: var(--red-light);
    border-color: var(--red-mid);
    color: var(--red-dark);
}

/* ===== Section ===== */
.gh-sec { margin-bottom: 8px; }
.gh-sec-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.gh-sec-hd h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
    position: relative;
    padding-left: 14px;
}
.gh-sec-hd h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--red);
    border-radius: 4px;
}
.gh-sec-hd h3 a {
    font-size: 13px;
    font-weight: 600;
    color: var(--blue);
    padding-left: 12px;
    transition: color 0.15s;
}
.gh-sec-hd h3 a:hover { color: var(--blue-dark); text-decoration: underline; }

/* ===== Media Grid ===== */
.gh-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.gh-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: all 0.2s;
    box-shadow: var(--shadow-xs);
}
.gh-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: transparent;
    transform: translateY(-4px);
}
.gh-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--bg);
}
.gh-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.gh-card:hover .gh-thumb img { transform: scale(1.06); }
.gh-cap {
    padding: 9px 12px;
}
.gh-cap h5 {
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-mid);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.45;
}
.gh-cap h5 a { color: inherit; }
.gh-cap h5 a:hover { color: var(--red); }

/* ===== Entry Detail ===== */
.gh-ttl {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--red);
    border-radius: var(--r-md);
    padding: 16px 20px;
    margin-bottom: 10px;
    text-align: center;
    font-size: 16px;
    word-break: break-all;
    line-height: 1.8;
    box-shadow: var(--shadow-xs);
}
.gh-ttl .cat-lk {
    display: inline-block;
    background: var(--red-light);
    color: var(--red-dark);
    border: 1px solid var(--red-mid);
    border-radius: var(--r-xl);
    padding: 2px 12px;
    font-size: 11px;
    font-weight: 700;
    margin-right: 10px;
    vertical-align: middle;
    letter-spacing: 0.3px;
}
.gh-ttl b { color: var(--ink); }

.gh-meta {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 18px 22px;
    font-size: 14px;
    line-height: 2.1;
    margin-bottom: 10px;
    box-shadow: var(--shadow-xs);
}
.gh-meta .mk { color: var(--red); font-weight: 700; }

.gh-preview { margin-top: 12px; }
.gh-preview picture img {
    width: 100%;
    height: auto;
    border-radius: var(--r-sm);
    display: block;
}

/* ===== Buttons ===== */
.gh-btns {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 18px 0;
}
.gh-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 12px 30px;
    border: none;
    border-radius: var(--r-xl);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.gh-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.gh-btn-red { background: var(--red); color: #fff; }
.gh-btn-red:hover { background: var(--red-dark); }
.gh-btn-blue { background: var(--blue); color: #fff; }
.gh-btn-blue:hover { background: var(--blue-dark); }
.gh-btn-out { background: var(--surface); color: var(--ink-muted); border: 1.5px solid var(--border-mid); }
.gh-btn-out:hover { border-color: var(--red); color: var(--red); box-shadow: none; transform: none; }

.gh-dl-note {
    text-align: center;
    padding: 10px;
    font-size: 13px;
}
.gh-dl-note a { color: var(--blue); font-weight: 600; }
.gh-dl-note a:hover { text-decoration: underline; }

/* ===== Share ===== */
.gh-share {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-xs);
}
.gh-share-inf {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.gh-share-tag {
    font-size: 10px;
    background: var(--red);
    color: #fff;
    padding: 2px 10px;
    border-radius: var(--r-xl);
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.gh-share-url {
    font-size: 12px;
    color: var(--ink-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gh-share-cp {
    background: var(--blue-light);
    color: var(--blue-dark);
    border: 1px solid var(--blue);
    border-radius: var(--r-xl);
    padding: 7px 16px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
}
.gh-share-cp:hover { background: var(--blue); color: #fff; border-color: var(--blue-dark); }

/* ===== Pagination ===== */
.gh-pgn {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 14px 0;
}
.gh-pgn a,
.gh-pgn .gh-pgc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--r-xl);
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--ink-muted);
    transition: all 0.15s;
}
.gh-pgn a:hover {
    background: var(--red-light);
    border-color: var(--red-mid);
    color: var(--red-dark);
}
.gh-pgn .gh-pgc {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue-dark);
    font-weight: 800;
}

/* ===== Footer ===== */
.gh-fl {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 14px 18px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-xs);
}
.gh-fl h4 {
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-dim);
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
}
.gh-fl-lks {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
}
.gh-fl-lks a {
    font-size: 12px;
    color: var(--ink-dim);
    transition: color 0.15s;
}
.gh-fl-lks a:hover { color: var(--red); }

.gh-ft {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 14px 16px;
    text-align: center;
    font-size: 12px;
    color: var(--ink-dim);
}

/* ===== Utilities ===== */
.clearfix::after { content: ''; display: table; clear: both; }
.hide-mobile { display: block; }
.hide-pc { display: none; }

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .gh-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hide-mobile { display: none; }
    .hide-pc { display: block; }

    .gh-site-nm { font-size: 17px; }
    .gh-url-val { font-size: 13px; }

    .gh-zone-nm {
        flex: 0 0 15%;
        font-size: 10px;
        padding: 4px 2px;
        letter-spacing: 0;
    }
    .gh-nav-lks {
        flex: 0 0 85%;
        padding: 4px;
        gap: 3px;
    }
    .gh-nav-lks a {
        flex: 1 0 calc(25% - 3px);
        font-size: 12px;
        padding: 5px 2px;
    }
    .gh-sec-hd h3 { font-size: 15px; }

    /* 移动端搜索栏强制单行显示 */
    .gh-sq { padding: 10px 12px; }
    .gh-sq-fm {
        flex-wrap: nowrap;
        gap: 6px;
    }
    .gh-sq-fm input[type="text"] {
        flex: 1 1 0;
        min-width: 0;
        padding: 8px 10px;
        font-size: 13px;
    }
    .gh-sq-fm button {
        flex-shrink: 0;
        padding: 8px 10px;
        font-size: 12px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .gh-nav-lks a { font-size: 14px; }
}

@media (min-width: 769px) {
    .gh-zone-nm { flex: 0 0 80px; font-size: 11px; }
    .gh-nav-lks a {
        flex: 1 0 calc(12.5% - 5px);
        font-size: 13px;
    }
}
