/* Player Easy visual system: graphite surfaces, metallic gold, electric blue. */
:root {
  --bg-deep: #03070d;
  --bg-primary: #080d14;
  --bg-secondary: #0d141f;
  --bg-tertiary: #151f2c;
  --bg-elevated: #1b2736;
  --bg-input: #080e17;
  --bg-hover: rgba(36, 134, 255, 0.10);
  --text-primary: #f7f3e8;
  --text-secondary: #c7cfdb;
  --text-tertiary: #8d9aab;
  --text-muted: #5f6b7b;
  --text-inverse: #080b10;
  --gold: #dda83b;
  --gold-light: #ffd477;
  --gold-dark: #a86f12;
  --gold-glow: rgba(221, 168, 59, 0.24);
  --gold-border: rgba(221, 168, 59, 0.42);
  --gold-border-light: rgba(221, 168, 59, 0.16);
  --blue: #2b88ff;
  --blue-light: #76b6ff;
  --blue-border: rgba(43, 136, 255, 0.30);
  --positive: #3fc995;
  --negative: #f05d64;
  --warning: #f5b942;
  --info: #4ca3ff;
  --sidebar-width: 248px;
  --content-padding: 30px;
  --card-radius: 6px;
  --button-radius: 4px;
  --panel-radius: 8px;
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.48);
  --shadow-gold: 0 8px 22px rgba(221, 168, 59, 0.20);
}

body {
  background-color: var(--bg-deep);
  background-position: center;
  color: var(--text-secondary);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(2, 6, 12, 0.22);
}

