*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root, [data-theme="dark"] {
  --bg: #0c0c10;
  --bg-card: #14141c;
  --bg-elevated: #1c1c28;
  --border: #2a2a38;
  --text: #ececf2;
  --text-muted: #8a8a9e;
  --primary: #5b5ef7;
  --primary-hover: #7477f9;
  --accent: #0ea5e9;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 4px 24px rgba(0,0,0,.35);
  --header-bg: rgba(12,12,16,.92);
  --font: 'Inter', system-ui, sans-serif;
}

[data-theme="light"] {
  --bg: #f4f4f8;
  --bg-card: #ffffff;
  --bg-elevated: #ececf4;
  --border: #d8d8e4;
  --text: #12121a;
  --text-muted: #64647a;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --accent: #0284c7;
  --success: #15803d;
  --danger: #b91c1c;
  --warning: #b45309;
  --shadow: 0 4px 24px rgba(0,0,0,.08);
  --header-bg: rgba(244,244,248,.92);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.container-narrow { max-width: 640px; }
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.logo-svg { height: 32px; width: auto; }

.nav {
  display: flex;
  gap: .15rem;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar { display: none; }

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: .45rem .75rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color .2s, background .2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--bg-elevated);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.select-compact {
  padding: .4rem .5rem !important;
  font-size: .8rem !important;
  min-width: 52px;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s;
  text-decoration: none;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: var(--bg-elevated); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: .3rem .65rem; font-size: .78rem; }
.btn-lg { padding: .75rem 1.5rem; font-size: .95rem; }
.btn-block { width: 100%; }

.icon-btn {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .2s;
}

.icon-btn:hover { border-color: var(--primary); }

.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--primary);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* User menu */
.user-menu { position: relative; }

.user-dropdown-btn { display: flex; align-items: center; gap: .4rem; }

.user-dropdown {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 180px;
  box-shadow: var(--shadow);
  z-index: 110;
  overflow: hidden;
}

.user-dropdown a, .user-dropdown button {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  padding: .65rem 1rem;
  text-decoration: none;
  color: var(--text);
  background: none;
  border: none;
  font-family: var(--font);
  font-size: .85rem;
  cursor: pointer;
  text-align: left;
}

.user-dropdown a:hover, .user-dropdown button:hover { background: var(--bg-elevated); }

.user-name { font-size: .82rem; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.role-badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.role-admin { color: var(--danger); border-color: var(--danger); }
.role-seller { color: var(--primary); border-color: var(--primary); }

/* Pages */
.page { display: none; padding: 1.5rem 0 5rem; }
.page.active { display: block; }

.page-title { margin-bottom: 1.5rem; }
.page-title h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; }
.page-title p { color: var(--text-muted); margin-top: .2rem; font-size: .9rem; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-header h2 { font-size: 1.25rem; font-weight: 700; }
.link { color: var(--primary); text-decoration: none; font-size: .875rem; font-weight: 500; }
.link:hover { text-decoration: underline; }

/* Hero */
.hero {
  padding: 2.5rem 0 3rem;
  background: radial-gradient(ellipse at 20% 50%, rgba(91,94,247,.12) 0%, transparent 55%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-tag {
  display: inline-block;
  background: rgba(91,94,247,.12);
  color: var(--primary);
  padding: .3rem .85rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border: 1px solid rgba(91,94,247,.25);
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: .75rem;
  letter-spacing: -.03em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p { color: var(--text-muted); font-size: 1rem; max-width: 440px; margin-bottom: 1.5rem; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.hero-visual { position: relative; height: 280px; }

.hero-card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .65rem;
  width: 150px;
  box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}

.hero-card-cover {
  height: 80px;
  border-radius: var(--radius-sm);
  background: var(--cover);
  margin-bottom: .4rem;
}

.hero-card span { font-size: .8rem; font-weight: 600; }
.hero-card-1 { top: 10px; left: 5%; }
.hero-card-2 { top: 60px; right: 0; animation-delay: -2s; }
.hero-card-3 { bottom: 10px; left: 25%; animation-delay: -4s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 8px 28px rgba(91,94,247,.12);
}

.game-cover {
  height: 140px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.85);
}

.game-cover-icon svg { width: 40px; height: 40px; }

.discount-badge {
  position: absolute;
  top: .6rem;
  left: .6rem;
  background: var(--danger);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: var(--radius-sm);
}

.owned-badge {
  position: absolute;
  top: .6rem;
  right: .6rem;
  background: var(--success);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: var(--radius-sm);
}

.game-info { padding: .85rem; }
.game-info h3 { font-size: .9rem; font-weight: 600; margin-bottom: .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.game-meta {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: .65rem;
}

.game-meta .rating { display: flex; align-items: center; gap: .2rem; color: var(--warning); }

.game-footer { display: flex; align-items: center; justify-content: space-between; }

.game-price .original { text-decoration: line-through; color: var(--text-muted); font-size: .75rem; margin-right: .3rem; }
.game-price .current { font-size: 1rem; font-weight: 700; color: var(--success); }

.owned-label { font-size: .75rem; color: var(--success); font-weight: 500; }

.add-cart-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}

.add-cart-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Catalog */
.catalog-toolbar { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }

.search-box {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 .85rem;
}

.search-box svg { color: var(--text-muted); flex-shrink: 0; }

.search-box input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: .875rem;
  padding: .65rem 0;
  outline: none;
}

.select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: .65rem .85rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .875rem;
  cursor: pointer;
  outline: none;
}

.select-sm { padding: .35rem .5rem; font-size: .8rem; }
.select:focus { border-color: var(--primary); }

.results-count { color: var(--text-muted); font-size: .82rem; margin-bottom: .85rem; }

/* Empty state */
.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--text-muted); }
.empty-state.compact { padding: 1.5rem; }
.empty-icon { margin-bottom: .85rem; color: var(--text-muted); display: flex; justify-content: center; }
.empty-state h3 { color: var(--text); margin-bottom: .4rem; font-size: 1.1rem; }

