:root {
    --gh-bg: #090b10;
    --gh-surface: #12151e;
    --gh-surface-2: #1c212e;
    --gh-line: rgba(255, 255, 255, 0.08);
    --gh-text: #f8fafc;
    --gh-muted: #94a3b8;
    --gh-coral: #ff4d6d;
    --gh-lime: #00f5d4;
    --gh-violet: #7209b7;
    --gh-radius: 12px;
    --gh-radius-sm: 8px;
    --gh-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    --gh-glow: 0 0 20px rgba(var(--gh-accent-rgb, 124, 255, 225), 0.3);
    letter-spacing: -0.01em;
}

[data-bs-theme="light"] {
    --gh-bg: #f8fafc;
    --gh-surface: #ffffff;
    --gh-surface-2: #f1f5f9;
    --gh-line: rgba(15, 23, 42, 0.08);
    --gh-text: #0f172a;
    --gh-muted: #64748b;
    --gh-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --gh-glow: none;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--gh-bg);
    color: var(--gh-text);
    font-family: 'Plus Jakarta Sans', 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
    color: var(--gh-accent);
}

img {
    max-width: 100%;
}

.muted,
.text-muted {
    color: var(--gh-muted) !important;
}

.site-shell {
    background: rgba(9, 11, 16, 0.8);
    border-bottom: 1px solid var(--gh-line);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
}

[data-bs-theme="light"] .site-shell {
    background: rgba(255, 255, 255, 0.7);
}

.navbar {
    min-height: 72px;
}

.navbar-brand {
    color: var(--gh-text);
    font-weight: 850;
    letter-spacing: -0.03em;
}

.site-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.brand-mark,
.panel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--gh-radius-sm);
    background: var(--gh-accent);
    color: #000;
    box-shadow: var(--gh-glow);
}

.navbar-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gh-muted);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--gh-text);
}

.navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--gh-radius-sm);
}

.site-search {
    width: min(300px, 100%);
    background: var(--gh-surface-2);
    border: 1px solid var(--gh-line);
    border-radius: 999px;
    padding: 2px 4px 2px 12px;
    transition: border-color 0.2s ease;
}

.site-search:focus-within {
    border-color: var(--gh-accent);
}

.site-search .form-control {
    min-width: 0;
    color: var(--gh-text);
    background: transparent;
    border: 0;
    box-shadow: none;
    font-size: 0.9rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--gh-radius-sm);
    font-weight: 700;
    padding: 0.6rem 1.25rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-accent {
    background: var(--gh-accent);
    border-color: var(--gh-accent);
    color: #000;
    box-shadow: var(--gh-glow);
}

.btn-accent:hover {
    background: #fff;
    border-color: #fff;
    color: #000;
    transform: translateY(-1px);
}

.btn-outline-accent {
    background: transparent;
    border: 1px solid var(--gh-line);
    color: var(--gh-text);
}

.btn-outline-accent:hover {
    background: var(--gh-accent);
    border-color: var(--gh-accent);
    color: #000;
    box-shadow: var(--gh-glow);
}

.btn-icon,
.btn-ghost {
    width: 38px;
    height: 38px;
    padding: 0;
    color: var(--gh-muted);
    border: 1px solid var(--gh-line);
    background: transparent;
}

.btn-icon:hover,
.btn-ghost:hover {
    background: var(--gh-surface-2);
    color: var(--gh-text);
    border-color: var(--gh-muted);
}

.dropdown-menu {
    background: var(--gh-surface);
    border: 1px solid var(--gh-line);
    border-radius: var(--gh-radius);
    box-shadow: var(--gh-shadow);
}

.dropdown-item,
.dropdown-item-text {
    color: var(--gh-text);
}

.dropdown-item:hover {
    color: #111318;
    background: var(--gh-accent);
}

.main-content {
    min-height: 68vh;
}

.catalog-heading,
.detail-hero,
.page-heading,
.not-found {
    padding: 80px 0 48px;
    background: radial-gradient(circle at 10% 20%, rgba(var(--gh-accent-rgb, 124, 255, 225), 0.05) 0%, transparent 40%), var(--gh-bg);
    border-bottom: 1px solid var(--gh-line);
}

.catalog-heading h1,
.detail-copy h1,
.page-heading h1,
.empty-state h1 {
    max-width: 900px;
    margin: 0;
    color: var(--gh-text);
    font-size: 3.5rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--gh-accent);
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.lead {
    max-width: 760px;
    color: var(--gh-muted);
    font-size: 1.15rem;
    line-height: 1.6;
}

.catalog-search {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 60px;
    padding: 8px 10px 8px 20px;
    background: var(--gh-surface);
    border: 1px solid var(--gh-line);
    border-radius: var(--gh-radius);
    box-shadow: var(--gh-shadow);
}

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

