:root {
  color-scheme: dark;
  --bg: #070d1a;
  --panel: #151c2f;
  --panel-2: #1b2438;
  --line: #27324a;
  --text: #ffffff;
  --muted: #8c98b3;
  --blue: #45a0ff;
  --blue-2: #2f7dff;
  --green: #18d39a;
  --gold: #ffd15c;
  --purple: #9a3df0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, "Microsoft YaHei", sans-serif;
}

.app {
  width: min(430px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 14px 92px;
  background:
    radial-gradient(circle at 85% 18%, rgba(73, 151, 255, 0.2), transparent 30%),
    linear-gradient(180deg, #081021 0%, #070d1a 70%);
}

.topbar,
.section-head,
.account-row,
.order,
.method,
.amount-grid,
.actions-row {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.logo,
.service-icon,
.menu-icon,
.method-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #3e96ff, #6b59ff);
  box-shadow: 0 10px 28px rgba(52, 142, 255, 0.3);
  font-weight: 800;
}

.brand h1,
.page-title,
.service-card h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.brand p,
.muted,
.service-card p,
.balance-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.refresh {
  width: 42px;
  padding: 0;
  border-radius: 12px;
}

button,
.link-button {
  border: 0;
  border-radius: 14px;
  min-height: 42px;
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.wallet-card,
.hero-card,
.panel,
.service-card,
.menu-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(21, 28, 47, 0.96);
}

.wallet-card {
  padding: 20px;
  background:
    radial-gradient(circle at 88% 10%, rgba(76, 148, 255, 0.22), transparent 35%),
    linear-gradient(135deg, #242a67, #192139 58%);
}

.currency-pill {
  float: right;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 9px 14px;
  border: 1px solid #34415f;
  border-radius: 999px;
  color: #d9e8ff;
  background: rgba(255, 255, 255, 0.06);
}

.balance-value {
  clear: both;
  margin: 24px 0 18px;
  font-size: 28px;
  font-weight: 900;
}

.actions-row {
  gap: 10px;
}

.actions-row button {
  flex: 1;
}

.secondary {
  background: rgba(255, 255, 255, 0.08);
}

.hero-card {
  position: relative;
  margin-top: 14px;
  padding: 26px 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #2d36a0, #8d4f85);
}

.star {
  position: absolute;
  right: 24px;
  top: 18px;
  color: var(--gold);
  font-size: 48px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 800;
}

.page-kicker {
  margin: 4px 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
}

.page-title {
  margin-bottom: 20px;
  font-size: 28px;
  text-shadow: 2px 2px 0 #000;
}

.service-list,
.orders-list,
.menu-list,
.deposit-list {
  display: grid;
  gap: 12px;
}

.service-card {
  display: grid;
  grid-template-columns: 56px 1fr 38px;
  gap: 12px;
  align-items: center;
  padding: 16px;
}

.product-group {
  align-items: flex-start;
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  font-size: 24px;
}

.service-icon.gold {
  background: linear-gradient(145deg, #ffe378, #ff9d00);
}

.service-icon.green {
  background: linear-gradient(145deg, #30df8f, #15a58f);
}

.service-card h3,
.menu-item strong,
.method strong {
  margin: 0 0 6px;
  font-size: 16px;
}

.service-card p {
  margin-bottom: 8px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #a8ffe3;
  background: rgba(13, 203, 144, 0.15);
  font-size: 12px;
  font-weight: 800;
}

.product-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.product-options button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(69, 160, 255, 0.14);
  color: #d7ebff;
  font-size: 12px;
  white-space: nowrap;
}

.arrow {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 22px;
}

.panel {
  padding: 16px;
}

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

.method {
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}

.method.active {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.amount-option {
  min-height: 54px;
  padding: 8px 4px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.amount-option.active {
  border: 1px solid var(--blue);
  color: var(--blue);
  background: rgba(69, 160, 255, 0.12);
}

input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--text);
  background: var(--panel-2);
  font-size: 15px;
}

.address-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed #3b4a69;
  border-radius: 12px;
  color: #d8e8ff;
  background: #10182a;
  word-break: break-all;
}

.menu-card {
  padding: 16px;
}

.account-row {
  justify-content: space-between;
}

.menu-item {
  display: grid;
  grid-template-columns: 42px 1fr 20px;
  gap: 12px;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.menu-item:first-child {
  border-top: 0;
}

.language-switch {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: #202840;
}

.language-switch button {
  min-height: 34px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
}

.language-switch button.active {
  background: var(--blue);
  color: #fff;
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 10px;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(414px, calc(100% - 28px));
  transform: translateX(-50%);
  border: 1px solid #28344f;
  border-radius: 22px;
  background: rgba(20, 28, 47, 0.98);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.tab {
  display: grid;
  gap: 3px;
  justify-items: center;
  min-height: 62px;
  padding: 8px 4px;
  color: #7d8ba8;
  background: transparent;
  font-size: 13px;
}

.tab span {
  font-size: 20px;
}

.tab.active {
  margin: 4px;
  border: 2px solid var(--blue);
  color: var(--blue);
  background: rgba(69, 160, 255, 0.12);
}

@media (max-width: 360px) {
  .amount-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
