@media only screen and (min-width: 720px) {
    .game-container {
        grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr
    }

    .tag-game {
        grid-template-columns: 1fr 1fr!important
    }

    .gt {
        min-height: 135px
    }

    #gla {
        order: 2
    }
}

/* Unified GPT placements shared by homepage, category, and detail pages. */
.home-unified-banner-ad {
    width: min(100%, 320px);
    min-height: 250px;
    margin: 24px auto 0;
}

.home-inline-ad {
    width: min(100%, 320px);
    min-height: 50px;
    margin: 24px auto;
}

.home-top-ad {
    position: fixed;
    left: 50%;
    top: env(safe-area-inset-top);
    width: 320px;
    max-width: calc(100vw - 24px);
    height: 50px;
    min-height: 50px;
    margin: 0;
    transform: translateX(-50%);
    z-index: 100004;
}

.category-ad-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    width: 100%;
    gap: 24px;
}

.detail-ad-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 320px));
    justify-content: center;
    gap: 24px;
}

.detail-page > .detail-ad-grid {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
}

.has-bottom-ad .category-page {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
}

.has-top-ad .category-page,
.has-top-ad .detail-page {
    padding-top: calc(70px + env(safe-area-inset-top));
}

@media (max-width: 720px) {
    .category-ad-grid,
    .detail-ad-grid {
        grid-template-columns: minmax(0, 320px);
        gap: 0;
    }

    .has-bottom-ad .category-page {
        padding-bottom: 32px !important;
    }
}

/* Category page minimal launch */
.category-page {
    --category-soft: #ecfffa;
    display: block !important;
    overflow-x: hidden;
}

.category-page .home-navlinks a.is-active {
    color: var(--home-teal);
}

.category-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: end;
    margin-top: 22px;
    padding: 22px;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(236, 255, 250, 0.92), #ffffff 72%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.category-back-link,
.category-tab,
.category-featured-card,
.category-sort-select {
    color: inherit;
    text-decoration: none;
}

.category-back-link {
    grid-column: 1 / -1;
    width: fit-content;
    color: var(--home-blue);
    font-size: 14px;
    font-weight: 900;
}

.category-hero-copy {
    min-width: 0;
}

.category-hero h1 {
    margin: 10px 0 8px;
    color: var(--home-ink);
    font-size: 40px;
    line-height: 1.08;
    letter-spacing: 0;
}

.category-hero p {
    max-width: 680px;
    margin: 0;
    color: var(--home-muted);
    font-size: 16px;
    line-height: 1.55;
}

.category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(20, 184, 166, 0.24);
    border-radius: 8px;
    background: rgba(20, 184, 166, 0.12);
    color: #0f766e;
    font-size: 14px;
}

.category-tabs-shell {
    position: relative;
    margin-top: 16px;
    overflow: hidden;
}

.category-tabs {
    display: flex;
    gap: 10px;
    width: 100%;
    overflow-x: auto;
    padding: 2px 2px 10px;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tabs-control {
    position: absolute;
    top: 0;
    bottom: 8px;
    z-index: 5;
    display: flex;
    align-items: center;
    width: 76px;
    padding: 0;
    border: 0;
    color: #0f766e;
    cursor: pointer;
}

.category-tabs-control[hidden] {
    display: none;
}

.category-tabs-control-left {
    left: 0;
    justify-content: flex-start;
    background: linear-gradient(90deg, rgba(236, 255, 250, 0.98) 0%, rgba(236, 255, 250, 0.72) 55%, rgba(236, 255, 250, 0) 100%);
}

.category-tabs-control-right {
    right: 0;
    justify-content: flex-end;
    background: linear-gradient(270deg, rgba(236, 255, 250, 0.98) 0%, rgba(236, 255, 250, 0.72) 55%, rgba(236, 255, 250, 0) 100%);
}

.category-tabs-control span {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(20, 184, 166, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.category-tabs-control-left span {
    margin-left: 6px;
}

.category-tabs-control-right span {
    margin-right: 6px;
}

.category-tabs-control span::before {
    content: "";
    width: 10px;
    height: 10px;
    border-top: 3px solid currentColor;
    border-right: 3px solid currentColor;
}

.category-tabs-control-left span::before {
    transform: translateX(2px) rotate(-135deg);
}

.category-tabs-control-right span::before {
    transform: translateX(-2px) rotate(45deg);
}

.category-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 42px;
    max-width: 210px;
    padding: 0 13px;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--home-muted);
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.category-tab:hover,
.category-tab:focus {
    border-color: rgba(20, 184, 166, 0.38);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.09);
}

.category-tab.is-active {
    border-color: var(--home-teal);
    background: var(--home-teal);
    color: #ffffff;
}

.category-tab img {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    border-radius: 8px;
}

.category-tab span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 10px;
    padding: 13px;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.category-sort-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: min(520px, 100%);
    min-width: 0;
    color: var(--home-muted);
    font-size: 14px;
    font-weight: 900;
}

.category-sort-label > span:first-child {
    flex: 0 0 auto;
}

.category-sort-select {
    position: relative;
    display: block;
    flex: 1 1 auto;
    min-width: 0;
}

.category-sort-select::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 16px;
    width: 9px;
    height: 9px;
    pointer-events: none;
    border-right: 2px solid var(--home-muted);
    border-bottom: 2px solid var(--home-muted);
    transform: translateY(-68%) rotate(45deg);
}

.category-sort-select select {
    width: 100%;
    min-height: 44px;
    padding: 0 44px 0 16px;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    appearance: none;
    background: #ffffff;
    color: var(--home-ink);
    outline: 0;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.02);
}

.category-sort-select select:focus {
    border-color: var(--home-teal);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
}

.category-featured {
    margin-top: 18px;
}