.game-card {
    position: relative;
    overflow: hidden;
    color: var(--gh-text);
    background: var(--gh-surface);
    border: 1px solid var(--gh-line);
    border-radius: var(--gh-radius);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: rgba(var(--gh-accent-rgb, 124, 255, 225), 0.4);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), var(--gh-glow);
}

.game-cover,
.detail-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--gh-surface-2);
}

.game-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.game-card-body {
    padding: 20px;
}

.game-tax {
    margin-bottom: 8px;
    color: var(--gh-accent);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.game-card-title {
    margin-bottom: 12px;
    line-height: 1.25;
    font-weight: 850;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.game-card-text {
    margin-bottom: 20px;
    color: var(--gh-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-facts span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--gh-line);
    border-radius: var(--gh-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.card-footer {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--gh-line);
    font-size: 0.85rem;
}

.detail-cover {
    border: 1px solid var(--gh-line);
    border-radius: var(--gh-radius);
    box-shadow: var(--gh-shadow);
}

.detail-copy {
    display: grid;
    gap: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--gh-muted);
}

.detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.content-panel,
.comments-panel,
.respond-panel,
.download-panel,
.side-panel {
    background: var(--gh-surface);
    border: 1px solid var(--gh-line);
    border-radius: var(--gh-radius);
    box-shadow: var(--gh-shadow);
}

.content-panel,
.comments-panel,
.respond-panel {
    padding: 40px;
}

.post-content {
    color: var(--gh-text);
    line-height: 1.8;
    font-size: 1.05rem;
}

.post-content h2,
.post-content h3 {
    margin: 2.5rem 0 1.25rem;
    font-weight: 850;
    letter-spacing: -0.02em;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.side-panel {
    padding: 24px;
}

.panel-heading h2 {
    font-size: 1.2rem;
    font-weight: 850;
    letter-spacing: -0.02em;
    margin: 0;
}

.side-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--gh-line);
}

.tag-cloud a {
    display: inline-flex;
    padding: 6px 14px;
    color: var(--gh-muted);
    background: var(--gh-surface-2);
    border: 1px solid var(--gh-line);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tag-cloud a:hover {
    color: var(--gh-text);
    border-color: var(--gh-accent);
    background: rgba(var(--gh-accent-rgb, 124, 255, 225), 0.1);
}

.comment-list li {
    padding: 24px 0;
    border-bottom: 1px solid var(--gh-line);
}

.comment-author {
    font-weight: 800;
    color: var(--gh-text);
    font-size: 1.1rem;
}

.comment-meta {
    font-size: 0.85rem;
    color: var(--gh-muted);
    margin-bottom: 8px;
}

.comment-content {
    color: var(--gh-text);
    opacity: 0.9;
    line-height: 1.6;
}

.pagination-wrap li a,
.pagination-wrap li span,
.page-navigator a,
.page-navigator span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 16px;
    color: var(--gh-muted);
    background: var(--gh-surface);
    border: 1px solid var(--gh-line);
    border-radius: var(--gh-radius-sm);
    font-weight: 700;
    transition: all 0.2s ease;
}

.pagination-wrap li a:hover,
.page-navigator a:hover {
    color: var(--gh-text);
    border-color: var(--gh-muted);
}

.pagination-wrap li.current span,
.page-navigator .current span {
    color: #000;
    background: var(--gh-accent);
    border-color: var(--gh-accent);
    box-shadow: var(--gh-glow);
}

.empty-state {
    padding: 58px 24px;
    background: var(--gh-surface);
    border: 1px solid var(--gh-line);
    border-radius: var(--gh-radius);
}

.empty-state h2 {
    font-weight: 850;
}

.empty-state p {
    color: var(--gh-muted);
}

.site-footer {
    padding: 32px 0;
    background: var(--gh-surface);
    border-top: 1px solid var(--gh-line);
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 850;
}

.footer-brand i {
    color: var(--gh-accent);
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
}

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

.footer-links a:hover {
    color: var(--gh-accent);
}

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

@media (max-width: 991.98px) {
    .site-search {
        width: 100%;
        margin: 12px 0;
    }

    .nav-actions {
        justify-content: flex-start;
        padding-bottom: 12px;
    }

    .catalog-heading h1,
    .detail-copy h1,
    .page-heading h1,
    .empty-state h1 {
        font-size: 2.15rem;
    }

    .sticky-aside {
        position: static;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .catalog-heading,
    .detail-hero,
    .page-heading,
    .not-found {
        padding: 42px 0 28px;
    }

    .game-grid {
        grid-template-columns: 1fr;
    }

    .content-panel,
    .comments-panel,
    .respond-panel {
        padding: 20px;
    }

    .catalog-search {
        grid-template-columns: auto 1fr;
    }

    .catalog-search button {
        grid-column: 1 / -1;
        width: 100%;
    }
}
