@font-face {
  font-family: "Geist Mono";
  src: url("/static/fonts/geist-mono/GeistMono-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0b0f14;
  --panel: #0f141b;
  --panel-2: #111923;
  --line: #1b2533;
  --text: #d9e1ea;
  --muted: #8aa0b6;
  --good: #34d399;
  --bad: #f87171;
  --link: #60a5fa;
  --font-family-geist-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1 {
  margin-top: 0;
  margin-bottom: 0;
  font-size: clamp(24px, 3vw, 32px);
}
a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 2000px;
  margin: 0 auto;
  padding: 20px;
}

.topbar {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.hero {
  margin-bottom: 32px;
}

.cta-row {
  margin-top: 20px;
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none; /* hide Firefox scrollbar */
  -ms-overflow-style: none; /* hide IE/Edge scrollbar */
}
.cta-row::-webkit-scrollbar { display: none; } /* hide WebKit scrollbar */

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #a855f7);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s ease;
  box-shadow: none;
  flex: 0 0 auto;
  min-width: 180px;
  text-align: center;
}

.cta-btn:hover {
  text-decoration: none;
  box-shadow: none;
}

.cta-btn:active {
  box-shadow: none;
}

.cta-btn--compact {
  padding: 10px 20px;
  font-size: 13px;
}

@media (max-width: 520px) {
  .cta-row {
    gap: 10px;
  }
  .cta-btn {
    min-width: 130px;
    padding: 12px 0px;
    font-size: 13px;
    letter-spacing: 0.04em;
  }
}

.cta-btn.cta-gold {
  background: linear-gradient(135deg, #f7c948 0%, #f2a93b 60%, #ef9e2c 100%);
  color: #1f2933;
  border: none;
  box-shadow: none;
}

.cta-btn.cta-gold:hover {
  background: linear-gradient(135deg, #ffd76a 0%, #f4b94f 60%, #f2a93b 100%);
  box-shadow: none;
}

.cta-btn.cta-telegram {
  background: linear-gradient(135deg, #2aa7ff 0%, #0088cc 60%, #0277bd 100%);
  color: #ffffff;
  border: none;
  box-shadow: none;
}

.cta-btn.cta-telegram:hover {
  background: linear-gradient(135deg, #44b6ff 0%, #1a9ee6 60%, #0284c7 100%);
  color: #ffffff;
  box-shadow: none;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.hero-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hero-desc {
  margin: 0;
  max-width: 920px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-family-geist-mono);
  font-size: 1.1rem;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.topbar-logo {
  width: 39px;
  height: 39px;
  object-fit: cover;
  border-radius: 0px;
}

.topbar-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 280px;
}

.topbar-btn {
  flex: 1;
  min-width: 140px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: none;
  border-radius: 0;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
  color: #0b1220;
  background: #e2e8f0;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.topbar-btn:hover {
  opacity: 0.9;
  text-decoration: none;
}

.topbar-btn--gold { background: #f7c948; color: #1f2933; }
.topbar-btn--blue { background: #1f8ef5; color: #f8fafc; }
.topbar-btn--purple { background: #6d4ae8; color: #f8fafc; }

@media (max-width: 680px) {
  .topbar {
    gap: 12px;
  }
  .topbar-title {
    display: none;
  }
  .topbar-actions {
    width: 100%;
  }
  .topbar-btn {
    min-width: 0;
  }
}

.brand {
  font-weight: 700;
  letter-spacing: 0.3px;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 0px;
  font-size: 12px;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 8px rgba(22, 163, 74, 0.7);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  color: var(--text);
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.45);
}

.btn.paused {
  color: #facc15;
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.45);
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 0 20px 0;
}

.cards-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.live-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-width: 320px;
  width: auto;
  max-width: 100%;
  align-self: flex-start;
}

.card h3 {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
}

.link-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}

.link-btn:hover {
  color: var(--text);
  text-decoration: underline;
}

.paper-tabs {
  display: inline-flex;
  gap: 16px;
  align-items: center;
}

.paper-tab {
  border: none;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin: 0;
  border-radius: 0;
  transition: color 0.15s ease;
}

.paper-tab.active {
  color: var(--text);
}

.close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.close-btn:hover {
  background: rgba(248, 113, 113, 0.2);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.6);
}

.summary-grid {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.summary-grid::-webkit-scrollbar {
  display: none;
}

.summary-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  min-width: 300px;
  width: auto;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.summary-title {
  font-weight: 600;
  color: var(--text);
  font-size: 15px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.summary-body {
  display: flex;
  flex-direction: column;
}

.summary-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  padding: 10px 16px;
  border-bottom: 1px solid rgba(27, 37, 51, 0.8);
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-row strong {
  font-variant-numeric: tabular-nums;
  font-weight: 400;
}

.summary-inline {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
}

.tp-hit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 5px;
  height: 24px;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  border: 1px solid var(--line);
  margin-right: 6px;
}

.tp-hit--filled {
  border-color: var(--good);
  color: var(--good);
  background: rgba(52, 211, 153, 0.12);
}

.tp-hit--sl {
  border-color: var(--bad);
  color: var(--bad);
  background: rgba(248, 113, 113, 0.12);
}

.tp-hit--timeout {
  border-color: #f59e0b;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
}

.tp-hit--sl-zero {
  border-color: var(--good);
  color: var(--good);
  background: rgba(52, 211, 153, 0.12);
}

.tp-hit--sl-lock {
  border-color: #d1b84a;
  color: #e9d47a;
  background: rgba(209, 184, 74, 0.16);
}

.tp-hit--manual {
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 400;
}

.pnl-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.pnl-modal.active {
  display: flex;
}

.pnl-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.pnl-modal-dialog {
  position: relative;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  width: auto;
  max-width: none;
  box-shadow: none;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pnl-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
  z-index: 2;
}

.pnl-modal-close:hover {
  color: #fff;
}

.pnl-card-host {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: auto;
  max-height: 80vh;
}

.card-icon svg {
  display: block;
}

.pnl-pos {
  color: var(--good);
}

.pnl-neg {
  color: var(--bad);
}

.close-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.card.table-card {
  overflow: hidden;
  box-sizing: border-box;
}

.card.table-card .table-h {
  display: block;
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  -ms-overflow-style: -ms-autohiding-scrollbar;
  touch-action: pan-x pan-y;
}

@media (min-width: 901px) {
  .card.table-card .table-h {
    overflow-y: visible;
    max-height: none;
    -webkit-overflow-scrolling: auto;
    touch-action: auto;
  }
}

.card.table-card table {
  width: max-content;
  min-width: 100%;
}

.table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  box-sizing: border-box;
}

.table th,
.table td {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
  text-align: left;
}

.flex-spacer {
  flex: 1;
}

.table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel);
  text-align: left;
  font-weight: 600;
  color: var(--muted);
}

.table tr:nth-child(even) {
  background: var(--panel-2);
}

.table tr:hover {
  background: #0f1b29;
}

.table tr.row-trend-near-ath {
  background: rgba(248, 113, 113, 0.12);
}

.table tr.row-trend-near-ath:hover {
  background: rgba(248, 113, 113, 0.18);
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.pos {
  color: var(--good);
}

.neg {
  color: var(--bad);
}

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

.age-new {
  color: #facc15;
}

.cell-green {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
}

.right {
  text-align: right;
}

.th-btn {
  cursor: pointer;
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}

.pill.active {
  background: var(--panel);
  color: var(--text);
}

.sparkline-price,
.sparkline-line {
  width: 103px;
  height: 40px;
  display: block;
}

.trend-dots {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 40px;
  gap: 6px;
}

.trend-dots-row {
  display: flex;
  gap: 2px;
  justify-content: flex-start;
}

.trend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1f2933;
  opacity: 0.25;
}

.trend-dot.pos {
  background: #34d399;
  opacity: 1;
}

.trend-dot.neg {
  background: #f87171;
  opacity: 1;
}

.streak-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  height: 24px;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  border: 1px solid var(--line);
}

