:root {
  --bg: #10161b;
  --card: #182127;
  --line: #2a3840;
  --text: #e7eef1;
  --muted: #93a4ad;
  --accent: #00d4b3;
  --accent2: #00b8c4;
  --shadow: 0 16px 40px rgba(0,0,0,.28);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  overflow-x: hidden;
  font-family: "Segoe UI", Inter, system-ui, sans-serif;
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(0,212,179,.16), transparent 50%),
    radial-gradient(700px 320px at 100% 0%, rgba(0,184,196,.10), transparent 46%),
    var(--bg);
  color: var(--text);
}
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
.wrap { width: min(1080px, calc(100% - 24px)); margin: 0 auto; }
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 22px; }
.brand img { height: 52px; width: auto; }
nav { display: flex; gap: 16px; font-size: 14px; color: var(--muted); }
.head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.btn {
  display: inline-block; border: 0; cursor: pointer; font-weight: 700;
  padding: 12px 16px; border-radius: 12px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #06241f;
}
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px;
}
.hero {
  padding: 28px 0 18px;
  display: grid; grid-template-columns: 1.15fr .85fr;
  gap: 28px; align-items: center;
}
h1 { font-size: clamp(28px, 7vw, 48px); line-height: 1.12; margin: 8px 0 12px; }
h2 { font-size: clamp(22px, 5vw, 28px); margin: 36px 0 14px; }
.lead { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 0 0 18px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.panel, .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.panel { padding: 8px 18px; }
.card { padding: 18px; }
.icon {
  width: 42px; height: 42px; margin-bottom: 12px;
  color: var(--accent);
}
.row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 14px;
}
.row:last-child { border-bottom: 0; }
.row b { color: var(--accent); }
.grid, .grid-2, .photos {
  display: grid; gap: 16px; padding: 0 0 24px;
}
.grid { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 1fr 1fr; }
.photos { grid-template-columns: 1.3fr .7fr; grid-template-rows: 180px 180px; }
.photos img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 16px;
  border: 1px solid var(--line);
}
.photos img:first-child { grid-row: 1 / 3; }
.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); line-height: 1.55; }
.form-box { padding: 0 0 48px; }
form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
form .full { grid-column: 1 / -1; }
label { font-size: 13px; color: var(--muted); }
input, textarea, select {
  width: 100%; margin-top: 6px; padding: 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #12181d; color: var(--text); font-size: 16px;
}
#msg { margin: 8px 0 0; min-height: 20px; }
.ok { color: var(--accent); }
.err { color: #ff6b6b; }
footer {
  color: var(--muted); font-size: 13px;
  padding: 22px 0 28px; margin-top: 48px;
  border-top: 1px solid var(--line);
}
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.on { opacity: 1; transform: none; }
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  margin: 0 0 32px;
}
.carousel-track { display: flex; transition: transform .35s ease; }
.carousel-track img {
  min-width: 100%;
  width: 100%;
  height: 340px;
  object-fit: contain;
  background: #0b0f12;
  display: block;
  border: 0;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: rgba(0,0,0,.45);
  color: #fff; font-size: 20px; cursor: pointer;
}
.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }
.carousel-dots {
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  display: flex; justify-content: center; gap: 6px;
}
.carousel-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.4);
}
.carousel-dots span.on { background: #00d4b3; }
.modal-bg {
  display: none; position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.55);
  align-items: center; justify-content: center; padding: 16px;
}
.modal-bg.show { display: flex; }
.modal {
  width: min(640px, 96vw);
  max-height: 90vh;
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.modal form { display: block; }
.modal form input,
.modal form select { width: 100%; }
.modal form input[type="checkbox"] { width: auto; }
.modal h3 { margin: 0 0 12px; }
.modal .close {
  float: right; background: none; border: 0;
  color: var(--muted); font-size: 22px; cursor: pointer;
}
.hint { font-size: 13px; color: var(--muted); }
.prof-table { width: 100%; border-collapse: collapse; margin: 0 0 28px; }
.prof-table th, .prof-table td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--line); font-size: 14px;
}
.prof-table th { color: var(--muted); font-weight: 600; }
.dir-long { color: #00d4b3; font-weight: 700; }
.dir-short { color: #ff6b6b; font-weight: 700; }
.bar {
  height: 8px; background: #2a3840; border-radius: 99px;
  overflow: hidden; min-width: 80px;
}
.bar > i { display: block; height: 100%; background: #00d4b3; }
.goal-row {
  display: flex; justify-content: space-between;
  gap: 12px; align-items: center; padding: 8px 0;
}
#reportForm, #compoundForm {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: end;
  margin: 0 0 28px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
#reportForm select, #compoundForm input { min-width: 140px; }
.stat-num { font-size: 28px; margin: 8px 0 0; color: #00d4b3; }
.trade-list { display: grid; gap: 10px; margin: 0 0 12px; }
.trade-card {
  display: grid;
  grid-template-columns: 1.2fr .6fr 1fr 1fr 1fr;
  gap: 8px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.trade-card b { font-size: 16px; }
.trade-card span { color: var(--muted); font-size: 13px; }
.month-list { display: grid; gap: 8px; }
.month-row {
  background: #12181d;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.month-top { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; }
.news-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
}
.news-photo { position: relative; }
.news-photo img {
  width: 100%; height: 140px;
  object-fit: cover; border-radius: 12px; display: block;
}
.news-photo span,
.news-photo a {
  position: absolute; left: 8px; top: 8px;
  background: rgba(0,0,0,.55); color: #00d4b3;
  font-size: 12px; padding: 3px 8px; border-radius: 8px;
  text-decoration: none;
}
.news-row h3 { margin: 0 0 8px; line-height: 1.3; }
.news-row .lead { margin: 0 0 10px; }
.news-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.news-chip {
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
}
.news-chip.on { color: #06241f; background: var(--accent); border-color: transparent; }
.blog-kicker { margin: 18px 0 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.blog-kicker a { color: var(--accent); }
.blog-sec {
  border-top: 1px solid var(--line);
  padding: 22px 0 8px;
  margin: 8px 0 0;
}
.blog-sec-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 14px;
}
.blog-sec-head h2 { margin: 0; }
.blog-sec-head a { font-size: 14px; white-space: nowrap; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-content: start;
  gap: 12px;
  margin: 0 0 28px;
  width: 100%;
}
.blog-card {
  display: flex;
  flex-direction: column;
  width: auto;
  max-width: 100%;
  min-height: 280px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  color: var(--text);
}
.blog-photo {
  height: 72px;
  overflow: hidden;
  flex-shrink: 0;
}
.blog-photo img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  display: block;
}
.blog-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 10px 10px;
}
.blog-cat { color: var(--accent); font-size: 11px; }
.blog-card h3 {
  margin: 4px 0 6px;
  font-size: 15px;
  line-height: 1.25;
  min-height: 38px;
}
.blog-card p {
  margin: 0 0 8px;
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card .lead {
  margin-top: auto;
  margin-bottom: 4px;
  font-size: 12px;
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.blog-more { color: var(--accent); font-size: 13px; }
.pnl-box { height: 420px; margin-bottom: 12px; }
.pnl-box canvas { width: 100% !important; height: 100% !important; }
#results { margin: 8px 0 28px; }
.live-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 13px;
}
.live-meta .btn-ghost {
  padding: 6px 12px;
  font-size: 13px;
}
#liveTradeBox {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.live-card {
  padding: 12px 8px 10px;
  text-align: center;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  display: grid;
  gap: 4px;
}
.live-card b {
  font-size: 14px;
}
.live-card span { font-size: 12px; }
.live-date {
  color: var(--muted);
  font-size: 11px;
}
.live-pnl {
  font-weight: 700;
  font-size: 14px;
}
.live-win {
  border-color: rgba(0, 212, 179, .45);
  box-shadow: 0 0 16px rgba(0, 212, 179, .12);
}
.live-loss {
  border-color: rgba(255, 107, 107, .4);
  box-shadow: 0 0 16px rgba(255, 107, 107, .1);
}
.live-spin {
  display: none;
  width: 12px;
  height: 12px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  vertical-align: -2px;
  margin-right: 6px;
}
#liveTradeBtn.is-load .live-spin {
  display: inline-block;
  animation: live-rot .6s linear infinite;
}
@keyframes live-rot {
  to { transform: rotate(360deg); }
}
@media (max-width: 800px) {
  .brand img { height: 56px; }
  .brand { font-size: 30px; }
  header {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }
  .brand {
    width: 100%;
    justify-content: center;
  }
  .brand a { width: auto; }
  nav { display: none; }
  .head-actions {
    width: 100%;
    margin-left: 0;
    justify-content: center;
  }
  .user-chip { justify-content: center; }
  .hero, .grid, form, .photos { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .photos { grid-template-rows: 200px 160px 160px; }
  .photos img:first-child { grid-row: auto; }
  .carousel-track img { height: 200px; }
  .prof-table { display: block; overflow-x: auto; }
  .trade-card { grid-template-columns: 1fr 1fr; }
  .news-row { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .blog-card { width: auto; }
  .blog-photo,
  .blog-photo img { height: 72px; }
  #liveTradeBox { grid-template-columns: 1fr 1fr; }
  h2 { margin-top: 28px; }
  .pnl-box { height: 340px; }
}