.category-featured-card {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.category-featured-art {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f1f5f9;
    background-position: center;
    background-size: cover;
}

.category-featured-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-featured-copy {
    min-width: 0;
}

.category-featured-copy h2,
.category-empty h2 {
    margin: 9px 0 8px;
    color: var(--home-ink);
    font-size: 28px;
    line-height: 1.12;
    letter-spacing: 0;
}

.category-featured-copy p,
.category-empty p {
    margin: 0;
    color: var(--home-muted);
    font-size: 15px;
    line-height: 1.55;
}

.category-featured-action {
    white-space: nowrap;
}

.category-game-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.category-game-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.category-game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.category-game-card .home-game-thumb {
    aspect-ratio: 16 / 10;
    background-position: center;
    background-size: cover;
}

.category-game-card .home-game-name {
    text-align: left;
}

.category-game-card .home-game-meta {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 7px;
}

.category-game-card .home-game-meta span:first-child {
    grid-column: 1 / -1;
}

.category-empty {
    grid-column: 1 / -1;
    padding: 22px;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

@media (max-width: 1100px) {
    .category-game-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .category-featured-card {
        grid-template-columns: 180px minmax(0, 1fr);
    }

    .category-featured-action {
        grid-column: 2;
        width: fit-content;
    }
}

@media (max-width: 720px) {
    .category-page {
        padding-bottom: 32px !important;
    }

    .category-hero {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 16px;
        padding: 16px;
    }

    .category-hero h1 {
        font-size: 30px;
    }

    .category-hero p {
        font-size: 14px;
    }

    .category-count {
        width: fit-content;
        min-height: 34px;
    }

    .category-tabs-shell {
        gap: 8px;
        margin-top: 14px;
    }

    .category-tabs {
        padding-bottom: 8px;
    }

    .category-tabs-control {
        bottom: 6px;
        width: 54px;
    }

    .category-tabs-control span {
        width: 32px;
        height: 32px;
    }

    .category-tab {
        min-height: 38px;
        padding: 0 11px;
        font-size: 13px;
    }

    .category-tab img {
        width: 22px;
        height: 22px;
    }

    .category-toolbar {
        align-items: stretch;
    }

    .category-sort-label {
        flex: 1 1 auto;
    }

    .category-sort-select {
        flex: 1 1 auto;
    }

    .category-featured-card {
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .category-featured-art {
        aspect-ratio: 1 / 1;
    }

    .category-featured-copy h2 {
        margin-top: 6px;
        font-size: 19px;
    }

    .category-featured-copy p {
        display: none;
    }

    .category-featured-action {
        grid-column: 2;
        min-height: 34px;
        width: fit-content;
        padding: 0 13px;
    }

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

    .category-game-card .home-game-meta {
        grid-template-columns: 1fr;
    }

    .category-page .home-tabbar a.is-active {
        background: rgba(20, 184, 166, 0.12);
        color: #0f766e;
    }
}

/* Detail game page */
body.detail-body {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(180deg, #ecfffa 0%, #f8fafc 45%, #ffffff 100%);
    color: #0f172a;
    font-family: Arial, sans-serif;
}

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

.detail-page {
    --home-ink: #0f172a;
    --home-muted: #64748b;
    --home-line: #e5e7eb;
    --home-teal: #14b8a6;
    --home-blue: #2563eb;
    --home-panel: #ffffff;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 48px;
}

.detail-topbar {
    margin-bottom: 22px;
}

.detail-back-link,
.detail-breadcrumb {
    color: inherit;
    text-decoration: none;
}

.detail-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--home-muted);
    font-size: 14px;
    font-weight: 900;
}

.detail-breadcrumb {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin-bottom: 16px;
    color: var(--home-blue);
    font-size: 14px;
    font-weight: 900;
}

.detail-hero-card,
.detail-player-card,
.detail-info-card {
    border: 1px solid var(--home-line);
    border-radius: 8px;
    background: var(--home-panel);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.detail-hero-card {
    padding: 18px;
}

.detail-hero-content {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
}

.detail-game-icon {
    display: block;
    width: 92px;
    height: 92px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f5f9;
}

.detail-title-group {
    min-width: 0;
}

.detail-title-group h1 {
    margin: 10px 0 8px;
    color: var(--home-ink);
    font-size: 34px;
    line-height: 1.08;
    letter-spacing: 0;
}

.detail-title-group p {
    max-width: 700px;
    margin: 0;
    color: var(--home-muted);
    font-size: 15px;
    line-height: 1.55;
}

.detail-hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.detail-hero-stats span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--home-muted);
    font-size: 13px;
    font-weight: 900;
}

.detail-player-card {
    position: relative;
    overflow: hidden;
    margin-top: 22px;
    padding: 14px;
}

.detail-player-preview {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border-radius: 8px;
    background: #0f172a;
}

.detail-player-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.18));
}

.detail-player-preview img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 620px;
    object-fit: cover;
    filter: saturate(1.05);
}

.detail-player-overlay {
    position: absolute;
    left: 32px;
    bottom: 32px;
    z-index: 2;
    display: grid;
    gap: 14px;
    max-width: 460px;
    color: #ffffff;
}

.detail-player-overlay h2 {
    margin: 0;
    color: #ffffff;
    font-size: 42px;
    line-height: 1.08;
    letter-spacing: 0;
}

.detail-play-button {
    width: fit-content;
    min-width: 148px;
    border: 0;
    cursor: pointer;
}

.detail-game-frame {
    display: none;
    width: 100%;
    height: min(72vh, 720px);
    min-height: 560px;
    border: 0;
    border-radius: 8px;
    background: #000000;
}

.detail-player-card.is-playing .detail-player-preview {
    display: none;
}

.detail-player-card.is-playing .detail-game-frame {
    display: block;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.detail-info-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 16px;
}

.detail-info-card span {
    color: var(--home-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.detail-info-card strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--home-ink);
    font-size: 20px;
    line-height: 1.15;
}

.detail-info-card small,
.detail-info-card p,
.detail-info-card li {
    color: var(--home-muted);
    font-size: 14px;
    line-height: 1.55;
}

.detail-info-card p {
    margin: 0;
}

.detail-info-card ol {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 18px;
}

.detail-info-card-wide {
    grid-column: span 2;
}

.detail-related-section {
    margin-top: 28px;
}

.detail-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}

.detail-related-card .home-game-meta {
    margin-top: 0;
}

.detail-footer {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 28px;
    color: #64748b;
    text-align: center;
    font-size: 13px;
}

@media (max-width: 980px) {
    .detail-page {
        width: min(100% - 24px, 760px);
    }

    .detail-hero-content {
        grid-template-columns: 78px minmax(0, 1fr);
    }

    .detail-game-icon {
        width: 78px;
        height: 78px;
    }

    .detail-hero-stats {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .detail-title-group h1 {
        font-size: 30px;
    }

    .detail-player-preview,
    .detail-player-preview img {
        min-height: 480px;
    }

    .detail-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .detail-page {
        width: calc(100% - 20px);
        padding: 12px 0 34px;
    }

    .detail-navlinks {
        display: none;
    }

    .detail-topbar {
        min-height: 58px;
        gap: 10px;
    }

    .detail-back-link {
        min-height: 36px;
        padding: 0 12px;
        font-size: 13px;
    }

    .detail-hero-card {
        padding: 14px;
    }

    .detail-hero-content {
        grid-template-columns: 62px minmax(0, 1fr);
        gap: 12px;
    }

    .detail-game-icon {
        width: 62px;
        height: 62px;
    }

    .detail-title-group h1 {
        font-size: 24px;
    }

    .detail-title-group p {
        font-size: 14px;
    }

    .detail-player-card {
        padding: 8px;
    }

    .detail-player-preview,
    .detail-player-preview img {
        min-height: 360px;
    }

    .detail-player-overlay {
        right: 18px;
        left: 18px;
        bottom: 18px;
    }

    .detail-player-overlay h2 {
        font-size: 28px;
    }

    .detail-game-frame {
        height: 68vh;
        min-height: 420px;
    }

    .detail-info-grid {
        gap: 12px;
    }

    .detail-info-card {
        padding: 13px;
    }

    .detail-info-card strong {
        font-size: 18px;
    }

    .detail-info-card-wide {
        grid-column: 1 / -1;
    }

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

    .detail-footer {
        width: calc(100% - 20px);
        padding-bottom: 22px;
    }
}

/* Balanced platform homepage */
body.mobileVersion {
    min-height: 100vh;
    background: linear-gradient(180deg, #ecfffa 0%, #f8fafc 45%, #ffffff 100%) !important;
    color: #0f172a;
}

.mobileVersion nav#nav {
    display: none !important;
}

.home-page {
    --home-ink: #0f172a;
    --home-muted: #64748b;
    --home-line: #e5e7eb;
    --home-teal: #14b8a6;
    --home-blue: #2563eb;
    --home-amber: #f59e0b;
    --home-red: #ef4444;
    --home-panel: #ffffff;
    box-sizing: border-box;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 48px;
    color: var(--home-ink);
}

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

.home-topbar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 64px;
    padding: 10px 14px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.home-brand,
.home-navlinks a,
.home-section-link,
.home-game-action,
.home-play-button,
.home-secondary-button,
.home-ranking-item {
    color: inherit;
    text-decoration: none;
}

.home-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-size: 19px;
    font-weight: 900;
}

