:root {
  --bg: #07111f;
  --surface: #0d1a2b;
  --surface-2: #122238;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f7f9fc;
  --muted: #91a0b5;
  --accent: #35d49a;
  --accent-dark: #072d24;
  --blue: #5998ff;
  --danger: #ff6476;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.ambient { position: fixed; z-index: -1; border-radius: 50%; filter: blur(120px); opacity: .16; pointer-events: none; }
.ambient-one { width: 520px; height: 520px; background: var(--blue); top: -230px; right: -170px; }
.ambient-two { width: 460px; height: 460px; background: var(--accent); top: 500px; left: -300px; opacity: .08; }

.topbar, main, footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-weight: 760; font-size: 19px; letter-spacing: -.4px; }
.brand > span:last-child > span { margin-left: 6px; color: var(--accent); font-weight: 600; letter-spacing: .08em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(53,212,154,.55); border-radius: 10px; color: var(--accent); background: rgba(53,212,154,.08); font-size: 15px; }
.nav-actions { display: flex; gap: 8px; }
.button { border: 0; border-radius: 11px; padding: 11px 15px; color: var(--text); transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-ghost { border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.button-bot { text-decoration: none; color: #062219; background: var(--accent); font-weight: 800; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 11px; }

.hero { padding: 94px 0 88px; text-align: center; }
.eyebrow, .kicker { color: var(--accent); text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: 800; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 7px 11px; border: 1px solid rgba(53,212,154,.22); background: rgba(53,212,154,.06); border-radius: 99px; }
.eyebrow span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.hero h1 { max-width: 850px; margin: 23px auto 20px; font-size: clamp(44px, 7vw, 78px); line-height: .99; letter-spacing: -.055em; }
.hero h1 em { color: var(--accent); font-family: Georgia, serif; font-weight: 500; }
.hero > p { max-width: 650px; margin: 0 auto; color: var(--muted); font-size: 18px; }
.hero-stats { display: flex; justify-content: center; gap: 0; margin: 52px auto 0; }
.hero-stats div { display: grid; gap: 2px; min-width: 180px; padding: 0 34px; border-right: 1px solid var(--line); }
.hero-stats div:last-child { border: 0; }
.hero-stats strong { font-size: 20px; color: var(--text); }
.hero-stats span { color: var(--muted); font-size: 12px; }

.workspace { padding: 56px; border: 1px solid var(--line); border-radius: 28px; background: rgba(13,26,43,.72); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.kicker { margin: 0 0 7px; }
h2 { margin: 0; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.035em; }
.search { display: flex; align-items: center; gap: 9px; width: min(320px, 100%); padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.035); color: var(--muted); }
.search:focus-within { border-color: rgba(53,212,154,.55); }
.search input { width: 100%; padding: 12px 0; border: 0; outline: 0; color: var(--text); background: transparent; }
.search input::placeholder { color: #708097; }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.tool-card { position: relative; min-height: 220px; padding: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.025); transition: transform .22s ease, border-color .22s ease, background .22s ease; }
.tool-card:hover { transform: translateY(-4px); border-color: rgba(53,212,154,.35); background: rgba(255,255,255,.045); }
.tool-card button.open-tool { position: absolute; inset: 0; z-index: 1; width: 100%; border: 0; background: none; }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.tool-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-dark); color: var(--accent); font-size: 19px; }
.tool-number { color: #53637a; font-size: 12px; font-weight: 700; }
.tool-card h3 { margin: 23px 0 8px; font-size: 18px; letter-spacing: -.015em; }
.tool-card p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.tool-link { color: var(--accent); font-size: 12px; font-weight: 750; }
.empty-state { padding: 32px; color: var(--muted); text-align: center; }

.paper-trading { scroll-margin-top: 24px; padding: 90px 0 20px; }
.bot-heading { display: grid; grid-template-columns: 1.4fr .6fr; gap: 50px; align-items: end; margin-bottom: 34px; }
.bot-heading h2 { margin: 17px 0 15px; font-size: clamp(36px, 5vw, 58px); line-height: 1.03; }
.bot-heading h2 em { color: var(--accent); font-family: Georgia, serif; font-weight: 500; }
.bot-heading > div:first-child > p { max-width: 670px; margin: 0; color: var(--muted); }
.risk-principle { padding: 22px; border: 1px solid rgba(255,190,85,.25); border-radius: 16px; background: rgba(255,190,85,.06); }
.risk-principle strong { color: #ffcb78; font-size: 14px; }
.risk-principle p { margin: 7px 0 0; color: #c5b28f; font-size: 12px; }
.bot-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bot-panel, .simulations-panel { padding: 27px; border: 1px solid var(--line); border-radius: 20px; background: rgba(13,26,43,.8); }
.panel-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.panel-heading > span { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; color: var(--accent); background: var(--accent-dark); font-size: 10px; font-weight: 800; }
.panel-heading h3 { margin: 0; font-size: 16px; }
.panel-heading .mini-button { margin-left: auto; }
.bot-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field span:first-child { font-size: 12px; font-weight: 760; color: #cbd5e4; }
.field select { width: 100%; padding: 13px 14px; outline: 0; border: 1px solid var(--line); border-radius: 11px; color: var(--text); background: #122238; }
.input-suffix { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.035); }
.input-suffix:focus-within { border-color: rgba(53,212,154,.6); box-shadow: 0 0 0 3px rgba(53,212,154,.08); }
.input-suffix input { border: 0; box-shadow: none !important; background: transparent; }
.input-suffix > span { padding-right: 13px; color: var(--muted); font-size: 12px; }
.acknowledgement { display: flex; gap: 10px; margin: 18px 0; color: var(--muted); font-size: 11px; }
.acknowledgement input { accent-color: var(--accent); }
.bot-submit { width: 100%; }
.data-status { margin: 12px 0 0; color: var(--muted); text-align: center; font-size: 10px; }
.signal-panel { min-height: 460px; }
.signal-empty { display: grid; place-items: center; align-content: center; min-height: 335px; text-align: center; }
.signal-empty > span { color: var(--accent); font-size: 42px; }
.signal-empty h4 { margin: 13px 0 5px; }
.signal-empty p { max-width: 330px; margin: 0; color: var(--muted); font-size: 12px; }
.signal-result { display: grid; gap: 16px; }
.signal-verdict { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.signal-verdict strong { display: block; font-size: 20px; }
.signal-verdict small { color: var(--muted); }
.signal-badge { padding: 7px 10px; border-radius: 99px; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.signal-badge.buy { color: var(--accent); background: var(--accent-dark); }
.signal-badge.wait, .signal-badge.blocked { color: #ffcb78; background: rgba(255,190,85,.09); }
.metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metric { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.02); }
.metric span { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.metric strong { display: block; margin-top: 4px; font-size: 14px; }
.signal-notes { margin: 0; padding-left: 19px; color: var(--muted); font-size: 11px; }
.signal-notes li + li { margin-top: 6px; }
.simulate-button { width: 100%; }
.simulations-panel { margin-top: 16px; }
.simulations-list { display: grid; gap: 10px; }
.simulation-row { display: grid; grid-template-columns: 1.2fr repeat(5, .75fr) auto; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.simulation-row span { color: var(--muted); font-size: 10px; }
.simulation-row strong { display: block; color: var(--text); font-size: 12px; }
.status-open { color: var(--blue) !important; }
.status-win { color: var(--accent) !important; }
.status-loss { color: var(--danger) !important; }
.financial-disclaimer { margin: 17px auto 0; max-width: 900px; color: #6f7e92; text-align: center; font-size: 10px; }

.principles { padding: 115px 0; }
.principles > h2 { margin-bottom: 38px; }
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.principle-grid article { padding: 28px 34px 0 0; }
.principle-grid article + article { padding-left: 34px; border-left: 1px solid var(--line); }
.principle-grid span { color: var(--accent); font-size: 11px; font-weight: 800; }
.principle-grid h3 { margin: 16px 0 8px; }
.principle-grid p { margin: 0; color: var(--muted); font-size: 14px; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 0 44px; border-top: 1px solid var(--line); }
footer p { color: var(--muted); font-size: 12px; }

.modal { width: min(760px, calc(100% - 24px)); max-height: calc(100vh - 30px); padding: 0; color: var(--text); border: 1px solid var(--line); border-radius: 22px; background: #0c192a; box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(2,7,14,.82); backdrop-filter: blur(8px); }
.modal-shell { margin: 0; padding: 30px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.modal-header h2 { font-size: 31px; }
.icon-button { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: transparent; font-size: 24px; line-height: 1; }
.icon-button:hover { color: white; border-color: rgba(255,255,255,.3); }
.modal-description { margin: 12px 50px 25px 0; color: var(--muted); font-size: 14px; }
.fields { display: grid; gap: 15px; margin-bottom: 25px; }
.field { display: grid; gap: 7px; }
.field label, .preview-heading label { font-size: 12px; font-weight: 760; color: #cbd5e4; }
.field input, .field textarea, .prompt-preview { width: 100%; padding: 13px 14px; outline: 0; border: 1px solid var(--line); border-radius: 11px; color: var(--text); background: rgba(255,255,255,.035); resize: vertical; }
.field input:focus, .field textarea:focus, .prompt-preview:focus { border-color: rgba(53,212,154,.6); box-shadow: 0 0 0 3px rgba(53,212,154,.08); }
.field small { color: var(--muted); font-size: 11px; }
.preview-heading { display: flex; justify-content: space-between; margin: 0 2px 8px; }
.preview-heading span { color: var(--muted); font-size: 11px; }
.prompt-preview { min-height: 250px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.65; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.button-primary { color: #03231a; background: var(--accent); font-weight: 800; }
.button-primary:hover { background: #45e5aa; }
.button-secondary { border: 1px solid var(--line); background: var(--surface-2); }
.button-danger { margin-top: 16px; color: #ff9aa6; border: 1px solid rgba(255,100,118,.25); background: rgba(255,100,118,.07); }
.collection-list { display: grid; gap: 10px; max-height: 55vh; margin-top: 24px; overflow-y: auto; }
.collection-item { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.collection-item h3 { margin: 0 0 3px; font-size: 14px; }
.collection-item p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--muted); font-size: 11px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.collection-item time { color: #607089; font-size: 10px; }
.collection-actions { display: flex; gap: 6px; align-items: center; }
.mini-button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: transparent; font-size: 11px; }
.collection-empty { padding: 45px 15px; color: var(--muted); text-align: center; }
.toast { position: fixed; z-index: 10; right: 22px; bottom: 22px; padding: 12px 16px; transform: translateY(20px); opacity: 0; border: 1px solid rgba(53,212,154,.25); border-radius: 11px; color: var(--text); background: #10241f; box-shadow: var(--shadow); font-size: 13px; pointer-events: none; transition: .25s ease; }
.toast.visible { transform: translateY(0); opacity: 1; }

@media (max-width: 850px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .workspace { padding: 34px; }
  .bot-heading, .bot-layout { grid-template-columns: 1fr; }
  .simulation-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .topbar, main, footer { width: min(100% - 24px, 1180px); }
  .topbar { height: 70px; }
  .nav-actions .button { padding: 8px 10px; font-size: 0; }
  .nav-actions .button-bot { display: none; }
  .nav-actions .button::first-letter { font-size: 0; }
  .nav-actions .count { margin: 0; font-size: 11px; }
  .hero { padding: 68px 0 60px; }
  .hero h1 { font-size: 45px; }
  .hero > p { font-size: 16px; }
  .hero-stats { justify-content: space-between; }
  .hero-stats div { min-width: 0; flex: 1; padding: 0 8px; }
  .workspace { padding: 24px 16px; border-radius: 20px; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .search { width: 100%; }
  .tool-grid, .principle-grid { grid-template-columns: 1fr; }
  .bot-fields, .metrics-grid { grid-template-columns: 1fr; }
  .paper-trading { padding-top: 70px; }
  .bot-panel, .simulations-panel { padding: 20px 15px; }
  .simulation-row { grid-template-columns: 1fr 1fr; }
  .tool-card { min-height: 205px; }
  .principles { padding: 80px 0; }
  .principle-grid article, .principle-grid article + article { padding: 25px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  footer { align-items: flex-start; flex-direction: column; }
  .modal-shell { padding: 22px 17px; }
  .modal-header h2 { font-size: 25px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
