:root {
    --bg: #0D0B09;
    --surface: #1A1612;
    --primary: #C9A15A;
    --accent: #00F5C4;
    --text: #F2EDE4;
    --muted: #8A7F70;
    --radius: 10px;
    --border: rgba(201, 161, 90, 0.28);
    --font-heading: 'Helvetica Neue', 'Arial Black', 'Noto Sans SC', sans-serif;
    --font-body: 'Inter', 'Helvetica Neue', 'Noto Sans SC', 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;
    background-image:
        radial-gradient(ellipse at top left, rgba(201, 161, 90, 0.06), transparent 55%),
        radial-gradient(ellipse at bottom right, rgba(0, 245, 196, 0.04), transparent 55%);
    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease, opacity .2s ease;
}

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

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

ul, ol {
    list-style: none;
}

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

/* ============ Header ============ */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(13, 11, 9, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

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

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

.logo span,
.logo em {
    color: var(--accent);
    font-style: normal;
}

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

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

.nav a {
    display: inline-block;
    padding: 6px 12px;
    font-size: 14px;
    color: var(--muted);
    white-space: nowrap;
    border-radius: var(--radius);
    transition: color .2s, background .2s;
}

.nav a:hover,
.nav a.active {
    color: var(--primary);
    background: rgba(201, 161, 90, 0.08);
}

.search-box {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
}

.search-box input {
    width: 180px;
    padding: 8px 12px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 13px;
}

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

.search-box button {
    padding: 8px 14px;
    border: none;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font-size: 13px;
    border-left: 1px solid var(--border);
    transition: background .2s;
}

.search-box button:hover {
    background: rgba(201, 161, 90, 0.12);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .72;
    transition: transform .6s ease, opacity .4s ease;
}

.hero-slide:hover img {
    transform: scale(1.03);
    opacity: .85;
}

.hero-info {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 40px 32px 28px;
    background: linear-gradient(to top, rgba(13, 11, 9, 0.96), rgba(13, 11, 9, 0.35) 60%, transparent);
}

.hero-info h2,
.hero-info h3 {
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 900;
    letter-spacing: .5px;
    margin-bottom: 8px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .6);
}

.hero-info p {
    color: var(--muted);
    font-size: 14px;
    max-width: 640px;
    margin-bottom: 14px;
}

.btn {
    display: inline-block;
    padding: 9px 22px;
    border-radius: var(--radius);
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #14110D;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, background .2s;
}

.btn:hover {
    color: #14110D;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 161, 90, 0.35);
}

.btn.ghost {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

.btn.ghost:hover {
    background: rgba(0, 245, 196, 0.1);
    box-shadow: 0 6px 20px rgba(0, 245, 196, 0.25);
}

/* ============ Section ============ */
.sec {
    margin: 48px 0;
}

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

.sec-head::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 64px;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

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

.sec-title span {
    color: var(--primary);
}

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

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

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

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

.card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .5), 0 0 0 1px rgba(201, 161, 90, .25);
}

.card-cover {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #000;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease, filter .3s ease;
}

.card:hover .card-cover img {
    transform: scale(1.06);
    filter: brightness(1.12);
}

.card-score {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    color: var(--bg);
    background: var(--accent);
    border-radius: 4px;
    box-shadow: 0 0 12px rgba(0, 245, 196, .5);
}

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

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card:hover .card-title {
    color: var(--primary);
}

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

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

.cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: border-color .2s, background .2s;
}

.cat-item:hover {
    border-color: var(--primary);
    background: rgba(201, 161, 90, 0.06);
    color: var(--primary);
}

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

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

.rank-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-bottom: 1px dashed rgba(201, 161, 90, 0.18);
    transition: background .2s;
}

.rank-item:hover {
    background: rgba(201, 161, 90, 0.05);
}

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

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

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

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

/* ============ Detail ============ */
.detail {
    margin: 40px 0;
}

.detail-head {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.detail-cover {
    aspect-ratio: 2 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000;
}

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

.detail-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-meta h1 {
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 900;
    letter-spacing: .5px;
    line-height: 1.25;
}

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

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

.detail-score {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    padding: 4px 14px;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 900;
    color: var(--bg);
    background: var(--accent);
    border-radius: 6px;
    box-shadow: 0 0 16px rgba(0, 245, 196, .4);
}

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

.detail-body h2,
.detail-body h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    margin: 18px 0 10px;
    color: var(--primary);
}

.detail-body p {
    margin-bottom: 12px;
    color: #d9d2c6;
}

/* ============ Tag ============ */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: color .2s, border-color .2s, background .2s;
}

.tag:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(0, 245, 196, 0.06);
}

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

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

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

.pg.current {
    color: var(--bg);
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 700;
}

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

/* ============ Links ============ */
.links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
}

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

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

/* ============ Footer ============ */
.footer {
    margin-top: 60px;
    padding: 36px 0 28px;
    border-top: 1px solid var(--border);
    background: linear-gradient(to bottom, transparent, rgba(26, 22, 18, 0.6));
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    line-height: 2;
}

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

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

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

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

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

.crumbs span {
    margin: 0 6px;
    opacity: .5;
}

/* ============ Highlight ============ */
.hl {
    color: var(--accent);
    background: rgba(0, 245, 196, 0.1);
    padding: 0 2px;
    border-radius: 2px;
}

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

@media (max-width: 768px) {
    .wrap {
        padding: 0 16px;
    }

    .header .wrap {
        height: auto;
        flex-wrap: wrap;
        gap: 10px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .logo {
        font-size: 19px;
    }

    .search-box {
        order: 3;
        width: 100%;
    }

    .search-box input {
        width: 100%;
        flex: 1;
    }

    .nav {
        order: 4;
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .nav a {
        padding: 6px 10px;
    }

    .hero {
        margin: 20px auto;
    }

    .hero-slide {
        aspect-ratio: 16 / 10;
    }

    .hero-info {
        padding: 24px 18px 18px;
    }

    .hero-info h2,
    .hero-info h3 {
        font-size: 20px;
    }

    .hero-info p {
        font-size: 13px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .sec {
        margin: 32px 0;
    }

    .sec-title {
        font-size: 19px;
    }

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

    .cat-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .rank-list {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .detail-head {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 18px;
    }

    .detail-cover {
        max-width: 200px;
        margin: 0 auto;
    }

    .detail-meta h1 {
        font-size: 22px;
        text-align: center;
    }

    .detail-meta p {
        text-align: center;
    }

    .detail-score {
        align-self: center;
    }

    .detail-body {
        padding: 18px;
        font-size: 14px;
    }

    .pg {
        min-width: 34px;
        height: 34px;
        padding: 0 9px;
    }
}

@media (max-width: 380px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .card-info {
        padding: 8px 9px 10px;
    }
    .card-title {
        font-size: 13px;
    }
}