:root {
  --bg-start: #6a11cb;
  --bg-end: #2575fc;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.78);
  --soft: rgba(255, 255, 255, 0.12);
  --card: rgba(255, 255, 255, 0.15);
  --card-strong: rgba(255, 255, 255, 0.24);
  --border: rgba(255, 255, 255, 0.25);
  --button: #ffffff;
  --button-text: #2d49c4;
  --accent: #9be7ff;
  --danger: #ff5c7a;
  --success: #20d6a5;
  --warning: #ffd166;
  --ink: #172033;
  --ink-muted: #667085;
  --surface: rgba(255, 255, 255, 0.96);
  --shadow: 0 18px 45px rgba(16, 24, 40, 0.28);
  --radius: 8px;
  --font: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
  background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
  background-attachment: fixed;
}

body.staff-mode {
  --bg-start: #ff8a00;
  --bg-end: #ffd166;
  --button-text: #7a3a00;
  --accent: #fff6b3;
  --card: rgba(255, 255, 255, 0.2);
  --card-strong: rgba(255, 255, 255, 0.3);
  --border: rgba(255, 255, 255, 0.38);
}

body.admin-mode {
  --bg-start: #2f3437;
  --bg-end: #aeb4bb;
  --button-text: #2f3437;
  --accent: #f2f4f7;
  --card: rgba(255, 255, 255, 0.18);
  --card-strong: rgba(255, 255, 255, 0.28);
  --border: rgba(255, 255, 255, 0.34);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(260px, 560px) auto;
  gap: 18px;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.13);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  padding: 0;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 900;
  background: transparent;
  border: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--button-text);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.search {
  display: flex;
  gap: 8px;
  width: 100%;
}

.search input,
.field input,
.field textarea,
.field select {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: var(--radius);
  outline: none;
  background: rgba(255, 255, 255, 0.94);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.6;
}

.search input:focus,
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(155, 231, 255, 0.24);
}

.button,
.search button,
.icon-button,
.account-button,
.avatar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 850;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover,
.search button:hover,
.icon-button:hover,
.account-button:hover,
.avatar-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.button-primary,
.search button,
.account-button {
  color: var(--button-text);
  background: var(--button);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16);
}

.button-ghost,
.button-subtle,
.icon-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid var(--border);
}

.button-danger {
  color: #ffffff;
  background: var(--danger);
  box-shadow: 0 10px 24px rgba(255, 92, 122, 0.34);
}

.button-success {
  color: #063f32;
  background: var(--success);
}

.button-disabled {
  color: #667085;
  background: #e4e7ec;
  border: 1px solid #d0d5dd;
  box-shadow: none;
}

.button-full {
  width: 100%;
}

.button-small {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.92rem;
}

.unread-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 950;
  border-radius: 999px;
  background: var(--danger);
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-width: 172px;
}

.account-button,
.avatar-button,
.icon-button.square {
  flex: 0 0 auto;
  width: 44px;
  padding: 0;
  border-radius: 50%;
}

.avatar-button {
  color: var(--button-text);
  font-weight: 900;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #ffffff;
}

.user-name {
  max-width: 140px;
  overflow: hidden;
  color: #ffffff;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 42px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 900;
}

.hero-panel h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-panel p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 10px;
  min-width: 300px;
}

.stat {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
}

.stat strong {
  display: block;
  color: #ffffff;
  font-size: 1.28rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.84rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  margin: 18px 2px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb button {
  padding: 0;
  color: #ffffff;
  background: transparent;
  border: 0;
  font-weight: 850;
}

.content-zone {
  min-height: 360px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.panel,
.product-row,
.order-row {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: fadeSlide 340ms ease both;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 238px;
  padding: 24px;
  text-align: left;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.card[role="button"] {
  cursor: pointer;
}

.card:hover {
  transform: translateY(-4px);
  background: var(--card-strong);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 24px;
  color: var(--button-text);
  font-size: 1.55rem;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.card h2,
.card h3,
.panel h2,
.panel h3 {
  margin: 0 0 10px;
  color: #ffffff;
  line-height: 1.24;
}

.card h2,
.panel h2 {
  font-size: 1.24rem;
}

.card h3,
.panel h3 {
  font-size: 1.05rem;
}

.card p,
.panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 22px;
}

.game-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  min-height: 214px;
}

.game-card .card-icon {
  margin-bottom: 0;
}

.game-card .card-footer {
  grid-column: 1 / -1;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 850;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.status-pending {
  color: #5b3b00;
  background: #ffd166;
}

.status-processing {
  color: #063f32;
  background: #20d6a5;
}

.status-completed {
  color: #17324d;
  background: #b7e3ff;
}

.status-cancelled {
  color: #ffffff;
  background: #8b1e3f;
}

.product-list,
.order-list {
  display: grid;
  gap: 12px;
}

.product-row,
.order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, auto) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.18);
}

