:root {
  --bg: #0b1220;
  --bg-soft: #111b2e;
  --card: #152238;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8eef7;
  --muted: #93a4bd;
  --brand: #2dd4bf;
  --brand-dark: #0d9488;
  --accent: #60a5fa;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 14px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --max: 1160px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(45, 212, 191, 0.12), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(96, 165, 250, 0.1), transparent 30%),
    var(--bg);
  line-height: 1.6;
}

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

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(11, 18, 32, 0.82);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: block;
  object-fit: cover;
}

.brand-text strong {
  display: block;
  font-size: 1.05rem;
}

.brand-text span {
  color: var(--muted);
  font-size: 0.82rem;
}

.site-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.94rem;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.header-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #041018;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.header-user-info {
  display: grid;
  line-height: 1.25;
  min-width: 0;
}

.header-user-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.header-user-email {
  font-size: 0.88rem;
  color: var(--text);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-logout {
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.72rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #041018;
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn.full {
  width: 100%;
}

.hero {
  padding: 72px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: start;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hero-media {
  position: relative;
  margin-top: 28px;
  min-height: 280px;
}

.hero-photo {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-photo.main {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.hero-photo.float {
  position: absolute;
  right: -12px;
  bottom: -24px;
  width: 42%;
  height: 140px;
  object-fit: cover;
  border: 3px solid var(--bg);
}

.hero-side {
  position: sticky;
  top: 88px;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 1.08;
  margin: 0 0 16px;
}

.hero p {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.badge-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.badge {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.hero-panel,
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 22px;
}

.section {
  padding: 56px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 24px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.8rem;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.rate-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.rate-item {
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.rate-item .pair {
  color: var(--muted);
  font-size: 0.82rem;
}

.rate-item .value {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 4px;
}

.rate-item .change {
  font-size: 0.82rem;
  margin-top: 4px;
}

.rate-item .change.up {
  color: var(--brand);
}

.rate-item .change.down {
  color: var(--danger);
}

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

.feature-card {
  padding: 22px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feature-card h3 {
  margin: 0 0 8px;
}

.feature-card p {
  color: var(--muted);
  margin: 0;
}

.feature-card .link {
  margin-top: 18px;
  color: var(--brand);
  font-weight: 600;
}

.select-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.select-wrap {
  position: relative;
}

.select-wrap label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.select-wrap select {
  width: 100%;
  appearance: none;
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 2.2rem 0.75rem 0.85rem;
}

.select-wrap::after {
  content: "▾";
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: var(--muted);
  pointer-events: none;
}

.converter-result {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.2);
}

.converter-result strong {
  font-size: 1.5rem;
}

.rate-preview {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  font-size: 0.95rem;
}

.rate-preview strong {
  font-size: 1.05rem;
}

.exchange-flow {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.exchange-box {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.exchange-label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 8px;
}

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

.exchange-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 700;
  padding: 0;
}

.exchange-row input:focus {
  outline: none;
}

.exchange-receive {
  flex: 1;
  min-width: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
}

.exchange-row select {
  width: auto;
  min-width: 96px;
  padding: 8px 28px 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  font-weight: 600;
}

.exchange-rate-line {
  margin: 4px 2px 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.exchange-deposit select {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.exchange-notice {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.25);
  color: var(--text);
  font-size: 0.9rem;
}

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

.step {
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.step-num {
  color: var(--brand);
  font-weight: 700;
}

.form-page {
  padding: 48px 0 72px;
}

.form-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
}

.form-card {
  padding: 28px;
}

.form-card h1 {
  margin: 0 0 8px;
}

.form-card > p {
  color: var(--muted);
  margin-top: 0;
}

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

label.field {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
}

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

input,
select,
textarea {
  width: 100%;
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  font: inherit;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.progress {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.progress span {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress span.active {
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.verify-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.notice {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.92rem;
}

.notice.info {
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.25);
}

.notice.success {
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.25);
}

.notice.warn {
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.legal-page {
  padding-top: 56px;
}

.legal-hero {
  max-width: 860px;
  margin-bottom: 28px;
}

.legal-hero .eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
}

.legal-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.legal-card {
  padding: clamp(24px, 4vw, 44px);
}

.legal-card section + section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.legal-card h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
}

.legal-card h3 {
  margin: 24px 0 8px;
  font-size: 1rem;
  color: var(--text);
}

.legal-card p,
.legal-card li {
  color: var(--muted);
}

.legal-card p {
  margin: 0 0 14px;
}

.legal-card ol,
.legal-card ul {
  margin: 10px 0 18px;
  padding-left: 22px;
}

.legal-card li + li {
  margin-top: 8px;
}

.legal-card a {
  color: var(--brand);
  font-weight: 600;
}

.hidden {
  display: none !important;
}

.gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 16, 0.72);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 50;
}

.gate-modal {
  width: min(480px, 100%);
  padding: 28px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
}

.footer-grid strong {
  color: var(--text);
}

.footer-links {
  display: grid;
  gap: 8px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.86rem;
}

.muted {
  color: var(--muted);
}

.media-cover {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}

.feature-card .media-cover {
  margin-bottom: 14px;
}

.feature-card .media-cover.photo {
  height: 160px;
  object-fit: cover;
}

.hero-visual {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.method-grid img {
  width: 100%;
  border-radius: 10px;
}

.page-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 28px;
}

.page-banner img,
.page-banner-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.fx-updated {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 10px;
}

.trust-strip {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.trust-strip img {
  height: 52px;
  width: auto;
  border-radius: 8px;
}

/* Auth pages (register / login / verify) */
.auth-page {
  background: #eceaf8;
  color: #1a1f36;
  min-height: 100vh;
}

.auth-shell {
  width: min(480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: #1a1f36;
}

.auth-menu {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(26, 31, 54, 0.08);
  cursor: pointer;
  font-size: 1.1rem;
}

.auth-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px 24px;
  box-shadow: 0 8px 32px rgba(26, 31, 54, 0.08);
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1f36;
}

.auth-sub {
  margin: 0 0 24px;
  color: #5c6378;
  font-size: 0.95rem;
}

.auth-sub a {
  color: #4f6df5;
  font-weight: 600;
}

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

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"],
.auth-form input[type="tel"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d8dce8;
  border-radius: 10px;
  background: #fff;
  color: #1a1f36;
  font: inherit;
}

.auth-form input:focus {
  outline: 2px solid rgba(79, 109, 245, 0.35);
  border-color: #4f6df5;
}

.auth-submit {
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 999px;
  background: #4f6df5;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}

.auth-submit:hover {
  background: #3f5ae0;
}

.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: #5c6378;
  cursor: pointer;
}

.auth-terms input {
  margin-top: 3px;
  width: auto;
}

.auth-terms a {
  color: #4f6df5;
}

.auth-divider {
  height: 1px;
  background: #eceef4;
  margin: 20px 0;
}

.auth-social {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  margin-bottom: 10px;
  border: 0;
  border-radius: 999px;
  background: #f3f4f8;
  color: #1a1f36;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.auth-social:hover {
  background: #e8eaf2;
}

.auth-social-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: linear-gradient(135deg, #ea4335, #fbbc05, #34a853, #4285f4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-social-icon.fb {
  background: #1877f2;
  color: #fff;
  border-radius: 50%;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  font-family: Georgia, serif;
}

.auth-resend {
  margin: 16px 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: #5c6378;
}

.auth-resend button {
  border: 0;
  background: none;
  color: #4f6df5;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.auth-hint {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: #f0f4ff;
  color: #3f4d6e;
  font-size: 0.9rem;
  text-align: center;
}

.auth-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(280px, 80vw);
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  padding: 72px 24px 24px;
  display: grid;
  gap: 16px;
  z-index: 100;
}

.auth-drawer a {
  color: #1a1f36;
  font-weight: 500;
}

@media (max-width: 900px) {
  .hero-grid,
  .form-layout,
  .grid-3,
  .steps,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .site-nav {
    display: none;
  }

  .two-col,
  .select-row {
    grid-template-columns: 1fr;
  }

  .page-banner {
    grid-template-columns: 1fr;
  }

  .hero-photo.float {
    position: static;
    width: 100%;
    height: 160px;
    margin-top: 12px;
  }

  .hero-side {
    position: static;
  }

  .header-user-info {
    display: none;
  }

  .legal-page {
    padding-top: 36px;
  }

  .legal-card {
    padding: 22px;
  }
}