/* Library */
.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }

.library-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.library-card-header { display: flex; gap: .85rem; padding: 1rem; }

.library-cover {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.85);
}

.library-cover svg { width: 32px; height: 32px; }
.library-card-header h3 { font-size: .95rem; margin-bottom: .2rem; }
.library-card-header p { font-size: .78rem; color: var(--text-muted); }

.library-key { padding: 0 1rem 1rem; }
.key-label { font-size: .78rem; color: var(--text-muted); margin-bottom: .4rem; }

.key-box {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: .65rem .85rem;
  font-family: ui-monospace, monospace;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.key-box code { color: var(--accent); word-break: break-all; }

.copy-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: .25rem .55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .72rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.copy-btn:hover { color: var(--text); border-color: var(--primary); }

/* Dashboard */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }

.dashboard-stats, .admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .85rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.stat-card .stat-value { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.stat-card .stat-label { font-size: .8rem; color: var(--text-muted); margin-top: .2rem; }

.profile-info { display: flex; gap: 1rem; align-items: center; margin-top: .75rem; }

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.order-item {
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
}

.order-item:last-child { border-bottom: none; }
.order-header { display: flex; justify-content: space-between; margin-bottom: .25rem; font-size: .85rem; }

/* Support */
.support-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.ticket-item {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: .75rem;
}

.ticket-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.ticket-msg { font-size: .875rem; margin-bottom: .4rem; }
.ticket-date { font-size: .75rem; color: var(--text-muted); }

.status-badge {
  font-size: .7rem;
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 999px;
  text-transform: uppercase;
}

.status-open { background: rgba(91,94,247,.15); color: var(--primary); }
.status-progress { background: rgba(217,119,6,.15); color: var(--warning); }
.status-closed { background: rgba(22,163,74,.15); color: var(--success); }

.ticket-reply {
  margin-top: .65rem;
  padding: .65rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: .85rem;
}

.admin-reply { border-left: 3px solid var(--primary); }

.ticket-admin-actions { display: flex; gap: .5rem; margin-top: .75rem; flex-wrap: wrap; }
.reply-input { flex: 1; min-width: 150px; padding: .45rem .65rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-family: var(--font); }

.admin-app-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

/* Admin */
.admin-tabs { display: flex; gap: .5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }

.admin-tab {
  padding: .5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font);
  font-size: .85rem;
  font-weight: 500;
}