.home-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--home-teal);
    color: #ffffff;
    font-size: 14px;
    letter-spacing: 0;
}

.home-navlinks {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1 1 auto;
    min-width: 0;
}

.home-navlinks a {
    color: var(--home-muted);
    font-size: 14px;
    font-weight: 800;
}

.home-search-trigger {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--home-muted);
    font-weight: 800;
    cursor: pointer;
}

.home-inline-search {
    position: relative;
    display: none;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.home-topbar.is-searching .home-brand,
.home-topbar.is-searching .home-navlinks,
.home-topbar.is-searching .home-search-trigger {
    display: none;
}

.home-topbar.is-searching .home-inline-search {
    display: flex;
}

.home-inline-search-input {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    outline: 0;
    background: #ffffff;
    color: var(--home-ink);
    font-size: 15px;
    font-weight: 800;
}

.home-inline-search-input:focus {
    border-color: var(--home-teal);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.home-inline-search-close {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--home-muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.home-inline-search-results {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    display: none;
    max-height: 360px;
    overflow: auto;
    padding: 8px;
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.home-inline-search-results.is-open {
    display: grid;
    gap: 6px;
}

.home-inline-search-result {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 54px;
    padding: 6px 8px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
}

.home-inline-search-result:hover,
.home-inline-search-result:focus {
    background: #f1f5f9;
}

.home-inline-search-result img {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f5f9;
}

.home-inline-search-result span,
.home-inline-search-empty {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--home-ink);
    font-size: 14px;
    font-weight: 900;
}

.home-inline-search-empty {
    padding: 14px 12px;
    color: var(--home-muted);
}

.home-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    margin-top: 22px;
}

.home-shell:has(> .home-sidebar) {
    grid-template-columns: minmax(0, 1fr) 320px;
}

.home-main-column,
.home-sidebar {
    min-width: 0;
}

.home-sidebar {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 96px;
}

.home-hero {
    position: relative;
    min-height: 338px;
    overflow: hidden;
    border: 1px solid #cfe7e5;
    border-radius: 8px;
    background: linear-gradient(135deg, #0f172a 0%, #0e7490 58%, #14b8a6 100%);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
}

.home-hero-slides {
    min-height: 338px;
}

.home-hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 28px;
    align-items: center;
    padding: 30px 34px;
    opacity: 0;
    pointer-events: none;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transform: translateX(16px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.home-hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.home-hero-copy {
    min-width: 0;
    color: #ffffff;
}

.home-kicker,
.home-section-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.14);
    color: #087a5a;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.home-hero .home-kicker {
    background: rgba(255, 255, 255, 0.16);
    color: #d1fae5;
}

.home-hero h1 {
    max-width: 560px;
    margin: 14px 0 10px;
    color: #ffffff;
    font-size: 44px;
    line-height: 1.05;
    letter-spacing: 0;
}

.home-hero p {
    max-width: 560px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 17px;
    line-height: 1.55;
}

.home-hero-tags,
.home-game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.home-hero-tags span,
.home-game-meta span {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 24px;
    overflow: hidden;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.84);
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.home-play-button,
.home-secondary-button,
.home-game-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 900;
}

.home-play-button,
.home-game-action {
    background: var(--home-blue);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.home-secondary-button {
    border: 1px solid rgba(255, 255, 255, 0.26);
    color: #ffffff;
}

.home-hero-art {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 6px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: #ffffff;
    background-position: center;
    background-size: cover;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.home-hero-art img,
.home-game-thumb img,
.home-category-card img,
.home-ranking-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-hero-controls {
    position: absolute;
    left: 34px;
    bottom: 20px;
    z-index: 5;
    display: flex;
    gap: 8px;
}

.home-hero-controls button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.44);
    cursor: pointer;
}

.home-hero-controls button.is-active {
    width: 28px;
    background: var(--home-amber);
}

.home-section,
.home-ranking-card,
.home-ad-slot {
    margin-top: 22px;
}

.home-sidebar .home-ranking-card,
.home-sidebar .home-ad-slot {
    margin-top: 0;
}

.home-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.home-section-header h2 {
    margin: 7px 0 0;
    color: var(--home-ink);
    font-size: 25px;
    line-height: 1.15;
    letter-spacing: 0;
}

.home-section-header-tight {
    margin-bottom: 10px;
}

.home-section-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--home-blue);
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.home-category-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(144px, 1fr);
    gap: 12px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: thin;
}

.home-category-strip.is-expanded {
    grid-auto-flow: row;
    grid-auto-columns: initial;
    grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
    overflow-x: visible;
}

.home-category-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 74px;
    padding: 11px;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    background: var(--home-panel);
    color: var(--home-ink);
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.home-category-card img {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 8px;
}

.home-category-card span {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
}

.home-game-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.home-game-grid-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-game-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    background: var(--home-panel);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.home-game-thumb {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f1f5f9;
}

.home-game-body {
    display: grid;
    gap: 10px;
    padding: 11px;
}

.home-game-name {
    min-height: 38px;
    margin: 0;
    overflow: hidden;
    color: var(--home-ink);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.25;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.home-game-meta {
    flex-wrap: nowrap;
    margin-top: 0;
    overflow: hidden;
}

.home-game-meta span {
    display: block;
    height: 24px;
    min-width: 0;
    max-width: calc((100% - 8px) / 2);
    line-height: 24px;
    background: #f1f5f9;
    color: var(--home-muted);
}

.home-game-action {
    width: 100%;
    min-height: 36px;
    box-shadow: none;
}

.home-ranking-card {
    padding: 16px;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    background: var(--home-panel);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.home-ranking-list {
    display: grid;
    gap: 10px;
}

.home-ranking-item {
    display: grid;
    grid-template-columns: 26px 42px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    color: var(--home-ink);
}

.home-ranking-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: #fef3c7;
    color: #92400e;
    font-size: 12px;
    font-weight: 900;
}

.home-ranking-item img {
    width: 42px;
    height: 42px;
    border-radius: 8px;
}

.home-ranking-name {
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-ranking-item strong {
    grid-column: 3;
    color: var(--home-muted);
    font-size: 12px;
    font-weight: 800;
}

.home-ad-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    min-height: 78px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--home-muted);
    text-align: center;
}

