/* ============================================================
   STEAM MANIFEST - MAIN STYLESHEET
   Dark Theme inspired by Steam
   ============================================================ */

/* CSS Variables */
:root {
    --bg-primary:      #0a0e1a;
    --bg-secondary:    #0f1526;
    --bg-card:         #131929;
    --bg-card-hover:   #1a2035;
    --bg-elevated:     #1e2740;
    --bg-input:        #0d1120;
    
    --border-color:    rgba(99,179,237,0.1);
    --border-hover:    rgba(99,179,237,0.3);
    
    --text-primary:    #e8eaf0;
    --text-secondary:  #8892a4;
    --text-muted:      #5a6478;
    
    --accent-blue:     #4f9cf9;
    --accent-blue-dark:#1565c0;
    --accent-cyan:     #22d3ee;
    --accent-green:    #4ade80;
    --accent-orange:   #fb923c;
    --accent-red:      #f87171;
    --accent-purple:   #a78bfa;
    
    --gradient-blue:   linear-gradient(135deg, #1565c0 0%, #4f9cf9 100%);
    --gradient-hero:   linear-gradient(135deg, #0a0e1a 0%, #0f1f3d 50%, #0a0e1a 100%);
    --gradient-card:   linear-gradient(145deg, #131929 0%, #0f1526 100%);
    
    --shadow-card:     0 4px 20px rgba(0,0,0,0.4);
    --shadow-elevated: 0 8px 40px rgba(0,0,0,0.6);
    --shadow-glow:     0 0 20px rgba(79,156,249,0.2);
    --shadow-glow-lg:  0 0 40px rgba(79,156,249,0.3);
    
    --radius-sm:       6px;
    --radius-md:       10px;
    --radius-lg:       16px;
    --radius-xl:       24px;
    
    --transition:      all 0.25s cubic-bezier(0.4,0,0.2,1);
    --transition-slow: all 0.4s cubic-bezier(0.4,0,0.2,1);
    
    --font-sans:       'Inter', system-ui, -apple-system, sans-serif;
    --font-mono:       'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================================
   BASE
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

::selection {
    background: var(--accent-blue);
    color: white;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent-blue-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

/* ============================================================
   NAVBAR
   ============================================================ */

#mainNav {
    background: rgba(9, 13, 26, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    transition: var(--transition);
    z-index: 1030;
}

#mainNav.scrolled {
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.brand-icon {
    width: 36px; height: 36px;
    background: var(--gradient-blue);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: white;
    box-shadow: 0 0 15px rgba(79,156,249,0.3);
}

.brand-text {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 6px 14px !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex; align-items: center;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--text-primary) !important;
    background: rgba(79,156,249,0.1);
}

.nav-search-form {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.nav-search-input .form-control {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.875rem;
    height: 38px;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
    transition: var(--transition);
}

.nav-search-input .form-control:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(79,156,249,0.15);
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-search-input .form-control::placeholder { color: var(--text-muted); }
.nav-search-input .btn { height: 38px; }

/* ============================================================
   SEARCH AUTOCOMPLETE
   ============================================================ */

.search-autocomplete {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    max-height: 380px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    box-shadow: var(--shadow-elevated);
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.autocomplete-item:hover { background: var(--bg-elevated); }
.autocomplete-item:last-child { border-bottom: none; }

.autocomplete-item img {
    width: 56px; height: 26px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--bg-elevated);
    flex-shrink: 0;
}

.autocomplete-item .item-info .item-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.autocomplete-item .item-info .item-appid {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ============================================================
   LOADING OVERLAY
   ============================================================ */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,14,26,0.85);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero-section {
    background: var(--gradient-hero);
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 60% at 20% 40%, rgba(21, 101, 192, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 80% 20%, rgba(34, 211, 238, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--bg-primary));
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(79,156,249,0.1);
    border: 1px solid rgba(79,156,249,0.25);
    color: var(--accent-blue);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    animation: fadeInDown 0.6s ease;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-title .highlight {
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-search-wrapper {
    max-width: 640px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(19,25,41,0.9);
    border: 1px solid rgba(79,156,249,0.2);
    border-radius: var(--radius-xl);
    padding: 6px 6px 6px 20px;
    box-shadow: var(--shadow-glow);
    transition: var(--transition);
}

.hero-search-box:focus-within {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-glow-lg), 0 0 0 3px rgba(79,156,249,0.1);
}

.hero-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-sans);
}

.hero-search-box input::placeholder { color: var(--text-muted); }

.hero-search-btn {
    background: var(--gradient-blue);
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex; align-items: center; gap: 8px;
    white-space: nowrap;
}

.hero-search-btn:hover {
    box-shadow: 0 4px 20px rgba(79,156,249,0.4);
    transform: translateY(-1px);
}

.hero-search-autocomplete {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    max-height: 400px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    box-shadow: var(--shadow-elevated);
}

.hero-stats-row {
    display: flex;
    gap: 30px;
    margin-top: 40px;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.hero-divider {
    width: 1px;
    background: var(--border-color);
    margin: 0 5px;
}

/* ============================================================
   CARDS
   ============================================================ */

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.game-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    transform: translateY(-4px);
}

.game-card-img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    background: var(--bg-elevated);
    display: block;
}

.game-card-img-placeholder {
    width: 100%; height: 130px;
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-secondary));
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
}

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

.game-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-card-appid {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-blue);
    display: flex; align-items: center; gap: 4px;
}