.order-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.row-title {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 900;
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.price {
  color: var(--accent);
  font-size: 1.07rem;
  font-weight: 950;
  white-space: nowrap;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.panel {
  padding: 24px;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 0.65fr);
  gap: 18px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
}

.metric strong {
  display: block;
  color: #ffffff;
  font-size: 1.45rem;
}

.metric span {
  color: var(--muted);
  font-size: 0.88rem;
}

.ledger-strip .metric i {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  color: var(--button-text);
  border-radius: 50%;
  background: #ffffff;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
}

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

.admin-stack {
  display: grid;
  gap: 16px;
}

.gate-panel {
  width: min(620px, 100%);
}

.admin-table {
  display: grid;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.admin-table-head,
.admin-table-row {
  display: grid;
  gap: 12px;
  align-items: center;
  min-width: 760px;
}

.admin-table-head {
  padding: 0 14px;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 900;
}

.admin-table-row {
  width: 100%;
  padding: 14px;
  color: #ffffff;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
}

button.admin-table-row {
  cursor: pointer;
}

button.admin-table-row:hover {
  background: rgba(255, 255, 255, 0.2);
}

.user-grid {
  grid-template-columns: minmax(220px, 1.5fr) minmax(140px, 1fr) minmax(110px, 0.7fr) minmax(150px, 1fr);
}

.simple-table .admin-table-head,
.simple-table .admin-table-row {
  width: max-content;
}

.admin-empty-row {
  min-width: 360px;
  padding: 18px;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.mono {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.86rem;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 36px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
}

.empty-state p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.7;
}

.modal-root:empty {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 32, 0.6);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  padding: 28px;
  color: var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.modal-wide {
  width: min(720px, 100%);
}

.modal-card h2 {
  margin: 0 0 18px;
  color: var(--ink);
}

.modal-card p {
  color: #4b5565;
  line-height: 1.7;
}

.modal-card .button-ghost,
.modal-card .button-subtle {
  color: #344054;
  background: #eef2ff;
  border-color: #d0d5dd;
}

.modal-card .icon-button {
  color: var(--ink);
  background: rgba(17, 24, 39, 0.08);
  border: 0;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: var(--radius);
  background: #eef2ff;
}

.tab {
  min-height: 42px;
  color: #475467;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  font-weight: 850;
}

.tab.active {
  color: var(--button-text);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.1);
}

.form-stack {
  display: grid;
  gap: 14px;
}

.auth-card {
  width: min(560px, 100%);
}

.auth-subtitle {
  margin-top: -8px;
}

.auth-intro {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #d0d5dd;
  border-radius: var(--radius);
  background: #f8fafc;
}

.auth-intro strong,
.auth-intro span {
  display: block;
}

.auth-intro span {
  margin-top: 3px;
  color: #667085;
  font-size: 0.9rem;
}

.auth-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--button-text);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(16, 24, 40, 0.12);
}

.auth-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-method {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 12px;
  color: #475467;
  border: 1px solid #d0d5dd;
  border-radius: var(--radius);
  background: #ffffff;
  font-weight: 850;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.auth-method:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.1);
}

.auth-method.active {
  color: var(--button-text);
  border-color: rgba(37, 117, 252, 0.42);
  background: var(--card-gradient);
  box-shadow: 0 14px 28px rgba(37, 117, 252, 0.16);
}

.verify-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.auth-code-hint {
  min-height: 22px;
  margin: 0;
  color: #475467;
  font-size: 0.9rem;
  line-height: 1.5;
}

.field {
  display: grid;
  gap: 8px;
  color: #344054;
  font-weight: 850;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--danger);
  font-weight: 850;
}

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

.language-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.language-option {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 70px;
  padding: 12px 42px 12px 14px;
  color: var(--ink);
  text-align: left;
  border: 1px solid #d0d5dd;
  border-radius: var(--radius);
  background: #ffffff;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.language-option:hover,
.language-option.active {
  transform: translateY(-2px);
  border-color: var(--button-text);
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.14);
}

.balance-note {
  padding: 10px 12px;
  border: 1px solid #fedf89;
  border-radius: var(--radius);
  background: #fffaeb;
}

.recharge-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.recharge-option {
  display: grid;
  gap: 6px;
  min-height: 82px;
  padding: 14px 10px;
  color: var(--ink);
  text-align: center;
  border: 1px solid #d0d5dd;
  border-radius: var(--radius);
  background: #ffffff;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.recharge-option:hover {
  transform: translateY(-2px);
  border-color: var(--button-text);
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.14);
}

.recharge-option strong {
  color: var(--button-text);
  font-size: 1.12rem;
}

.recharge-option span {
  color: #667085;
  font-size: 0.86rem;
  font-weight: 800;
}

.chat-modal {
  width: min(920px, 100%);
}

.chat-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.chat-header p {
  margin: 0 0 4px;
}

.chat-header small {
  color: #667085;
}

.chat-presence {
  display: grid;
  gap: 8px;
  min-width: 260px;
}

.chat-participant {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #d0d5dd;
  border-radius: var(--radius);
  background: #f8fafc;
}

.chat-participant strong,
.chat-participant small {
  display: block;
}

.presence-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #98a2b3;
  box-shadow: 0 0 0 4px rgba(152, 162, 179, 0.16);
}

.presence-dot.online {
  background: #12b76a;
  box-shadow: 0 0 0 4px rgba(18, 183, 106, 0.16);
}