.home-anchor-ad {
    position: fixed;
    left: 50%;
    bottom: max(0px, env(safe-area-inset-bottom));
    width: 320px;
    max-width: calc(100vw - 24px);
    height: 50px;
    min-height: 50px;
    margin: 0;
    transform: translateX(-50%);
    z-index: 100004;
}

.home-top-ad {
    position: fixed;
    left: 50%;
    top: env(safe-area-inset-top);
    width: 320px;
    max-width: calc(100vw - 24px);
    height: 50px;
    min-height: 50px;
    margin: 0;
    transform: translateX(-50%);
    z-index: 100004;
}

.home-interstitial-ad {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.58);
    opacity: 0;
    pointer-events: none;
    z-index: 100005;
}

.home-interstitial-ad[hidden] {
    display: none;
}

.home-interstitial-ad.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.home-interstitial-backdrop {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.home-interstitial-panel {
    position: relative;
}

.home-interstitial-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: var(--home-ink);
    font-size: 22px;
    font-weight: 900;
    line-height: 34px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
    z-index: 1;
}

.home-interstitial-slot {
    width: 320px;
    max-width: calc(100vw - 48px);
    height: 480px;
    min-height: 480px;
    margin: 0;
    background: #ffffff;
}

.detail-banner-ad {
    width: 100%;
    max-width: none;
    min-height: 250px;
    margin: 24px 0 0;
}

.has-bottom-ad .detail-page {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
}

.has-top-ad .category-page,
.has-top-ad .detail-page {
    padding-top: calc(70px + env(safe-area-inset-top));
}

.home-ad-slot span {
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.home-ad-slot strong {
    color: var(--home-ink);
    font-size: 14px;
}

.home-ad-slot-box {
    min-height: 180px;
}

.home-tabbar {
    display: none;
}

@media (max-width: 980px) {
    .home-page {
        width: min(100% - 24px, 760px);
    }

    .home-navlinks {
        display: none;
    }

    .home-shell {
        display: block;
    }

    .home-sidebar {
        position: static;
        margin-top: 22px;
    }

    .home-hero,
    .home-hero-slides {
        min-height: 520px;
    }

    .home-hero-slide {
        grid-template-columns: 1fr;
        align-content: start;
        gap: 18px;
        padding: 22px 22px 62px;
    }

    .home-hero-art {
        max-width: 260px;
        margin: 0 auto;
        order: -1;
    }

    .home-hero h1 {
        font-size: 34px;
    }

    .home-hero-controls {
        left: 22px;
    }

    .home-game-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .home-page {
        width: calc(100% - 20px);
        padding-bottom: 32px;
    }

    .home-topbar {
        min-height: 58px;
        gap: 10px;
    }

    .home-brand {
        font-size: 17px;
    }

    .home-brand-mark {
        width: 34px;
        height: 34px;
    }

    .home-search-trigger {
        margin-left: auto;
        min-height: 36px;
        padding: 0 12px;
    }

    .home-topbar.is-searching {
        padding: 8px;
    }

    .home-topbar.is-searching .home-inline-search {
        gap: 6px;
    }

    .home-inline-search-input,
    .home-inline-search-close {
        min-height: 40px;
    }

    .home-inline-search-close {
        width: 40px;
        height: 40px;
    }

    .home-inline-search-results {
        max-height: min(55vh, 360px);
    }

    .home-shell {
        margin-top: 16px;
    }

    .home-hero,
    .home-hero-slides {
        min-height: 440px;
    }

    .home-hero-slide {
        padding: 16px 16px 54px;
    }

    .home-hero-art {
        max-width: 210px;
        border-width: 4px;
    }

    .home-hero h1 {
        font-size: 28px;
    }

    .home-hero p {
        font-size: 15px;
    }

    .home-hero-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .home-section-header h2 {
        font-size: 22px;
    }

    .home-category-strip {
        grid-auto-columns: 132px;
    }

    .home-game-grid,
    .home-game-grid-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .home-game-body {
        padding: 9px;
    }

    .home-game-name {
        font-size: 14px;
    }

    .home-ranking-item {
        grid-template-columns: 28px 46px minmax(0, 1fr) auto;
    }

    .home-ranking-item strong {
        grid-column: 4;
    }

    .home-tabbar {
        position: relative;
        z-index: 60;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
        min-height: 60px;
        padding: 7px;
        border: 1px solid var(--home-line);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
        backdrop-filter: blur(16px);
    }

    .home-tabbar a,
    .home-tabbar button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 44px;
        padding: 0 4px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: var(--home-muted);
        font: inherit;
        font-size: 11px;
        font-weight: 900;
        text-decoration: none;
    }

    .home-tabbar a:first-child {
        background: rgba(20, 184, 166, 0.12);
        color: #0f766e;
    }

    .home-tabbar button:disabled {
        opacity: 0.48;
    }
}

/* Neon Arcade homepage redesign */
body.mobileVersion:has(#home-page) {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 8%, rgba(34, 211, 238, 0.22), transparent 26%),
        radial-gradient(circle at 86% 18%, rgba(244, 114, 182, 0.2), transparent 24%),
        linear-gradient(180deg, #050816 0%, #0b1024 48%, #111827 100%) !important;
    color: #f8fbff;
}

body.mobileVersion:has(#home-page) .q3dppPisdqD1gwCqXrlY {
    background: transparent !important;
    color: #9fb4d0;
}

body.mobileVersion:has(#home-page) .q3dppPisdqD1gwCqXrlY::before {
    background: transparent !important;
}

.home-page {
    --home-style-label: "Neon Arcade";
    --home-arcade-bg: #050816;
    --home-arcade-panel: rgba(13, 18, 39, 0.9);
    --home-arcade-panel-strong: rgba(20, 28, 61, 0.96);
    --home-ink: #f8fbff;
    --home-muted: #9fb4d0;
    --home-line: rgba(125, 211, 252, 0.26);
    --home-teal: #22d3ee;
    --home-blue: #38bdf8;
    --home-amber: #fbbf24;
    --home-neon-cyan: #22d3ee;
    --home-neon-magenta: #f472b6;
    --home-neon-lime: #a3e635;
    --home-panel: rgba(15, 23, 42, 0.86);
    position: relative;
    width: min(1220px, calc(100% - 32px)) !important;
    padding-top: 18px !important;
    color: var(--home-ink);
}

.home-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(125, 211, 252, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 211, 252, 0.06) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 78%);
    z-index: -1;
}

.home-topbar {
    min-height: 70px;
    padding: 12px 14px;
    border: 1px solid rgba(125, 211, 252, 0.28);
    border-radius: 8px;
    background: rgba(5, 8, 22, 0.82);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(244, 114, 182, 0.08);
    backdrop-filter: blur(18px);
}

.home-brand {
    gap: 10px;
    color: #ffffff;
    text-shadow: 0 0 18px rgba(34, 211, 238, 0.44);
}