.admin-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.admin-panel { display: grid; grid-template-columns: 1fr 1.2fr; gap: 1rem; }

.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .85rem; }
.form-group { margin-bottom: .85rem; }

.form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 500;
  margin-bottom: .35rem;
  color: var(--text-muted);
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: .6rem .75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .875rem;
  outline: none;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--primary); }
.form-actions { display: flex; gap: .65rem; margin-top: .35rem; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.admin-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.admin-table th { text-align: left; padding: .65rem; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border); }
.admin-table td { padding: .65rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table .game-cell { display: flex; align-items: center; gap: .65rem; }

.admin-table .mini-cover {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.85);
}

.admin-table .mini-cover svg { width: 16px; height: 16px; }
.table-actions { display: flex; gap: .4rem; flex-wrap: wrap; }

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(3px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  max-height: 90dvh;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header-auth { border-bottom: none; padding-bottom: .5rem; }

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.modal-close {
  position: relative;
  top: auto;
  right: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  z-index: 20;
  padding: 0;
  line-height: 0;
  transition: background .15s, border-color .15s, color .15s;
}

.modal-close:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(220, 38, 38, .08);
}

.drawer-close { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }

.game-modal { max-width: 680px; }

.game-detail { display: grid; grid-template-columns: 1fr 1.2fr; gap: 1.25rem; }

.game-detail-cover {
  height: 240px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.85);
}

.game-detail-cover svg { width: 64px; height: 64px; }
.game-detail-info h2 { font-size: 1.35rem; margin-bottom: .4rem; }

.game-detail-tags { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .85rem; }

.tag {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.tag-sale { color: var(--danger); border-color: var(--danger); }

.game-detail-desc { color: var(--text-muted); font-size: .875rem; margin-bottom: 1.25rem; line-height: 1.65; }

.game-detail-price { font-size: 1.5rem; font-weight: 800; color: var(--success); margin-bottom: .85rem; }
.original-price { text-decoration: line-through; color: var(--text-muted); font-size: .95rem; margin-right: .4rem; font-weight: 400; }

.game-detail-actions { display: flex; gap: .65rem; align-items: center; }

/* Auth */
.auth-modal { max-width: 400px; }
.auth-tabs { display: flex; gap: .4rem; margin-bottom: 1.25rem; }

.auth-tab {
  flex: 1;
  padding: .55rem;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  font-size: .875rem;
}

.auth-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.auth-error {
  background: rgba(220, 38, 38, .1);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: .65rem .85rem;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  margin-bottom: .85rem;
  line-height: 1.45;
}

.wishlist-btn {
  position: absolute;
  top: .6rem;
  right: .6rem;
  background: rgba(0,0,0,.45);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s, background .15s;
  z-index: 2;
}

.wishlist-btn:hover { transform: scale(1.08); background: rgba(0,0,0,.6); }
.wishlist-btn.active { color: #f43f5e; background: rgba(0,0,0,.55); }

.wishlist-remove-btn {
  position: absolute;
  top: .6rem;
  right: .6rem;
  background: rgba(0,0,0,.45);
  border: none;
  color: #f43f5e;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.coupon-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .85rem;
  margin-bottom: 1.25rem;
}

.coupon-box label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: .5rem;
}

.coupon-input-row { display: flex; gap: .5rem; }

.coupon-input-row input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: .55rem .75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .875rem;
  outline: none;
  text-transform: uppercase;
}

.coupon-hint { font-size: .75rem; color: var(--text-muted); margin-top: .4rem; }
.coupon-hint.success { color: var(--success); }
.coupon-hint.error { color: var(--danger); }

/* Checkout */
.checkout-modal { max-width: 500px; }
.checkout-modal .modal-title { font-size: 1.15rem; }

.checkout-items { margin-bottom: 1.25rem; }

.checkout-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--border);
}

.checkout-item-cover {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.85);
}

.checkout-item-cover svg { width: 22px; height: 22px; }
.checkout-item-info { flex: 1; }
.checkout-item-info h4 { font-size: .875rem; }
.checkout-item-info span { font-size: .78rem; color: var(--text-muted); }
.checkout-item-price { font-weight: 700; color: var(--success); font-size: .875rem; }

