/* Player Easy premium trading interface - 2026 UI system */
:root {
  --pe-topbar: 58px;
  --pe-sidebar: 248px;
  --pe-bg: #030812;
  --pe-shell: #050b14;
  --pe-panel: #0a1320;
  --pe-panel-strong: #0d1827;
  --pe-panel-soft: rgba(9,18,31,.94);
  --pe-line: #26374b;
  --pe-line-soft: rgba(102,131,166,.20);
  --pe-gold: #e8ae35;
  --pe-gold-bright: #ffd36d;
  --pe-blue: #2388ff;
  --pe-blue-bright: #67b6ff;
  --pe-green: #37d08f;
  --pe-red: #ff5d68;
  --pe-white: #f6f8fb;
  --pe-copy: #c1ccda;
  --pe-muted: #75849a;
  --pe-shadow: 0 18px 46px rgba(0,0,0,.42);
  --sidebar-width: var(--pe-sidebar);
  --content-padding: 28px;
  --card-radius: 6px;
  --panel-radius: 7px;
  --button-radius: 4px;
  --gold: var(--pe-gold);
  --gold-light: var(--pe-gold-bright);
  --gold-border: rgba(232,174,53,.46);
  --gold-border-light: rgba(232,174,53,.20);
  --blue: var(--pe-blue);
  --positive: var(--pe-green);
  --negative: var(--pe-red);
  --text-primary: var(--pe-white);
  --text-secondary: var(--pe-copy);
  --text-tertiary: var(--pe-muted);
  --text-muted: #536176;
  --bg-deep: var(--pe-bg);
  --bg-primary: var(--pe-shell);
  --bg-secondary: var(--pe-panel);
  --bg-tertiary: var(--pe-panel-strong);
  --bg-elevated: #132238;
  --bg-input: #07111e;
  --bg-hover: rgba(35,136,255,.09);
}

html { background: var(--pe-bg); }
body {
  color: var(--pe-copy);
  background-color: var(--pe-bg);
  letter-spacing: 0;
}
body::before {
  background: rgba(2,7,14,.16);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg,rgba(2,7,14,.92) 0%,rgba(2,7,14,.58) 46%,rgba(2,7,14,.10) 100%);
}

button, input, select, textarea { letter-spacing: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--pe-blue-bright);
  outline-offset: 2px;
}
input, select, textarea {
  min-height: 42px;
  background: #07111e;
  border: 1px solid #2b3d53;
  color: var(--pe-white);
}
input:hover, select:hover, textarea:hover { border-color: #46617f; }
input:focus, select:focus, textarea:focus {
  border-color: var(--pe-blue);
  box-shadow: 0 0 0 3px rgba(35,136,255,.13);
}

.desktop-titlebar {
  position: fixed;
  z-index: 2200;
  inset: 0 0 auto 0;
  height: var(--pe-topbar);
  display: flex;
  align-items: stretch;
  padding: 0 24px 0 18px;
  background: #050b14;
  border-bottom: 1px solid #243347;
  box-shadow: 0 10px 28px rgba(0,0,0,.26);
  color: var(--pe-copy);
  user-select: none;
}
.desktop-titlebar-brand {
  width: calc(var(--pe-sidebar) - 18px);
  flex: 0 0 calc(var(--pe-sidebar) - 18px);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--pe-white);
}
.desktop-titlebar-brand img { width: 36px; height: 36px; object-fit: contain; }
.desktop-titlebar-brand strong { font-size: 16px; font-weight: 800; }
.desktop-titlebar-brand span { color: var(--pe-gold-bright); font-size: 14px; font-weight: 800; }
.desktop-titlebar-nav {
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.desktop-titlebar-nav a {
  position: relative;
  min-width: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  color: #9ba9ba;
  font-size: 14px;
  font-weight: 700;
}
.desktop-titlebar-nav a:hover { color: var(--pe-white); background: #0b1523; }
.desktop-titlebar-nav a.active { color: var(--pe-gold-bright); }
.desktop-titlebar-nav a.active::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 2px;
  background: var(--pe-gold);
  box-shadow: 0 0 13px rgba(232,174,53,.75);
}
.desktop-titlebar > .language-switcher { margin: auto 0 auto auto; }

#app {
  height: calc(100vh - var(--pe-topbar));
  margin-top: var(--pe-topbar);
}
#sidebar, #content { height: calc(100vh - var(--pe-topbar)); }
#sidebar {
  width: var(--pe-sidebar);
  min-width: var(--pe-sidebar);
  background: rgba(4,10,18,.98);
  border-right: 1px solid #27374a;
  box-shadow: 12px 0 36px rgba(0,0,0,.26);
}
#content {
  background: rgba(3,9,17,.28);
  isolation: isolate;
}
#content::before {
  content: '';
  position: fixed;
  z-index: -1;
  inset: var(--pe-topbar) 0 0 var(--pe-sidebar);
  pointer-events: none;
  background: linear-gradient(90deg,rgba(2,8,16,.82) 0%,rgba(2,8,16,.36) 48%,rgba(2,8,16,.08) 100%);
}
#content-inner {
  width: 100%;
  max-width: 1580px;
  min-height: 100%;
  margin: 0 auto;
  padding: 26px 28px 90px;
}
.content-toolbar { display: none !important; }