.home-brand-mark {
    background: linear-gradient(135deg, var(--home-neon-cyan), var(--home-neon-magenta));
    color: #050816;
    box-shadow: 0 0 22px rgba(34, 211, 238, 0.42);
}

.home-search-trigger,
.home-inline-search-close,
.home-section-link {
    border-color: rgba(125, 211, 252, 0.3);
    background: rgba(15, 23, 42, 0.92);
    color: var(--home-neon-cyan);
}

.home-inline-search-input {
    border-color: rgba(125, 211, 252, 0.32);
    background: rgba(2, 6, 23, 0.95);
    color: #f8fbff;
}

.home-inline-search-input::placeholder {
    color: #7f95b3;
}

.home-inline-search-input:focus {
    border-color: var(--home-neon-cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2), 0 0 28px rgba(34, 211, 238, 0.14);
}

.home-inline-search-results {
    border-color: rgba(125, 211, 252, 0.26);
    background: rgba(8, 13, 31, 0.98);
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.42);
}

.home-inline-search-result {
    color: #f8fbff;
}

.home-inline-search-result:hover,
.home-inline-search-result:focus {
    background: rgba(34, 211, 238, 0.12);
}

.home-inline-search-result span,
.home-inline-search-empty {
    color: var(--home-muted);
}

.home-shell {
    gap: 24px;
    margin-top: 20px;
}

.home-ad-slot {
    border: 1px dashed rgba(125, 211, 252, 0.38);
    background: rgba(8, 13, 31, 0.72);
    color: #9fb4d0;
    box-shadow: inset 0 0 0 1px rgba(244, 114, 182, 0.08), 0 14px 34px rgba(0, 0, 0, 0.24);
}

.home-unified-banner-ad {
    margin-top: 24px;
}

.home-anchor-ad {
    position: fixed;
    left: 50%;
    bottom: max(0px, env(safe-area-inset-bottom));
    width: 320px;
    max-width: calc(100vw - 24px);
    height: 50px;
    min-height: 50px;
    margin: 0;
    transform: translateX(-50%);
    z-index: 100004;
    border-color: rgba(251, 191, 36, 0.44);
    background: rgba(5, 8, 22, 0.94);
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.38), 0 0 24px rgba(251, 191, 36, 0.14);
}

.home-hero {
    position: relative !important;
    min-height: 360px !important;
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, 0.34) !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #050816 0%, #101642 46%, #0f766e 100%) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36), inset 0 0 0 1px rgba(244, 114, 182, 0.14) !important;
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -46% 26%;
    height: 210px;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.24), transparent);
    transform: rotate(-8deg);
    pointer-events: none;
}

.home-hero-slides {
    min-height: 360px;
}

.home-hero-slide {
    grid-template-columns: minmax(0, 1fr) minmax(210px, 300px);
    gap: 34px;
    padding: 34px 38px;
    transform: translateX(22px) scale(0.98);
}

.home-hero-slide.is-active {
    transform: translateX(0) scale(1);
}

.home-kicker,
.home-section-kicker {
    border: 1px solid rgba(34, 211, 238, 0.34);
    background: rgba(34, 211, 238, 0.12);
    color: var(--home-neon-cyan);
    text-shadow: 0 0 14px rgba(34, 211, 238, 0.34);
}

.home-hero .home-kicker {
    background: rgba(244, 114, 182, 0.14);
    border-color: rgba(244, 114, 182, 0.44);
    color: #fbcfe8;
}

.home-hero h1 {
    max-width: 620px;
    margin: 14px 0 8px;
    color: #ffffff;
    font-size: 50px;
    line-height: 0.98;
    text-shadow: 0 0 28px rgba(34, 211, 238, 0.26);
}

.home-hero-tags,
.home-game-meta {
    gap: 8px;
}

.home-hero-tags span,
.home-game-meta span {
    max-width: 100%;
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, 0.2);
    background: rgba(15, 23, 42, 0.72);
    color: #c7d2fe;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-play-button,
.home-game-action {
    background: linear-gradient(135deg, var(--home-neon-magenta), #fb7185 48%, var(--home-amber));
    color: #050816;
    box-shadow: 0 12px 28px rgba(244, 114, 182, 0.26);
}

.home-secondary-button {
    border-color: rgba(125, 211, 252, 0.36);
    background: rgba(15, 23, 42, 0.42);
    color: #dff7ff;
}

.home-hero-art {
    border: 7px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background-color: #020617;
    transform: rotate(3deg);
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.42), 0 0 32px rgba(34, 211, 238, 0.18);
}

.home-hero-controls button {
    background: rgba(148, 163, 184, 0.55);
}

.home-hero-controls button.is-active {
    background: var(--home-neon-cyan);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.58);
}

.home-section,
.home-ranking-card {
    border: 1px solid rgba(125, 211, 252, 0.22);
    border-radius: 8px;
    background: rgba(8, 13, 31, 0.52);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.home-section {
    padding: 16px;
}

.home-section-header h2 {
    color: #ffffff;
    font-size: 28px;
    text-shadow: 0 0 20px rgba(244, 114, 182, 0.22);
}

.home-category-strip {
    padding: 2px 2px 10px;
}

.home-category-card {
    border-color: rgba(125, 211, 252, 0.24);
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.94), rgba(8, 13, 31, 0.94));
    color: #f8fbff;
    box-shadow: inset 0 0 0 1px rgba(244, 114, 182, 0.08), 0 12px 26px rgba(0, 0, 0, 0.2);
}

.home-category-card:hover,
.home-category-card:focus {
    border-color: var(--home-neon-cyan);
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.18), 0 14px 30px rgba(0, 0, 0, 0.28);
    transform: translateY(-2px);
}

.home-category-card img {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.12);
}

.home-game-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px !important;
}

.home-game-card {
    position: relative;
    border-color: rgba(125, 211, 252, 0.22);
    background: linear-gradient(180deg, rgba(16, 23, 49, 0.96), rgba(7, 12, 30, 0.96));
    color: #f8fbff;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.home-game-card:nth-child(even) {
    transform: translateY(8px);
}

.home-game-card:hover,
.home-game-card:focus-within {
    border-color: rgba(244, 114, 182, 0.62);
    box-shadow: 0 0 26px rgba(244, 114, 182, 0.18), 0 18px 36px rgba(0, 0, 0, 0.34);
    transform: translateY(-3px);
}

.home-game-card:nth-child(even):hover,
.home-game-card:nth-child(even):focus-within {
    transform: translateY(3px);
}

.home-game-thumb {
    background-color: #020617;
}

.home-game-thumb img {
    transition: transform 0.22s ease, filter 0.22s ease;
}

.home-game-card:hover .home-game-thumb img,
.home-game-card:focus-within .home-game-thumb img {
    filter: saturate(1.12);
    transform: scale(1.05);
}

.home-game-body {
    padding: 12px;
}

.home-game-name {
    color: #ffffff;
}

.home-game-meta {
    flex-wrap: nowrap;
}

.home-game-meta span {
    display: block;
    height: 24px;
    min-width: 0;
    max-width: calc((100% - 8px) / 2);
    line-height: 24px;
    background: rgba(34, 211, 238, 0.1);
    color: #bae6fd;
}

