:root {
    --ag-ink: #151827;
    --ag-muted: #626d83;
    --ag-line: rgba(18, 24, 42, .1);
    --ag-bg: #f6f8ff;
    --ag-panel: rgba(255, 255, 255, .9);
    --ag-pink: #ff4d6d;
    --ag-cyan: #22c7d8;
    --ag-yellow: #f6c64f;
    --ag-green: #2fbf71;
    --ag-shadow: 0 18px 48px rgba(33, 45, 84, .14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 12% 8%, rgba(34, 199, 216, .16), transparent 30%),
        radial-gradient(circle at 88% 14%, rgba(255, 77, 109, .14), transparent 28%),
        linear-gradient(180deg, #fff 0, var(--ag-bg) 46%, #eef7f1 100%);
    color: var(--ag-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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

img {
    max-width: 100%;
}

.ag-container,
.ag-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.ag-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(255, 255, 255, .7);
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(16px);
}

.ag-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

.ag-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.ag-brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--ag-pink), var(--ag-cyan));
    color: #fff;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(255, 77, 109, .22);
}

.ag-brand strong,
.ag-brand small {
    display: block;
}

.ag-brand small {
    max-width: 220px;
    overflow: hidden;
    color: var(--ag-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ag-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ag-menu a,
.ag-menu li a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    color: #323b50;
    font-weight: 700;
}

.ag-menu ul {
    display: contents;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ag-menu a:hover {
    background: rgba(34, 199, 216, .12);
}

.ag-menu-btn {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--ag-line);
    border-radius: 8px;
    background: #fff;
    color: var(--ag-ink);
    font-size: 20px;
}

.ag-main {
    padding: 34px 0 56px;
}

.ag-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
    gap: 32px;
    align-items: end;
    min-height: 420px;
    overflow: hidden;
    margin-bottom: 34px;
    padding: 32px;
    border-radius: 8px;
    background: #11182b;
    box-shadow: var(--ag-shadow);
}

.ag-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .46;
}

.ag-hero:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 13, 27, .82), rgba(8, 13, 27, .28));
}

.ag-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 640px;
    color: #fff;
}

.ag-kicker {
    margin: 0 0 8px;
    color: var(--ag-pink);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.ag-hero .ag-kicker {
    color: #8df3ff;
}

.ag-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.06;
}

.ag-hero p {
    max-width: 560px;
    color: rgba(255, 255, 255, .86);
    font-size: 17px;
}

.ag-hero-actions,
.ag-detail-actions,
.ag-card-foot,
.ag-neighbor {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.ag-primary-btn,
.ag-secondary-btn,
.ag-card-foot a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 8px;
    font-weight: 850;
}

.ag-primary-btn {
    border: 0;
    background: var(--ag-pink);
    color: #fff;
    box-shadow: 0 12px 28px rgba(255, 77, 109, .26);
}

.ag-secondary-btn,
.ag-card-foot a {
    border: 1px solid rgba(255, 255, 255, .34);
    background: rgba(255, 255, 255, .88);
    color: #1d273c;
}

.ag-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 28px;
}

.ag-section-title {
    margin-bottom: 18px;
}

.ag-section-title h2 {
    margin: 0;
    font-size: 30px;
}

.ag-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.ag-game-card,
.ag-side-block,
.ag-content-wrap,
.ag-config,
.ag-comments,
.ag-comment-list,
.ag-page {
    border: 1px solid var(--ag-line);
    border-radius: 8px;
    background: var(--ag-panel);
    box-shadow: 0 14px 38px rgba(30, 42, 76, .08);
}

.ag-game-card {
    overflow: hidden;
}

.ag-card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #101525;
}

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

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

.ag-card-cover span,
.ag-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    color: #1f2a44;
    font-size: 12px;
    font-weight: 900;
}

.ag-card-cover span {
    position: absolute;
    left: 12px;
    bottom: 12px;
}

.ag-card-body {
    padding: 18px;
}

.ag-card-body h3 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.3;
}

.ag-card-body p,
.ag-card-meta,
.ag-card-foot,
.ag-side-block p {
    color: var(--ag-muted);
}

.ag-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
    font-size: 13px;
    font-weight: 750;
}

.ag-card-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(34, 199, 216, .1);
}

.ag-card-foot {
    justify-content: space-between;
}

.ag-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ag-side-block {
    padding: 20px;
}