::selection { background: rgba(221, 168, 59, 0.30); color: #fff; }
::-webkit-scrollbar-track { background: #080d14; }
::-webkit-scrollbar-thumb { background: #2b3543; border: 1px solid #111a25; }
::-webkit-scrollbar-thumb:hover { background: #3a4657; }

h1, h2, h3 { letter-spacing: 0; }
h2 { font-size: 26px; }

input,
select,
textarea {
  min-height: 40px;
  background-color: var(--bg-input);
  border-color: #293545;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

input:hover,
select:hover,
textarea:hover { border-color: #3b4a5d; }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(43,136,255,0.12);
}

.btn-primary,
.game-card .buy-btn {
  background: var(--gold);
  background-image: none;
  border: 1px solid var(--gold-light);
  color: var(--text-inverse);
  box-shadow: 0 2px 0 rgba(0,0,0,0.28);
}

.btn-primary:hover:not(:disabled),
.game-card .buy-btn:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

.btn-secondary {
  background: #111a26;
  border-color: #344256;
  color: var(--text-secondary);
}

.btn-secondary:hover:not(:disabled) {
  color: var(--gold-light);
  border-color: var(--gold);
  background: #172232;
}

.btn-danger { background: #c9444b; border: 1px solid #f06a70; }
.text-gold { color: var(--gold-light); }

/* Application shell */
#sidebar {
  background: rgba(4, 9, 16, 0.97);
  border-right: 1px solid rgba(221,168,59,0.22);
  box-shadow: 12px 0 36px rgba(0,0,0,0.32);
}

#content { background: rgba(3, 8, 15, 0.30); }
#content-inner { max-width: 1480px; margin: 0 auto; }

.sidebar-brand {
  min-height: 72px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(221,168,59,0.16);
  background: #070d15;
}

.sidebar-brand .brand-logo { width: 38px; height: 38px; }
.sidebar-brand .brand-text { font-size: 17px; color: #fff8e8; }
.sidebar-brand .brand-text span { color: var(--gold-light); }
.sidebar-nav { padding: 14px 10px; }
.sidebar-nav .nav-section { margin-bottom: 16px; }
.sidebar-nav .nav-section-label { color: #627084; padding: 8px 12px 6px; }

.sidebar-nav .nav-item {
  min-height: 42px;
  margin-bottom: 3px;
  border: 1px solid transparent;
  color: #99a6b7;
}

.sidebar-nav .nav-item:hover {
  color: #e8edf5;
  background: #111b29;
  border-color: rgba(43,136,255,0.16);
}

.sidebar-nav .nav-item.active {
  padding-left: 9px;
  color: #fff7e5;
  background: #172131;
  background-image: none;
  border-color: rgba(221,168,59,0.22);
  border-left: 3px solid var(--gold);
  box-shadow: inset 3px 0 12px rgba(221,168,59,0.06);
}

.sidebar-nav .nav-item .nav-icon { color: var(--blue-light); }
.sidebar-nav .nav-item.active .nav-icon { color: var(--gold-light); }
.sidebar-nav .nav-item .nav-badge { background: var(--blue); color: #fff; border-radius: 8px; }
.sidebar-footer { padding: 14px; background: #070d15; border-color: rgba(221,168,59,0.16); }
.sidebar-user .user-avatar { background: var(--bg-elevated); border: 1px solid var(--gold-border); }
.sidebar-user .user-balance { color: var(--gold-light); }

/* Page structure */
.section-header {
  margin-bottom: 20px;
  padding: 0 0 14px 14px;
  border-bottom: 1px solid rgba(221,168,59,0.16);
  border-left: 3px solid var(--gold);
}

.section-header h2 { color: #fff8e8; }
.section-header .subtitle { color: #8492a4; }

.card,
.stat-card,
.game-card,
.studio-card,
.concept-card,
.market-card,
.lib-card,
.lib-list-item,
.friend-item,
.order-book,
.trade-form,
.portfolio-section,
.recent-trades,
.game-detail .detail-sidebar,
.cart-summary,
.friends-steam-layout,
.voice-panel {
  background: #0d141f;
  border-color: #263243;
}

.card,
.stat-card,
.studio-card,
.concept-card,
.market-card,
.lib-card,
.friend-item {
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
}

.card:hover,
.game-card:hover,
.studio-card:hover,
.concept-card:hover,
.market-card:hover,
.lib-card:hover,
.friend-item:hover {
  border-color: var(--gold-border);
  box-shadow: 0 14px 34px rgba(0,0,0,0.36);
}

.stat-cards { gap: 12px; }
.stat-card {
  min-height: 96px;
  padding: 16px 18px;
  text-align: left;
  border-top: 2px solid #344358;
}

.stat-card.gold { border-top-color: var(--gold); }
.stat-card.positive { border-top-color: var(--positive); }
.stat-card.negative { border-top-color: var(--negative); }
.stat-card .stat-value { font-size: 24px; letter-spacing: 0; }
.stat-card .stat-label { color: #768497; }

table { background: #0b121c; border: 1px solid #253142; }
thead { background: #131d2a; }
thead th { color: #9aa7b8; border-color: #303d50; }
tbody td { border-color: rgba(141,154,171,0.10); }
tbody tr:hover td { background: rgba(43,136,255,0.07); }

/* Store, market and library */
.store-filters,
.lib-toolbar {
  padding: 12px;
  background: rgba(8,14,23,0.92);
  border: 1px solid #263243;
  border-radius: var(--card-radius);
}

.game-grid,
.market-grid,
.lib-grid { gap: 16px; }

.game-card { background: #0d141f; }
.game-card .game-cover,
.market-card-header,
.lib-card-cover { border-bottom: 1px solid rgba(255,255,255,0.06); }
.game-card .game-cover .supply-badge { background: #060a10; border: 1px solid #364255; border-radius: 4px; }
.game-card .game-meta .genre-tag,
.game-detail .detail-tags .tag { background: #182333; color: #aeb8c6; border: 1px solid #2b394b; border-radius: 3px; }
.game-card .game-rating { color: var(--blue-light); }
.supply-bar { background: #202b39; }
.supply-bar .supply-filled { background: var(--blue); }
.game-detail .detail-cover { background-color: #0b121c; border-color: #2c394b; }
.game-detail .detail-sidebar { border-top: 2px solid var(--gold); }
.game-detail .detail-sidebar .supply-info { color: var(--blue-light); }
.cart-summary { border-top: 2px solid var(--gold); }

.market-tab {
  border: 1px solid transparent;
  border-radius: 4px;
}
.market-tab:hover { background: #151f2c; border-color: #2d3a4c; }
.market-tab.active { background: var(--gold); color: var(--text-inverse); border-color: var(--gold-light); }
.market-card { border-top: 2px solid rgba(43,136,255,0.38); }
.market-card:hover { border-top-color: var(--gold); }
.market-card-price { color: var(--gold-light); }
.market-card-seller { border-color: rgba(141,154,171,0.12); }
.market-discount-badge { background: var(--positive); border-radius: 3px; }
.market-sell-estimate { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin:4px 0 14px; }
.market-sell-estimate > div { min-width:0; padding:8px 10px; background:#0a111a; border:1px solid #293748; border-radius:3px; }
.market-sell-estimate span,.market-sell-estimate b { display:block; }
.market-sell-estimate span { color:#748196; font-size:9px; }
.market-sell-estimate b { color:#c6cfda; font-family:var(--font-mono); font-size:11px; }
.market-sell-estimate .net { border-color:rgba(63,201,149,.36); background:rgba(63,201,149,.07); }
.market-sell-estimate .net b { color:var(--positive); }

.lib-nav-btn.active { background: #1a2635; border-color: #36465a; color: #fff; }
.lib-view-toggle { background: #080e17; border: 1px solid #2c394b; }
.lib-view-toggle button.active { background: var(--blue); color: #fff; }
.lib-card { border-top: 2px solid #2d3b4e; }
.lib-card:hover { border-top-color: var(--gold); }
.lib-play-btn { background: var(--gold); color: var(--text-inverse); border: 1px solid var(--gold-light); }
.lib-play-btn:hover { background: var(--gold-light); box-shadow: var(--shadow-gold); }
.lib-card-overlay { background: rgba(4,8,14,0.91); }

/* Trading */
.trading-header {
  padding: 12px;
  background: rgba(8,14,23,0.94);
  border: 1px solid #263243;
  border-radius: var(--card-radius);
}
.trading-header .timeframe-btns,
.kline-panel-header > div { padding: 2px; background: #070d15; border: 1px solid #273446; border-radius: 4px; }
.trading-header .timeframe-btns button,
.kline-tf-btn { background: transparent; border-color: transparent; }
.trading-header .timeframe-btns button.active,
.kline-tf-btn.active,
.kline-tf-btn:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.kline-container { background: #070c13; border-color: #2a3749; }
.kline-panel-header { background: #111a27; border-color: #2b384a; }
.order-book .ob-header,
.recent-trades .rt-header { background: #131d2a; border-color: #2b384a; }
.order-book .ob-mid { background: #0a111b; border-color: #293648; }
.trade-form { border-top: 2px solid var(--gold); }
.trade-form .form-tabs { padding: 3px; background: #080e17; border-radius: 4px; }
.trade-form .form-tabs button { border-radius: 3px; }

/* Creator and friends */
.studio-card { border-top: 2px solid rgba(43,136,255,0.45); }
.studio-card:hover { border-top-color: var(--gold); }
.studio-card .studio-badge,
.concept-votes .trial-btn { background: #172231; border: 1px solid #2c3a4d; border-radius: 3px; }
.concept-card { border-left: 2px solid rgba(43,136,255,0.38); }
.concept-votes .vote-btn { border-radius: 50%; background: #0a1019; }

.friends-steam-layout { box-shadow: var(--shadow-md); }
.friends-list-panel { background: #070c13; border-color: #293648; }
.friends-list-panel h5 { background: #070c13; color: #718095; }
.friend-list-item:hover,
.friend-list-item.selected { background: #152131; }
.friend-list-item.selected { border-left-color: var(--gold); }
.friend-chat-panel { background: #0d141f; }
.friend-chat-header { background: #111a27; border-color: #293648; }
.friend-search-results { background: #121c29; border-color: #35455a; box-shadow: var(--shadow-lg); }
.request-item { background: #151f2c; border: 1px solid #2a3748; }
.voice-panel { border-top: 2px solid var(--gold); }

/* Dialogs and status surfaces */
.modal-overlay { background: rgba(1,4,8,0.84); backdrop-filter: none; -webkit-backdrop-filter: none; }
.modal { background: #0c131e; border-color: rgba(221,168,59,0.50); box-shadow: var(--shadow-lg); }
.modal h2 { padding-bottom: 16px; border-bottom: 1px solid #293648; }
.modal .modal-close { border-radius: 4px; }
.toast { background: #111a26; border-color: #3a495d; border-left: 3px solid var(--blue); }
.toast.success { border-left-color: var(--positive); }
.toast.error { border-left-color: var(--negative); }
.launch-overlay { background: rgba(2,6,12,0.97); backdrop-filter: none; -webkit-backdrop-filter: none; }
.launch-progress-fill { background: var(--gold); }

/* Wallet */
.wallet-loading,
.wallet-empty-ledger {
  padding: 56px 20px;
  text-align: center;
  color: var(--text-tertiary);
  background: #0d141f;
  border: 1px solid #263243;
  border-radius: var(--card-radius);
}

.wallet-balance-band {
  display: grid;
  grid-template-columns: minmax(250px,1.35fr) repeat(3,minmax(150px,1fr));
  background: #0a111a;
  border: 1px solid #2c394b;
  border-top: 2px solid var(--gold);
  border-radius: var(--panel-radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 18px;
}

.wallet-balance-main,
.wallet-balance-item {
  min-width: 0;
  min-height: 126px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wallet-balance-main { background: #121b27; }
.wallet-balance-item { border-left: 1px solid #263243; }
.wallet-balance-main span,
.wallet-balance-item span { color: var(--text-tertiary); font-size: var(--font-xs); }
.wallet-balance-main strong { color: var(--gold-light); font-size: 34px; line-height: 1.25; font-family: var(--font-mono); }
.wallet-balance-item strong { color: var(--text-primary); font-size: 22px; line-height: 1.45; font-family: var(--font-mono); }
.wallet-balance-item.accent strong { color: var(--blue-light); }
.wallet-balance-main small,
.wallet-balance-item small { color: var(--text-muted); font-size: 10px; }

.wallet-action-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.wallet-action-panel {
  background: #0d141f;
  border: 1px solid #263243;
  border-radius: var(--panel-radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.wallet-panel-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #263243;
}
.wallet-panel-title h3 { font-size: 17px; }
.wallet-panel-title p { color: var(--text-tertiary); font-size: var(--font-xs); }
.wallet-panel-mark { width: 4px; height: 36px; border-radius: 2px; background: var(--gold); }
.wallet-panel-mark.blue { background: var(--blue); }
.wallet-presets { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; margin-bottom: 16px; }
.wallet-presets button {
  min-height: 38px;
  background: #111b28;
  border: 1px solid #2c3a4d;
  border-radius: 4px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}
.wallet-presets button:hover { border-color: var(--gold); color: var(--gold-light); }
.wallet-money-input { display: grid; grid-template-columns: 42px 1fr; }
.wallet-money-input > span {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #172231;
  border: 1px solid #29384a;
  border-right: 0;
  border-radius: 4px 0 0 4px;
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-weight: 700;
}
.wallet-money-input input { border-radius: 0 4px 4px 0; }
.wallet-provider-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wallet-provider-switch button {
  min-height: 44px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #111a26;
  border: 1px solid #2e3c4f;
  border-radius: 4px;
  color: var(--text-secondary);
}
.wallet-provider-switch button > span { width: 10px; height: 10px; border-radius: 50%; background: #2aae67; }
.wallet-provider-switch button.alipay > span { background: #188bf5; }
.wallet-provider-switch button.active { border-color: var(--gold); background: #182333; color: #fff; }
.wallet-provider-switch button:disabled { opacity: .42; }
.wallet-provider-switch small { font-size: 9px; color: var(--text-muted); }
.wallet-rule,
.wallet-config-note { margin-top: 12px; font-size: 10px; color: var(--text-muted); line-height: 1.65; }
.wallet-config-note { color: var(--warning); }

.wallet-history {
  background: #0d141f;
  border: 1px solid #263243;
  border-radius: var(--panel-radius);
  overflow: hidden;
}
.wallet-history-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; background: #111a27; border-bottom: 1px solid #2b384a; }
.wallet-history-head h3 { font-size: 16px; }
.wallet-history-head p { color: var(--text-tertiary); font-size: 10px; }
.wallet-ledger-row { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 12px; align-items: center; min-height: 68px; padding: 10px 20px; border-bottom: 1px solid rgba(141,154,171,.10); }
.wallet-ledger-row:last-child { border-bottom: 0; }
.wallet-ledger-row:hover { background: rgba(43,136,255,.06); }
.wallet-ledger-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--negative); background: rgba(240,93,100,.12); font-weight: 900; }
.wallet-ledger-icon.in { color: var(--positive); background: rgba(63,201,149,.12); }
.wallet-ledger-info { min-width: 0; display: flex; flex-direction: column; }
.wallet-ledger-info strong { color: var(--text-primary); font-size: var(--font-sm); }
.wallet-ledger-info span { color: var(--text-muted); font-size: 10px; }
.wallet-ledger-amount { text-align: right; color: var(--text-primary); font-family: var(--font-mono); font-weight: 700; }
.wallet-ledger-amount.positive { color: var(--positive); }
.wallet-ledger-amount.negative { color: var(--negative); }
.wallet-ledger-amount small { display: block; color: var(--text-muted); font-size: 9px; font-weight: 400; }
.wallet-pay-dialog { text-align: center; }
.wallet-pay-dialog #wallet-pay-code { width: 212px; min-height: 212px; padding: 8px; margin: 0 auto 14px; background: #fff; border-radius: 4px; }
.wallet-pay-dialog #wallet-pay-code:empty { display: none; }
.wallet-pay-dialog strong { display: block; color: var(--gold-light); font-size: 28px; font-family: var(--font-mono); }
.wallet-pay-dialog p { color: var(--text-tertiary); font-size: var(--font-xs); margin: 8px 0 14px; }
.wallet-withdraw-estimate { min-height:42px; margin:-4px 0 14px; padding:8px 11px; display:flex; align-items:center; justify-content:space-between; gap:12px; background:#08111b; border:1px solid #273647; border-left:2px solid var(--blue); border-radius:3px; }
.wallet-withdraw-estimate span { color:#7f8da0; font-size:10px; }
.wallet-withdraw-estimate b { color:var(--blue-light); font-family:var(--font-mono); font-size:11px; }
.wallet-fee-policy { margin-bottom:18px; background:#0d141f; border:1px solid #2b3849; border-top:2px solid var(--gold); border-radius:6px; overflow:hidden; box-shadow:var(--shadow-sm); }
.wallet-fee-heading { min-height:64px; padding:12px 18px; display:flex; align-items:center; justify-content:space-between; gap:16px; background:#111a27; border-bottom:1px solid #2b384a; }
.wallet-fee-heading p { color:var(--gold); font:8px var(--font-mono); letter-spacing:1.4px; }
.wallet-fee-heading h3 { margin-top:2px; font-size:16px; }
.wallet-fee-heading > span { padding:4px 8px; background:#0a1018; border:1px solid #344256; border-radius:3px; color:#718095; font:8px var(--font-mono); }
.wallet-fee-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); }
.wallet-fee-grid > div { min-width:0; min-height:116px; padding:16px; border-right:1px solid #273344; }
.wallet-fee-grid > div:last-child { border-right:0; }
.wallet-fee-grid > div.featured { background:#121d2a; box-shadow:inset 0 2px 0 var(--blue); }
.wallet-fee-grid span,.wallet-fee-grid strong,.wallet-fee-grid p { display:block; }
.wallet-fee-grid span { color:#8492a5; font-size:9px; }
.wallet-fee-grid strong { margin:4px 0; color:var(--text-primary); font-family:var(--font-mono); font-size:18px; }
.wallet-fee-grid .featured strong { color:var(--gold-light); }
.wallet-fee-grid p { color:#647286; font-size:9px; line-height:1.6; }

/* Physical game collection cabinet */
.collection-header { align-items: flex-end; }
.collection-summary { display: flex; gap: 20px; flex-wrap: wrap; }
.collection-summary span { display: flex; flex-direction: column; color: var(--text-muted); font-size: 10px; text-align: right; }
.collection-summary b { color: var(--text-primary); font-family: var(--font-mono); font-size: 14px; }

.collection-cabinet {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  background: #070b11;
  border: 1px solid #374354;
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0,0,0,.52), inset 0 0 0 5px #0c121b, inset 0 0 0 6px rgba(221,168,59,.16);
}
.cabinet-crown { min-height: 54px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #111821; border-bottom: 1px solid #3b4655; box-shadow: inset 0 -8px 18px rgba(0,0,0,.32); }
.cabinet-brand-mark { display: flex; align-items: center; gap: 10px; color: #f7e8bd; font-size: 11px; letter-spacing: 2px; }
.cabinet-brand-mark > span { width: 26px; height: 3px; background: var(--gold); box-shadow: 0 0 10px rgba(221,168,59,.5); }
.cabinet-status { display: flex; align-items: center; gap: 7px; color: #708095; font-family: var(--font-mono); font-size: 9px; }
.cabinet-status i,.collection-power i { width: 7px; height: 7px; border-radius: 50%; background: var(--positive); box-shadow: 0 0 9px rgba(63,201,149,.8); animation: cabinetPulse 2.6s ease-in-out infinite; }
@keyframes cabinetPulse { 50% { opacity: .42; box-shadow: 0 0 4px rgba(63,201,149,.35); } }

.cabinet-glass { position: relative; padding: 22px 26px 10px; background-color: rgba(8,14,22,.90); box-shadow: inset 0 0 70px rgba(20,78,140,.12); }
.cabinet-reflection { position: absolute; z-index: 3; top: -30%; bottom: -30%; left: -24%; width: 12%; pointer-events: none; transform: skewX(-15deg); background: linear-gradient(90deg,transparent,rgba(130,190,255,.07),transparent); animation: cabinetReflection 9s ease-in-out infinite; }
@keyframes cabinetReflection { 0%,18% { left:-24%; } 64%,100% { left:116%; } }
.cabinet-shelf { position: relative; min-height: 310px; padding: 18px 16px 0; border-left: 8px solid #141c27; border-right: 8px solid #141c27; background: linear-gradient(180deg,#0b121d 0%,#080d14 72%,#030507 100%); box-shadow: inset 0 26px 38px rgba(33,112,195,.07), inset 0 -30px 34px rgba(0,0,0,.72); }
.cabinet-shelf-items { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(auto-fill,minmax(154px,180px)); align-items: end; gap: 28px; min-height: 255px; padding: 0 10px 10px; }
.cabinet-shelf-edge { position: relative; z-index: 4; height: 28px; margin: 0 -16px; background: #202a36; border-top: 2px solid #4b5663; border-bottom: 5px solid #05070a; box-shadow: 0 10px 18px rgba(0,0,0,.68), inset 0 1px 0 rgba(255,255,255,.08); }
.cabinet-shelf-edge span { position: absolute; right: 14px; top: 5px; color: #657184; font: 8px var(--font-mono); letter-spacing: 1px; }
.collection-case {
  --case-rx: 0deg;
  --case-ry: 0deg;
  --shine-x: 20%;
  width: 170px;
  min-height: 278px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  perspective: 900px;
  text-align: left;
}
.case-shell { position: relative; display: block; width: 150px; height: 225px; margin: 0 auto; transform-style: preserve-3d; transform: rotateX(var(--case-rx)) rotateY(var(--case-ry)); transition: transform 140ms ease,filter 180ms ease; filter: drop-shadow(11px 14px 10px rgba(0,0,0,.68)); }
.collection-case:hover .case-shell { transform: translateY(-7px) rotateX(var(--case-rx)) rotateY(var(--case-ry)); }
.collection-case.selected .case-shell { transform: translateY(-9px) rotateX(var(--case-rx)) rotateY(var(--case-ry)); filter: drop-shadow(0 0 15px rgba(43,136,255,.32)) drop-shadow(11px 14px 10px rgba(0,0,0,.68)); }
.case-front { position: absolute; inset: 0 0 0 12px; z-index: 2; overflow: hidden; display: block; background: #0a111a; border: 2px solid #151c25; border-left-color: #303b49; border-radius: 2px 5px 5px 2px; transform: translateZ(7px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.case-front img,.case-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; object-fit: cover; font-size: 42px; }
.case-front::after { content:''; position:absolute; inset:-30% auto -30% var(--shine-x); width:28%; transform:skewX(-16deg); background:linear-gradient(90deg,transparent,rgba(255,255,255,.15),transparent); transition:left 120ms linear; pointer-events:none; }
.case-front-shade { position:absolute; inset:0; background:linear-gradient(180deg,rgba(3,7,12,.52) 0%,transparent 26%,transparent 58%,rgba(2,5,9,.94) 100%); }
.case-brand { position:absolute; top:10px; left:10px; padding:3px 6px; background:rgba(4,8,13,.78); border-left:2px solid var(--gold); color:#efe4c3; font:7px var(--font-mono); letter-spacing:1px; }
.case-title { position:absolute; left:10px; right:8px; bottom:23px; color:#fff; font-size:17px; font-weight:900; line-height:1.15; text-shadow:0 2px 6px #000; }
.case-edition { position:absolute; left:10px; bottom:10px; color:#9db5d2; font:6px var(--font-mono); letter-spacing:.7px; }
.case-spine { position:absolute; left:0; top:3px; bottom:3px; width:20px; z-index:3; display:flex; flex-direction:column; align-items:center; background:#101823; border:1px solid #3a4655; border-radius:3px 0 0 3px; transform:translateZ(4px) rotateY(-3deg); box-shadow:inset -5px 0 8px rgba(0,0,0,.45); }
.case-spine small { margin-top:8px; color:var(--gold-light); font:7px var(--font-mono); }
.case-spine strong { flex:1; margin:10px 0; color:#e8edf5; font-size:9px; letter-spacing:1px; writing-mode:vertical-rl; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.case-spine em { margin-bottom:8px; color:#647186; font:6px var(--font-mono); font-style:normal; writing-mode:vertical-rl; }
.case-edge { position:absolute; top:5px; right:-4px; width:10px; height:215px; background:#070b10; border:1px solid #303a47; border-left:0; transform:rotateY(72deg) translateZ(2px); transform-origin:left center; }
.case-plaque { display:block; width:100%; min-height:42px; margin-top:8px; padding:7px 9px; background:#0a1018; border:1px solid #2d3848; border-left:2px solid transparent; border-radius:2px; transition:border-color 160ms ease,background 160ms ease; }
.case-plaque strong,.case-plaque small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.case-plaque strong { color:#dce3ec; font-size:10px; }
.case-plaque small { margin-top:2px; color:#667488; font:7px var(--font-mono); }
.collection-case:hover .case-plaque,.collection-case.selected .case-plaque { background:#121d2b; border-color:rgba(43,136,255,.46); border-left-color:var(--gold); }

.collection-console { display:grid; grid-template-columns:120px minmax(0,1fr) 230px; gap:20px; min-height:180px; padding:20px; background:#0d141f; border:1px solid #2b3849; border-top:2px solid var(--blue); border-radius:6px; box-shadow:var(--shadow-md); }
.collection-console-art { height:140px; overflow:hidden; background:#080d14; border:1px solid #3a4657; border-radius:3px; box-shadow:8px 10px 18px rgba(0,0,0,.35); }
.collection-console-art img,.collection-console-art > span { width:100%; height:100%; display:flex; align-items:center; justify-content:center; object-fit:cover; font-size:36px; }
.collection-console-info { min-width:0; }
.collection-kicker { color:var(--blue-light); font:8px var(--font-mono); letter-spacing:1.4px; }
.collection-console-info h3 { margin:3px 0 8px; font-size:22px; }
.collection-description { max-width:650px; color:#8f9bab; font-size:12px; line-height:1.7; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.collection-metadata { display:grid; grid-template-columns:repeat(4,minmax(90px,1fr)); gap:8px; margin-top:14px; }
.collection-metadata span { min-width:0; padding:7px 9px; background:#101925; border-left:2px solid #34465c; }
.collection-metadata small,.collection-metadata b { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.collection-metadata small { color:#657286; font-size:8px; }
.collection-metadata b { color:#dfe6ef; font-size:10px; }
.collection-console-actions { display:flex; flex-direction:column; justify-content:center; gap:10px; padding-left:18px; border-left:1px solid #2a3748; }
.collection-power { display:flex; align-items:center; gap:7px; color:#75849a; font:8px var(--font-mono); letter-spacing:1px; }
.collection-install-progress { display:none; height:3px; overflow:hidden; background:#070c13; border-radius:2px; }
.collection-install-progress.active { display:block; }
.collection-install-progress i { display:block; width:0; height:100%; background:var(--positive); box-shadow:0 0 8px rgba(63,201,149,.5); transition:width .18s ease; }
.collection-launch-btn { min-height:46px; display:flex; align-items:center; justify-content:center; gap:10px; background:var(--gold); border:1px solid var(--gold-light); border-radius:4px; color:#080b10; box-shadow:0 5px 18px rgba(221,168,59,.18); }
.collection-launch-btn:hover { background:var(--gold-light); transform:translateY(-1px); }
.collection-launch-btn:disabled { cursor:progress; opacity:.72; transform:none; }
.collection-launch-btn span { font-size:12px; }
.collection-secondary-actions { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.collection-secondary-actions button { min-height:34px; background:#121c29; border:1px solid #344256; border-radius:4px; color:#aab6c6; font-size:9px; }
.collection-secondary-actions button.danger { color:#e89797; border-color:#5c3035; }
.desktop-only { display:none !important; }
body.player-easy-desktop .desktop-only { display:block !important; }
body.player-easy-desktop .desktop-download-link { display:none; }

/* Desktop client readability */
body.player-easy-desktop {
  --font-xs: 13px;
  --font-sm: 15px;
  --font-base: 16px;
  --font-lg: 18px;
  --font-xl: 22px;
  --font-2xl: 30px;
  --font-3xl: 38px;
}
.desktop-titlebar { display:none; }
body.player-easy-desktop.player-easy-integrated-titlebar .desktop-titlebar {
  position:fixed;
  z-index:1200;
  top:0;
  left:0;
  right:0;
  height:38px;
  display:flex;
  align-items:center;
  gap:22px;
  padding:0 138px 0 12px;
  background:#0d141d;
  border-bottom:1px solid #26313f;
  box-shadow:none;
  color:#e8edf5;
  font-size:13px;
  -webkit-app-region:drag;
  user-select:none;
}
body.player-easy-desktop.player-easy-integrated-titlebar .desktop-titlebar img { width:22px; height:22px; object-fit:contain; }
body.player-easy-desktop.player-easy-integrated-titlebar .desktop-titlebar strong { font-weight:700; }
body.player-easy-desktop.player-easy-integrated-titlebar .desktop-titlebar-brand { display:flex; align-items:center; gap:8px; color:#e8edf5; text-decoration:none; -webkit-app-region:no-drag; }
body.player-easy-desktop.player-easy-integrated-titlebar .desktop-titlebar-nav { align-self:stretch; display:flex; align-items:center; gap:4px; -webkit-app-region:no-drag; }
body.player-easy-desktop.player-easy-integrated-titlebar .desktop-titlebar-nav a { position:relative; height:100%; display:flex; align-items:center; padding:0 12px; color:#8996a8; font-size:13px; font-weight:600; text-decoration:none; }
body.player-easy-desktop.player-easy-integrated-titlebar .desktop-titlebar-nav a:hover { color:#e8edf5; background:#151f2b; }
body.player-easy-desktop.player-easy-integrated-titlebar .desktop-titlebar-nav a.active { color:#fff; }
body.player-easy-desktop.player-easy-integrated-titlebar .desktop-titlebar-nav a.active::after { content:''; position:absolute; left:12px; right:12px; bottom:0; height:2px; background:var(--blue); }
body.player-easy-desktop.player-easy-integrated-titlebar #app { height:calc(100vh - 38px); margin-top:38px; }
body.player-easy-desktop.player-easy-integrated-titlebar #sidebar,
body.player-easy-desktop.player-easy-integrated-titlebar #content { height:calc(100vh - 38px); }
body.player-easy-desktop.player-easy-integrated-titlebar #sidebar { box-shadow:none; border-right-color:#26313f; }
body.player-easy-desktop .sidebar-brand .brand-text { font-size:18px; }
body.player-easy-desktop .sidebar-nav .nav-section-label { font-size:12px; }
body.player-easy-desktop .sidebar-nav .nav-item .nav-badge { font-size:12px; }
body.player-easy-desktop .collection-summary span { font-size:13px; }
body.player-easy-desktop .collection-summary b { font-size:17px; }
body.player-easy-desktop .cabinet-brand-mark { font-size:14px; }
body.player-easy-desktop .cabinet-status { font-size:12px; }
body.player-easy-desktop .cabinet-shelf-edge span { font-size:10px; }
body.player-easy-desktop .case-brand { font-size:9px; }
body.player-easy-desktop .case-title { font-size:19px; }
body.player-easy-desktop .case-edition { font-size:8px; }
body.player-easy-desktop .case-spine small { font-size:9px; }
body.player-easy-desktop .case-spine strong { font-size:11px; }
body.player-easy-desktop .case-spine em { font-size:8px; }
body.player-easy-desktop .case-plaque strong { font-size:13px; }
body.player-easy-desktop .case-plaque small { font-size:10px; }
body.player-easy-desktop .collection-kicker { font-size:11px; }
body.player-easy-desktop .collection-console-info h3 { font-size:26px; }
body.player-easy-desktop .collection-description { font-size:15px; line-height:1.65; }
body.player-easy-desktop .collection-metadata small { font-size:11px; }
body.player-easy-desktop .collection-metadata b { font-size:13px; }
body.player-easy-desktop .collection-power { font-size:11px; }
body.player-easy-desktop .collection-secondary-actions button { font-size:12px; }
body.player-easy-desktop .desktop-download-link strong { font-size:13px; }
body.player-easy-desktop .desktop-download-link small { font-size:11px; }
body.player-easy-desktop .friend-list-copy strong,
body.player-easy-desktop .friends-dock-layout .fl-name,
body.player-easy-desktop .friends-dock-layout .chat-msg { font-size:14px; }
body.player-easy-desktop .friends-dock-layout .friend-list-copy small,
body.player-easy-desktop .friends-dock-layout .chat-title { font-size:12px; }

.desktop-download-link { margin:0 0 10px; min-height:48px; display:grid; grid-template-columns:30px 1fr; grid-template-rows:auto auto; column-gap:8px; align-items:center; padding:8px 10px; background:#101a27; border:1px solid #33445a; border-left:2px solid var(--gold); border-radius:4px; color:#dce4ee; text-decoration:none; }
.desktop-download-link > span { grid-row:1/3; width:28px; height:28px; display:grid; place-items:center; border:1px solid #4b5f77; border-radius:3px; color:var(--gold-light); font-size:16px; }
.desktop-download-link strong { align-self:end; font-size:10px; }
.desktop-download-link small { align-self:start; color:#748399; font-size:8px; }
.desktop-download-link:hover { background:#152235; border-color:#53677f; border-left-color:var(--gold-light); }
.collection-secondary-actions button:hover { border-color:var(--blue); color:#fff; }

.empty-collection-cabinet { position:relative; min-height:430px; display:flex; flex-direction:column; align-items:center; justify-content:center; overflow:hidden; background:#080d14; border:10px solid #121b27; box-shadow:inset 0 0 0 1px #3a4655,inset 0 -80px 90px rgba(0,0,0,.65); text-align:center; }
.empty-cabinet-light { position:absolute; top:0; width:70%; height:2px; background:var(--blue); box-shadow:0 12px 44px rgba(43,136,255,.35); }
.empty-collection-cabinet strong { color:#e2e8f0; font-size:18px; }
.empty-collection-cabinet p { margin:7px 0 18px; color:#718095; font-size:12px; }

@media (max-width: 1024px) {
  :root { --sidebar-width: 68px; --content-padding: 18px; }
  .sidebar-brand { padding: 14px; justify-content: center; }
  .sidebar-brand .brand-text,
  .sidebar-nav .nav-section-label,
  .sidebar-nav .nav-item:not(.active) .nav-badge,
  .sidebar-nav .nav-item { font-size: 0; }
  .sidebar-nav .nav-item { justify-content: center; padding: 9px; }
  .sidebar-nav .nav-item.active { padding-left: 6px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar-footer { padding: 6px; }
  .sidebar-user { justify-content: center; }
  .sidebar-user .user-info,
  .sidebar-user .logout-btn { display: none; }
  #sidebar-auth .btn-primary { padding: 7px 2px; font-size: 10px; letter-spacing: 0; }
  #sidebar-auth .btn-secondary { display: none; }
}

@media (max-width: 768px) {
  body { background-position: 63% center; }
  #content { background: rgba(3,8,15,0.50); }
  #content-inner { padding: 10px; }
  #mobile-bar {
    min-height: 50px;
    background: #070d15;
    border-color: rgba(221,168,59,0.24);
    box-shadow: 0 6px 20px rgba(0,0,0,0.30);
  }
  #sidebar { width: 232px; min-width: 232px; left: -252px; }
  .sidebar-brand { justify-content: flex-start; min-height: 60px; }
  .sidebar-brand .brand-text,
  .sidebar-nav .nav-item { font-size: 12px; }
  .sidebar-nav .nav-section-label { font-size: 10px; }
  .sidebar-nav .nav-item { justify-content: flex-start; padding: 8px 10px; }
  .sidebar-nav .nav-item.active { padding-left: 7px; }
  .section-header { margin-bottom: 12px; padding: 0 0 10px 10px; }
  .section-header h2 { font-size: 19px; }
  .stat-card { min-height: 80px; padding: 11px; }
  .stat-card .stat-value { font-size: 17px; }
  .store-filters,
  .lib-toolbar,
  .trading-header { padding: 8px; }
  .game-grid,
  .market-grid,
  .lib-grid { gap: 8px; }
  .game-card:hover,
  .market-card:hover,
  .lib-card:hover { transform: none; }
  .modal { padding: 22px 18px; }
  .wallet-balance-band { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .wallet-balance-main { grid-column: 1/-1; min-height: 108px; }
  .wallet-balance-item { min-height: 88px; padding: 13px; border-top: 1px solid #263243; }
  .wallet-balance-item:nth-child(2) { border-left: 0; }
  .wallet-balance-main strong { font-size: 28px; }
  .wallet-balance-item strong { font-size: 17px; }
  .wallet-action-grid { grid-template-columns: 1fr; gap: 10px; }
  .wallet-action-panel { padding: 15px; }
  .wallet-presets { gap: 5px; }
  .wallet-ledger-row { padding: 9px 12px; grid-template-columns: 32px minmax(0,1fr) auto; gap: 8px; }
  .wallet-fee-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .wallet-fee-grid > div { min-height:104px; border-bottom:1px solid #273344; }
  .wallet-fee-grid > div:nth-child(2n) { border-right:0; }
  .wallet-fee-grid > div:last-child { grid-column:1/-1; border-bottom:0; }
  .collection-header { align-items:flex-start; }
  .collection-summary { width:100%; gap:14px; justify-content:space-between; }
  .collection-summary span { text-align:left; }
  .cabinet-crown { min-height:46px; padding:0 12px; }
  .cabinet-status { display:none; }
  .cabinet-glass { padding:12px 8px 6px; }
  .cabinet-shelf { min-height:268px; padding:14px 4px 0; border-left-width:4px; border-right-width:4px; }
  .cabinet-shelf-items { display:flex; align-items:flex-end; gap:18px; min-height:218px; padding:0 12px 8px; overflow-x:auto; }
  .collection-case { width:140px; min-width:140px; min-height:240px; }
  .case-shell { width:126px; height:189px; }
  .case-front { left:10px; }
  .case-title { font-size:14px; }
  .case-spine { width:18px; }
  .case-edge { height:180px; }
  .case-plaque { min-height:40px; }
  .collection-console { grid-template-columns:76px minmax(0,1fr); gap:12px; padding:13px; }
  .collection-console-art { height:104px; }
  .collection-console-info h3 { font-size:17px; }
  .collection-description { -webkit-line-clamp:2; font-size:10px; }
  .collection-metadata { grid-template-columns:repeat(2,minmax(0,1fr)); margin-top:10px; }
  .collection-console-actions { grid-column:1/-1; padding:12px 0 0; border-left:0; border-top:1px solid #2a3748; }
  .collection-launch-btn { min-height:42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