.home-game-action {
    min-height: 38px;
    border: 0;
}

.home-ranking-card {
    padding: 18px;
    background: linear-gradient(180deg, rgba(20, 28, 61, 0.86), rgba(8, 13, 31, 0.86));
}

.home-ranking-item {
    grid-template-columns: 30px 48px minmax(0, 1fr) auto;
    min-height: 60px;
    padding: 6px 8px;
    border: 1px solid rgba(125, 211, 252, 0.16);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.66);
    color: #f8fbff;
}

.home-ranking-number {
    background: linear-gradient(135deg, var(--home-neon-cyan), var(--home-neon-lime));
    color: #050816;
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.22);
}

.home-ranking-item img {
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.home-ranking-name {
    color: #ffffff;
}

.home-ranking-item strong {
    grid-column: 4;
    color: var(--home-amber);
}

.home-interstitial-ad {
    background: rgba(2, 6, 23, 0.72);
}

.home-tabbar {
    border-color: rgba(125, 211, 252, 0.28);
    background: rgba(5, 8, 22, 0.92);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
}

.home-tabbar a,
.home-tabbar button {
    color: #9fb4d0;
}

.home-tabbar a:first-child {
    background: rgba(34, 211, 238, 0.14);
    color: var(--home-neon-cyan);
}

@media (max-width: 980px) {
    .home-page {
        width: min(100% - 24px, 760px) !important;
    }

    .home-hero-slide {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .home-hero-art {
        max-width: 240px;
        transform: rotate(2deg);
    }

    .home-game-card:nth-child(even) {
        transform: none;
    }

    .home-game-card:nth-child(even):hover,
    .home-game-card:nth-child(even):focus-within {
        transform: translateY(-3px);
    }
}

@media (max-width: 720px) {
    .home-page {
        width: calc(100% - 20px) !important;
        padding-bottom: 32px !important;
    }

    .home-topbar {
        min-height: 60px;
        gap: 10px;
        padding: 9px;
    }

    .home-brand {
        font-size: 16px;
    }

    .home-brand-mark {
        width: 34px;
        height: 34px;
    }

    .home-search-trigger {
        min-height: 40px;
        padding: 0 12px;
    }

    .home-hero,
    .home-hero-slides {
        min-height: 430px !important;
    }

    .home-hero-slide {
        padding: 24px 20px 54px;
    }

    .home-hero h1 {
        font-size: 34px;
    }

    .home-hero-art {
        width: min(100%, 210px);
        justify-self: center;
    }

    .home-hero-actions {
        grid-template-columns: 1fr 1fr;
    }

    .home-section {
        padding: 13px;
    }

    .home-section-header {
        gap: 10px;
    }

    .home-section-header h2 {
        font-size: 22px;
    }

    .home-category-strip {
        grid-auto-columns: 132px;
    }

    .home-game-grid,
    .home-game-grid-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .home-game-body {
        padding: 9px;
    }

    .home-game-name {
        font-size: 14px;
    }

    .home-game-action {
        min-height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }

    .home-ranking-item {
        grid-template-columns: 28px 44px minmax(0, 1fr);
    }

    .home-ranking-item strong {
        grid-column: 3;
    }

    .home-tabbar {
        position: relative;
        z-index: 60;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
        min-height: 60px;
        padding: 7px;
        border-radius: 8px;
        backdrop-filter: blur(16px);
    }
}


div.thumb a img {
    width: 100%;
    aspect-ratio: 4/4;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box
}

.thumb img {
    border: none!important;
    object-fit: fill
}

/* 加载动画 */
.loading-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 游戏卡片样式 */
.game-preview {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 10px;
    padding: 15px;
    transition: transform 0.3s ease;
}

.game-preview:hover {
    transform: translateY(-5px);
}

.game-preview img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.game-preview h3 {
    margin: 10px 0;
    color: #333;
    font-size: 1.2em;
}

/* 无限滚动加载指示器 */
#scroll-sentinel {
    text-align: center;
    padding: 20px;
}

/* 错误状态样式 */
.error-state {
    color: #e74c3c;
    padding: 20px;
    text-align: center;
    background: #fdf7f7;
    border-radius: 4px;
    margin: 10px;
}

.retry-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.retry-button:hover {
    background: #2980b9;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .game-preview {
        margin: 5px;
        padding: 10px;
    }
    
    .game-preview h3 {
        font-size: 1em;
    }
}

/* 预加载状态 */
.preload {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loaded {
    opacity: 1;
}

/* 图片懒加载占位符 */
.lazy-image {
    background: #f7f7f7;
    position: relative;
}

.lazy-image::before {
    content: "";
    display: block;
    padding-top: 100%;
}

/* SEO优化相关样式 */
.noscript-content {
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    margin: 20px;
    border-radius: 4px;
}

.noscript-content h1 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.noscript-content ul {
    list-style-type: none;
    padding: 0;
}

.noscript-content li {
    margin: 10px 0;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

/* 结构化数据样式 */
.structured-data {
    display: none;
}

/* 可访问性增强 */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 主题色变量 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --text-color: #2c3e50;
    --background-color: #f8f9fa;
    --error-color: #e74c3c;
}

/* 首页改版 */
.home-page {
    --home-ink: #122033;
    --home-muted: #667085;
    --home-line: #d8e1ee;
    --home-blue: #1677ff;
    --home-green: #13b981;
    --home-amber: #f59e0b;
    --home-pink: #ef4f8f;
    width: min(1180px, calc(100% - 40px));
    display: block !important;
    margin: 0 auto;
    padding: 28px 0 42px;
    color: var(--home-ink);
    background: transparent;
}

.home-page,
.home-page * {
    box-sizing: border-box;
}

.home-hero,
.home-section {
    width: 100%;
}

.home-carousel {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    border-radius: 8px;
    background: #eef6ff;
    border: 1px solid var(--home-line);
    box-shadow: 0 16px 40px rgba(24, 39, 75, 0.12);
}

.home-carousel-track {
    position: relative;
    min-height: 360px;
}

.home-carousel-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(260px, 420px) 1fr;
    align-items: center;
    gap: 34px;
    padding: 34px 82px 34px 42px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(18px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.home-carousel-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.home-carousel-image {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(22, 119, 255, 0.16);
}

.home-carousel-image img,
.home-game-thumb img,
.home-category-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-carousel-content {
    min-width: 0;
}

.home-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(19, 185, 129, 0.14);
    color: #087a5a;
    font-size: 14px;
    font-weight: 700;
}

.home-carousel-content h2 {
    margin: 16px 0 10px;
    font-size: 42px;
    line-height: 1.08;
    letter-spacing: 0;
}

.home-carousel-content p {
    max-width: 520px;
    margin: 0 0 24px;
    color: var(--home-muted);
    font-size: 17px;
    line-height: 1.6;
}

.home-play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 8px;
    background: var(--home-blue);
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(22, 119, 255, 0.26);
}

.home-carousel-btn {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--home-ink);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    box-shadow: 0 8px 20px rgba(24, 39, 75, 0.16);
}

.home-carousel-prev {
    left: 18px;
}

