:root {
    --gh-bg: #0a0e17;
    --gh-bg-secondary: #10151f;
    --gh-card-bg: #141a26;
    --gh-primary: #3b82f6;
    --gh-primary-dark: #2563eb;
    --gh-accent: #60a5fa;
    --gh-green: #22c55e;
    --gh-text: #e8eaf0;
    --gh-text-muted: #8b93a7;
    --gh-border: #232b3d;
}

body {
    background-color: var(--gh-bg);
    color: var(--gh-text);
    font-family: 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.gh-main { flex: 1; }

/* Navbar */
.gh-navbar {
    background: var(--gh-bg-secondary);
    border-bottom: 1px solid var(--gh-border);
}

.gh-brand {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--gh-text) !important;
}

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

.navbar-nav .nav-link {
    color: var(--gh-text-muted) !important;
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover { color: var(--gh-primary) !important; }

.gh-search-input {
    background-color: var(--gh-bg) !important;
    border: 1px solid var(--gh-border) !important;
    color: var(--gh-text) !important;
}

.gh-btn-accent {
    background: var(--gh-primary);
    border: none;
    color: white;
    font-weight: 600;
}

.gh-btn-accent:hover { background: var(--gh-primary-dark); color: white; }

.btn-outline-light {
    border-color: var(--gh-border);
}
.btn-outline-light:hover {
    background-color: var(--gh-bg-secondary);
    border-color: var(--gh-primary);
    color: var(--gh-text);
}

/* ===== Hero (Home) ===== */
.gh-hero-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.15);
    color: var(--gh-accent);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.gh-hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.15;
}

.gh-hero-number { color: var(--gh-primary); }

.gh-stat-box {
    background-color: var(--gh-card-bg);
    border: 1px solid var(--gh-border);
    border-radius: 10px;
    padding: 1.2rem;
    text-align: center;
}

.gh-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gh-primary);
}

.gh-stat-label {
    font-size: 0.85rem;
    color: var(--gh-text-muted);
}

/* ===== Game Cards ===== */
.gh-card {
    background-color: var(--gh-card-bg);
    border: 1px solid var(--gh-border);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.gh-card:hover {
    transform: translateY(-4px);
    border-color: var(--gh-primary);
}

.gh-card-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.gh-card-body { padding: 0.75rem; }

.gh-card-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--gh-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gh-badge {
    background-color: var(--gh-bg);
    color: var(--gh-accent);
    border: 1px solid var(--gh-border);
    font-size: 0.72rem;
    padding: 0.25rem 0.55rem;
    border-radius: 20px;
}

.gh-price { font-weight: 700; color: var(--gh-accent); }
.gh-price-free { color: var(--gh-green); }

.gh-fav-btn {
    background: rgba(0,0,0,0.55);
    border: none;
    color: var(--gh-text-muted);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gh-fav-btn.active, .gh-fav-btn:hover { color: #f43f5e; }

/* ===== Game Details Hero ===== */
.gh-detail-hero {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    min-height: 420px;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
    margin-bottom: 1.5rem;
}

.gh-detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,14,23,0.1) 0%, rgba(10,14,23,0.95) 90%);
}

.gh-detail-hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
}

.gh-detail-title {
    font-size: 2.4rem;
    font-weight: 800;
}

.gh-pill-steam {
    background: var(--gh-primary);
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
}

.gh-pill-free {
    background: var(--gh-green);
    color: #06280f;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
}

.gh-pill-price {
    background: var(--gh-card-bg);
    border: 1px solid var(--gh-border);
    color: var(--gh-text);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
}

/* Info panel / requirements / stat blocks */
.gh-filter-panel, .gh-info-panel {
    background-color: var(--gh-card-bg);
    border: 1px solid var(--gh-border);
    border-radius: 12px;
    padding: 1.2rem;
}

.gh-info-block {
    background-color: var(--gh-bg);
    border: 1px solid var(--gh-border);
    border-radius: 10px;
    padding: 0.9rem;
    text-align: center;
}