.game-card-meta {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.game-meta-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 500;
    display: flex; align-items: center; gap: 4px;
}

.badge-depots {
    background: rgba(79,156,249,0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(79,156,249,0.2);
}

.badge-manifests {
    background: rgba(74,222,128,0.1);
    color: var(--accent-green);
    border: 1px solid rgba(74,222,128,0.2);
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title-icon {
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
}

.icon-blue   { background: rgba(79,156,249,0.15); color: var(--accent-blue); }
.icon-green  { background: rgba(74,222,128,0.15); color: var(--accent-green); }
.icon-orange { background: rgba(251,146,60,0.15); color: var(--accent-orange); }
.icon-purple { background: rgba(167,139,250,0.15); color: var(--accent-purple); }
.icon-cyan   { background: rgba(34,211,238,0.15); color: var(--accent-cyan); }

.section-view-all {
    color: var(--accent-blue);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    display: flex; align-items: center; gap: 4px;
    transition: var(--transition);
}

.section-view-all:hover { color: var(--accent-cyan); }

/* ============================================================
   STAT CARDS
   ============================================================ */

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
}

.stat-card.blue::before  { background: var(--gradient-blue); }
.stat-card.green::before { background: linear-gradient(90deg, #22c55e, #4ade80); }
.stat-card.orange::before{ background: linear-gradient(90deg, #ea580c, #fb923c); }
.stat-card.purple::before{ background: linear-gradient(90deg, #7c3aed, #a78bfa); }

.stat-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card);
    transform: translateY(-2px);
}

.stat-card-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    display: block;
}

.stat-card-value {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
    margin-bottom: 6px;
}

.stat-card-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   FORM CONTROLS
   ============================================================ */

.form-control, .form-select {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    transition: var(--transition);
    font-family: var(--font-sans);
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 3px rgba(79,156,249,0.15) !important;
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

.form-control::placeholder { color: var(--text-muted) !important; }
.form-select option { background: var(--bg-card); color: var(--text-primary); }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn { border-radius: var(--radius-sm) !important; font-weight: 500; transition: var(--transition); }

.btn-primary {
    background: var(--gradient-blue) !important;
    border: none !important;
    box-shadow: 0 2px 10px rgba(79,156,249,0.25);
}
.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(79,156,249,0.4) !important;
    transform: translateY(-1px);
}

.btn-outline-primary {
    border-color: var(--accent-blue) !important;
    color: var(--accent-blue) !important;
}
.btn-outline-primary:hover {
    background: var(--accent-blue) !important;
    color: white !important;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.btn-ghost:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-copy {
    background: rgba(79,156,249,0.1);
    border: 1px solid rgba(79,156,249,0.2);
    color: var(--accent-blue);
    font-size: 0.8rem;
    padding: 4px 10px;
    display: inline-flex; align-items: center; gap: 4px;
}
.btn-copy:hover {
    background: rgba(79,156,249,0.2);
    color: white;
}

.btn-success { background: linear-gradient(135deg,#16a34a,#4ade80) !important; border: none !important; }
.btn-danger  { background: linear-gradient(135deg,#dc2626,#f87171) !important; border: none !important; }
.btn-warning { background: linear-gradient(135deg,#d97706,#fb923c) !important; border: none !important; }

/* ============================================================
   CODE / MONO DISPLAY
   ============================================================ */

.code-block {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-cyan);
    white-space: pre-wrap;
    word-break: break-all;
    position: relative;
    max-height: 400px;
    overflow-y: auto;
}

.mono-text {
    font-family: var(--font-mono);
    color: var(--accent-cyan);
}

.manifest-id-badge {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: rgba(34,211,238,0.1);
    border: 1px solid rgba(34,211,238,0.2);
    color: var(--accent-cyan);
    padding: 4px 10px;
    border-radius: 4px;
    word-break: break-all;
    display: inline-block;
}

/* ============================================================
   DETAIL PAGE
   ============================================================ */

.detail-hero {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

.detail-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 100% at 0% 50%, rgba(21,101,192,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.game-header-img {
    width: 100%;
    max-width: 460px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-elevated);
    border: 1px solid var(--border-color);
}

.game-logo {
    max-height: 80px;
    width: auto;
    object-fit: contain;
}

.detail-title {
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.detail-appid {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-blue);
    background: rgba(79,156,249,0.1);
    border: 1px solid rgba(79,156,249,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-flex; align-items: center; gap: 6px;
}

.detail-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.detail-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.detail-meta-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

/* ============================================================
   DEPOT TABLE
   ============================================================ */

.depot-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.depot-table-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table-dark-custom {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--border-color);
    --bs-table-striped-bg: rgba(255,255,255,0.02);
    --bs-table-hover-bg: var(--bg-elevated);
    color: var(--text-primary);
    margin-bottom: 0;
}

.table-dark-custom th {
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-color: var(--border-color);
    padding: 14px 16px;
    font-weight: 600;
}

.table-dark-custom td {
    padding: 14px 16px;
    border-color: var(--border-color);
    vertical-align: middle;
    font-size: 0.875rem;
}

.table-dark-custom tr:hover td { background: var(--bg-elevated) !important; }

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.page-link {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 14px;
    transition: var(--transition);
}

.page-link:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.page-item.active .page-link {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

.page-item.disabled .page-link {
    background: var(--bg-input);
    color: var(--text-muted);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

.toast-custom {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    box-shadow: var(--shadow-elevated);
}

.toast-custom.toast-success { border-left: 3px solid var(--accent-green); }
.toast-custom.toast-error   { border-left: 3px solid var(--accent-red); }
.toast-custom.toast-info    { border-left: 3px solid var(--accent-blue); }
.toast-custom.toast-warning { border-left: 3px solid var(--accent-orange); }

/* ============================================================
   SEARCH PAGE
   ============================================================ */

.search-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 32px 0;
}

.search-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.results-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.results-count strong {
    color: var(--text-primary);
    font-weight: 700;
}

.search-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============================================================
   ADMIN PANEL
   ============================================================ */

.admin-sidebar {
    width: 250px;
    min-height: calc(100vh - 60px);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 24px 0;
    flex-shrink: 0;
}

.admin-sidebar-logo {
    padding: 0 20px 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.admin-nav-item:hover, .admin-nav-item.active {
    background: rgba(79,156,249,0.1);
    color: var(--text-primary);
    border-left: 2px solid var(--accent-blue);
}

.admin-nav-item i { font-size: 1rem; width: 20px; text-align: center; }

.admin-nav-section {
    padding: 16px 20px 8px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}

.admin-content {
    flex: 1;
    padding: 32px;
    background: var(--bg-primary);
    min-height: calc(100vh - 60px);
    overflow-x: auto;
}

.admin-topbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* ============================================================
   MANIFEST DISPLAY
   ============================================================ */

.manifest-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: var(--transition);
}

.manifest-row:hover {
    border-color: var(--border-hover);
    background: var(--bg-elevated);
}

/* ============================================================
   LUA GENERATOR
   ============================================================ */

.lua-preview {
    background: #0d1117;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.8;
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
    color: #c9d1d9;
}

.lua-comment { color: #6e7681; }
.lua-keyword { color: #ff7b72; }
.lua-string  { color: #a5d6ff; }
.lua-number  { color: #79c0ff; }

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-top { }
.footer-bottom { border-top: 1px solid var(--border-color); }

.footer-heading {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-links li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    transition: var(--transition);
}

.footer-links li a:hover { color: var(--accent-blue); }
.footer-links li a i { font-size: 0.65rem; }

/* ============================================================
   BADGES & CHIPS
   ============================================================ */

.badge-appid {
    background: rgba(79,156,249,0.1);
    border: 1px solid rgba(79,156,249,0.2);
    color: var(--accent-blue);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.chip-blue   { background: rgba(79,156,249,0.1); color: var(--accent-blue); border: 1px solid rgba(79,156,249,0.2); }
.chip-green  { background: rgba(74,222,128,0.1); color: var(--accent-green); border: 1px solid rgba(74,222,128,0.2); }
.chip-orange { background: rgba(251,146,60,0.1); color: var(--accent-orange); border: 1px solid rgba(251,146,60,0.2); }
.chip-red    { background: rgba(248,113,113,0.1); color: var(--accent-red); border: 1px solid rgba(248,113,113,0.2); }
.chip-purple { background: rgba(167,139,250,0.1); color: var(--accent-purple); border: 1px solid rgba(167,139,250,0.2); }
.chip-cyan   { background: rgba(34,211,238,0.1); color: var(--accent-cyan); border: 1px solid rgba(34,211,238,0.2); }

/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 0.875rem;
    max-width: 400px;
    margin: 0 auto 20px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79,156,249,0); }
    50%       { box-shadow: 0 0 0 8px rgba(79,156,249,0.1); }
}

.animate-fade-in { animation: fadeIn 0.5s ease; }
.animate-fade-in-up { animation: fadeInUp 0.5s ease; }

.skeleton {
    background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-card) 50%, var(--bg-elevated) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* ============================================================
   ALERT / FLASH MESSAGES
   ============================================================ */

.alert-dark-custom {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-md);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 992px) {
    .admin-sidebar { width: 200px; }
    .hero-section { padding: 70px 0 60px; }
    .hero-stats-row { gap: 20px; }
}

@media (max-width: 768px) {
    .hero-section { padding: 50px 0 40px; }
    .hero-title { font-size: 1.8rem; }
    .hero-search-btn span { display: none; }
    .hero-stats-row { flex-wrap: wrap; gap: 16px; }
    .hero-stat-value { font-size: 1.4rem; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; min-height: auto; }
    .admin-content { padding: 20px; }
    .detail-hero { padding: 24px 0; }
    .nav-search-form { display: none; }
    .detail-actions { flex-direction: column; }
}

@media (max-width: 576px) {
    .game-card-img, .game-card-img-placeholder { height: 100px; }
    .section-title { font-size: 1.1rem; }
    .stat-card-value { font-size: 1.75rem; }
}

/* ============================================================
   SEARCH RESULT LIST VIEW
   ============================================================ */

.search-result-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
    text-decoration: none;
    transition: var(--transition);
}

.search-result-item:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card);
    transform: translateX(4px);
    background: var(--bg-elevated);
}

.search-result-img {
    width: 92px;
    height: 44px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    flex-shrink: 0;
}

.search-result-body {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.search-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* ============================================================
   MISC UTILITIES
   ============================================================ */

.text-gradient {
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-card { background: var(--bg-card) !important; }
.border-custom { border-color: var(--border-color) !important; }
.text-primary-custom { color: var(--text-primary) !important; }
.text-secondary-custom { color: var(--text-secondary) !important; }
.text-muted-custom { color: var(--text-muted) !important; }

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}

.info-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.info-row:last-child { border-bottom: none; }

.info-row-label {
    width: 140px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    flex-shrink: 0;
}

.info-row-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
}

/* ============================================================
   AUTOCOMPLETE ITEMS
   ============================================================ */

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.autocomplete-item:last-child { border-bottom: none; }

.autocomplete-item:hover {
    background: var(--bg-elevated);
}

.autocomplete-item img {
    width: 60px;
    height: 28px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.item-info { flex: 1; min-width: 0; }
.item-name { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-appid { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }

/* ============================================================
   MANIFEST ROW (Depots in generate page)
   ============================================================ */

.manifest-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.manifest-row:last-child { border-bottom: none; }

/* ============================================================
   HERO BADGE
   ============================================================ */

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(74,222,128,0.1);
    border: 1px solid rgba(74,222,128,0.25);
    color: var(--accent-green);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* ============================================================
   BTN SUCCESS (Bootstrap override)
   ============================================================ */

.btn-success {
    background: linear-gradient(135deg, #16a34a, #4ade80) !important;
    border: none !important;
    color: #0a0e1a !important;
    font-weight: 700 !important;
    transition: var(--transition) !important;
}

.btn-success:hover {
    box-shadow: 0 4px 20px rgba(74,222,128,0.4) !important;
    transform: translateY(-1px) !important;
    color: #000 !important;
}

/* ============================================================
   BTN DANGER
   ============================================================ */

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #f87171) !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
}