.presence-dot.offline {
  background: #98a2b3;
}

.chat-shell {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.chat-sidebar {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d0d5dd;
  border-radius: var(--radius);
  background: #f8fafc;
}

.chat-sidebar h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 0.98rem;
}

.chat-tool {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  color: var(--ink);
  text-align: left;
  border: 1px solid #d0d5dd;
  border-radius: var(--radius);
  background: #ffffff;
  font-weight: 850;
}

.chat-tool.disabled {
  color: #98a2b3;
  background: #eef2f6;
}

.chat-panel {
  display: grid;
  grid-template-rows: minmax(260px, 46vh) auto;
  gap: 12px;
  min-width: 0;
}

.chat-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding: 14px;
  border: 1px solid #d0d5dd;
  border-radius: var(--radius);
  background: #f8fafc;
}

.chat-message {
  width: min(78%, 520px);
  padding: 10px 12px;
  border: 1px solid #d0d5dd;
  border-radius: var(--radius);
  background: #ffffff;
}

.chat-message.own {
  justify-self: end;
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
}

.chat-message.system {
  justify-self: center;
  width: auto;
  max-width: 90%;
  color: #475467;
  text-align: center;
  background: #eef2ff;
}

.chat-message p {
  margin: 8px 0 0;
}

.chat-message-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #667085;
  font-size: 0.78rem;
}

.chat-message.own .chat-message-meta {
  color: rgba(255, 255, 255, 0.78);
}

.read-state {
  margin-top: 8px;
  text-align: right;
  font-size: 0.76rem;
  font-weight: 850;
}

.read-state.read {
  color: rgba(255, 255, 255, 0.82);
}

.read-state.unread {
  color: #ffd166;
}

.chat-image {
  display: block;
  max-width: min(100%, 320px);
  max-height: 260px;
  margin-top: 8px;
  border-radius: var(--radius);
  object-fit: contain;
}

.chat-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: #667085;
}

.chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.image-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  color: #344054;
  border: 1px solid #d0d5dd;
  border-radius: var(--radius);
  background: #eef2ff;
  font-weight: 850;
  cursor: pointer;
}

.image-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.language-option span {
  font-weight: 900;
}

.language-option small {
  color: var(--ink-muted);
}

.language-option i {
  position: absolute;
  top: 15px;
  right: 14px;
  color: var(--button-text);
}

.translate-engine,
.goog-te-banner-frame,
.goog-te-balloon-frame,
body > .skiptranslate {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

body {
  top: 0 !important;
}

.product-art {
  display: grid;
  place-items: center;
  height: 220px;
  margin-bottom: 22px;
  color: #ffffff;
  font-size: 4rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #6a11cb, #2575fc);
}

.detail-price {
  display: block;
  margin: 20px 0 4px;
  color: var(--button-text);
  font-size: 1.55rem;
}

.context-menu {
  position: fixed;
  z-index: 80;
  min-width: 210px;
  overflow: hidden;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 22px 60px rgba(16, 24, 40, 0.3);
}

.context-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  color: var(--ink);
  text-align: left;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
}

.context-menu button:hover {
  background: #eef2ff;
}

.context-menu .destructive {
  color: #c01048;
}

.hidden {
  display: none !important;
}

.toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100% - 36px));
  pointer-events: none;
}

.toast {
  padding: 14px 16px;
  color: var(--ink);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.26);
  animation: slideUp 220ms ease both;
}

.toast strong {
  display: block;
  margin-bottom: 3px;
}

.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 24px;
  padding: 22px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-bottom: 8px;
  color: #ffffff;
  font-weight: 850;
}

.fade-in {
  animation: fadeIn 360ms ease both;
}

.slide-up {
  animation: slideUp 260ms ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: auto auto;
  }

  .search {
    grid-column: 1 / -1;
    order: 3;
  }

  .top-actions {
    justify-content: flex-end;
  }

  .hero-panel,
  .dashboard {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .detail-heading {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stats {
    min-width: 0;
  }

  .grid,
  .grid-two,
  .grid-three,
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .recharge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-row,
  .order-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .chat-shell,
  .chat-compose,
  .chat-header {
    grid-template-columns: 1fr;
  }

  .chat-presence {
    min-width: 0;
  }

  .chat-panel {
    grid-template-rows: minmax(260px, 42vh) auto;
  }

  .row-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .topbar,
  .shell,
  .footer {
    width: min(100% - 20px, 1180px);
  }

  .topbar {
    gap: 12px;
    padding: 12px;
  }

  .search {
    flex-direction: column;
  }

  .search button,
  .button {
    width: 100%;
  }

  .top-actions .button {
    width: auto;
  }

  .brand span:last-child {
    display: none;
  }

  .user-name {
    display: none;
  }

  .hero-panel,
  .card,
  .panel {
    padding: 20px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .game-card {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 12px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .language-grid {
    grid-template-columns: 1fr;
  }

  .auth-methods {
    grid-template-columns: 1fr;
  }

  .recharge-grid {
    grid-template-columns: 1fr;
  }

  .verify-row {
    grid-template-columns: 1fr;
  }
}
