:root {
  --bg: #07111f;
  --bg-2: #0a1730;
  --panel: rgba(9, 19, 39, 0.72);
  --panel-solid: #0d1a34;
  --panel-soft: rgba(255, 255, 255, 0.04);
  --border: rgba(180, 205, 255, 0.12);
  --border-strong: rgba(180, 205, 255, 0.22);
  --text: #f2f6ff;
  --muted: #93a6cf;
  --muted-2: #6d83b2;
  --accent: #7c9cff;
  --accent-2: #5eead4;
  --accent-3: #fbbf24;
  --danger: #ff7a7a;
  --success: #62f2b2;
  --warning: #ffd26b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 12%, rgba(124, 156, 255, 0.20), transparent 30%),
    radial-gradient(circle at 88% 16%, rgba(94, 234, 212, 0.12), transparent 24%),
    radial-gradient(circle at 62% 82%, rgba(251, 191, 36, 0.10), transparent 24%),
    linear-gradient(180deg, #04101f 0%, #091427 42%, #081225 100%);
}

.ambient {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}
.ambient-1 { background: #4f79ff; top: -120px; right: -80px; }
.ambient-2 { background: #26d6b9; left: -120px; bottom: -120px; }

.shell {
  position: relative;
  z-index: 1;
  max-width: 1380px;
  margin: 0 auto;
  padding: 28px;
}

.card {
  border-radius: 28px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.glass {
  background:
    linear-gradient(180deg, rgba(14, 27, 53, 0.90) 0%, rgba(10, 21, 42, 0.78) 100%);
}
.panel {
  padding: 24px;
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 22px;
  padding: 28px;
  margin-bottom: 18px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--accent-2);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.hero h1 span {
  color: var(--accent-2);
}
.hero p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
  max-width: 860px;
}
.hero-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-panel {
  display: flex;
  align-items: stretch;
}
.live-card {
  width: 100%;
  border-radius: 24px;
  padding: 22px;
  background:
    linear-gradient(155deg, rgba(124, 156, 255, 0.16), rgba(94, 234, 212, 0.10)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-strong);
}
.live-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.pulse-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pulse {
  width: 12px;
  height: 12px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(98, 242, 178, 0.7);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(98, 242, 178, 0.65); }
  70% { box-shadow: 0 0 0 12px rgba(98, 242, 178, 0); }
  100% { box-shadow: 0 0 0 0 rgba(98, 242, 178, 0); }
}
.price-block {
  margin-top: 28px;
}
.big-price {
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 8px;
}
.mini-label {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mini-sub {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 13px;
}

.quick-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.chip {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.22s ease;
}
.chip:hover,
.chip.active {
  border-color: rgba(124, 156, 255, 0.45);
  background: rgba(124, 156, 255, 0.14);
  transform: translateY(-1px);
}

.layout-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 18px;
  margin-bottom: 18px;
}
.result-layout {
  grid-template-columns: 1.2fr 1fr;
}
.section-head h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.02em;
}
.section-head p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.form-grid,
.result-grid,
.metric-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.field {
  display: block;
}
.field span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 9px;
}
input {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-radius: 18px;
  padding: 15px 16px;
  font-size: 17px;
  outline: none;
  transition: 0.22s ease;
}
input:focus {
  border-color: rgba(124, 156, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(124, 156, 255, 0.12);
}

.toolbar,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.toolbar {
  margin-top: 18px;
}
.btn {
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 700;
  transition: 0.22s ease;
  font-size: 15px;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  color: #03111f;
  background: linear-gradient(135deg, var(--accent-2), #9ed9ff);
}
.btn-soft {
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border-color: var(--border);
}
.btn-ghost {
  color: var(--accent-2);
  background: rgba(94, 234, 212, 0.08);
  border-color: rgba(94, 234, 212, 0.20);
}

.subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
  margin-top: 18px;
}
.mini-card,
.metric,
.insight-card {
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  padding: 16px;
}
.mini-value,
.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.metric strong.small {
  font-size: 18px;
}
.empty-state {
  margin-top: 18px;
  display: block;
  color: var(--muted);
  border: 1px dashed var(--border-strong);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255,255,255,0.03);
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
}
.badge-ok { background: rgba(98, 242, 178, 0.14); color: var(--success); }
.badge-warn { background: rgba(255, 210, 107, 0.16); color: var(--warning); }
.badge-error { background: rgba(255, 122, 122, 0.15); color: var(--danger); }
.direction-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
}
.direction-long {
  color: var(--success);
  background: rgba(98, 242, 178, 0.14);
}
.direction-short {
  color: #ffb1b1;
  background: rgba(255, 122, 122, 0.14);
}

.insight-box {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}
.alert {
  border-radius: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  line-height: 1.6;
}
.alert-warning {
  background: rgba(255, 210, 107, 0.10);
  border-color: rgba(255, 210, 107, 0.24);
  color: #ffe29a;
}
.alert-note {
  background: rgba(124, 156, 255, 0.10);
  border-color: rgba(124, 156, 255, 0.24);
  color: #d7e0ff;
}
.alert-success {
  background: rgba(98, 242, 178, 0.10);
  border-color: rgba(98, 242, 178, 0.20);
  color: #c6ffea;
}
.summary-block {
  display: grid;
  gap: 10px;
}
.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 15px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}
.summary-line:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.summary-line span:first-child { color: var(--muted); }
.summary-line strong { font-weight: 800; }

@media (max-width: 1120px) {
  .hero,
  .layout-grid,
  .result-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .shell { padding: 16px; }
  .hero, .panel { padding: 18px; }
  .form-grid,
  .result-grid,
  .metric-list,
  .subgrid { grid-template-columns: 1fr; }
  .hero-actions,
  .toolbar { flex-direction: column; }
  .btn { width: 100%; }
}


.symbol-field { position: relative; }
.symbol-wrap {
  position: relative;
}
.field-hint {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.45;
}
.symbol-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 40;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(7, 17, 31, 0.96);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}
.symbol-dropdown.hidden {
  display: none;
}
.symbol-option,
.symbol-empty {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 14px 16px;
  text-align: left;
}
.symbol-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: 0.18s ease;
}
.symbol-option:last-child {
  border-bottom: 0;
}
.symbol-option:hover,
.symbol-option.active {
  background: rgba(124, 156, 255, 0.12);
}
.symbol-option strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.symbol-option span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.symbol-option em {
  font-style: normal;
  color: var(--accent-2);
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.16);
}
.symbol-empty {
  color: var(--muted);
}
