/* Crown Trade App - front page for visitors who aren't logged in (welcome.html) */
:root {
  --bg: #15221e; --card: #1d2e28; --card-2: #243831; --line: #2e453e; --text: #ece6d3; --muted: #93a69e;
  --gold: #f2bc3f; --gold-hi: #ffe08a; --gold-lo: #b8811f; --gold-dim: rgba(242, 188, 63, .13);
  --up: #36d399; --up-dim: rgba(54, 211, 153, .13); --down: #ff6a5c; --down-dim: rgba(255, 106, 92, .13);
  --display: "Unbounded", "Segoe UI", system-ui, sans-serif; --body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 500 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
a { color: inherit; }
button { font: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.gold { background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; padding: 13px 22px; font: 700 15px var(--body); border: 1px solid var(--line); color: var(--text); background: var(--card-2); text-decoration: none; white-space: nowrap; cursor: pointer; transition: border-color .15s, transform .1s, filter .15s; }
.btn:hover { border-color: var(--gold); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.primary { border: 0; color: #2a1c02; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 50%, #d99a26); box-shadow: 0 8px 24px rgba(242, 188, 63, .25); font-family: var(--display); font-size: 14px; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; }
.btn:focus-visible, .linkish:focus-visible, .tabs button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* nav */
nav { display: flex; align-items: center; gap: 28px; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 12px; font: 900 20px var(--display); letter-spacing: -.01em; text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.links { display: flex; gap: 26px; margin-left: auto; font-weight: 600; }
.links a { color: var(--muted); text-decoration: none; }
.links a:hover { color: var(--text); }
.nav-cta { display: flex; gap: 10px; }

/* hero */
.hero { position: relative; padding: 56px 0 80px; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -200px 0 auto; height: 700px; background: radial-gradient(600px 340px at 72% 40%, rgba(242, 188, 63, .14), transparent 70%), radial-gradient(500px 300px at 10% 10%, rgba(54, 211, 153, .07), transparent 70%); pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--gold-dim); border: 1px solid rgba(242, 188, 63, .35); color: var(--gold); font: 700 12px var(--display); letter-spacing: .06em; text-transform: uppercase; }
h1 { font: 900 46px/1.1 var(--display); letter-spacing: -.02em; margin: 20px 0 18px; }
.lead { font-size: 19px; color: #cfd6cc; max-width: 540px; margin: 0 0 28px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.cta .btn { padding: 16px 26px; }
.trust { display: flex; gap: 10px 22px; flex-wrap: wrap; margin-top: 28px; font-size: 14px; color: var(--muted); }
.trust span::before { content: '✓'; color: var(--up); font-weight: 800; margin-right: 7px; }

/* hero picture: an example trade, the VPS badge and a Telegram alert */
.visual { position: relative; height: 540px; }
.panel { position: absolute; background: linear-gradient(180deg, #213530, var(--card)); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }
.trade { left: 20px; right: 40px; top: 30px; padding: 22px; }
.trade-top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.pill { font: 800 12px var(--body); padding: 4px 10px; border-radius: 999px; }
.pill.buy { background: var(--up-dim); color: var(--up); }
.pill.live { background: var(--gold-dim); color: var(--gold); }
.sym { font: 700 20px var(--display); margin-left: auto; }
.chart { display: block; width: 100%; height: 120px; margin: 6px 0 16px; }
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lv { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.lv small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.lv b { font: 700 17px var(--display); }
.placed { margin-top: 14px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--up-dim); border: 1px solid rgba(54, 211, 153, .35); color: var(--up); font-weight: 700; font-size: 14px; }
.tg { right: 0; bottom: 0; width: 310px; padding: 14px 16px; border-radius: 16px; }
.tg-head { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.tg-dot { width: 30px; height: 30px; border-radius: 50%; background: #2aa3df; display: grid; place-items: center; color: #fff; font-size: 15px; }
.tg p { margin: 0; font-size: 13.5px; color: #cfd6cc; }
.vps { left: 0; bottom: 34px; padding: 12px 16px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; border-radius: 14px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 4px var(--up-dim); }
.sample { position: absolute; top: 0; right: 40px; font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

/* sections */
section { padding: 80px 0; }
.sec-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
h2 { font: 800 36px/1.15 var(--display); letter-spacing: -.015em; margin: 14px 0 12px; }
.sec-head p { color: var(--muted); font-size: 17px; margin: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px; }
.ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--gold-dim); border: 1px solid rgba(242, 188, 63, .3); margin-bottom: 16px; }
.feat h3, .step h3 { font: 700 18px var(--display); margin: 0 0 8px; }
.feat p, .step p { margin: 0; color: var(--muted); font-size: 15px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step { padding: 28px 26px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--card), transparent); }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font: 800 16px var(--display); color: #2a1c02; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); margin-bottom: 16px; }
.alt { background: linear-gradient(180deg, rgba(0, 0, 0, .12), transparent); border-top: 1px solid var(--line); }
.final { text-align: center; padding: 64px 32px; border-radius: 24px; border: 1px solid rgba(242, 188, 63, .4); background: radial-gradient(500px 220px at 50% 0, rgba(242, 188, 63, .16), transparent 70%), var(--card); }
.final h2 { margin-top: 0; }
.final .cta { justify-content: center; }
footer { padding: 36px 0 48px; color: var(--muted); font-size: 13px; text-align: center; border-top: 1px solid var(--line); }

/* ---------- the Log in / Register window */
.overlay { position: fixed; inset: 0; z-index: 20; background: rgba(8, 14, 12, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.overlay[hidden] { display: none; }
.modal { width: 420px; max-width: 100%; margin: auto; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px 28px 22px; box-shadow: 0 40px 80px rgba(0, 0, 0, .5); position: relative; }
.modal .x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; font-size: 15px; }
.modal .x:hover { color: var(--text); border-color: var(--muted); }
.modal .brand { justify-content: center; flex-direction: column; gap: 8px; text-align: center; margin-bottom: 14px; font-size: 18px; }
.modal .brand img { width: 50px; height: 50px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); margin: 0 0 18px; }
.tabs button { padding: 10px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 14px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--card); color: var(--text); box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.sub { text-align: center; color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: block; margin-bottom: 13px; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.field .opt { font-weight: 500; }
.field input { width: 100%; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--text); font: 600 16px var(--body); outline: none; transition: border-color .15s, box-shadow .15s; }
.field input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.field input.bad { border-color: var(--down); }
.hint { font-size: 12px; color: var(--muted); margin: 5px 0 0; min-height: 0; }
.hint .ok { color: var(--up); font-weight: 700; }
.hint .no { color: var(--down); font-weight: 700; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; padding: 6px 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #cfd6cc; margin: 4px 0 14px; cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--gold); }
.err { background: var(--down-dim); border: 1px solid rgba(255, 106, 92, .4); color: #ffb3ab; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 0 0 12px; }
.err[hidden] { display: none; }
.modal .btn.primary { width: 100%; padding: 15px; margin-top: 4px; font-size: 15px; }
.foot { text-align: center; font-size: 13.5px; color: var(--muted); margin: 14px 0 0; }
.linkish { border: 0; background: none; padding: 0; color: var(--gold); font-weight: 700; cursor: pointer; font-size: inherit; }
.linkish:disabled { color: var(--muted); cursor: default; }
.code-input { text-align: center; font: 800 28px var(--display) !important; letter-spacing: 10px; padding: 14px !important; }
.code-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 13.5px; }
.closed { text-align: center; padding: 10px 4px 6px; }
.closed b { display: block; font: 700 17px var(--display); margin-bottom: 8px; }

/* phones */
@media (max-width: 700px) {
  .links, .nav-cta .btn.primary { display: none; }
  .nav-cta { margin-left: auto; }
  .brand { font-size: 16px; } .brand img { width: 34px; height: 34px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 24px 0 40px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero .wrap > *, .visual, .visual .panel { min-width: 0; }
  h1 { font-size: 34px; } .lead { font-size: 16.5px; }
  .cta .btn { flex: 1; }
  .visual { height: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .visual .panel { position: relative; inset: auto; width: auto; }
  .sample { position: static; text-align: right; }
  .trade { padding: 16px; } .lv { padding: 8px 9px; } .lv b { font-size: 13.5px; } .levels { gap: 6px; }
  .vps { justify-self: start; }
  section { padding: 52px 0; } h2 { font-size: 26px; }
  .grid3, .steps { grid-template-columns: 1fr; }
  .final { padding: 40px 20px; }
  .overlay { padding: 10px; align-items: flex-start; }
  .modal { padding: 24px 18px 20px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