.gh-info-block-label { font-size: 0.75rem; color: var(--gh-text-muted); }
.gh-info-block-value { font-weight: 700; font-size: 1.05rem; }

.form-select, .form-control {
    background-color: var(--gh-bg) !important;
    color: var(--gh-text) !important;
    border: 1px solid var(--gh-border) !important;
}
.form-select:focus, .form-control:focus {
    border-color: var(--gh-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25) !important;
}

.gh-footer {
    background-color: var(--gh-bg-secondary);
    border-top: 1px solid var(--gh-border);
    color: var(--gh-text-muted);
    font-size: 0.85rem;
}

/* ===== Compact Card Grid Overrides ===== */
.gh-card-body { padding: 0.6rem; }

.gh-card-title {
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.gh-card-img { aspect-ratio: 3 / 4; }

.gh-price { font-size: 0.8rem; }
.gh-badge { font-size: 0.65rem; padding: 0.2rem 0.45rem; }

/* ===== Games List Header Bar ===== */
.gh-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--gh-card-bg);
    border: 1px solid var(--gh-border);
    border-radius: 10px;
    padding: 0.7rem 1rem;
    margin-bottom: 1.2rem;
}

.gh-filter-btn {
    background-color: var(--gh-bg);
    border: 1px solid var(--gh-border);
    color: var(--gh-text);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
}
.gh-filter-btn:hover { border-color: var(--gh-primary); color: var(--gh-text); }

.gh-view-toggle {
    background-color: var(--gh-bg);
    border: 1px solid var(--gh-border);
    border-radius: 8px;
    overflow: hidden;
}
.gh-view-toggle button {
    background: transparent;
    border: none;
    color: var(--gh-text-muted);
    padding: 0.4rem 0.7rem;
}
.gh-view-toggle button.active { background: var(--gh-primary); color: white; }

/* ===== Filters Sidebar ===== */
.gh-sidebar {
    background-color: var(--gh-card-bg);
    border: 1px solid var(--gh-border);
    border-radius: 12px;
    padding: 1.2rem;
    position: sticky;
    top: 80px;
}

.gh-sidebar-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gh-filter-group { margin-bottom: 1.2rem; }

.gh-filter-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gh-text-muted);
    margin-bottom: 0.5rem;
    display: block;
}

.gh-clear-filters {
    font-size: 0.78rem;
    color: var(--gh-accent);
    text-decoration: none;
}
.gh-clear-filters:hover { color: var(--gh-primary); }

/* ===== Smaller Game Cards Override ===== */
.gh-card-body { padding: 0.5rem; }
.gh-card-title { font-size: 0.8rem; }
.gh-price { font-size: 0.75rem; }
.gh-badge { font-size: 0.62rem; padding: 0.15rem 0.4rem; }
.gh-fav-btn { width: 28px; height: 28px; }
.gh-fav-btn i { font-size: 0.75rem; }