.ag-side-block h3 {
    margin: 0 0 14px;
}

.ag-side-list {
    display: grid;
    gap: 12px;
}

.ag-side-list a {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.ag-side-list img {
    width: 62px;
    height: 46px;
    border-radius: 8px;
    object-fit: cover;
}

.ag-rank-list {
    margin: 0;
    padding-left: 22px;
}

.ag-rank-list li {
    margin: 10px 0;
}

.ag-tag-cloud,
.ag-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ag-tag-cloud a,
.ag-tag {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 77, 109, .1);
    color: #b21f42;
    font-size: 13px;
    font-weight: 800;
}

.ag-detail-hero {
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    gap: 30px;
    align-items: center;
}

.ag-detail-cover {
    overflow: hidden;
    border-radius: 8px;
    background: #101525;
    aspect-ratio: 4 / 5;
    box-shadow: var(--ag-shadow);
}

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

.ag-detail-info h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.1;
}

.ag-detail-meta,
.ag-stat-grid,
.ag-config-grid {
    display: grid;
    gap: 12px;
}

.ag-detail-meta {
    grid-template-columns: repeat(auto-fit, minmax(110px, max-content));
    margin: 18px 0;
    color: var(--ag-muted);
}

.ag-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 22px 0;
}

.ag-stat-grid div,
.ag-config-grid div {
    padding: 16px;
    border: 1px solid var(--ag-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
}

.ag-stat-grid small,
.ag-config-grid span {
    display: block;
    color: var(--ag-muted);
}

.ag-stat-grid strong,
.ag-config-grid strong {
    display: block;
    color: var(--ag-ink);
}

.ag-content-wrap,
.ag-config,
.ag-comments,
.ag-comment-list,
.ag-page {
    margin-top: 28px;
    padding: 26px;
}

.ag-content {
    color: #293249;
}

.ag-content img {
    border-radius: 8px;
}

.ag-config h2,
.ag-comments h2,
.ag-comment-list h2,
.ag-page-head h1 {
    margin: 0 0 18px;
}

.ag-config-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ag-neighbor {
    justify-content: space-between;
    margin: 24px 0;
}

.ag-neighbor a {
    color: #42526e;
    font-weight: 800;
}

.ag-comment-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ag-comment-form input,
.ag-comment-form textarea {
    width: 100%;
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid var(--ag-line);
    border-radius: 8px;
    background: #fff;
    color: var(--ag-ink);
    font: inherit;
}

.ag-comment-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--ag-line);
}

.ag-comment-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.ag-comment-head span,
.ag-empty {
    color: var(--ag-muted);
}

.ag-pagination {
    margin-top: 26px;
    text-align: center;
}

.ag-pagination a,
.ag-pagination span,
.ag-pagination em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    margin: 3px;
    border-radius: 8px;
    background: #fff;
    color: #34405a;
    font-style: normal;
    font-weight: 800;
}

.ag-pagination span {
    background: var(--ag-cyan);
    color: #fff;
}

.ag-footer {
    border-top: 1px solid var(--ag-line);
    background: rgba(255, 255, 255, .72);
    color: var(--ag-muted);
}

.ag-footer .ag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
    min-height: 76px;
}

.ag-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 8px;
    background: var(--ag-ink);
    color: #fff;
    font-size: 18px;
}

.ag-top.is-visible {
    display: block;
}

@media (max-width: 900px) {
    .ag-menu-btn {
        display: inline-grid;
        place-items: center;
    }

    .ag-menu {
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--ag-line);
        border-radius: 8px;
        background: #fff;
        box-shadow: var(--ag-shadow);
    }

    .ag-menu.is-open {
        display: flex;
    }

    .ag-menu a {
        width: 100%;
    }

    .ag-hero,
    .ag-layout,
    .ag-detail-hero,
    .ag-stat-grid,
    .ag-config-grid {
        grid-template-columns: 1fr;
    }

    .ag-hero {
        min-height: 360px;
    }
}

@media (max-width: 620px) {
    .ag-main,
    .ag-container {
        width: min(100% - 24px, 1180px);
    }

    .ag-hero,
    .ag-content-wrap,
    .ag-config,
    .ag-comments,
    .ag-comment-list,
    .ag-page {
        padding: 18px;
    }

    .ag-comment-fields {
        grid-template-columns: 1fr;
    }
}
