:root {
    --bg: #EEF1F3;
    --surface: #FAFBFC;
    --primary: #3E5C6B;
    --accent: #D6452F;
    --text: #232A2E;
    --muted: #8A99A3;
    --radius: 14px;
    --font-heading: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
    --font-body: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
    --shadow: 0 2px 10px rgba(62, 92, 107, 0.08);
    --border: 1px solid rgba(62, 92, 107, 0.12);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background-color: var(--bg);
    background-image:
        radial-gradient(rgba(62, 92, 107, 0.035) 1px, transparent 1px),
        radial-gradient(rgba(62, 92, 107, 0.025) 1px, transparent 1px);
    background-size: 7px 7px, 11px 11px;
    background-position: 0 0, 3px 5px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.7;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent);
}

img {
    display: block;
    max-width: 100%;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0;
}

.wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Header ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 251, 252, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: var(--border);
}

.header .wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 66px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.08em;
    white-space: nowrap;
    position: relative;
    padding-left: 14px;
}

.logo::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) skewY(-12deg);
    width: 4px;
    height: 22px;
    background: var(--accent);
    border-radius: 2px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
}

.nav::-webkit-scrollbar {
    display: none;
}

.nav a {
    padding: 6px 12px;
    font-size: 14px;
    color: var(--muted);
    white-space: nowrap;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav a:hover {
    color: var(--primary);
    background: rgba(62, 92, 107, 0.07);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.search-box input {
    width: 180px;
    height: 36px;
    padding: 0 14px;
    border: var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(214, 69, 47, 0.1);
}

.search-box button {
    height: 36px;
    padding: 0 18px;
    border: none;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-box button:hover {
    background: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    margin: 28px auto;
    max-width: 1200px;
    padding: 0 20px;
}

.hero-slide {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 21 / 9;
    background: var(--primary);
    box-shadow: var(--shadow);
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

.hero-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px 32px 28px;
    background: linear-gradient(to top, rgba(35, 42, 46, 0.85), rgba(35, 42, 46, 0));
    color: #fff;
}

.hero-info h2 {
    font-size: 28px;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-info p {
    margin: 0 0 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 640px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn {
    display: inline-block;
    padding: 9px 24px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
    background: #c03a26;
    color: #fff;
    transform: translateY(-1px);
}

/* ---------- Section ---------- */
.sec {
    margin: 40px auto;
    max-width: 1200px;
    padding: 0 20px;
}

.sec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(62, 92, 107, 0.12);
    position: relative;
}

.sec-head::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 48px;
    height: 2px;
    background: var(--accent);
    transform: skewX(-20deg);
}

.sec-title {
    font-size: 22px;
    color: var(--primary);
    letter-spacing: 0.06em;
}

.sec-more {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}

.sec-more:hover {
    color: var(--accent);
}

/* ---------- Grid & Card ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid transparent;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-2px);
    border-color: rgba(214, 69, 47, 0.55);
    box-shadow: 0 6px 18px rgba(62, 92, 107, 0.12);
}

.card-cover {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--bg);
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-cover img {
    transform: scale(1.04);
}

.card-score {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 9px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-heading);
    border-radius: 3px;
    transform: skewX(-10deg);
    box-shadow: 0 2px 6px rgba(214, 69, 47, 0.35);
}

.card-info {
    padding: 12px 14px 14px;
}

.card-title {
    font-size: 15px;
    font-family: var(--font-heading);
    color: var(--text);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Category list ---------- */
.cat-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 18px 8px;
    background: var(--surface);
    border: 1px solid rgba(62, 92, 107, 0.18);
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-size: 15px;
    color: var(--primary);
    text-align: center;
    transition: all 0.2s ease;
}

.cat-item:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.cat-count {
    font-size: 12px;
    font-family: var(--font-body);
    color: var(--muted);
}

/* ---------- Rank list ---------- */
.rank-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 24px;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: var(--surface);
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.rank-item:hover {
    border-color: rgba(214, 69, 47, 0.5);
    transform: translateY(-1px);
}

.rank-num {
    flex-shrink: 0;
    width: 30px;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--muted);
    text-align: center;
    font-style: italic;
}

.rank-item:nth-child(-n+3) .rank-num {
    color: var(--accent);
}

.rank-title {
    flex: 1;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-score {
    flex-shrink: 0;
    font-size: 13px;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--accent);
}

/* ---------- Detail ---------- */
.detail {
    max-width: 1200px;
    margin: 32px auto;
    padding: 0 20px;
}

.detail-head {
    display: flex;
    gap: 32px;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 28px;
}

.detail-cover {
    flex-shrink: 0;
    width: 240px;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg);
}

