:root {
    --bg: #EDF1F2;
    --surface: #FFFFFF;
    --primary: #6E8B96;
    --accent: #E2A76F;
    --text: #22303A;
    --muted: #8A9AA3;
    --line: #D7DFE2;
    --radius: 18px;
    --font-heading: "Helvetica Neue", "PingFang SC", "Noto Sans SC", sans-serif;
    --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

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

ul, ol {
    list-style: none;
}

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

/* ---------- Header ---------- */
.header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.logo img {
    height: 32px;
    width: auto;
}

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

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

.nav a {
    font-size: 14px;
    color: var(--muted);
    white-space: nowrap;
    padding: 6px 2px;
    border-bottom: 1px solid transparent;
    transition: color .2s, border-color .2s;
}

.nav a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.search-box {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    padding: 0 4px 0 14px;
    height: 36px;
    flex-shrink: 0;
}

.search-box input {
    border: 0;
    outline: 0;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    width: 150px;
}

.search-box input::placeholder {
    color: var(--muted);
}

.search-box button {
    border: 0;
    background: var(--primary);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    height: 28px;
    padding: 0 14px;
    border-radius: 999px;
    cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    margin: 24px 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
}

.hero-slide {
    position: relative;
    display: block;
    aspect-ratio: 21 / 9;
    overflow: hidden;
}

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

.hero-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px 32px 24px;
    background: linear-gradient(to top, rgba(34, 48, 58, .82), rgba(34, 48, 58, 0));
    color: #fff;
}

.hero-info h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 500;
    letter-spacing: .5px;
    margin-bottom: 6px;
}

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

.btn {
    display: inline-block;
    margin-top: 14px;
    padding: 8px 22px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .2s;
}

.btn:hover {
    background: #d1955e;
}

.btn.ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, .6);
    color: #fff;
}

/* ---------- Section ---------- */
.sec {
    margin: 36px 0;
}

.sec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.sec-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: .5px;
    color: var(--text);
}

.sec-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: var(--primary);
    margin-right: 10px;
    vertical-align: -2px;
}

.sec-more {
    font-size: 13px;
    color: var(--muted);
    transition: color .2s;
}

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

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

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .25s ease;
}

.card:hover {
    transform: translateY(-4px);
}

.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 .35s ease;
}

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(110, 139, 150, .45), rgba(110, 139, 150, 0));
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
}

.card:hover .card-cover::after {
    opacity: 1;
}

.card-score {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: rgba(226, 167, 111, .92);
    padding: 2px 8px;
    border-radius: 999px;
}

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

.card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    margin-top: 4px;
    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: 16px;
}

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 18px 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-align: center;
    transition: border-color .2s, color .2s;
}

.cat-item:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.cat-item span:first-child {
    font-size: 14px;
    font-weight: 500;
}

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

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

.rank-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color .2s;
}

.rank-item:hover {
    border-color: var(--primary);
}

.rank-num {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--muted);
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
    color: var(--accent);
}

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

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

/* ---------- Detail ---------- */
.detail {
    margin: 24px 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.detail-head {
    display: flex;
    gap: 28px;
    padding: 28px;
    border-bottom: 1px solid var(--line);
}

.detail-cover {
    width: 220px;
    flex-shrink: 0;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
}

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

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

.detail-meta h1 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 500;
    letter-spacing: .5px;
    margin-bottom: 8px;
}

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

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

.detail-score {
    display: inline-block;
    margin: 12px 0;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 600;
    color: var(--accent);
}

.detail-body {
    padding: 28px;
    font-size: 15px;
    line-height: 1.9;
    color: var(--text);
}

.detail-body p {
    margin-bottom: 16px;
}

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

.tag {
    display: inline-block;
    font-size: 12px;
    color: var(--primary);
    background: rgba(110, 139, 150, .1);
    border: 1px solid rgba(110, 139, 150, .25);
    padding: 3px 12px;
    border-radius: 999px;
    transition: background .2s;
}

.tag:hover {
    background: rgba(110, 139, 150, .2);
}

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

.pg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    transition: border-color .2s, color .2s;
}

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

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

.pg.disabled {
    color: var(--muted);
    pointer-events: none;
    opacity: .55;
}

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

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

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

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

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

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

.footer p {
    margin-bottom: 6px;
}

/* ---------- Crumbs ---------- */
.crumbs {
    padding: 16px 0 0;
    font-size: 13px;
    color: var(--muted);
}

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

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

/* ---------- Highlight ---------- */
.hl {
    color: var(--accent);
    font-style: normal;
    font-weight: 600;
}

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

@media (max-width: 768px) {
    .wrap {
        padding: 0 14px;
    }
    .header .wrap {
        height: auto;
        flex-wrap: wrap;
        gap: 10px;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .nav {
        order: 3;
        width: 100%;
        flex: none;
        gap: 16px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .search-box {
        margin-left: auto;
    }
    .search-box input {
        width: 100px;
    }
    .hero {
        margin: 16px 0;
        border-radius: 14px;
    }
    .hero-slide {
        aspect-ratio: 16 / 10;
    }
    .hero-info {
        padding: 28px 18px 16px;
    }
    .hero-info h2 {
        font-size: 19px;
    }
    .hero-info p {
        font-size: 12px;
    }
    .sec {
        margin: 24px 0;
    }
    .sec-title {
        font-size: 17px;
    }
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .cat-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .cat-item {
        padding: 14px 8px;
    }
    .rank-list {
        grid-template-columns: 1fr;
    }
    .detail-head {
        flex-direction: column;
        gap: 18px;
        padding: 18px;
    }
    .detail-cover {
        width: 140px;
    }
    .detail-meta h1 {
        font-size: 20px;
    }
    .detail-body {
        padding: 18px;
        font-size: 14px;
    }
    .footer {
        margin-top: 32px;
        padding: 20px 0;
    }
}