.streak-tag.pos {
  color: var(--good);
  border-color: rgba(52, 211, 153, 0.6);
}

.streak-tag.neg {
  color: #a1b0c2;
  border-color: rgba(241, 245, 249, 0.15);
}

.streak-tag.long {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
  border-color: rgba(250, 204, 21, 0.4);
}

.exchanges-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.exchange-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 10px;
  height: 24px;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: #a1b0c2;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  text-align: center;
}

.exchange-badge.active {
  color: var(--muted);
}

.exchange-badge.empty {
  color: var(--muted);
  cursor: default;
}

.exchange-tooltip {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translate(-50%, 2px);
  background: #0f141b;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.45);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 150;
  max-width: 260px;
}

.exchange-badge:hover .exchange-tooltip,
.exchange-badge.open .exchange-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.tooltip-group {
  margin: 0;
  padding: 0;
  display: block;
}

.tooltip-group + .tooltip-group {
  margin-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 8px;
}

.tooltip-title {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 4px;
}

.tooltip-line {
  display: block;
  font-size: 12px;
  line-height: 1.3;
}

.live-card .table-h {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.live-card .table-h::-webkit-scrollbar {
  display: none;
}

.live-card table {
  width: 100% !important;
  min-width: 0 !important;
}

.live-card table tr:last-child td {
  border-bottom: none;
}

.table-h {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  -ms-overflow-style: -ms-autohiding-scrollbar;
  /* allow both axes so вертикальный скролл не блокируется на iOS */
  touch-action: pan-x pan-y;
}

.table-h::-webkit-scrollbar {
  display: none;
}

@media (max-width: 900px) {
  .table {
    width: max-content;
  }
  .live-card {
    flex: 1 1 100%;
    width: 100%;
  }
  .card.table-card .table-h {
    max-height: 70vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }
  .card.table-card .table-h::-webkit-scrollbar {
    display: none;
  }
}

.progress-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.progress-bar {
  position: relative;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(17, 24, 39, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #475569, #1e293b);
  transition: width 0.35s ease;
}

.progress-label {
  position: relative;
  z-index: 1;
  font-weight: 600;
}

.progress-meta {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

.progress-bar.neutral .progress-fill {
  background: linear-gradient(90deg, #475569, #1e293b);
}

.progress-bar.long .progress-fill {
  background: linear-gradient(90deg, #22c55e, #0ea5e9);
}

.progress-bar.long-ready .progress-fill {
  background: linear-gradient(90deg, #16a34a, #22d3ee);
}

.progress-bar.short .progress-fill {
  background: linear-gradient(90deg, #fb923c, #f97316);
}

.progress-bar.short-ready .progress-fill {
  background: linear-gradient(90deg, #ef4444, #b91c1c);
}

.progress-bar.ready {
  color: #ffffff;
}

.progress-bar.ready .progress-label {
  color: #ffffff;
}
.paper-foot-btn {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.paper-foot-btn:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer {
  margin-top: 48px;
  padding: 32px 0 56px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-brand {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
}

.footer-links a:hover {
  color: #93c5fd;
}

.footer-disclaimer {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.6;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}