.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-meta {
    flex: 1;
    min-width: 0;
}

.detail-meta h1 {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 6px;
}

.detail-meta p {
    margin: 4px 0;
    font-size: 14px;
    color: var(--muted);
}

.detail-meta p strong {
    color: var(--text);
    font-weight: 500;
}

.detail-score {
    display: inline-block;
    margin: 12px 0;
    padding: 4px 16px;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    border-radius: 4px;
    transform: skewX(-8deg);
}

.detail-body {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    font-size: 15px;
    line-height: 1.9;
    color: var(--text);
}

.detail-body h2 {
    font-size: 20px;
    color: var(--primary);
    margin: 24px 0 12px;
}

.detail-body h2:first-child {
    margin-top: 0;
}

/* ---------- Tags ---------- */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.tag {
    display: inline-block;
    padding: 3px 12px;
    font-size: 12px;
    color: var(--primary);
    background: rgba(62, 92, 107, 0.07);
    border: 1px solid rgba(62, 92, 107, 0.15);
    border-radius: 999px;
    transition: all 0.2s ease;
}

.tag:hover {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

/* ---------- Pager ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 36px 0;
}

.pg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    background: var(--surface);
    border: 1px solid rgba(62, 92, 107, 0.15);
    border-radius: 8px;
    font-size: 14px;
    color: var(--primary);
    transition: all 0.2s ease;
}

.pg:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pg.current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pg.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ---------- Links ---------- */
.links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    padding: 24px 0;
}

.link-item {
    font-size: 13px;
    color: var(--muted);
    transition: color 0.2s ease;
}

.link-item:hover {
    color: var(--accent);
}

/* ---------- Footer ---------- */
.footer {
    margin-top: 48px;
    padding: 32px 0;
    background: var(--surface);
    border-top: var(--border);
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    line-height: 2;
}

.footer a {
    color: var(--muted);
}

.footer a:hover {
    color: var(--accent);
}

/* ---------- Crumbs ---------- */
.crumbs {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 0 20px;
    font-size: 13px;
    color: var(--muted);
}

.crumbs a {
    color: var(--muted);
}

.crumbs a:hover {
    color: var(--accent);
}

/* ---------- Highlight ---------- */
.hl {
    color: var(--accent);
    font-weight: 600;
    font-style: normal;
    background: rgba(214, 69, 47, 0.08);
    padding: 0 2px;
    border-radius: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .cat-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    .header .wrap {
        height: auto;
        flex-wrap: wrap;
        gap: 10px;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .logo {
        font-size: 19px;
    }
    .nav {
        order: 3;
        width: 100%;
        flex: none;
        overflow-x: auto;
        padding-bottom: 2px;
    }
    .nav a {
        padding: 5px 10px;
        font-size: 13px;
    }
    .search-box {
        margin-left: auto;
    }
    .search-box input {
        width: 120px;
        height: 32px;
    }
    .search-box button {
        height: 32px;
        padding: 0 14px;
    }
    .hero {
        margin: 18px auto;
        padding: 0 14px;
    }
    .hero-slide {
        aspect-ratio: 16 / 10;
    }
    .hero-info {
        padding: 24px 18px 16px;
    }
    .hero-info h2 {
        font-size: 20px;
    }
    .hero-info p {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }
    .btn {
        padding: 7px 18px;
        font-size: 13px;
    }
    .sec {
        margin: 26px auto;
        padding: 0 14px;
    }
    .sec-title {
        font-size: 18px;
    }
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .card-info {
        padding: 9px 10px 11px;
    }
    .card-title {
        font-size: 14px;
    }
    .cat-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .cat-item {
        padding: 14px 6px;
        font-size: 14px;
    }
    .rank-list {
        grid-template-columns: 1fr;
    }
    .detail {
        margin: 18px auto;
        padding: 0 14px;
    }
    .detail-head {
        flex-direction: column;
        gap: 18px;
        padding: 18px;
    }
    .detail-cover {
        width: 160px;
        margin: 0 auto;
    }
    .detail-meta h1 {
        font-size: 22px;
        text-align: center;
    }
    .detail-meta p {
        text-align: center;
    }
    .detail-score {
        display: block;
        width: fit-content;
        margin: 12px auto;
    }
    .detail-body {
        padding: 18px;
        font-size: 14px;
    }
    .pg {
        min-width: 34px;
        height: 34px;
        font-size: 13px;
    }
    .footer {
        margin-top: 32px;
        padding: 24px 14px;
    }
}
</style>