:root {
  color-scheme: dark;
  --bg: #08070d;
  --panel: #11101a;
  --panel-2: #171522;
  --line: rgba(157, 89, 255, 0.2);
  --violet: #9b5cff;
  --violet-2: #6d35e8;
  --orange: #ff7a18;
  --text: #f6f4fb;
  --muted: #8d899a;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 85% 3%, rgba(122, 57, 231, 0.16), transparent 24rem),
    linear-gradient(180deg, #0b0911 0%, var(--bg) 55%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
.app-shell { max-width: 680px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(92px + var(--safe-bottom)); }
.topbar {
  height: 74px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(18px); background: rgba(8, 7, 13, .78);
  border-bottom: 1px solid rgba(255,255,255,.045);
}
.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center; font-weight: 900; letter-spacing: -2px;
  border: 1px solid var(--violet); background: linear-gradient(145deg, #2b1b49, #0e0b15); clip-path: polygon(50% 0, 94% 24%, 94% 76%, 50% 100%, 6% 76%, 6% 24%);
}
.brand-lockup strong { display: block; font-size: 16px; letter-spacing: .06em; }
.brand-mark{overflow:hidden}.brand-mark img{width:115%;height:115%;object-fit:contain;transform:translate(-5%,-2%)}
.brand-lockup strong span { color: var(--violet); }
.brand-lockup small { display: block; color: var(--muted); font-size: 8px; letter-spacing: .28em; margin-top: 2px; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: #c7aaff; font-size: 19px; }
.top-actions { display: flex; align-items: center; gap: 6px; }.locale-button { height: 38px; min-width: 42px; display: flex; align-items: center; justify-content: center; gap: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(17,16,26,.88); color: #d8c7f4; padding: 0 8px; }.locale-button span { font-size: 15px; }.locale-button b { font-size: 9px; }

.hero { min-height: 360px; overflow: hidden; position: relative; display: flex; align-items: center; padding: 38px 20px 44px; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(155,92,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(155,92,255,.035) 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(90deg, #000 0%, transparent 80%); }
.hero::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; border: 1px solid rgba(155,92,255,.2); right: -40px; top: 45px; box-shadow: 0 0 70px rgba(126,55,235,.18); }
.hero-copy { position: relative; z-index: 3; width: 62%; }
.eyebrow { color: #ba9af2; font-size: 10px; letter-spacing: .18em; font-weight: 800; margin-bottom: 13px; }
.eyebrow i { display: inline-block; width: 7px; height: 7px; background: #61e2a3; border-radius: 50%; margin-right: 6px; box-shadow: 0 0 10px #61e2a3; }
.hero h1 { font-size: clamp(34px, 9vw, 52px); line-height: .98; letter-spacing: -.055em; margin: 0 0 17px; text-transform: uppercase; }
.hero p { max-width: 340px; color: #aaa5b4; line-height: 1.55; font-size: 13px; margin: 0 0 22px; }
.hero img { position: absolute; z-index: 2; width: 305px; height: 305px; object-fit: cover; border-radius: 50%; right: -86px; bottom: -18px; filter: drop-shadow(0 0 28px rgba(119,56,235,.25)); animation: forgeFloat 5s ease-in-out infinite; }
@keyframes forgeFloat { 50% { transform: translateY(-8px) rotate(.6deg); filter: drop-shadow(0 0 38px rgba(119,56,235,.38)); } }
.primary-button { border: 0; border-radius: 14px; padding: 14px 17px; background: linear-gradient(135deg, var(--violet), var(--violet-2)); font-weight: 800; box-shadow: 0 10px 28px rgba(109,53,232,.27); }
.primary-button b { margin-left: 14px; }
.primary-button.full { width: 100%; margin-top: 14px; }

.quick-row { display: grid; grid-template-columns: repeat(3, 1fr); margin: -18px 16px 0; position: relative; z-index: 5; background: rgba(18,16,27,.94); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 18px 50px rgba(0,0,0,.35); }
.quick-row article { padding: 14px 8px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; border-right: 1px solid var(--line); }
.quick-row article:last-child { border-right: 0; }
.quick-row b { color: #c7a8ff; font-size: 15px; }
.quick-row span { color: var(--muted); font-size: 9px; }

.catalog { padding: 34px 16px 20px; }
.section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 16px; }
.section-head span, .sheet-title span, .admin-head span { font-size: 9px; color: var(--violet); letter-spacing: .25em; font-weight: 800; }
.section-head h2, .sheet-title h2, .admin-head h2 { margin: 4px 0 0; font-size: 23px; letter-spacing: -.035em; }
.text-button { border: 0; background: transparent; color: #b899ef; font-size: 12px; }
.search-wrap { margin-bottom: 14px; }
.search-wrap input { width: 100%; border: 1px solid var(--line); color: var(--text); background: var(--panel); border-radius: 14px; padding: 13px 15px; outline: none; }
.search-wrap input:focus { border-color: var(--violet); }
.category-tabs { display: grid; gap: 10px; margin: 0 -16px 17px; }
.category-tabs::-webkit-scrollbar { display: none; }
.game-filter, .type-filter { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 0 16px; }
.game-filter::-webkit-scrollbar, .type-filter::-webkit-scrollbar { display: none; }
.category-tabs button { white-space: nowrap; border: 1px solid rgba(255,255,255,.075); border-radius: 99px; background: var(--panel); color: var(--muted); padding: 9px 14px; font-size: 11px; }
.category-tabs button.active { color: white; border-color: var(--violet); background: rgba(126,57,235,.22); }
.game-chip { display: flex; align-items: center; gap: 7px; }
.game-logo { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; color: white; background: color-mix(in srgb, var(--game), #111 45%); border: 1px solid color-mix(in srgb, var(--game), white 18%); box-shadow: inset 0 0 12px color-mix(in srgb, var(--game), transparent 65%); }
.game-logo svg { width: 16px; height: 16px; fill: currentColor; filter: drop-shadow(0 0 4px currentColor); }
.game-logo img { width: 100%; height: 100%; border-radius: inherit; object-fit: contain; }
.game-logo b { font-size: 8px; }
.game-chip.active .game-logo { background: var(--game); color: #fff; }
.product-game .game-logo { width: 21px; height: 21px; border-radius: 7px; }.product-game .game-logo svg { width: 14px; height: 14px; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.product-card { position: relative; overflow: hidden; background: linear-gradient(155deg, #171520, #0e0d14); border: 1px solid rgba(255,255,255,.07); border-radius: 19px; padding: 14px; min-height: 230px; display: flex; flex-direction: column; }
.product-card { transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.product-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent), transparent 55%); box-shadow: 0 16px 35px rgba(0,0,0,.28); }
.reveal { animation: reveal .42s both; animation-delay: var(--delay); }
@keyframes reveal { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.product-card::before { content: ""; position: absolute; width: 100px; height: 100px; border-radius: 50%; background: var(--accent); filter: blur(55px); opacity: .18; right: -30px; top: -30px; }
.product-icon { width: 60px; height: 60px; display: grid; place-items: center; margin-bottom: 18px; border: 1px solid color-mix(in srgb, var(--accent), transparent 52%); border-radius: 17px; color: var(--accent); font-size: 27px; background: rgba(255,255,255,.025); }
.product-icon.has-image { width: 100%; height: 105px; overflow: hidden; }.product-icon img { width: 100%; height: 100%; object-fit: cover; }
.product-card small { color: var(--accent); font-size: 8px; letter-spacing: .14em; font-weight: 800; }
.product-game { display: flex; align-items: center; gap: 6px; color: #aaa4b5; font-size: 9px; margin-bottom: 8px; }
.product-card h3 { font-size: 15px; line-height: 1.22; margin: 6px 0; }
.product-card p { color: var(--muted); font-size: 10px; line-height: 1.4; margin: 0 0 12px; }
.product-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.product-bottom strong { font-size: 15px; }
.add-button { width: 34px; height: 34px; border: 0; border-radius: 11px; background: var(--accent); color: #09080d; font-size: 20px; font-weight: 800; }
.stock { position: absolute; top: 12px; right: 12px; color: #65dea1; font-size: 8px; }
.stock.off { color: #817c8b; }

.bottom-nav { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: 0; width: min(680px, 100%); display: grid; grid-template-columns: repeat(5, 1fr); padding: 9px 8px calc(9px + var(--safe-bottom)); background: rgba(12,10,17,.94); backdrop-filter: blur(20px); border-top: 1px solid var(--line); }
.bottom-nav button { position: relative; border: 0; background: transparent; color: #706b7a; font-size: 9px; display: grid; place-items: center; gap: 3px; }
.bottom-nav span { font-size: 20px; line-height: 1; }
.bottom-nav button.active { color: #b889ff; }
.bottom-nav i { position: absolute; top: -2px; right: 23%; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border-radius: 10px; background: var(--orange); color: #111; font-size: 9px; font-style: normal; font-weight: 900; }

dialog { color: var(--text); }
dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(5px); }
.sheet { width: min(680px, 100%); max-height: 86vh; margin: auto auto 0; border: 1px solid var(--line); border-radius: 26px 26px 0 0; padding: 27px 19px calc(24px + var(--safe-bottom)); background: #100e18; }
.sheet[open], .admin-panel[open] { animation: rise .22s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.sheet-close { position: absolute; right: 17px; top: 15px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: var(--panel-2); font-size: 22px; }
.detail-visual { height: 180px; border-radius: 20px; display: grid; place-items: center; font-size: 72px; color: var(--accent); background: radial-gradient(circle, color-mix(in srgb, var(--accent), transparent 72%), transparent 62%), #0b0910; border: 1px solid color-mix(in srgb, var(--accent), transparent 65%); }
.detail-visual.has-image { overflow: hidden; }.detail-visual img { width: 100%; height: 100%; object-fit: cover; }
.detail-copy small { color: var(--accent); letter-spacing: .15em; }
.detail-copy h2 { margin: 8px 0; font-size: 26px; }
.detail-copy p { color: var(--muted); line-height: 1.6; font-size: 13px; }
.detail-price { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 18px; }
.detail-price strong { font-size: 24px; }
.cart-item { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.cart-item-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; background: var(--panel-2); color: var(--violet); font-size: 22px; }
.cart-item b, .cart-item small { display: block; }
.cart-item small { color: var(--muted); margin-top: 3px; }
.cart-item button { border: 0; background: transparent; color: #e28686; }
.cart-total { display: flex; justify-content: space-between; padding-top: 18px; }
.cart-total span { color: var(--muted); }
.cart-total strong { font-size: 21px; }
.empty { text-align: center; padding: 55px 15px; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 20px; margin-bottom: 7px; }

.admin-panel { width: min(620px, calc(100% - 22px)); max-height: 90vh; border: 1px solid var(--line); border-radius: 24px; padding: 20px; background: #100e18; }
.admin-head { display: flex; justify-content: space-between; align-items: start; }
.admin-head button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); font-size: 22px; }
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 20px 0; }
.admin-stats article { background: var(--panel); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; padding: 12px; }
.admin-stats span { display: block; color: var(--muted); font-size: 9px; margin-bottom: 6px; }
.admin-stats b { font-size: 20px; color: #c6a5ff; }
.admin-list { display: grid; gap: 8px; max-height: 44vh; overflow-y: auto; }
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; }
.admin-tabs button { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 9px 11px; color: var(--muted); white-space: nowrap; font-size: 10px; }
.admin-tabs button.active { color: white; border-color: var(--violet); background: rgba(126,57,235,.2); }
.admin-tabs i { min-width: 15px; display: inline-grid; place-items: center; background: var(--orange); color: #111; border-radius: 8px; font-style: normal; }
.admin-workspace { min-height: 220px; }
.admin-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.admin-section-head small { color: var(--violet); letter-spacing: .16em; font-size: 8px; }
.admin-section-head h3 { margin: 3px 0 0; }
.mini-button, .ghost-button, .back-button { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 9px 12px; color: #c4a6f8; }
.ghost-button.full { width: 100%; margin-top: 14px; }
.admin-game, .admin-order { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; background: var(--panel); border-radius: 13px; padding: 11px; margin-bottom: 8px; }
.admin-game i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; font-style: normal; }
.admin-game small, .admin-product small, .admin-order small { display: block; color: var(--muted); font-size: 9px; }
.admin-game button { border: 0; background: transparent; color: #e28686; }
.admin-product span { min-width: 0; }
.admin-product b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-order select { max-width: 100px; }
.ticket-list { display: grid; gap: 8px; margin-top: 14px; }
.ticket-row { width: 100%; display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; text-align: left; border: 1px solid rgba(255,255,255,.06); border-radius: 14px; background: var(--panel); padding: 11px; }
.ticket-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: rgba(155,92,255,.15); color: #c6a5ff; font-style: normal; }
.ticket-row span { min-width: 0; }
.ticket-row b, .ticket-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-row b { font-size: 11px; }.ticket-row small { color: var(--muted); font-size: 9px; margin-top: 4px; }
.status { border-radius: 99px; background: rgba(255,122,24,.13); color: #ff9b51; padding: 5px 8px; font-size: 8px; font-style: normal; white-space: nowrap; }.status.closed { color: var(--muted); background: #24212b; }
.ticket-title { display: flex; justify-content: space-between; align-items: center; margin: 16px 0; }.ticket-title span { color: var(--violet); font-size: 8px; letter-spacing: .18em; }.ticket-title h3 { margin: 4px 0 0; }
.messages { display: grid; gap: 9px; max-height: 38vh; overflow-y: auto; }.message { max-width: 86%; border-radius: 16px 16px 16px 4px; background: var(--panel-2); padding: 11px; }.message.admin { margin-left: auto; border-radius: 16px 16px 4px 16px; background: rgba(109,53,232,.26); }.message b,.message small { font-size: 8px; color: #bfa1f1; }.message p { margin: 5px 0; font-size: 12px; line-height: 1.45; }
.reply-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 14px; }.reply-form textarea { min-height: 48px; }
.ticket-form { display: grid; gap: 12px; margin-top: 18px; }.ticket-form label { display: grid; gap: 6px; color: #b8b2c2; font-size: 10px; }.ticket-form input,.ticket-form textarea,.ticket-form select,.reply-form textarea,.admin-order select { width: 100%; border: 1px solid var(--line); background: #09080d; color: white; border-radius: 11px; padding: 11px; outline: none; }.ticket-form textarea { min-height: 100px; resize: vertical; }.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.form-note { color: var(--muted); font-size: 12px; line-height: 1.55; }.auth-switch { display: block; margin: 17px auto 0; }.profile-head { display: flex; align-items: center; gap: 13px; margin: 5px 0 20px; }.profile-avatar { width: 56px; height: 56px; display: grid; place-items: center; border: 1px solid var(--violet); border-radius: 18px; background: linear-gradient(145deg,#2b1b49,#0e0b15); font-size: 23px; font-weight: 900; }.profile-head span { color: var(--violet); font-size: 8px; letter-spacing: .18em; }.profile-head h2 { margin: 3px 0; }.profile-head small { color: var(--muted); }.balance-card { position: relative; overflow: hidden; display: grid; gap: 8px; border: 1px solid rgba(155,92,255,.35); border-radius: 20px; padding: 18px; background: radial-gradient(circle at 90% 0,rgba(155,92,255,.32),transparent 45%),var(--panel); }.balance-card span { color: #bba2e7; font-size: 8px; letter-spacing: .2em; }.balance-card strong { font-size: 29px; }.balance-card button { position: absolute; right: 13px; bottom: 13px; padding: 10px 13px; }.profile-actions { display: grid; gap: 8px; margin: 15px 0; }.profile-actions button { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; text-align: left; border: 1px solid rgba(255,255,255,.06); background: var(--panel); border-radius: 14px; padding: 10px; }.profile-actions i { width: 38px;height:38px;display:grid;place-items:center;border-radius:11px;background:rgba(155,92,255,.14);color:#bd99fa;font-style:normal}.profile-actions b,.profile-actions small { display:block }.profile-actions small { color:var(--muted);font-size:9px;margin-top:3px}.profile-actions em { font-size:22px;color:var(--muted);font-style:normal}.profile-history h3 { font-size:14px }.history-row { display:flex;justify-content:space-between;align-items:center;border-top:1px solid rgba(255,255,255,.06);padding:11px 0}.history-row b,.history-row small{display:block}.history-row small{color:var(--muted);font-size:9px;margin-top:3px}.empty.compact{padding:25px 10px}
.admin-product { display: grid; grid-template-columns: 1fr 78px 32px 42px 24px; gap: 7px; align-items: center; background: var(--panel); padding: 11px; border-radius: 13px; }
.admin-product b { font-size: 11px; }
.admin-product input { width: 100%; min-width: 0; border: 1px solid var(--line); background: #09080d; color: white; border-radius: 9px; padding: 8px; }
.toggle { border: 0; border-radius: 9px; padding: 8px 4px; background: #263d34; color: #78e2ad; font-size: 9px; }
.toggle.off { background: #30242b; color: #d88b9b; }
.delete-row { border: 0; background: transparent; color: #dc7c8d; font-size: 19px; }
.upload-mini { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: #c3a1fa; cursor: pointer; }.upload-mini input { display: none; }
.staff-card { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; border: 1px solid rgba(255,255,255,.06); background: var(--panel); border-radius: 14px; padding: 11px; }
.staff-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg,#6d35e8,#26183f); font-weight: 900; }
.staff-card b,.staff-card small,.staff-card em { display: block; }.staff-card small { color: #aaa4b5; font-size: 9px; margin-top: 2px; }.staff-card em { color: #756f80; font-size: 8px; line-height: 1.4; margin-top: 4px; font-style: normal; }.staff-card button { border: 1px solid var(--line); border-radius: 9px; background: transparent; color: #b99af0; padding: 7px; font-size: 9px; }.owner-badge { color: #ffac67; border: 1px solid rgba(255,122,24,.32); border-radius: 8px; padding: 5px 7px; font-size: 8px; font-style: normal; }
.permission-grid { border: 1px solid var(--line); border-radius: 13px; padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }.permission-grid legend { color: #b99af0; padding: 0 5px; }.permission-grid label { display: flex; align-items: center; gap: 7px; }.permission-grid input { width: auto; accent-color: var(--violet); }.danger-button { border: 1px solid rgba(220,83,105,.35); border-radius: 12px; padding: 11px; color: #ee8b9b; background: rgba(220,83,105,.08); }.danger-button.full { width: 100%; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(90px + var(--safe-bottom)); transform: translate(-50%, 20px); background: #f4f0fa; color: #17121d; padding: 11px 16px; border-radius: 13px; font-weight: 700; font-size: 12px; opacity: 0; pointer-events: none; transition: .2s; box-shadow: 0 12px 40px rgba(0,0,0,.4); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.mini-legal{margin:12px 16px 24px;padding:18px;border:1px solid var(--line);border-radius:18px;background:rgba(17,16,26,.78);display:grid}.mini-legal>div{margin-bottom:10px}.mini-legal b,.mini-legal span{display:block}.mini-legal span,.mini-legal small{color:var(--muted);font-size:9px;margin-top:3px}.mini-legal a{display:flex;justify-content:space-between;align-items:center;border-top:1px solid rgba(255,255,255,.06);padding:12px 0;color:#bca1ec;font-size:10px;text-decoration:none}.mini-legal a i{font-style:normal}.mini-legal small{margin-top:10px}

@media (min-width: 600px) {
  .hero { min-height: 400px; padding-left: 34px; }
  .hero img { width: 390px; height: 390px; right: -35px; }
  .catalog { padding-left: 24px; padding-right: 24px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 390px) {
  .hero-copy { width: 68%; }
  .hero h1 { font-size: 31px; }
  .hero img { width: 250px; height: 250px; right: -86px; }
  .product-grid { gap: 9px; }
  .product-card { padding: 12px; }
}