.checkout-summary { background: var(--bg); border-radius: var(--radius-sm); padding: .85rem; margin-bottom: 1.25rem; }

.checkout-row { display: flex; justify-content: space-between; padding: .3rem 0; font-size: .875rem; }
.checkout-row.total { font-size: 1rem; font-weight: 700; border-top: 1px solid var(--border); margin-top: .4rem; padding-top: .65rem; }

.checkout-note { text-align: center; font-size: .72rem; color: var(--text-muted); margin-top: .65rem; }

.checkout-success { text-align: center; padding: .5rem 0; }
.checkout-success .success-icon { margin-bottom: .85rem; color: var(--success); display: flex; justify-content: center; }
.checkout-success h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.keys-list { text-align: left; margin: 1rem 0; }

.payment-methods { display: flex; gap: .65rem; margin-bottom: 1.25rem; }

.payment-method {
  flex: 1;
  padding: .65rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
  transition: border-color .15s;
}

.payment-method.active { border-color: var(--primary); color: var(--primary); }

/* Drawer */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 150; }

.drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 160;
  display: flex;
  flex-direction: column;
  transition: right .25s ease;
}

.drawer.open { right: 0; }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.drawer-header h2 { font-size: 1.05rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: .85rem 1.25rem; }

.drawer-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}

.cart-item { display: flex; gap: .85rem; padding: .85rem 0; border-bottom: 1px solid var(--border); }

.cart-item-cover {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.85);
}

.cart-item-cover svg { width: 26px; height: 26px; }
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: .875rem; margin-bottom: .2rem; }
.cart-item-info .price { color: var(--success); font-weight: 600; font-size: .875rem; }

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.15rem;
  padding: .2rem;
}

.cart-item-remove:hover { color: var(--danger); }

.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: .85rem; font-size: 1rem; }

.cart-empty { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); }
.cart-empty-icon { margin-bottom: .65rem; display: flex; justify-content: center; }

/* Toast */
#toast-container {
  position: fixed;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  right: 1rem;
  left: 1rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  pointer-events: none;
}

@media (min-width: 480px) {
  #toast-container { left: auto; }
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  font-size: .875rem;
  box-shadow: var(--shadow);
  animation: slideIn .25s ease;
  max-width: 360px;
  margin-left: auto;
  pointer-events: auto;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--primary); }

@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 2rem 0; margin-top: auto; }
.footer-inner { text-align: center; }
.footer-brand { display: inline-flex; align-items: center; justify-content: center; margin-bottom: .65rem; }
.footer-brand .logo-svg { height: 36px; }
.footer-inner p { color: var(--text-muted); font-size: .82rem; }
.footer-copy { margin-top: .75rem; font-size: .75rem; }

/* Mobile bottom nav */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  z-index: 90;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  padding: .55rem .25rem;
  text-decoration: none;
  color: var(--text-muted);
  font-size: .65rem;
  font-weight: 500;
}

.bottom-nav-item:hover, .bottom-nav-item.active { color: var(--primary); }

.loading-state { text-align: center; padding: 2rem; color: var(--text-muted); }

.seller-approved-card, .seller-pending-card, .seller-form-card { text-align: center; }
.seller-form-card { text-align: left; }

/* Responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero-content h1 { font-size: 2rem; }
  .admin-panel, .support-layout, .game-detail { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: .75rem;
    max-height: 70vh;
    overflow-y: auto;
  }

  .nav.open { display: flex; }
  .mobile-menu-btn { display: flex; }
  .header-inner { position: relative; flex-wrap: wrap; height: auto; min-height: 60px; padding: .5rem 0; }
  .mobile-bottom-nav { display: flex; }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .page { padding-bottom: 6rem; }
  .user-name { display: none; }
  .catalog-toolbar .select { flex: 1; min-width: calc(50% - .4rem); }
  .header-actions { margin-left: auto; }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 1.65rem; }
  .games-grid { grid-template-columns: repeat(2, 1fr); gap: .65rem; }
  .game-cover { height: 110px; }
  .game-info { padding: .65rem; }
  .game-info h3 { font-size: .82rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
}