.home-carousel-next {
    right: 18px;
}

.home-carousel-dots {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 3;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.home-carousel-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(18, 32, 51, 0.24);
    cursor: pointer;
}

.home-carousel-dots button.is-active {
    width: 28px;
    border-radius: 999px;
    background: var(--home-amber);
}

.home-section {
    margin-top: 34px;
}

.home-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.home-section-header h1,
.home-section-header h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: 0;
}

.home-section-header p {
    margin: 0;
    color: var(--home-muted);
    font-size: 15px;
}

.home-game-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.home-game-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 10px;
    color: var(--home-ink);
    text-decoration: none;
}

.home-game-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid var(--home-line);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-game-card:hover .home-game-thumb {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(24, 39, 75, 0.14);
}

.home-game-name {
    min-height: 40px;
    overflow: hidden;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.home-category-section {
    padding-bottom: 8px;
}

.home-category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.home-category-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 76px;
    padding: 12px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid var(--home-line);
    color: var(--home-ink);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.home-category-card:hover {
    border-color: var(--home-pink);
    transform: translateY(-2px);
}

.home-category-card img {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    border-radius: 8px;
}

.home-category-card span {
    min-width: 0;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
}

@media (max-width: 980px) {
    .home-page {
        width: min(100% - 28px, 760px);
        padding-top: 18px;
    }

    .home-carousel,
    .home-carousel-track {
        min-height: 520px;
    }

    .home-carousel-slide {
        grid-template-columns: 1fr;
        align-content: start;
        gap: 18px;
        padding: 22px 22px 68px;
    }

    .home-carousel-image {
        max-width: 320px;
        margin: 0 auto;
    }

    .home-carousel-content {
        text-align: center;
    }

    .home-eyebrow {
        justify-content: center;
    }

    .home-carousel-content h2 {
        margin-top: 12px;
        font-size: 30px;
    }

    .home-carousel-content p {
        margin-right: auto;
        margin-left: auto;
        font-size: 15px;
    }

    .home-carousel-btn {
        top: auto;
        bottom: 14px;
        transform: none;
    }

    .home-carousel-prev {
        left: 16px;
    }

    .home-carousel-next {
        right: 16px;
    }

    .home-game-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .home-page {
        width: calc(100% - 20px);
        padding-bottom: 28px;
    }

    .home-carousel,
    .home-carousel-track {
        min-height: 480px;
    }

    .home-carousel-slide {
        padding: 18px 16px 64px;
    }

    .home-carousel-image {
        max-width: 250px;
    }

    .home-carousel-content h2 {
        font-size: 24px;
    }

    .home-play-button {
        width: 100%;
    }

    .home-section {
        margin-top: 28px;
    }

    .home-section-header {
        display: block;
    }

    .home-section-header h1,
    .home-section-header h2 {
        font-size: 22px;
    }

    .home-section-header p {
        margin-top: 6px;
        font-size: 14px;
    }

    .home-game-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .home-game-name {
        font-size: 14px;
    }

    .home-category-grid {
        gap: 10px;
    }

    .home-category-card {
        min-height: 68px;
        padding: 10px;
    }

    .home-category-card img {
        width: 44px;
        height: 44px;
    }

    .home-category-card span {
        font-size: 14px;
    }
}

/* Final homepage overrides kept last so legacy imported styles cannot win. */
body.mobileVersion {
    min-height: 100vh;
    background: linear-gradient(180deg, #ecfffa 0%, #f8fafc 45%, #ffffff 100%) !important;
    color: #0f172a;
}

.mobileVersion nav#nav {
    display: none !important;
}

.home-page {
    --home-ink: #0f172a;
    --home-muted: #64748b;
    --home-line: #e5e7eb;
    --home-teal: #14b8a6;
    --home-blue: #2563eb;
    --home-amber: #f59e0b;
    --home-panel: #ffffff;
    width: min(1200px, calc(100% - 32px)) !important;
    margin: 0 auto !important;
    padding: 16px 0 48px !important;
    color: var(--home-ink);
    background: transparent !important;
}

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

.home-topbar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 64px;
    padding: 10px 14px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.home-brand,
.home-navlinks a,
.home-section-link,
.home-game-action,
.home-play-button,
.home-secondary-button,
.home-ranking-item {
    color: inherit;
    text-decoration: none;
}

.home-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-size: 19px;
    font-weight: 900;
}

.home-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--home-teal);
    color: #ffffff;
    font-size: 14px;
}

.home-navlinks {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1 1 auto;
    min-width: 0;
}

.home-navlinks a {
    color: var(--home-muted);
    font-size: 14px;
    font-weight: 800;
}

.home-search-trigger {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--home-muted);
    font-weight: 800;
    cursor: pointer;
}

.home-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    margin-top: 22px;
}

.home-shell:has(> .home-sidebar) {
    grid-template-columns: minmax(0, 1fr) 320px;
}

.home-main-column,
.home-sidebar {
    min-width: 0;
}

.home-sidebar {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 96px;
}

.home-hero {
    position: relative !important;
    min-height: 338px !important;
    overflow: hidden;
    border: 1px solid #cfe7e5 !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #0f172a 0%, #0e7490 58%, #14b8a6 100%) !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14) !important;
}

.home-hero-slides {
    min-height: 338px;
}

.home-hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 28px;
    align-items: center;
    padding: 30px 34px;
    opacity: 0;
    pointer-events: none;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transform: translateX(16px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.home-hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.home-hero-copy {
    min-width: 0;
    color: #ffffff;
}

.home-kicker,
.home-section-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.14);
    color: #087a5a;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.home-hero .home-kicker {
    background: rgba(255, 255, 255, 0.16);
    color: #d1fae5;
}

.home-hero h1 {
    max-width: 560px;
    margin: 14px 0 10px;
    color: #ffffff;
    font-size: 44px;
    line-height: 1.05;
    letter-spacing: 0;
}

.home-hero p {
    max-width: 560px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 17px;
    line-height: 1.55;
}

.home-hero-tags,
.home-game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.home-hero-tags span,
.home-game-meta span {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 24px;
    overflow: hidden;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.84);
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.home-play-button,
.home-secondary-button,
.home-game-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 900;
}

.home-play-button,
.home-game-action {
    background: var(--home-blue);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.home-secondary-button {
    border: 1px solid rgba(255, 255, 255, 0.26);
    color: #ffffff;
}

.home-hero-art {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 6px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: #ffffff;
    background-position: center;
    background-size: cover;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.home-hero-art img,
.home-game-thumb img,
.home-category-card img,
.home-ranking-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-hero-controls {
    position: absolute;
    left: 34px;
    bottom: 20px;
    z-index: 5;
    display: flex;
    gap: 8px;
}

.home-hero-controls button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.44);
    cursor: pointer;
}

.home-hero-controls button.is-active {
    width: 28px;
    background: var(--home-amber);
}

.home-section,
.home-ranking-card,
.home-ad-slot {
    margin-top: 22px;
}

.home-sidebar .home-ranking-card,
.home-sidebar .home-ad-slot {
    margin-top: 0;
}

