/* ==========================================================================
   STEAM STORE AUTHENTIC DESIGN SYSTEM & STYLESHEET
   ========================================================================== */

:root {
    /* Steam Official Color Palette */
    --steam-header-bg: #171a21;
    --steam-bg-dark: #0f1823;
    --steam-bg-gradient-start: #1b2838;
    --steam-bg-gradient-end: #101822;
    --steam-blue-dark: #16202d;
    --steam-blue-medium: #2a475e;
    --steam-blue-light: #66c0f4;
    --steam-blue-hover: #417a9b;
    --steam-green: #5c7e10;
    --steam-green-hover: #799e1c;
    --steam-green-bright: #a4d007;
    --steam-text-muted: #8f98a0;
    --steam-text-normal: #c7d5e0;
    --steam-text-bright: #ffffff;
    --steam-border: rgba(102, 192, 244, 0.2);
    --steam-card-bg: rgba(22, 32, 45, 0.85);
    --steam-card-hover: rgba(42, 71, 94, 0.65);
    --steam-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    
    /* Layout Constants */
    --max-width: 1240px;
    --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Outfit', system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at 50% 0%, var(--steam-bg-gradient-start) 0%, var(--steam-bg-gradient-end) 60%, #0c1219 100%);
    color: var(--steam-text-normal);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    overflow-x: hidden;
}

/* ==========================================================================
   1. STEAM GLOBAL HEADER
   ========================================================================== */
.steam-global-header {
    background-color: var(--steam-header-bg);
    height: 104px;
    width: 100%;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.6);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    width: 100%;
    max-width: var(--max-width);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.steam-logo img {
    height: 44px;
    transition: filter var(--transition-fast);
}

.steam-logo:hover img {
    filter: brightness(1.2);
}

.steam-nav {
    display: flex;
    gap: 24px;
}

.nav-item {
    color: #b8b6b4;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    position: relative;
    padding: 6px 0;
    transition: color var(--transition-fast);
}