/* ===== Compatibility Card ===== */
.gh-compat-card {
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--gh-border);
}
.gh-compat-can-run { background: rgba(34, 197, 94, 0.12); border-color: #22c55e; }
.gh-compat-maybe { background: rgba(234, 179, 8, 0.12); border-color: #eab308; }
.gh-compat-cannot-run { background: rgba(239, 68, 68, 0.12); border-color: #ef4444; }
.gh-compat-unknown { background: rgba(139, 147, 167, 0.12); border-color: var(--gh-border); }

/* ===== Profile Icon (square, navbar) ===== */
.gh-profile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: var(--gh-bg);
    border: 1px solid var(--gh-border);
    overflow: hidden;
    color: var(--gh-text-muted);
}
.gh-profile-icon:hover { border-color: var(--gh-primary); }
.gh-profile-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gh-profile-menu { min-width: 220px; }

/* ===== Collection Cards ===== */
.gh-collection-card {
    background-color: var(--gh-card-bg);
    border: 1px solid var(--gh-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.gh-collection-card:hover { transform: translateY(-4px); border-color: var(--gh-primary); }

.gh-collection-poster {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background-color: var(--gh-bg);
}

.gh-collection-poster-fallback {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background-color: var(--gh-border);
}
.gh-collection-poster-fallback img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gh-like-btn {
    background: transparent;
    border: 1px solid var(--gh-border);
    color: var(--gh-text-muted);
    border-radius: 20px;
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
}
.gh-like-btn.liked { background: rgba(239, 68, 68, 0.15); border-color: #ef4444; color: #ef4444; }
.gh-like-btn:hover { border-color: #ef4444; }

/* ===== Real Portrait Poster Ratio (Steam library capsule 600x900 = 2:3) ===== */
#gamesGrid .gh-card-img,
.row .gh-card-img {
    aspect-ratio: 2 / 3;
}

/* ===== Collapsible Filter Sidebar (hover to expand) ===== */
.gh-sidebar-col {
    position: relative;
    transition: max-width 0.25s ease, flex 0.25s ease;
}

@media (min-width: 992px) {
    .gh-sidebar-collapsed {
        width: 56px;
        overflow: hidden;
        transition: width 0.25s ease;
        position: relative;
        cursor: pointer;
    }
    .gh-sidebar-collapsed::before {
        content: "\f0b0";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        position: absolute;
        top: 1.2rem;
        left: 1.2rem;
        color: var(--gh-text-muted);
        font-size: 1.1rem;
    }
    .gh-sidebar-collapsed:hover {
        width: 260px;
        z-index: 20;
        box-shadow: 10px 0 30px rgba(0,0,0,0.4);
    }
    .gh-sidebar-collapsed > * {
        opacity: 0;
        transition: opacity 0.15s ease;
        white-space: nowrap;
    }
    .gh-sidebar-collapsed:hover > * {
        opacity: 1;
        transition: opacity 0.2s ease 0.1s;
    }
}

/* ===== Trending (Home) ===== */
.gh-trending-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
}
.gh-trending-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,14,23,0) 40%, rgba(10,14,23,0.95) 100%);
}
.gh-trending-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 2;
    padding: 1.2rem;
}
.gh-trending-badge {
    background: #ef4444;
    color: white;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* ===== Screenshot Strip (horizontal scroll) ===== */
.gh-screenshot-strip {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}
.gh-screenshot-thumb {
    height: 140px;
    width: auto;
    border-radius: 8px;
    border: 1px solid var(--gh-border);
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}
.gh-screenshot-thumb:hover { transform: scale(1.03); border-color: var(--gh-primary); }

/* ===== Trailer Thumbnail (lightbox trigger) ===== */
.gh-trailer-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    border: 1px solid var(--gh-border);
    cursor: pointer;
    overflow: hidden;
}
.gh-trailer-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    transition: background 0.15s ease;
}
.gh-trailer-thumb:hover::after { background: rgba(0,0,0,0.5); }
.gh-trailer-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 70px; height: 70px;
    background: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    z-index: 2;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}

/* ===== Search Autocomplete ===== */
.gh-search-wrapper { position: relative; }
.gh-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 380px;
    max-height: 400px;
    overflow-y: auto;
    background-color: var(--gh-card-bg);
    border: 1px solid var(--gh-border);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
}
.gh-search-results.show { display: block; }
.gh-search-result-item {
    display: flex;
    gap: 0.7rem;
    padding: 0.6rem 0.8rem;
    text-decoration: none;
    color: var(--gh-text);
    border-bottom: 1px solid var(--gh-border);
}
.gh-search-result-item:last-child { border-bottom: none; }
.gh-search-result-item:hover { background-color: var(--gh-bg); }
.gh-search-result-item img {
    width: 40px; height: 55px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.gh-search-result-title { font-weight: 600; font-size: 0.85rem; }
.gh-search-result-desc {
    font-size: 0.72rem;
    color: var(--gh-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