.home-section-header {
    display: flex !important;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.home-section-header h2 {
    margin: 7px 0 0;
    color: var(--home-ink);
    font-size: 25px;
    line-height: 1.15;
    letter-spacing: 0;
}

.home-section-header-tight {
    margin-bottom: 10px;
}

.home-section-link {
    color: var(--home-blue);
    font-size: 14px;
    font-weight: 900;
}

.home-category-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(144px, 1fr);
    gap: 12px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: thin;
}

.home-category-card {
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 74px;
    padding: 11px !important;
    border: 1px solid var(--home-line);
    border-radius: 8px !important;
    background: var(--home-panel);
    color: var(--home-ink);
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.home-category-card img {
    width: 46px !important;
    height: 46px !important;
    flex: 0 0 auto;
    border-radius: 8px;
}

.home-category-card span {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
}

.home-game-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
}

.home-game-card {
    display: block !important;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    background: var(--home-panel);
    color: var(--home-ink);
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.home-game-thumb {
    display: block !important;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 0 !important;
    border-radius: 0 !important;
    background: #f1f5f9;
    background-position: center;
    background-size: cover;
}

.home-game-body {
    display: grid;
    gap: 10px;
    padding: 11px;
}

.home-game-name {
    min-height: 38px !important;
    margin: 0;
    overflow: hidden;
    color: var(--home-ink);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.25;
    text-align: left !important;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.home-game-meta {
    flex-wrap: nowrap;
    margin-top: 0;
    overflow: hidden;
}

.home-game-meta span {
    display: block;
    height: 24px;
    min-width: 0;
    max-width: calc((100% - 8px) / 2);
    line-height: 24px;
    background: #f1f5f9;
    color: var(--home-muted);
}

.home-game-action {
    width: 100%;
    min-height: 36px;
    box-shadow: none;
}

.home-ranking-card {
    padding: 16px;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    background: var(--home-panel);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.home-ranking-list {
    display: grid;
    gap: 10px;
}

.home-ranking-item {
    display: grid;
    grid-template-columns: 26px 42px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    color: var(--home-ink);
}

.home-ranking-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: #fef3c7;
    color: #92400e;
    font-size: 12px;
    font-weight: 900;
}

.home-ranking-item img {
    width: 42px;
    height: 42px;
    border-radius: 8px;
}

.home-ranking-name {
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-ranking-item strong {
    grid-column: 3;
    color: var(--home-muted);
    font-size: 12px;
    font-weight: 800;
}

.home-ad-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    min-height: 78px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--home-muted);
    text-align: center;
}

.home-anchor-ad {
    position: fixed;
    left: 50%;
    bottom: max(0px, env(safe-area-inset-bottom));
    width: 320px;
    max-width: calc(100vw - 24px);
    height: 50px;
    min-height: 50px;
    margin: 0;
    transform: translateX(-50%);
    z-index: 100004;
}

.home-top-ad {
    position: fixed;
    left: 50%;
    top: env(safe-area-inset-top);
    width: 320px;
    max-width: calc(100vw - 24px);
    height: 50px;
    min-height: 50px;
    margin: 0;
    transform: translateX(-50%);
    z-index: 100004;
}

.home-interstitial-ad {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.58);
    opacity: 0;
    pointer-events: none;
    z-index: 100005;
}

.home-interstitial-ad[hidden] {
    display: none;
}

.home-interstitial-ad.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.home-interstitial-backdrop {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.home-interstitial-panel {
    position: relative;
}

.home-interstitial-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: var(--home-ink);
    font-size: 22px;
    font-weight: 900;
    line-height: 34px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
    z-index: 1;
}

.home-interstitial-slot {
    width: 320px;
    max-width: calc(100vw - 48px);
    height: 480px;
    min-height: 480px;
    margin: 0;
    background: #ffffff;
}

.detail-banner-ad {
    width: 100%;
    max-width: none;
    min-height: 250px;
    margin: 24px 0 0;
}

.has-bottom-ad .detail-page {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
}

.has-top-ad .category-page,
.has-top-ad .detail-page {
    padding-top: calc(70px + env(safe-area-inset-top));
}

.home-ad-slot span {
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.home-ad-slot strong {
    color: var(--home-ink);
    font-size: 14px;
}

.home-ad-slot-box {
    min-height: 180px;
}

.home-tabbar {
    display: none;
}

@media (max-width: 980px) {
    .home-page {
        width: min(100% - 24px, 760px) !important;
    }

    .home-navlinks {
        display: none;
    }

    .home-shell {
        display: block;
    }

    .home-sidebar {
        position: static;
        margin-top: 22px;
    }

    .home-hero,
    .home-hero-slides {
        min-height: 520px !important;
    }

    .home-hero-slide {
        grid-template-columns: 1fr;
        align-content: start;
        gap: 18px;
        padding: 22px 22px 62px;
    }

    .home-hero-art {
        max-width: 260px;
        margin: 0 auto;
        order: -1;
    }

    .home-hero h1 {
        font-size: 34px;
    }

    .home-hero-controls {
        left: 22px;
    }

    .home-game-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 720px) {
    .home-page {
        width: calc(100% - 20px) !important;
        padding-bottom: 32px !important;
    }

    .has-bottom-ad .home-page {
        padding-bottom: 32px !important;
    }

    .home-topbar {
        min-height: 58px;
        gap: 10px;
    }

    .home-brand {
        font-size: 17px;
    }

    .home-brand-mark {
        width: 34px;
        height: 34px;
    }

    .home-search-trigger {
        margin-left: auto;
        min-height: 36px;
        padding: 0 12px;
    }

    .home-shell {
        margin-top: 16px;
    }

    .home-hero,
    .home-hero-slides {
        min-height: 440px !important;
    }

    .home-hero-slide {
        padding: 16px 16px 54px;
    }

    .home-hero-art {
        max-width: 210px;
        border-width: 4px;
    }

    .home-hero h1 {
        font-size: 28px;
    }

    .home-hero p {
        font-size: 15px;
    }

    .home-hero-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .home-section-header h2 {
        font-size: 22px;
    }

    .home-category-strip {
        grid-auto-columns: 132px;
    }

    .home-game-grid,
    .home-game-grid-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .home-game-body {
        padding: 9px;
    }

    .home-game-name {
        font-size: 14px;
    }

    .home-ranking-item {
        grid-template-columns: 28px 46px minmax(0, 1fr) auto;
    }

    .home-ranking-item strong {
        grid-column: 4;
    }

    .home-tabbar {
        position: relative;
        z-index: 60;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
        min-height: 60px;
        padding: 7px;
        border: 1px solid var(--home-line);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
        backdrop-filter: blur(16px);
    }

    .home-tabbar a,
    .home-tabbar button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 44px;
        padding: 0 4px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: var(--home-muted);
        font: inherit;
        font-size: 11px;
        font-weight: 900;
        text-decoration: none;
    }

    .home-tabbar a:first-child {
        background: rgba(20, 184, 166, 0.12);
        color: #0f766e;
    }

    .home-tabbar button:disabled {
        opacity: 0.48;
    }
}
