body {
    background: var(--bg);
    color: var(--text);
}

.page-banner {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 32px 24px;
}

.page-banner-inner {
    max-width: var(--w);
    margin: 0 auto;
}

.page-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.page-kicker .kicker-line {
    width: 24px;
    height: 2px;
    background: var(--gold);
    flex-shrink: 0;
}

.page-kicker span {
    font-size: 11px;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.page-banner h1 {
    font-size: 28px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 6px;
}

.page-banner h1 em {
    color: var(--gold);
    font-style: normal;
}

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

.content-area {
    max-width: var(--w);
    margin: 0 auto;
    padding: 32px 24px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 20px;
    transition: opacity 0.2s;
}

.back-link:hover {
    opacity: 0.7;
}

.load-more-wrap {
    text-align: center;
    padding: 32px 0 0;
}

.load-more-btn {
    display: inline-block;
    padding: 12px 36px;
    background: transparent;
    border: 2px solid rgba(245, 200, 66, 0.3);
    border-radius: 6px;
    color: var(--gold);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.load-more-btn:hover {
    background: rgba(245, 200, 66, 0.08);
    border-color: var(--gold);
}

.load-more-btn.hidden {
    display: none;
}

.results-count {
    font-size: 13px;
    color: var(--muted);
}

/* ── category ── */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.cat-card {
    background: var(--bg3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s;
    cursor: pointer;
}

.cat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 200, 66, 0.35);
}

.cat-card .cat-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    text-transform: capitalize;
}

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

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

/* ── search ── */
.search-wrap {
    max-width: var(--w);
    margin: 0 auto;
    padding: 24px 24px 0;
}

.search-input-row {
    display: flex;
    max-width: 560px;
}

.search-input-row input {
    flex: 1;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(245, 200, 66, 0.2);
    border-right: none;
    border-radius: 6px 0 0 6px;
    padding: 0 16px;
    color: #fff;
    font-size: 14px;
}

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

.search-input-row input:focus {
    outline: none;
    border-color: var(--gold);
}

.search-input-row button {
    height: 44px;
    padding: 0 24px;
    background: var(--gold);
    border-radius: 0 6px 6px 0;
    color: #111;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    transition: background 0.2s;
}

.search-input-row button:hover {
    background: var(--gold2);
}

.results-wrap {
    max-width: var(--w);
    margin: 0 auto;
    padding: 28px 24px;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.results-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-title .accent {
    width: 3px;
    height: 18px;
    background: var(--gold);
    border-radius: 2px;
}

.results-title h2 {
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nodata {
    display: none;
    text-align: center;
    padding: 80px 20px;
    color: var(--muted);
}

.nodata h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text2);
    margin-bottom: 8px;
}

.nodata p {
    font-size: 14px;
}

/* ── detail ── */
.detail-wrap {
    max-width: var(--w);
    margin: 0 auto;
    padding: 32px 24px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}

.game-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #111;
    position: relative;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

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

.game-preview .play-btn-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: background 0.2s;
}

.game-preview .play-btn-overlay:hover {
    background: rgba(0, 0, 0, 0.35);
}

.play-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 32px rgba(245, 200, 66, 0.5);
    transition: transform 0.2s;
}

.play-btn-overlay:hover .play-circle {
    transform: scale(1.08);
}

.play-circle svg {
    width: 32px;
    height: 32px;
    fill: #111;
    margin-left: 4px;
}

.play-btn-overlay span {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
}

.game-meta {
    margin-bottom: 24px;
}

.game-title {
    font-size: 26px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 10px;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.game-tag {
    padding: 4px 12px;
    border-radius: 4px;
    background: rgba(245, 200, 66, 0.1);
    border: 1px solid rgba(245, 200, 66, 0.2);
    color: var(--gold);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.game-tag:hover {
    background: rgba(245, 200, 66, 0.2);
}

.game-desc {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.8;
}

.game-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.info-item {
    background: var(--bg3);
    border-radius: 8px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-item .info-label {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.info-item .info-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.share-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.share-btn {
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text2);
    transition: all 0.2s;
}

.share-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(245, 200, 66, 0.08);
}

.detail-sidebar .sidebar-sec {
    margin-bottom: 28px;
}

.detail-sidebar .sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.detail-sidebar .sec-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-sidebar .sec-title .accent {
    width: 3px;
    height: 16px;
    background: var(--gold);
    border-radius: 2px;
}

.detail-sidebar .sec-title h3 {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── play ── */
.play-layout {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 96px);
    min-height: 500px;
}

.play-topbar {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.play-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.play-back {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.play-back:hover {
    opacity: 0.7;
}

.play-game-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.play-game-cat {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}

.play-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.play-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text2);
    transition: all 0.2s;
    white-space: nowrap;
}

.play-action-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(245, 200, 66, 0.08);
}

.play-action-btn.primary {
    background: var(--gold);
    color: #111;
    border-color: var(--gold);
}

.play-action-btn.primary:hover {
    background: var(--gold2);
}

.game-frame-wrap {
    flex: 1;
    position: relative;
    background: #000;
    overflow: hidden;
}

.game-frame-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.frame-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #000;
    z-index: 10;
}

.frame-loading .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(245, 200, 66, 0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.frame-loading span {
    font-size: 14px;
    color: var(--muted);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.related-strip {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 16px 20px;
    flex-shrink: 0;
}

.related-strip-inner {
    max-width: var(--w);
    margin: 0 auto;
}

.related-strip h3 {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.related-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.related-row::-webkit-scrollbar {
    display: none;
}

.related-mini {
    flex-shrink: 0;
    width: 100px;
    text-decoration: none;
    display: block;
}

.related-mini .rm-thumb {
    width: 100px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    background: #222;
    margin-bottom: 5px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.2s;
}

.related-mini:hover .rm-thumb {
    border-color: rgba(245, 200, 66, 0.3);
}

.related-mini .rm-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-mini .rm-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── responsive ── */
@media (max-width: 1024px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 769px) {
    .page-banner {
        padding: 24px 16px;
    }

    .content-area {
        padding: 24px 16px;
    }

    .search-wrap {
        padding: 20px 16px 0;
    }

    .results-wrap {
        padding: 20px 16px;
    }

    .detail-wrap {
        padding: 20px 16px;
    }

    .cat-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

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

    .play-layout {
        height: calc(100vh - 56px);
    }

    .play-topbar {
        padding: 8px 12px;
        flex-direction: column;
    }

    .related-strip {
        padding: 12px 16px;
    }
}