* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #070b12;
  --bg-2: #0c1220;
  --card: rgba(16, 24, 40, 0.78);
  --line: rgba(240, 185, 11, 0.16);
  --gold: #f0b90b;
  --gold-2: #ffe08a;
  --green: #0ecb81;
  --red: #f6465d;
  --text: #f5f7fb;
  --muted: #8b97a8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

html, body {
  min-height: 100%;
  min-height: 100dvh;
}

input, select, textarea {
  font-size: 16px;
}

body {
  font-family: "Noto Sans SC", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(240, 185, 11, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(14, 203, 129, 0.08), transparent 50%),
    linear-gradient(180deg, #070b12 0%, #0a101c 100%);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }

.wrap {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f0b90b, #8a6a00);
  display: grid;
  place-items: center;
  color: #1a1200;
  font-family: Orbitron, sans-serif;
  box-shadow: 0 0 24px rgba(240, 185, 11, 0.45);
}

.nav-links {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.nav-actions { display: flex; gap: 10px; align-items: center; }

.btn {
  border: 0;
  cursor: pointer;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-gold {
  background: linear-gradient(180deg, #ffd54a, #f0b90b);
  color: #1a1200;
  box-shadow: 0 8px 24px rgba(240, 185, 11, 0.28);
}

.btn-gold:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding: 54px 0 30px;
}

.kicker {
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

h1 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.15;
  font-weight: 900;
}

.hero p.lead {
  margin: 18px 0 28px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  max-width: 560px;
}

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.trust {
  display: flex;
  gap: 22px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
}

.trust b { color: var(--text); display: block; font-size: 18px; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.pair-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  padding: 12px 8px;
  border-radius: 12px;
  align-items: center;
}

.pair-row:hover { background: rgba(255,255,255,0.03); }
.up { color: var(--green); }
.down { color: var(--red); }
.mono { font-family: Orbitron, ui-monospace, monospace; }

.ticker {
  margin: 18px 0 8px;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ticker-track {
  display: flex;
  gap: 36px;
  padding: 12px 0;
  white-space: nowrap;
  animation: slide 28s linear infinite;
  color: var(--muted);
  font-size: 13px;
}

@keyframes slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.section { padding: 48px 0; }
.section h2 { font-size: 28px; margin-bottom: 8px; }
.section .sub { color: var(--muted); margin-bottom: 24px; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  background: rgba(12, 18, 32, 0.75);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 22px;
}

.card h3 { margin: 10px 0 8px; }
.card p { color: var(--muted); line-height: 1.7; font-size: 14px; }

.icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(240, 185, 11, 0.12);
  color: var(--gold);
  font-weight: 800;
}

.cta-band {
  margin: 20px 0 60px;
  padding: 32px;
  border-radius: 24px;
  background:
    linear-gradient(120deg, rgba(240,185,11,0.16), rgba(14,203,129,0.08)),
    rgba(12,18,32,0.9);
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

footer {
  color: var(--muted);
  font-size: 13px;
  padding: 24px 0 40px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(440px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-card h1 { font-size: 28px; margin: 10px 0 8px; }
.auth-card p { color: var(--muted); margin-bottom: 22px; }

label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }

input, select {
  width: 100%;
  background: #0b1220;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}

input:focus, select:focus { border-color: var(--gold); }
select option { background: #0b1220; }

.full { width: 100%; margin-top: 18px; }
.hint { margin-top: 16px; color: var(--muted); font-size: 13px; text-align: center; }
.hint a { color: var(--gold); }
.error {
  display: none;
  margin-top: 12px;
  color: var(--red);
  font-size: 13px;
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.72);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: none;
  place-items: center;
  place-content: center;
  align-items: center;
  justify-items: center;
  padding: 20px;
}

.modal-mask.is-open {
  display: grid !important;
}

.modal {
  width: min(460px, 100%);
  background: linear-gradient(180deg, #141b2c, #0d1322);
  border: 1px solid rgba(240, 185, 11, 0.35);
  border-radius: 24px;
  padding: 32px 28px 24px;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(240,185,11,0.08), 0 30px 80px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}

.modal::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 160px;
  background: radial-gradient(circle, rgba(240,185,11,0.25), transparent 70%);
  pointer-events: none;
}

.badge {
  display: inline-block;
  background: rgba(240,185,11,0.12);
  color: var(--gold);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}

.modal h2 { font-size: 28px; position: relative; }
.reward {
  margin: 18px 0 24px;
  font-size: 22px;
  color: var(--gold-2);
  font-weight: 800;
}
.reward span { color: var(--muted); font-size: 14px; font-weight: 500; display: block; margin-bottom: 6px; }

.user-chip {
  color: var(--gold);
  font-size: 14px;
}

.wallet-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 28px 0 12px;
}
.uid-box {
  color: var(--muted);
  font-size: 13px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 10px 14px;
}
.wallet-card {
  background: linear-gradient(135deg, rgba(240,185,11,0.16), rgba(16,24,40,0.9));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px;
  margin: 8px 0 8px;
}
.wallet-label { color: var(--muted); font-size: 13px; }
.wallet-amount {
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 800;
  margin: 8px 0 12px;
  color: var(--gold-2);
}
.wallet-sub {
  display: flex;
  gap: 22px;
  color: var(--muted);
  margin-bottom: 20px;
}
.wallet-sub b { color: var(--text); }
.wallet-actions { display: flex; gap: 12px; }
.wallet-actions .btn { min-width: 120px; }
.wallet-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wallet-table th, .wallet-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.wallet-table th { color: var(--muted); }
.addr-cell { word-break: break-all; max-width: 220px; }
.wallet-modal { text-align: left; }
.wallet-modal h2 { text-align: center; }
.net-tabs { display: flex; gap: 8px; margin: 14px 0; }
.net-tab {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
}
.net-tab.active {
  color: #1a1200;
  background: linear-gradient(180deg, #ffd54a, #f0b90b);
  border-color: transparent;
  font-weight: 700;
}
.addr-box {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #0b1220;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.addr-box code { flex: 1; word-break: break-all; font-size: 12px; color: var(--gold-2); }
#deposit-mask, #withdraw-mask, #paypass-mask { display: none; }

.stat {
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  padding: 16px;
}
.stat b { font-size: 22px; display: block; margin-top: 6px; }
.muted { color: var(--muted); }

@media (max-width: 900px) {
  .wrap { width: calc(100% - 20px); }
  .nav { padding: 12px 0 6px; gap: 8px; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn { padding: 8px 10px; font-size: 13px; }
  .brand { letter-spacing: 0.04em; font-size: 15px; }
  .hero {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px 0 16px;
  }
  h1 { font-size: clamp(26px, 8vw, 36px); }
  .hero p.lead { font-size: 14px; margin: 12px 0 18px; }
  .hero-cta .btn { width: 100%; text-align: center; }
  .trust { flex-wrap: wrap; gap: 12px 18px; }
  .grid-3 { display: grid; grid-template-columns: 1fr; }
  .section { padding: 28px 0; }
  .section h2 { font-size: 22px; }
  .cta-band, footer, .wallet-hero { display: flex; flex-direction: column; align-items: stretch; }
  .cta-band { padding: 20px; }
  .cta-band .btn { width: 100%; text-align: center; }
  footer { gap: 8px; font-size: 12px; }
  .nav-links { display: none; }
  .wallet-table { display: block; overflow-x: auto; }
  .wallet-actions { flex-direction: column; }
  .wallet-actions .btn { width: 100%; min-width: 0; }
  .wallet-card { padding: 18px; }
  .wallet-amount { font-size: 34px; }
  .modal { padding: 22px 16px 16px; max-height: min(88dvh, 640px); overflow-y: auto; }
  .modal-mask {
    padding: 16px;
    place-items: center;
    place-content: center;
    align-items: center;
    justify-items: center;
  }
  .auth-page { padding: 16px; align-items: stretch; }
  .auth-card { padding: 22px 16px; border-radius: 16px; }
  .pair-row { grid-template-columns: 1.1fr 1fr auto; font-size: 13px; }
  .ticker-track { font-size: 12px; }
}
