:root {
  --bg: #071322;
  --panel: rgba(17, 31, 55, 0.78);
  --panel-strong: rgba(24, 42, 75, 0.92);
  --line: rgba(166, 193, 255, 0.18);
  --text: #edf5ff;
  --muted: #96aacd;
  --blue: #38a8ff;
  --violet: #8a6bff;
  --mint: #3ce6b0;
  --amber: #ffd166;
  --danger: #ff6b86;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(56, 168, 255, 0.22), transparent 32%),
    radial-gradient(circle at 86% 4%, rgba(60, 230, 176, 0.14), transparent 26%),
    linear-gradient(135deg, #06101e 0%, #11192d 58%, #1a1534 100%);
}

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

.app-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 18px;
}

.app-header,
.hero-band,
.glass-card,
.tabbar,
.alert {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 8px;
  padding: 14px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--violet));
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup small,
.glass-card > span,
.hero-band p {
  color: var(--muted);
}

select,
input,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(166, 193, 255, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(7, 14, 28, 0.78);
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(56, 168, 255, 0.78);
  box-shadow: 0 0 0 3px rgba(56, 168, 255, 0.14);
}

.hero-band {
  display: grid;
  grid-template-columns: 1fr 180px;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  border-radius: 8px;
  padding: 24px;
  overflow: hidden;
}

.hero-band h1 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-band p {
  max-width: 680px;
  margin: 14px 0 0;
  line-height: 1.55;
}

.rate-orbit {
  display: grid;
  place-items: center;
  min-height: 160px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(56, 168, 255, 0.18), rgba(60, 230, 176, 0.12));
}

.rate-orbit strong {
  font-size: 34px;
}

.tabbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
  border-radius: 8px;
  padding: 8px;
}

.tabbar button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  color: #c9d8f4;
  background: transparent;
  cursor: pointer;
}

.tabbar button.active {
  color: white;
  background: linear-gradient(135deg, rgba(56, 168, 255, 0.32), rgba(138, 107, 255, 0.34));
}

.tab-panel {
  display: none;
  margin-top: 18px;
}

.tab-panel.active {
  display: block;
}

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

.glass-card {
  border-radius: 8px;
  padding: 18px;
}

.rate-card strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
}

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

.feature-list span {
  display: grid;
  align-items: center;
  min-height: 54px;
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

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

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: #c9d8f4;
}

.expected-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(60, 230, 176, 0.24);
  border-radius: 8px;
  padding: 14px;
  background: rgba(60, 230, 176, 0.08);
}

.wallet-box {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(56, 168, 255, 0.24);
  border-radius: 8px;
  padding: 14px;
  background: rgba(56, 168, 255, 0.08);
}

.wallet-box strong {
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.wallet-box small,
.wallet-box span {
  color: var(--muted);
}

.expected-box strong {
  color: #bdfbe8;
  font-size: 24px;
}

.primary-btn {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 12px 28px rgba(56, 168, 255, 0.24);
}

.primary-btn:disabled {
  cursor: wait;
  opacity: 0.66;
}

.alert {
  margin-top: 18px;
  border-radius: 8px;
  padding: 12px 14px;
}

.alert.success {
  border-color: rgba(60, 230, 176, 0.38);
  color: #c9ffed;
}

.alert.error {
  border-color: rgba(255, 107, 134, 0.44);
  color: #ffd1da;
}

.orders-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.order-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(17, 31, 55, 0.68);
}

.order-item header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.order-item dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.order-item dt {
  color: var(--muted);
  font-size: 12px;
}

.order-item dd {
  margin: 4px 0 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 8px;
  padding: 4px 8px;
  color: #ffe8b8;
  background: rgba(255, 209, 102, 0.18);
}

.rules-card p {
  line-height: 1.55;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .app-shell {
    padding: 12px;
  }

  .app-header,
  .hero-band {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .app-header {
    flex-direction: column;
  }

  .tabbar,
  .grid-two,
  .field-row,
  .order-item dl {
    grid-template-columns: 1fr;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }
}