.nav-item:hover, .nav-item.active {
    color: var(--steam-text-bright);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--steam-blue-light);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--steam-blue-light);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.install-steam-btn {
    background-color: var(--steam-green);
    color: var(--steam-text-bright);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.install-steam-btn:hover {
    background-color: var(--steam-green-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(92, 126, 16, 0.4);
}

.user-profile-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 12px 4px 6px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.avatar-box {
    background: linear-gradient(135deg, #66c0f4, #1b2838);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.user-nickname {
    color: #e5e5e5;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ==========================================================================
   2. STORE CONTAINER & SUB-NAVIGATION
   ========================================================================== */
.store-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 20px 60px 20px;
    flex: 1;
}

.store-subnav {
    background: linear-gradient(90deg, rgba(42, 71, 94, 0.8) 0%, rgba(27, 40, 56, 0.9) 100%);
    border: 1px solid rgba(102, 192, 244, 0.25);
    border-radius: 4px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    margin-bottom: 24px;
}

.subnav-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.subnav-link {
    color: var(--steam-text-normal);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 3px;
    transition: all var(--transition-fast);
}

.subnav-link:hover, .subnav-link.active {
    background: rgba(102, 192, 244, 0.2);
    color: var(--steam-text-bright);
}

.subnav-search {
    display: flex;
    align-items: center;
    background: #316282;
    border-radius: 3px;
    padding: 2px;
    border: 1px solid rgba(0, 0, 0, 0.3);
    min-width: 280px;
}

.subnav-search input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    padding: 6px 12px;
    font-size: 0.85rem;
    width: 100%;
}

.subnav-search input::placeholder {
    color: #000000;
    opacity: 0.6;
    font-style: italic;
}

.search-submit-btn {
    background: #67c1f5;
    border: none;
    color: #1b2838;
    padding: 6px 10px;
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.search-submit-btn:hover {
    background: #8de1ff;
}

/* ==========================================================================
   3. HERO BANNER
   ========================================================================== */
.store-hero-banner {
    position: relative;
    background: linear-gradient(135deg, rgba(22, 32, 45, 0.9) 0%, rgba(42, 71, 94, 0.6) 100%);
    border: 1px solid rgba(102, 192, 244, 0.3);
    border-radius: 8px;
    padding: 36px 40px;
    margin-bottom: 32px;
    overflow: hidden;
    box-shadow: var(--steam-shadow);
}

.hero-bg-glow {
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(102, 192, 244, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-tag {
    color: var(--steam-blue-light);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
}

.hero-content h1 {
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    color: var(--steam-text-normal);
    font-size: 1.05rem;
    max-width: 760px;
    margin-bottom: 24px;
}

.hero-content strong {
    color: var(--steam-blue-light);
}

/* Quick presets bar */
.quick-presets {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.preset-label {
    font-size: 0.85rem;
    color: var(--steam-text-muted);
    font-weight: 600;
    margin-right: 4px;
}

.preset-btn {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(102, 192, 244, 0.3);
    color: var(--steam-text-normal);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.preset-btn:hover {
    background: rgba(102, 192, 244, 0.15);
    border-color: var(--steam-blue-light);
    color: #ffffff;
    transform: translateY(-1px);
}

.preset-btn.active {
    background: linear-gradient(90deg, #66c0f4, #417a9b);
    color: #171a21;
    font-weight: 700;
    border-color: #66c0f4;
    box-shadow: 0 0 12px rgba(102, 192, 244, 0.4);
}

/* ==========================================================================
   4. LAYOUT & SIDEBAR
   ========================================================================== */
.store-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    align-items: start;
}

.store-sidebar {
    position: sticky;
    top: 124px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-block {
    background: rgba(23, 26, 33, 0.9);
    border: 1px solid rgba(42, 71, 94, 0.4);
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.sidebar-title {
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
    border-bottom: 2px solid var(--steam-blue-light);
    padding-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-subtitle {
    font-size: 0.8rem;
    color: var(--steam-text-muted);
    margin-bottom: 14px;
}

/* Players Filter List */
.players-filter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.player-filter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.player-filter-item:hover {
    background: rgba(102, 192, 244, 0.1);
    border-color: rgba(102, 192, 244, 0.3);
}

.player-filter-item.checked {
    background: rgba(42, 71, 94, 0.5);
    border-color: var(--steam-blue-light);
}

.player-info-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-avatar-mini {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: linear-gradient(135deg, #316282, #1b2838);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.player-filter-item.checked .player-avatar-mini {
    background: linear-gradient(135deg, #5c7e10, #316282);
    box-shadow: 0 0 8px rgba(92, 126, 16, 0.6);
}

.player-name-text {
    display: flex;
    flex-direction: column;
}

.player-name-main {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
}

.player-name-id {
    color: var(--steam-text-muted);
    font-size: 0.75rem;
}

.steam-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    border: 2px solid #556772;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.player-filter-item.checked .steam-checkbox {
    background: #66c0f4;
    border-color: #66c0f4;
}

.player-filter-item.checked .steam-checkbox::after {
    content: '✓';
    color: #171a21;
    font-weight: 800;
    font-size: 0.8rem;
}

.sidebar-actions {
    display: flex;
    gap: 8px;
}

.sidebar-btn-mini {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--steam-text-normal);
    padding: 6px;
    border-radius: 3px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sidebar-btn-mini:hover {
    background: rgba(102, 192, 244, 0.2);
    color: #fff;
    border-color: var(--steam-blue-light);
}

/* Radio Group */
.filter-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.filter-radio-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}

.filter-radio-item:hover {
    background: rgba(42, 71, 94, 0.3);
}

.filter-radio-item input[type="radio"] {
    display: none;
}

.radio-mark {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #556772;
    background: rgba(0, 0, 0, 0.4);
    margin-top: 2px;
    flex-shrink: 0;
    position: relative;
    transition: all var(--transition-fast);
}

.filter-radio-item input[type="radio"]:checked + .radio-mark {
    border-color: #66c0f4;
    background: #66c0f4;
}

.filter-radio-item input[type="radio"]:checked + .radio-mark::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 6px;
    height: 6px;
    background: #171a21;
    border-radius: 50%;
}

.radio-label-text {
    display: flex;
    flex-direction: column;
}

.radio-label-text strong {
    color: #ffffff;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.radio-label-text span {
    color: var(--steam-text-muted);
    font-size: 0.75rem;
    line-height: 1.3;
}

/* Stats Box */
.stats-summary-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
}

.stats-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stats-row span:first-child {
    color: var(--steam-text-muted);
}

.stats-row span:last-child {
    color: #ffffff;
    font-weight: 700;
}

/* Tip Box */
.steam-tip-box {
    background: linear-gradient(135deg, rgba(42, 71, 94, 0.4) 0%, rgba(23, 26, 33, 0.8) 100%);
    border-color: rgba(102, 192, 244, 0.3);
}

.tip-header {
    color: var(--steam-blue-light);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.steam-tip-box p {
    font-size: 0.82rem;
    color: #c7d5e0;
    line-height: 1.4;
}

/* ==========================================================================
   5. MAIN GAMES COLUMN & CARDS
   ========================================================================== */
.results-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(22, 32, 45, 0.9);
    border: 1px solid rgba(102, 192, 244, 0.25);
    border-radius: 4px;
    padding: 12px 18px;
    margin-bottom: 20px;
}

.results-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.results-count-badge {
    background: var(--steam-blue-medium);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 3px;
    border: 1px solid rgba(102, 192, 244, 0.4);
}

.active-filters-text {
    color: var(--steam-text-muted);
    font-size: 0.85rem;
}

.sorting-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sorting-controls label {
    font-size: 0.85rem;
    color: var(--steam-text-muted);
}

.steam-dropdown {
    background: #171a21;
    border: 1px solid #316282;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

.steam-dropdown:focus {
    border-color: #66c0f4;
}

/* Games Grid */
.games-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Game Card Item */
.game-card {
    display: grid;
    grid-template-columns: 200px 1fr 280px;
    background: var(--steam-card-bg);
    border: 1px solid rgba(42, 71, 94, 0.35);
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
}

.game-card:hover {
    background: var(--steam-card-hover);
    border-color: var(--steam-blue-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(102, 192, 244, 0.15);
}

/* Left Capsule Area */
.game-card-capsule {
    background: linear-gradient(135deg, #1b2838 0%, #0f1822 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 16px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.capsule-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.08;
    background: repeating-linear-gradient(45deg, #66c0f4, #66c0f4 10px, transparent 10px, transparent 20px);
    pointer-events: none;
}

.game-capsule-icon {
    font-size: 2rem;
    margin-bottom: 6px;
    z-index: 1;
}

.game-capsule-title {
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    z-index: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.steam-store-link-hint {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--steam-blue-light);
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.8;
    z-index: 1;
}

.game-card:hover .steam-store-link-hint {
    opacity: 1;
    text-decoration: underline;
}

/* Middle Game Info Area */
.game-card-info {
    padding: 18px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.game-card-title {
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 10px;
    transition: color var(--transition-fast);
}

.game-card:hover .game-card-title {
    color: #66c0f4;
}

.game-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.meta-badge {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--steam-text-normal);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-badge.hours-badge {
    background: rgba(102, 192, 244, 0.15);
    border-color: rgba(102, 192, 244, 0.4);
    color: #8de1ff;
}

.meta-badge.owners-count-badge {
    background: rgba(92, 126, 16, 0.25);
    border-color: rgba(92, 126, 16, 0.6);
    color: #b5e833;
}

/* Right Owners Status Area */
.game-card-owners {
    background: rgba(15, 24, 35, 0.6);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.owners-list-title {
    font-size: 0.75rem;
    color: var(--steam-text-muted);
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.owner-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.82rem;
    transition: background var(--transition-fast);
}

.owner-pill.has-game {
    background: rgba(92, 126, 16, 0.2);
    border: 1px solid rgba(92, 126, 16, 0.5);
    color: #ffffff;
}

.owner-pill.no-game {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #636b72;
}

.owner-pill-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.owner-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.has-game .owner-dot {
    background: #799e1c;
    box-shadow: 0 0 6px #799e1c;
}

.no-game .owner-dot {
    background: #4a5158;
}

.owner-hours {
    font-size: 0.78rem;
    font-weight: 700;
    color: #8de1ff;
}

.no-game .owner-hours {
    color: #555d64;
    font-weight: 400;
    font-size: 0.75rem;
}

/* Empty / No Results State */
.empty-state {
    padding: 60px 40px;
    text-align: center;
    background: rgba(22, 32, 45, 0.6);
    border: 2px dashed rgba(102, 192, 244, 0.3);
    border-radius: 8px;
    color: var(--steam-text-muted);
}

.empty-state h3 {
    color: #ffffff;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.empty-state p {
    max-width: 500px;
    margin: 0 auto 20px auto;
}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
.steam-global-footer {
    background: #171a21;
    border-top: 1px solid #2a475e;
    padding: 30px 20px 40px 20px;
    margin-top: auto;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
}

.footer-bottom {
    display: flex;
    align-items: center;
    gap: 30px;
}

.valve-logo {
    height: 26px;
    opacity: 0.7;
}

.footer-legal p {
    font-size: 0.78rem;
    color: #8f98a0;
    line-height: 1.4;
}

/* ==========================================================================
   7. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
    .store-layout {
        grid-template-columns: 1fr;
    }
    
    .store-sidebar {
        position: relative;
        top: 0;
        grid-row: 1; /* Put filters above on mobile/tablet */
    }

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

    .game-card-owners {
        grid-column: 1 / -1;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 8px;
    }
}

@media (max-width: 640px) {
    .game-card {
        grid-template-columns: 1fr;
    }

    .game-card-capsule {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 20px;
    }

    .header-inner {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    .steam-global-header {
        height: auto;
        position: relative;
    }

    .store-hero-banner {
        padding: 24px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }
}