.sidebar-brand {
  min-height: 82px;
  padding: 15px 20px;
  gap: 12px;
  background: #06101c;
  border-bottom: 1px solid rgba(232,174,53,.22);
}
.sidebar-brand .brand-logo { width: 44px; height: 44px; }
.sidebar-brand-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.sidebar-brand .brand-text { color: var(--pe-gold-bright); font-size: 18px; font-weight: 900; }
.sidebar-brand-copy small { margin-top: 4px; color: #738198; font-size: 8px; font-weight: 800; letter-spacing: 2.2px; }
.sidebar-nav {
  padding: clamp(12px, 1.8vh, 20px) 10px 12px;
}
.sidebar-nav .nav-section { margin-bottom: 13px; }
.sidebar-nav .nav-section-label {
  padding: 7px 12px 5px;
  color: #59677b;
  font-size: clamp(9px, .62vw, 10px);
  letter-spacing: 1.5px;
}
.sidebar-nav .nav-item {
  position: relative;
  min-height: clamp(38px, 4.2vh, 44px);
  margin: 2px 0;
  padding: 9px 12px;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #a5b2c2;
  font-size: clamp(12px, .78vw, 15px);
  font-weight: 700;
}
.sidebar-nav .nav-item:hover { color: #eef3f8; background: #0d1928; border-color: #263a51; }
.sidebar-nav .nav-item.active {
  padding-left: 10px;
  color: #fff8e8;
  background: #152235;
  border-color: rgba(232,174,53,.52);
  border-left: 2px solid var(--pe-gold);
  box-shadow: inset 18px 0 28px rgba(232,174,53,.08),0 0 18px rgba(35,136,255,.10);
}
.sidebar-nav .nav-item.active::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--pe-blue);
  box-shadow: 0 0 12px rgba(35,136,255,.9);
}
.sidebar-nav .nav-item .nav-icon {
  width: 22px;
  color: var(--pe-blue-bright);
  font: 800 18px/1 var(--font-family);
}
.sidebar-nav .nav-item.active .nav-icon { color: var(--pe-gold-bright); }
.sidebar-nav .nav-item .nav-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--pe-blue);
  color: white;
  font-size: 11px;
}
.sidebar-footer {
  padding: 12px 14px;
  background: #050c15;
  border-color: #243347;
}
.sidebar-user { min-height: 54px; }
.sidebar-account-button { padding: 5px; }
.sidebar-account-button:hover { background: #0d1826; }
.sidebar-user .user-avatar {
  width: 40px;
  height: 40px;
  background: #101c2b;
  border: 1px solid rgba(232,174,53,.55);
  box-shadow: 0 0 0 3px rgba(232,174,53,.05);
}
.sidebar-user .user-name { color: #f3f6fa; font-size: 13px; }
.sidebar-user .user-balance { color: var(--pe-gold-bright); font-size: 11px; }
.logout-btn { color: #6f7e91; }
.logout-btn:hover { color: var(--pe-gold-bright); }

.language-switcher button, .language-switcher select {
  min-height: 36px;
  border-color: #30435a;
  background-color: #091320;
}

.section-header {
  min-height: 66px;
  margin: 0 0 18px;
  padding: 7px 0 12px 16px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid rgba(103,134,169,.24);
  border-left: 3px solid var(--pe-gold);
}
.section-header h2 { color: var(--pe-white); font-size: 27px; line-height: 1.15; }
.section-header .subtitle { margin-top: 6px; color: #8492a5; font-size: 12px; }
.breadcrumb { margin-bottom: 16px; color: #6f7e91; font-size: 11px; }
.breadcrumb a { color: #92a2b5; }
.breadcrumb a:hover { color: var(--pe-gold-bright); }

.btn-primary, .game-card .buy-btn {
  min-height: 40px;
  padding: 9px 20px;
  border: 1px solid #ffd36d;
  border-radius: 4px;
  background: #e4aa33;
  color: #08101a;
  font-weight: 900;
  text-transform: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28),0 6px 16px rgba(232,174,53,.15);
}
.btn-primary:hover:not(:disabled), .game-card .buy-btn:hover {
  background: #ffd36d;
  box-shadow: 0 0 22px rgba(232,174,53,.27);
}
.btn-secondary {
  min-height: 40px;
  padding: 9px 18px;
  border: 1px solid #35506c;
  border-radius: 4px;
  background: #0b1725;
  color: #bdc8d5;
}
.btn-secondary:hover:not(:disabled) { color: #fff; border-color: var(--pe-blue); background: #102238; }
.btn-danger { min-height: 40px; border-radius: 4px; background: #8e2f3a; border: 1px solid #d8525e; }
.btn-sm { min-height: 34px; padding: 6px 13px; }

.card, .stat-card, .game-card, .market-card, .wallet-action-panel, .wallet-history,
.account-overview, .account-settings, .contact-channel, .creator-console-section,
.creator-side-section, .friends-steam-layout, .modal {
  background: var(--pe-panel-soft);
  border-color: var(--pe-line);
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
}
.card:hover, .game-card:hover, .market-card:hover { border-color: rgba(232,174,53,.55); }
.stat-cards { gap: 12px; }
.stat-card {
  position: relative;
  min-height: 104px;
  padding: 17px 18px 16px 64px;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--pe-line);
  border-top: 1px solid rgba(232,174,53,.42);
}
.stat-card::before {
  content: '◆';
  position: absolute;
  left: 17px;
  top: 22px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(35,136,255,.48);
  border-radius: 50%;
  color: var(--pe-blue-bright);
  background: #0a1b2d;
  box-shadow: inset 0 0 14px rgba(35,136,255,.10);
}
.stat-card.gold::before { content: '●'; color: var(--pe-gold-bright); border-color: rgba(232,174,53,.58); background: #211a0c; }
.stat-card.positive::before { content: '↗'; color: var(--pe-green); border-color: rgba(55,208,143,.45); }
.stat-card.negative::before { content: '↘'; color: var(--pe-red); border-color: rgba(255,93,104,.45); }
.stat-card .stat-value { color: var(--pe-white); font-size: 24px; line-height: 1.2; font-family: var(--font-mono); }
.stat-card.gold .stat-value { color: var(--pe-gold-bright); }
.stat-card .stat-label { margin-top: 7px; color: #7f8da1; font-size: 10px; letter-spacing: .8px; }

table { background: #07111d; border: 1px solid var(--pe-line); }
thead { background: #101d2c; }
thead th { height: 42px; color: #8190a3; border-color: #2a3b4f; }
tbody td { height: 48px; border-color: rgba(108,135,166,.13); }
tbody tr:hover td { background: rgba(35,136,255,.07); }

.modal-overlay { background: rgba(1,5,10,.84); }
.modal {
  width: min(540px,92vw);
  padding: 24px;
  border: 1px solid rgba(232,174,53,.54);
  background: #09131f;
  box-shadow: 0 28px 80px rgba(0,0,0,.68),0 0 36px rgba(35,136,255,.08);
}
.modal h2 { padding: 0 40px 16px 0; color: #fff; border-bottom: 1px solid #293b50; font-size: 21px; }
.modal .modal-close { top: 14px; right: 14px; width: 32px; height: 32px; border: 1px solid #31465e; color: #8291a5; }
.modal .modal-close:hover { color: #fff; border-color: var(--pe-red); background: rgba(255,93,104,.08); }
.toast { border-radius: 4px; background: #101d2c; }

.friends-dock-toggle {
  right: 16px;
  bottom: 14px;
  height: 42px;
  border-color: #3a5876;
  background: #0d1a29;
  color: #e3ebf4;
}
.friends-dock-toggle .shell-icon { color: var(--pe-blue-bright); font-size: 17px; }
.friends-dock-toggle:hover { border-color: var(--pe-gold); background: #142338; }

/* Store and product detail */
body[data-route="store"] #content-inner,
body[data-route="cart"] #content-inner { max-width: 1540px; }
.store-filters {
  min-height: 58px;
  margin: 0 0 18px;
  padding: 9px;
  gap: 8px;
  background: rgba(6,14,24,.95);
  border: 1px solid var(--pe-line);
  border-radius: 6px;
}
.store-filters .search-box { max-width: none; }
.store-filters .search-box .search-icon { color: var(--pe-blue-bright); }
.store-filters select { min-width: 145px; }
.game-grid {
  grid-template-columns: repeat(auto-fill,minmax(218px,1fr));
  gap: 14px;
}
.game-card {
  position: relative;
  overflow: hidden;
  background: #091421;
  border: 1px solid #26384c;
  border-top-color: rgba(35,136,255,.48);
  border-radius: 6px;
  transform: none;
}
.game-card::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: transparent;
  transition: background .18s ease,box-shadow .18s ease;
}
.game-card:hover {
  transform: translateY(-3px);
  border-color: rgba(232,174,53,.58);
  box-shadow: 0 16px 34px rgba(0,0,0,.42);
}
.game-card:hover::after { background: var(--pe-gold); box-shadow: 0 0 14px rgba(232,174,53,.55); }
.game-card .game-cover { height: 156px; background-color: #07101b !important; }
.game-card .game-cover::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(transparent,rgba(4,9,16,.92));
  pointer-events: none;
}
.game-card .game-cover .supply-badge {
  z-index: 2;
  top: 9px;
  right: 9px;
  padding: 3px 7px;
  border: 1px solid rgba(108,136,169,.42);
  border-radius: 3px;
  background: rgba(3,8,14,.86);
  color: #b6c1ce;
  font-size: 9px;
}
.game-card .game-info { padding: 13px 14px 14px; }
.game-card .game-name { color: #fff; font-size: 15px; }
.game-card .game-meta { margin: 7px 0 6px; }
.game-card .game-meta .genre-tag,
.game-detail .detail-tags .tag {
  padding: 2px 7px;
  border: 1px solid #2d4561;
  border-radius: 3px;
  background: #0b1b2d;
  color: #75b6f5;
}
.game-quality { min-height: 22px; margin: 8px 0 5px; }
.review-tier { min-height: 22px; padding: 2px 7px; border-radius: 3px; }
.supply-bar { background: #172436; }
.supply-bar .supply-filled { background: var(--pe-blue); }
.game-card .game-price { color: var(--pe-gold-bright); font-size: 18px; }
.game-card .game-rating { color: #8f9db0; }

.creative-value-section {
  margin: 18px 0;
  padding: 17px 0 14px;
  border-top: 1px solid rgba(232,174,53,.42);
  border-bottom: 1px solid rgba(102,131,166,.22);
}
.creative-studio-grid { border-color: var(--pe-line); }
.creative-studio-card { min-height: 66px; border-color: rgba(102,131,166,.20); }
.creative-studio-card:hover { background: #0c1928; }
.creative-studio-card em { border-color: rgba(232,174,53,.42); color: var(--pe-gold-bright); }

.game-detail {
  grid-template-columns: minmax(0,1fr) 330px;
  gap: 24px;
  align-items: start;
}
.game-detail > div:first-child { min-width: 0; }
.game-detail .detail-cover {
  height: clamp(300px,39vw,520px);
  border: 1px solid rgba(35,136,255,.56);
  border-radius: 6px;
  background-color: #050e19 !important;
  box-shadow: 0 16px 44px rgba(0,0,0,.34);
}
.game-detail .detail-cover .game-cover-image { object-fit: cover; }
.game-detail .detail-header {
  position: relative;
  margin-top: 18px;
  padding: 0 4px 18px;
  border-bottom: 1px solid rgba(103,134,169,.24);
}
.game-detail .detail-header h2 { margin-bottom: 10px; color: #fff; font-size: 34px; }
.detail-rating { margin: 12px 0; }
.game-detail .detail-desc { max-width: 850px; color: #9aa8ba; line-height: 1.75; }
.game-detail .detail-sidebar {
  position: sticky;
  top: 18px;
  padding: 22px;
  background: rgba(7,16,27,.97);
  border: 1px solid rgba(232,174,53,.50);
  border-top: 2px solid var(--pe-gold);
  border-radius: 6px;
  box-shadow: var(--pe-shadow);
}
.game-detail .detail-sidebar .price-display { color: var(--pe-gold-bright); font-size: 34px; }
.game-detail .detail-sidebar .supply-info { color: #a6b2c1; }
.game-detail .detail-sidebar .meta-row { min-height: 42px; border-color: rgba(103,134,169,.18); }
.game-detail .detail-sidebar .detail-actions { gap: 8px; }
.detail-actions .form-row { margin-top: 14px; }
.detail-actions .form-row > div { display: grid !important; grid-template-columns: 42px 1fr 42px; gap: 6px !important; }
.detail-actions .form-row input { width: 100% !important; }
.detail-actions .total-display {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: #07111e;
  border: 1px solid #2b3d53;
  color: var(--pe-gold-bright);
  font-family: var(--font-mono);
}
.game-community { margin-top: 26px; border-color: var(--pe-line); background: rgba(7,15,25,.95); }
.community-tabs { background: #0d1928; border-color: var(--pe-line); }
.community-tabs button.active { color: var(--pe-gold-bright); border-bottom-color: var(--pe-gold); }

/* Cart and checkout */
body[data-route="cart"] #content-inner { max-width: 1380px; }
.pe-cart-layout { display: grid; grid-template-columns: minmax(0,1fr) 350px; gap: 22px; align-items: start; }
.pe-cart-items {
  overflow: hidden;
  background: rgba(7,16,27,.96);
  border: 1px solid var(--pe-line);
  border-radius: 6px;
}
.cart-item {
  min-height: 108px;
  padding: 14px 18px;
  gap: 16px;
  border-color: rgba(103,134,169,.18);
}
.cart-item:hover { background: rgba(35,136,255,.04); }
.cart-item .cart-cover { width: 132px; height: 76px; overflow: hidden; border: 1px solid #31475f; }
.cart-item .cart-details { flex: 1; min-width: 0; }
.cart-item .cart-name { color: #fff; font-size: 16px; }
.cart-item .cart-meta { margin-top: 6px; color: #75849a; }
.cart-qty-stepper { display: grid; grid-template-columns: 34px 48px 34px; gap: 4px; align-items: center; }
.cart-qty-stepper button { height: 34px; border: 1px solid #31475f; background: #0b1827; color: #9fb0c2; }
.cart-qty-stepper output { height: 34px; display: grid; place-items: center; border: 1px solid #31475f; background: #07111e; color: #fff; font-family: var(--font-mono); }
.cart-remove { width: 34px; height: 34px; border: 1px solid #4b3038; color: #dc737b !important; font-size: 14px !important; }
.cart-summary {
  position: sticky;
  top: 18px;
  margin: 0;
  padding: 22px;
  text-align: left;
  background: rgba(7,16,27,.97);
  border: 1px solid #32475f;
  border-top: 2px solid var(--pe-gold);
  box-shadow: var(--pe-shadow);
}
.cart-summary h3 { margin-bottom: 18px; font-size: 18px; }
.cart-summary-row { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; color: #8998aa; border-bottom: 1px solid rgba(103,134,169,.16); }
.cart-summary-row strong { color: #e5ebf2; font-family: var(--font-mono); }
.cart-summary .total-label { margin-top: 16px; color: #94a2b3; }
.cart-summary .total-price { margin: 3px 0 14px; color: var(--pe-gold-bright); font-size: 31px; }
.cart-summary .btn-primary { width: 100%; }
.cart-security-note { margin-top: 13px; color: #68778a; font-size: 10px; text-align: center; }

.purchase-confirm { display: grid; gap: 16px; }
.purchase-confirm-product { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 14px; align-items: center; }
.purchase-confirm-cover { height: 60px; display: grid; place-items: center; overflow: hidden; border: 1px solid #344b64; background: #091625; }
.purchase-confirm-cover img { width: 100%; height: 100%; object-fit: cover; }
.purchase-confirm-product strong { display: block; color: #fff; font-size: 16px; }
.purchase-confirm-product span { display: block; margin-top: 4px; color: #7f8da1; font-size: 11px; }
.purchase-confirm-lines { border-top: 1px solid #2a3c51; border-bottom: 1px solid #2a3c51; }
.purchase-confirm-lines div { display: flex; justify-content: space-between; gap: 18px; padding: 9px 0; color: #8796a9; }
.purchase-confirm-lines b { color: #dfe7f0; font-family: var(--font-mono); }
.purchase-confirm-lines .purchase-total b { color: var(--pe-gold-bright); font-size: 20px; }
.purchase-confirm-balance { color: #6f7e91; font-size: 11px; }
.purchase-confirm-safe { padding: 10px 12px; border-left: 2px solid var(--pe-blue); background: rgba(35,136,255,.07); color: #8ea2b8; font-size: 10px; }

/* Player market and K-line terminal */
body[data-route="market"] #content-inner,
body[data-route="trading"] #content-inner { max-width: 1580px; }
.market-tabs {
  min-height: 46px;
  margin-bottom: 14px !important;
  padding: 3px;
  display: inline-flex !important;
  background: #07111e;
  border: 1px solid var(--pe-line);
  border-radius: 5px;
}
.market-tab {
  min-height: 38px;
  padding: 8px 18px;
  display: inline-flex;
  align-items: center;
  border-radius: 3px;
  color: #8392a5;
}
.market-tab.active { background: #e4aa33; color: #07101a; border-color: #ffd36d; }
.kline-expand-panel {
  margin-bottom: 18px !important;
  background: #06101b;
  border: 1px solid #2b4057;
  border-top: 2px solid rgba(35,136,255,.70);
  border-radius: 6px;
}
.kline-panel-header {
  min-height: 55px;
  padding: 8px 14px;
  background: #0c1827;
  border-bottom: 1px solid #2c4056;
}
.kline-panel-header > span { color: #dfe6ef; }
.kline-panel-header > span small { display: block; margin-bottom: 2px; color: #6f8095; font-size: 9px; font-weight: 800; letter-spacing: 1.2px; }
.kline-panel-header > span strong { margin-right: 10px; font-size: 15px; }
.kline-panel-header > div { background: #07111e; border: 1px solid #263b51; }
.kline-tf-btn { min-width: 50px; min-height: 32px; }
.kline-tf-btn.active, .kline-tf-btn:hover { background: #13263c; color: var(--pe-gold-bright); border-color: rgba(232,174,53,.58); }
.kline-container { min-height: 390px !important; background: #050d17; }
.market-grid { grid-template-columns: repeat(auto-fill,minmax(230px,1fr)); gap: 13px; }
.market-browse-tools { display: flex; gap: 8px; align-items: center; }
.market-browse-tools input { width: 190px; }
.market-browse-tools select { width: 145px; }
.market-card {
  overflow: hidden;
  border: 1px solid #283b50;
  border-top: 2px solid rgba(35,136,255,.55);
  border-radius: 6px;
  background: #091421;
}
.market-card:hover { transform: translateY(-2px); border-color: rgba(232,174,53,.56); }
.market-card-header { height: 118px; }
.market-card-header img { width: 100%; height: 100%; display: block; object-fit: cover; }
.market-card-header > span { font-size: 40px; }
.market-card-body { padding: 12px 13px; }
.market-card-game { color: #fff; font-size: 15px; }
.market-card-meta { color: #77869a; }
.market-card-price { color: var(--pe-gold-bright); font-size: 22px; }
.market-card-compare { color: #6c7b8f; }
.market-card-seller { border-color: rgba(103,134,169,.18); color: #8795a6; }
.market-card-actions { padding: 0 12px 13px; }

.market-listings {
  overflow: hidden;
  border: 1px solid #2b3f55;
  border-radius: 6px;
  background: rgba(7,16,27,.96);
}
.market-listing-row {
  min-height: 92px;
  display: grid;
  grid-template-columns: 138px minmax(180px,1.2fr) minmax(110px,.7fr) 90px minmax(150px,.9fr) 130px;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(103,134,169,.18);
}
.market-listing-row:last-child { border-bottom: 0; }
.market-listing-row:hover { background: rgba(35,136,255,.045); }
.market-listing-cover { height: 66px; overflow: hidden; display: grid; place-items: center; border: 1px solid #344a62; background: #0a1726; font-size: 30px; }
.market-listing-cover img { width: 100%; height: 100%; object-fit: cover; }
.market-listing-name strong { display: block; color: #fff; font-size: 15px; }
.market-listing-name small { color: #718197; }
.market-listing-price strong { color: var(--pe-gold-bright); font: 800 18px var(--font-mono); }
.market-listing-price small, .market-listing-qty small, .market-listing-status small { display: block; margin-bottom: 4px; color: #657489; font-size: 9px; }
.market-listing-qty b { color: #e4eaf1; font-family: var(--font-mono); }
.market-listing-status b { color: var(--pe-green); font-size: 12px; }
.market-listing-status time { display: block; margin-top: 5px; color: #75849a; font-size: 9px; }
.market-listing-actions { text-align: right; }

.market-purchase-dialog, .market-sell-dialog { display: grid; gap: 15px; }
.market-order-product { padding: 12px; border: 1px solid #2c4057; background: #07111e; }
.market-order-product strong { color: #fff; }
.market-order-product span { float: right; color: var(--pe-gold-bright); font-family: var(--font-mono); }
.market-qty-stepper { display: grid; grid-template-columns: 42px 1fr 42px; gap: 6px; }
.market-qty-stepper input { text-align: center; }
.market-order-summary { border-top: 1px solid #2b3e54; border-bottom: 1px solid #2b3e54; }
.market-order-summary > div { display: flex; justify-content: space-between; padding: 8px 0; color: #7e8da1; }
.market-order-summary b { color: #dfe7f0; font-family: var(--font-mono); }
.market-order-summary .total b { color: var(--pe-gold-bright); font-size: 20px; }
.market-sell-estimate { grid-template-columns: repeat(2,minmax(0,1fr)); }
.market-sell-estimate > div { background: #07111e; border-color: #2b4057; }
.market-sell-estimate .net { background: rgba(55,208,143,.06); border-color: rgba(55,208,143,.36); }

/* Wallet */
body[data-route="wallet"] #content-inner { max-width: 1380px; }
.wallet-balance-band {
  grid-template-columns: minmax(250px,1.35fr) repeat(3,minmax(150px,1fr));
  margin-bottom: 16px;
  background: #07111e;
  border: 1px solid #2d4158;
  border-top: 2px solid var(--pe-gold);
  border-radius: 6px;
  box-shadow: var(--pe-shadow);
}
.wallet-balance-main { background: #101d2c; }
.wallet-balance-item { border-color: #26394e; }
.wallet-balance-main strong { color: var(--pe-gold-bright); }
.wallet-balance-item.accent strong { color: var(--pe-blue-bright); }
.wallet-action-grid { gap: 14px; }
.wallet-action-panel { padding: 19px; }
.wallet-panel-title { padding-bottom: 13px; margin-bottom: 13px; border-color: #293d53; }
.wallet-panel-mark { background: var(--pe-gold); }
.wallet-panel-mark.blue { background: var(--pe-blue); }
.wallet-presets button { background: #0c1a2b; border-color: #2f4661; }
.wallet-presets button:hover { color: var(--pe-gold-bright); border-color: var(--pe-gold); }
.wallet-provider-switch button { background: #0b1725; border-color: #31475f; }
.wallet-provider-switch button.active { border-color: var(--pe-gold); background: #172436; }
.wallet-fee-policy { background: rgba(7,16,27,.96); border-color: #2b4056; }
.wallet-fee-heading { background: #0c1928; border-color: #2b4056; }
.wallet-fee-grid > div { border-color: rgba(103,134,169,.18); }
.wallet-history { border-color: #2b4056; }
.wallet-history-head { background: #0e1b2a; border-color: #2b4056; }
.wallet-ledger-row { min-height: 70px; border-color: rgba(103,134,169,.14); }
.wallet-ledger-row:hover { background: rgba(35,136,255,.05); }

/* Collection cabinet */
body[data-route="library"] #content-inner { max-width: 1540px; }
.collection-header { min-height: 72px; }
.collection-summary {
  padding: 8px 13px;
  border: 1px solid #2f435a;
  background: rgba(7,16,27,.92);
}
.collection-cabinet {
  border: 1px solid #304359;
  background: #050d17;
  box-shadow: 0 18px 44px rgba(0,0,0,.36);
}
.cabinet-crown { background: #0c1724; border-color: #31455b; }
.cabinet-glass { background: rgba(4,10,18,.83); }
.cabinet-shelf { border-color: #293b4e; box-shadow: inset 0 -56px 80px rgba(0,0,0,.48); }
.collection-case { transition: transform .18s ease,filter .18s ease; }
.collection-case:hover { transform: translateY(-7px); filter: brightness(1.08); }
.case-plaque { border-color: #30445b; background: #0b1624; }
.collection-console {
  border: 1px solid #30465d;
  border-top: 2px solid var(--pe-blue);
  background: rgba(7,16,27,.96);
  box-shadow: var(--pe-shadow);
}
.collection-launch-btn { background: var(--pe-gold); border-color: var(--pe-gold-bright); }

/* Creator platform */
body[data-route="creator"] #content-inner { max-width: 1510px; }
.creator-page { max-width: 1480px; padding: 0 0 64px; }
.creator-hero, .creator-intro {
  min-height: 330px;
  background: linear-gradient(90deg,rgba(3,9,17,.95),rgba(3,9,17,.42) 64%,rgba(3,9,17,.08));
  border-bottom: 1px solid rgba(232,174,53,.35);
}
.creator-hero h1, .creator-intro h1 { color: var(--pe-gold-bright); }
.creator-hero-actions .btn-primary, .creator-actions .btn-primary { min-width: 170px; }
.creator-flow, .creator-process { border-color: rgba(103,134,169,.18); }
.creator-flow > div, .creator-process > div { border-color: rgba(103,134,169,.18); background: rgba(7,16,27,.86); }
.creator-benefits { border-top-color: rgba(232,174,53,.55); }
.creator-benefit, .benefit-ledger li {
  background: rgba(8,18,30,.94);
  border: 1px solid #283d53;
  border-top: 2px solid rgba(35,136,255,.46);
}
.creator-benefit:hover, .benefit-ledger li:hover { border-color: rgba(232,174,53,.55); }
.referral-explainer { background: #2b4057; border-color: #2b4057; }
.referral-explainer > div { background: rgba(7,16,27,.96); }
.creator-studio-row { border-color: rgba(103,134,169,.18); }
.creator-studio-row:hover { background: #0c1928; }
.creator-workbar, .review-console-head, .release-head {
  border-bottom-color: rgba(232,174,53,.36);
}
.creator-metrics > div { background: rgba(7,16,27,.94); border-color: #293e54; }
.creator-console-section, .creator-side-section { border-color: #2b4057; }
.section-heading { border-color: rgba(103,134,169,.18); }
.creator-table-wrap { border-color: #293e54; }
.release-steps > div { background: #091625; border-color: #2c4158; }
.release-steps > div.active { border-color: rgba(232,174,53,.58); color: var(--pe-gold-bright); }
.upload-grid label { background: #081522; border-color: #2e435a; }
.review-tabs { background: #07111e; border-color: #2b4057; }
.review-tabs button.active { background: var(--pe-gold); color: #07101a; }

/* Account */
body[data-route="account"] #content-inner { max-width: 1380px; }
.account-page { max-width: 1260px; }
.account-header {
  min-height: 108px;
  padding: 9px 0 20px;
  border-color: rgba(232,174,53,.34);
}
.account-header h1 { color: #fff; font-size: 31px; }
.account-layout { grid-template-columns: 270px minmax(0,1fr); gap: 20px; }
.account-overview {
  position: sticky;
  top: 18px;
  padding: 25px 20px;
  border: 1px solid #2d435a;
  border-left: 2px solid var(--pe-gold);
  background: rgba(7,16,27,.96);
}
.account-avatar-large { border-color: rgba(232,174,53,.60); box-shadow: 0 0 0 5px rgba(232,174,53,.06),0 0 24px rgba(35,136,255,.10); }
.account-settings { border-color: #2d435a; background: rgba(7,16,27,.94); }
.account-section { padding: 23px 26px; border-color: rgba(103,134,169,.20); }
.account-section-icon { border-color: rgba(35,136,255,.52); background: #0b1a2b; color: var(--pe-blue-bright); }
.account-upload-button { border-color: #3a526e; }
.avatar-presets button { border-color: #2d435a; background: #0a1726; }

/* Support */
body[data-route="contact"] #content-inner { max-width: 1370px; }
.contact-page { max-width: 1220px; }
.contact-hero { min-height: 128px; border-color: rgba(232,174,53,.35); }
.contact-hero h2 { color: var(--pe-gold-bright); font-size: 36px; }
.contact-account { background: #0a1726; border: 1px solid #2d435b; border-left: 2px solid var(--pe-gold); }
.contact-directory { border-color: transparent; }
.contact-channel {
  min-height: 104px;
  margin-top: 8px;
  padding: 16px 18px;
  border: 1px solid #2c4158;
  background: rgba(7,16,27,.94);
}
.contact-channel:hover { background: #0c1a2a; border-color: rgba(232,174,53,.48); }
.contact-channel-icon { border-color: rgba(232,174,53,.48); background: #101c2c; }
.contact-copy { border-color: #324a63; background: #0a1725; }
.contact-checklist { margin-top: 10px; padding: 22px; border: 1px solid #2b4057; background: rgba(7,16,27,.92); }

/* Friends */
.friends-dock-panel {
  right: 16px;
  bottom: 64px;
  width: min(820px,calc(100vw - 32px));
  height: min(660px,calc(100vh - 96px));
  background: #07111e;
  border: 1px solid #34516e;
  border-radius: 6px;
  box-shadow: 0 28px 80px rgba(0,0,0,.68);
}
.friends-dock-header { height: 48px; background: #0f1e2f; border-color: #2d435b; }
.friends-dock-body { padding: 10px; }
.friends-dock-layout { grid-template-columns: 270px minmax(0,1fr); border-color: #293f56; background: #06101b; }
.friends-list-panel { background: #07111c; border-color: #2a4057; }
.friend-list-item { min-height: 50px; border-radius: 3px; }
.friend-list-item:hover { background: #0e2033; }
.friend-list-item.selected { background: #112a43; border-left-color: var(--pe-gold); }
.friends-dock-layout .friend-profile-header { background: #0e1c2b; border-color: #2b4158; }
.friends-dock-layout .chat-panel { background: #07111e; }
.friends-dock-layout .chat-messages {
  background-color: #07111e;
  background-image: linear-gradient(rgba(3,9,17,.78),rgba(3,9,17,.86));
}
.chat-msg { border: 1px solid #2d435a; background: #142336; }
.chat-msg.mine { border-color: #276ab0; background: #174c82; }
.chat-input-row { background: #0b1725; border-color: #2c425a; }

/* Desktop integration overrides */
body.player-easy-desktop.player-easy-integrated-titlebar .desktop-titlebar {
  height: var(--pe-topbar);
  padding: 0 142px 0 18px;
  background: #050b14;
  border-color: #243347;
  font-size: 14px;
}
body.player-easy-desktop.player-easy-integrated-titlebar .desktop-titlebar img { width: 36px; height: 36px; }
body.player-easy-desktop.player-easy-integrated-titlebar .desktop-titlebar-nav a { height: 100%; padding: 0 15px; font-size: 14px; }
body.player-easy-desktop.player-easy-integrated-titlebar #app { height: calc(100vh - var(--pe-topbar)); margin-top: var(--pe-topbar); }
body.player-easy-desktop.player-easy-integrated-titlebar #sidebar,
body.player-easy-desktop.player-easy-integrated-titlebar #content { height: calc(100vh - var(--pe-topbar)); }

@media (max-width: 1180px) and (min-width: 769px) {
  :root { --pe-sidebar: 72px; --sidebar-width: 72px; --content-padding: 18px; }
  .desktop-titlebar-brand { width: 76px; flex-basis: 76px; }
  .desktop-titlebar-brand strong, .desktop-titlebar-brand span { display: none; }
  #content::before { left: var(--pe-sidebar); }
  .sidebar-brand { justify-content: center; padding: 12px; }
  .sidebar-brand-copy, .sidebar-nav .nav-section-label, .sidebar-user .user-info, .logout-btn { display: none; }
  .sidebar-nav .nav-item { justify-content: center; padding: 9px; font-size: 0; }
  .sidebar-nav .nav-item.active { padding-left: 7px; }
  .sidebar-nav .nav-item .nav-icon { font-size: 18px; }
  .sidebar-nav .nav-item .nav-badge { position: absolute; right: 2px; top: 2px; font-size: 9px; }
  .sidebar-footer { padding: 8px; }
  .sidebar-user { justify-content: center; }
  .desktop-download-link { display: none; }
  .game-detail { grid-template-columns: minmax(0,1fr) 300px; }
  .market-listing-row { grid-template-columns: 110px minmax(160px,1fr) 120px 70px minmax(130px,.8fr) 110px; gap: 10px; }
}

@media (max-width: 768px) {
  :root { --pe-topbar: 0px; --pe-sidebar: 0px; --sidebar-width: 0px; --content-padding: 10px; }
  body { background-position: 66% center; overflow: hidden; }
  body::after { background: rgba(2,7,14,.36); }
  .desktop-titlebar { display: none !important; }
  #app { height: 100dvh; margin-top: 0; }
  #sidebar, #content { height: auto; }
  #content { flex: 1; min-height: 0; background: rgba(3,9,17,.45); }
  #content::before { display: none; }
  #content-inner { padding: 10px 10px 74px; }
  #mobile-bar {
    min-height: 54px;
    padding: 7px 10px;
    background: #050c15;
    border-bottom: 1px solid #2b3e54;
  }
  .mobile-brand { min-width: 0; display: flex; align-items: center; gap: 8px; }
  .mobile-brand img { width: 30px; height: 30px; object-fit: contain; }
  .mobile-logo { color: #fff; font-size: 13px; letter-spacing: 0; }
  .mobile-sub { display: block; color: var(--pe-gold-bright); font-size: 8px; }
  #sidebar { width: 250px; min-width: 250px; left: -270px; height: 100dvh; }
  .sidebar-brand { justify-content: flex-start; min-height: 70px; }
  .sidebar-brand-copy { display: flex; }
  .sidebar-nav .nav-item { justify-content: flex-start; font-size: 14px; }
  .sidebar-nav .nav-section-label { display: block; }
  .sidebar-user .user-info, .logout-btn { display: block; }
  .section-header { min-height: 56px; margin-bottom: 12px; padding: 4px 0 9px 11px; }
  .section-header h2 { font-size: 21px; }
  .stat-cards { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 8px; }
  .stat-card { min-height: 86px; padding: 12px 10px 11px 47px; }
  .stat-card::before { left: 10px; top: 16px; width: 28px; height: 28px; }
  .stat-card .stat-value { font-size: 16px; overflow-wrap: anywhere; }
  .stat-card .stat-label { font-size: 8px; }
  .store-filters { flex-direction: column; align-items: stretch; }
  .store-filters .search-box, .store-filters select { width: 100%; max-width: none; }
  .game-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .game-card .game-cover { height: 96px; }
  .game-card .game-info { padding: 9px; }
  .game-card .game-name { font-size: 12px; }
  .game-quality { display: block; }
  .game-quality > span:last-child { display: block; margin: 4px 0 0; font-size: 9px; }
  .review-tier { max-width: 100%; font-size: 9px; }
  .game-card .game-price { font-size: 14px; }
  .game-detail { grid-template-columns: 1fr; gap: 12px; }
  .game-detail .detail-cover { height: 210px; }
  .game-detail .detail-header h2 { font-size: 24px; }
  .game-detail .detail-sidebar { position: static; padding: 16px; }
  .game-detail .detail-sidebar .price-display { font-size: 27px; }
  .pe-cart-layout { grid-template-columns: 1fr; gap: 12px; }
  .cart-summary { position: static; }
  .cart-item { min-height: 96px; padding: 10px; gap: 9px; flex-wrap: wrap; }
  .cart-item .cart-cover { width: 92px; height: 56px; }
  .cart-item .cart-details { min-width: calc(100% - 102px); }
  .cart-qty-stepper { margin-left: 101px; }
  .cart-item .cart-price { margin-left: auto; }
  .market-tabs { width: 100%; }
  .market-tab { flex: 1; justify-content: center; padding: 7px; font-size: 11px; }
  .kline-panel-header { align-items: flex-start; flex-direction: column; gap: 8px; }
  .kline-panel-header > div { width: 100%; overflow-x: auto; }
  .kline-container { min-height: 260px !important; }
  .market-grid { grid-template-columns: 1fr; }
  .market-listing-row { grid-template-columns: 88px minmax(0,1fr) auto; gap: 9px; padding: 10px; }
  .market-listing-cover { height: 56px; }
  .market-listing-price { grid-column: 2; }
  .market-listing-qty { grid-column: 3; grid-row: 1; text-align: right; }
  .market-listing-status { grid-column: 2; }
  .market-listing-actions { grid-column: 3; text-align: right; }
  .wallet-balance-band { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .wallet-balance-main { grid-column: 1/-1; }
  .wallet-action-grid { grid-template-columns: 1fr; }
  .account-header { min-height: 86px; align-items: flex-start; }
  .account-sync-state { display: none; }
  .account-layout { grid-template-columns: 1fr; padding-top: 12px; }
  .account-overview { position: static; }
  .account-section { padding: 17px 14px; }
  .account-profile-editor, .account-form-grid { grid-template-columns: 1fr; }
  .avatar-editor { align-items: flex-start; }
  .contact-hero { align-items: flex-start; flex-direction: column; }
  .contact-account { width: 100%; }
  .contact-channel { grid-template-columns: 42px minmax(0,1fr); gap: 10px; }
  .contact-channel > p { grid-column: 1/-1; }
  .contact-channel-actions { grid-column: 1/-1; justify-content: flex-end; }
  .contact-checklist { grid-template-columns: 1fr; gap: 16px; }
  .contact-safety { padding: 12px; border-left: 2px solid var(--pe-red); }
  .friends-dock-toggle {
    right: 10px;
    bottom: max(10px,env(safe-area-inset-bottom));
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 10px 24px rgba(0,0,0,.42),0 0 16px rgba(35,136,255,.18);
  }
  .friends-dock-toggle strong { display: none; }
  .friends-dock-toggle .shell-icon { font-size: 19px; }
  .friends-dock-panel { inset: 58px 8px 8px; width: auto; height: auto; }
  .friends-dock-layout { grid-template-columns: 108px minmax(0,1fr); }
  .friend-list-copy small { display: none; }
  .friend-list-item { padding: 6px 5px; }
  .friends-dock-layout .friend-profile-header { padding: 10px; }
  .fp-actions { flex-wrap: wrap; }
  .chat-msg { max-width: 88%; }
  .creator-hero { min-height: 270px; padding: 24px 0; }
  .creator-console-grid, .release-layout, .creator-form-layout { grid-template-columns: 1fr; }
  .creator-table-wrap { overflow: visible; }
  .creator-table { display: block; min-width: 0; }
  .creator-table thead { display: none; }
  .creator-table tbody { display: grid; gap: 10px; }
  .creator-table tr {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 0;
    padding: 9px;
    border: 1px solid #293f56;
    background: #07121f;
  }
  .creator-table td {
    display: block;
    min-width: 0;
    height: auto;
    padding: 8px;
    border: 0;
    overflow-wrap: anywhere;
  }
  .creator-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: #718198;
    font-size: 9px;
    font-weight: 800;
  }
  .creator-table td:first-child { grid-column: 1/-1; border-bottom: 1px solid rgba(108,135,166,.18); }
  .creator-table td.creator-table-action { grid-column: 1/-1; }
  .creator-table td.creator-table-action .table-action { width: 100%; }
  .creator-table .table-empty { grid-column: 1/-1; }
  .creator-table .table-empty::before { display: none; }
}

@media (max-width: 420px) {
  #content-inner { padding-inline: 7px; }
  .game-grid { gap: 6px; }
  .game-card .game-cover { height: 84px; }
  .stat-card { padding-left: 10px; }
  .stat-card::before { display: none; }
  .wallet-balance-item strong { font-size: 15px; }
  .friends-dock-layout { grid-template-columns: 88px minmax(0,1fr); }
  .fl-avatar { width: 29px; height: 29px; flex-basis: 29px; }
}
