
:root {
  --bg:#0b0f14;
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.62);
  --gold:#c27c0e;
  --gold-soft:rgba(194,124,14,.14);
  --line:rgba(255,255,255,.10);
  --cardA:rgba(255,255,255,.06);
  --cardB:rgba(255,255,255,.035);
  --panel: linear-gradient(180deg,var(--cardA),var(--cardB));
  --shadow: 0 14px 40px rgba(0,0,0,.20);
  --radius: 18px;
}

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

body {
  min-height: 100vh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background:
    radial-gradient(1200px 800px at 20% 0%, rgba(194,124,14,0.14), transparent 55%),
    radial-gradient(1200px 800px at 85% 20%, rgba(0,160,255,0.10), transparent 50%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 70px;
}

.site-header {
  padding: 10px 0 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.site-header-stack {
  border-bottom: 0;
  padding-bottom: 0;
}

.site-header-row,
.site-header-mainrow,
.site-header-bar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.site-header-mainrow {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.site-brand-inline,
.site-brand-home,
.brand-wrap {
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}

.site-logo-link,
.site-banner-link {
  display:inline-flex;
  align-items:center;
}

.compact-header { padding-top: 0; }
.compact-logo, .brand-logo, .site-logo { height: 36px; width: auto; display:block; }
.compact-banner, .brand-server, .site-server-banner { height: 27px; width: auto; display:block; max-width: min(520px, 52vw); }

.site-nav,
.site-main-nav {
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.site-nav a,
.site-main-nav a {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 9px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.05);
  border:1px solid var(--line);
  color:rgba(255,255,255,.88);
  font-size:13px;
  font-weight:700;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.site-nav a:hover,
.site-main-nav a:hover,
.shop-subnav a:hover,
.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(194,124,14,.35);
}

.site-nav a.cta,
.site-main-nav a.cta {
  background: rgba(194,124,14,.14);
  border-color: rgba(194,124,14,.30);
}

.site-nav a.is-active,
.site-main-nav a.is-active {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.18);
}

.site-nav a.login-cta,
.site-main-nav a.login-cta {
  background: rgba(124,124,14,.14);
  border-color: rgba(124,124,14,.30);
}

.shop-subnav-shell {
  display:flex;
  justify-content:flex-end;
  margin-top: 10px;
}

.shop-subnav {
  display:inline-flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  padding: 10px 12px;
  border-radius: 18px;
  background: var(--panel);
  border:1px solid var(--line);
  box-shadow: var(--shadow);
}

.shop-subnav a {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height: 0;
  padding: 9px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.05);
  border:1px solid var(--line);
  color: rgba(255,255,255,.88);
  font-size: 13px;
  font-weight:700;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.shop-subnav a.is-active {
  background: rgba(194,124,14,.14);
  border-color: rgba(194,124,14,.30);
}

.shop-subnav-count {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius:999px;
  background: var(--gold);
  color:#fff;
  font-size:11px;
  line-height:1;
}

.hero-card,
.panel-card,
.empty-box,
.item-card,
.category-card,
.modal-card,
.cart-card,
.inv-card,
.shop-empty,
.summary,
.inventory-card,
.inventory-empty {
  background: var(--panel);
  border:1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 16px;
  margin-bottom: 18px;
}

.hero-card h1,
.hero-card h2,
.page-head h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: .2px;
}

.hero-card p,
.page-head .sub,
.hero-kicker,
.muted {
  color: var(--muted);
}

.hero-kicker { margin-top: 10px; text-align:center; font-size:12px; }

.page-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.userbox { text-align:right; min-width:140px; }
.userbox .name, .hero-user-name { color:#fff; font-weight:700; }
.userbox .balance, .hero-user-balance { font-size:22px; font-weight:800; }

.hero-card,
.topbar,
.inventory-topbar {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.hero-user,
.meta,
.inventory-meta-pills {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.pill,
.inventory-pill {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.05);
  border:1px solid var(--line);
  color:rgba(255,255,255,.88);
  font-size:13px;
}

.category-grid,
.item-grid,
.inventory-grid,
.cart-list {
  display:grid;
  gap:18px;
}

.category-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.item-grid { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }

.category-card { position:relative; min-height:190px; overflow:hidden; }
.item-card { padding:14px; }
.item-image-wrap {
  height:220px;
  border-radius:16px;
  background:rgba(255,255,255,.03);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.item-image { max-width:100%; max-height:100%; object-fit:contain; display:block; }
.img-placeholder { color:#768295; }
.item-name { margin-top:14px; font-size:18px; font-weight:800; }
.item-price { margin-top:8px; font-size:20px; color:#ecf3ff; }

.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  cursor:pointer;
  border-radius:999px;
  border:1px solid rgba(194,124,14,.30);
  background:rgba(194,124,14,.16);
  color:rgba(255,255,255,.92);
  font-size:13px;
  font-weight:800;
  padding:10px 14px;
}
.btn-primary { background:rgba(194,124,14,.16); border-color:rgba(194,124,14,.30); }
.btn-danger { background:rgba(160,45,45,.20); border-color:rgba(180,70,70,.35); }
.btn-muted { background:rgba(255,255,255,.05); border-color: var(--line); }
.btn-full { width:100%; margin-top:14px; }
.btn-small { padding:8px 12px; }

input[type="number"],
input[type="text"],
select {
  width:100%;
  background: rgba(255,255,255,.08);
  color:#fff;
  border:1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  padding: 14px;
}

@media (max-width: 900px) {
  .site-header-mainrow,
  .site-header-bar,
  .page-head,
  .topbar,
  .inventory-topbar,
  .shop-subnav-shell {
    justify-content:flex-start;
  }

  .site-nav,
  .site-main-nav,
  .shop-subnav { justify-content:flex-start; }

  .cart-row,
  .inv-row { grid-template-columns:1fr; }

  .userbox { text-align:left; }
}

@media (max-width: 700px) {
  .site-shell { width:min(1180px, calc(100% - 24px)); padding-top:16px; }
  .site-header-mainrow { flex-direction:column; align-items:flex-start; }
  .compact-logo, .brand-logo, .site-logo { height:36px; }
  .compact-banner, .brand-server, .site-server-banner { height:auto; width:min(280px, 100%); max-width:100%; }
  .hero-card,
  .topbar,
  .inventory-topbar { flex-direction:column; align-items:flex-start; }
}

.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 18px;
}

.modal-card {
  width: min(860px, 100%);
  padding: 24px;
  position: relative;
}

.modal-close {
  position: absolute;
  right: 14px;
  top: 8px;
  font-size: 36px;
  line-height: 1;
  border: 0;
  background: transparent;
  color: #c9d4e2;
  cursor: pointer;
}

.modal-price {
  font-size: 26px;
  font-weight: 800;
  margin: 8px 0 18px;
}

label {
  display: block;
  margin: 14px 0 8px;
  font-weight: 700;
}

input[type="number"],
input[type="text"],
select {
  width: 100%;
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  padding: 14px;
}

.marks-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.marks-panel {
  margin-top: 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 12px;
  max-height: 280px;
  overflow: auto;
}

.mark-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.mark-row:last-child {
  border-bottom: 0;
}

.modal-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.table-like {
  display: grid;
  gap: 12px;
}

.cart-row,
.inv-row {
  display: grid;
  grid-template-columns: 120px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.cart-thumb,
.inv-thumb {
  width: 120px;
  height: 90px;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cart-thumb img,
.inv-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cart-total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
}

.empty-box {
  padding: 22px;
}

@media (max-width: 900px) {
  .site-header-bar,
  .page-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .brand-wrap {
    flex-wrap: wrap;
  }

  .cart-row,
  .inv-row {
    grid-template-columns: 1fr;
  }

  .userbox {
    text-align: left;
  }

  .brand-logo {
    height: 34px;
  }

  .brand-server {
    height: 48px;
    max-width: 100%;
  }
}


.login-cta { background: rgba(194,124,14,.18) !important; border-color: rgba(194,124,14,.38) !important; }
@media (max-width: 768px) {
  .site-shell { width: min(100%, calc(100% - 20px)); padding: 12px 0 48px; }
  .site-header-mainrow { gap: 14px; }
  .site-brand-inline, .site-brand-home { width: 100%; justify-content: center; flex-wrap: wrap; }
  .compact-banner, .brand-server, .site-server-banner { max-width: min(100%, 420px); height: auto; }
  .site-nav, .site-main-nav { width: 100%; justify-content: center; }
  .site-nav a, .site-main-nav a { flex: 1 1 calc(50% - 10px); min-width: 130px; }
  .hero-card, .topbar, .inventory-topbar, .page-head { flex-direction: column; }
  .userbox { text-align: left; }
}
