/* Quantumix 360 - radial radar terminal */
@property --accent { syntax: '<color>'; inherits: true; initial-value: #8ab4ff; }
@property --accent2 { syntax: '<color>'; inherits: true; initial-value: #d29bff; }

.qtx {
  --bg: #060912;
  --surface: rgba(255, 255, 255, .045);
  --border: rgba(255, 255, 255, .1);
  --text: #f1f4ff;
  --muted: #8a93b5;
  --mint: #19e6a0;
  --rose: #ff5577;
  --amber: #ffb84d;
  --accent: #8ab4ff;
  --accent2: #d29bff;
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(16px, 3.5vw, 34px);
  color: var(--text);
  font-family: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', 'Noto Sans Bengali', sans-serif;
  line-height: 1.4;
  text-align: left;
  background:
    radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1.2px) 0 0 / 22px 22px,
    var(--bg);
  border-radius: 32px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 40px 100px -40px var(--accent), 0 0 0 1px var(--border);
  transition: --accent .6s, --accent2 .6s, box-shadow .6s;
}
.qtx *, .qtx *::before, .qtx *::after { box-sizing: border-box; }
.qtx > * { position: relative; z-index: 1; }

.qtx[data-state="scan"] { --accent: #b388ff; --accent2: #ff7ad9; }
.qtx[data-state="call"] { --accent: #19e6a0; --accent2: #7df9ff; }
.qtx[data-state="put"]  { --accent: #ff5577; --accent2: #ffb84d; }
.qtx[data-state="none"] { --accent: #ffb84d; --accent2: #ffe08a; }

/* ambient glows */
.qtx > .qtx-glow { position: absolute; z-index: 0; border-radius: 50%; filter: blur(90px); opacity: .28; pointer-events: none; }
.qtx .qtx-glow-a { width: 420px; height: 420px; top: -160px; left: -120px; background: var(--accent); animation: qtx-drift-a 18s ease-in-out infinite alternate; }
.qtx .qtx-glow-b { width: 380px; height: 380px; bottom: -150px; right: -120px; background: var(--accent2); animation: qtx-drift-b 22s ease-in-out infinite alternate; }

/* ===== Header ===== */
.qtx .qtx-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.qtx .qtx-brand { display: flex; align-items: center; gap: 14px; }
.qtx .qtx-mark { width: 54px; height: 54px; flex: none; animation: qtx-spin 24s linear infinite; filter: drop-shadow(0 0 14px rgba(138, 180, 255, .55)); }
.qtx .qtx-title { margin: 0; padding: 0; border: 0; font-family: inherit; font-size: clamp(24px, 4.6vw, 34px); font-weight: 700; letter-spacing: .08em; line-height: 1; text-transform: uppercase; color: var(--text); }
.qtx .qtx-360 {
  display: inline-block; margin-left: 4px; padding: 0 4px; font-weight: 700; letter-spacing: .02em;
  background: linear-gradient(100deg, #7df9ff, var(--accent), var(--accent2)); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: qtx-shine 6s linear infinite;
}
.qtx .qtx-360::after { content: '\00B0'; font-size: .6em; vertical-align: .55em; margin-left: 1px; }
.qtx .qtx-tag { margin: 8px 0 0; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.qtx .qtx-live {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(10px);
  font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--muted);
}
.qtx .qtx-now { font-family: 'DM Mono', ui-monospace, Consolas, monospace; font-size: 13px; letter-spacing: .04em; color: var(--text); }
.qtx .qtx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); animation: qtx-pulse 2s infinite; }

/* ===== Pair ===== */
.qtx .qtx-pair {
  position: relative; display: flex; align-items: center; gap: 0; margin-top: 26px; padding: 5px;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(10px);
  transition: border-color .25s, box-shadow .25s;
}
.qtx .qtx-pair:hover, .qtx .qtx-pair:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.qtx .qtx-pair-k {
  padding: 11px 16px; border-radius: 13px; font-size: 11px; font-weight: 700; letter-spacing: .2em; color: #07101f;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
}
.qtx .qtx-pair::after {
  content: ''; position: absolute; right: 22px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); pointer-events: none;
}
.qtx .qtx-select {
  flex: 1; min-width: 0; display: block; height: auto; min-height: 0; margin: 0; padding: 11px 46px 11px 16px;
  appearance: none; -webkit-appearance: none; cursor: pointer; border: 0; border-radius: 13px; box-shadow: none; background: transparent;
  font-family: inherit; font-size: 16px; font-weight: 500; line-height: 1.4; color: var(--text);
}
.qtx .qtx-select:focus { outline: none; }
.qtx .qtx-select option { background: #0c1120; color: #f1f4ff; }

/* ===== Stage: 360 orbit ===== */
.qtx .qtx-stage { display: flex; flex-direction: column; align-items: center; margin-top: 26px; }
.qtx .qtx-orbit { position: relative; width: min(100%, 480px); aspect-ratio: 1; }

/* 100 ticks around the circle */
.qtx .qtx-ticks { position: absolute; inset: 0; }
.qtx .qtx-cell { position: absolute; inset: 0; transform: rotate(var(--a)); pointer-events: none; }
.qtx .qtx-cell::before {
  content: ''; position: absolute; left: 50%; top: 0; width: 1.3%; height: 6.4%; margin-left: -.65%; border-radius: 99px;
  background: rgba(255, 255, 255, .13); transform-origin: 50% 0;
  transition: background .3s var(--d, 0ms), box-shadow .3s var(--d, 0ms);
}
.qtx .qtx-cell.p::before { background: var(--mint); box-shadow: 0 0 10px rgba(25, 230, 160, .7); animation: qtx-tick .5s cubic-bezier(.2, 1.4, .4, 1) var(--d, 0ms) both; }
.qtx .qtx-cell.f::before { background: var(--rose); box-shadow: 0 0 10px rgba(255, 85, 119, .75); animation: qtx-tick .5s cubic-bezier(.2, 1.4, .4, 1) var(--d, 0ms) both; }
.qtx[data-state="idle"] .qtx-cell::before { animation: qtx-idle 4s ease-in-out var(--d, 0s) infinite; }

/* radar beam */
.qtx .qtx-radar {
  position: absolute; inset: 9%; border-radius: 50%; opacity: 0; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 62%, color-mix(in srgb, var(--accent) 50%, transparent) 100%);
  transition: opacity .4s;
}
.qtx[data-state="scan"] .qtx-radar { opacity: 1; animation: qtx-spin 1s linear infinite; }

.qtx .qtx-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.qtx .qtx-s1 { stop-color: var(--accent); }
.qtx .qtx-s2 { stop-color: var(--accent2); }
.qtx .qtx-orbit-line { fill: none; stroke: var(--accent); stroke-opacity: .35; stroke-width: .8; stroke-dasharray: 1 4; transform-origin: 100px 100px; animation: qtx-spin 60s linear infinite; }
.qtx[data-state="scan"] .qtx-orbit-line { animation-duration: 4s; stroke-opacity: .8; }
.qtx .qtx-ring-bg { fill: none; stroke: rgba(255, 255, 255, .07); stroke-width: 7; }
.qtx .qtx-ring-fg { fill: none; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 477.52; stroke-dashoffset: 477.52; filter: drop-shadow(0 0 6px var(--accent)); }
.qtx .qtx-ring-tick { stroke: #fff; stroke-width: 2.4; stroke-linecap: round; opacity: .9; }

.qtx .qtx-core {
  position: absolute; inset: 24%; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 8%;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02) 70%);
  border: 1px solid var(--border); backdrop-filter: blur(6px);
}
.qtx .qtx-sig { font-size: clamp(20px, 5vw, 30px); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; line-height: 1.1; color: var(--muted); }
.qtx .qtx-sub { margin-top: 8px; font-size: 12px; color: var(--muted); max-width: 150px; }
.qtx[data-state="scan"] .qtx-sig { color: var(--text); animation: qtx-blink 1s ease-in-out infinite; }
.qtx[data-state="call"] .qtx-sig,
.qtx[data-state="put"] .qtx-sig {
  font-size: clamp(30px, 8.4vw, 50px); font-weight: 700; color: var(--accent); text-shadow: 0 0 32px var(--accent);
  animation: qtx-pop-sig .6s cubic-bezier(.2, 1.5, .4, 1) both;
}
.qtx[data-state="none"] .qtx-sig { color: var(--accent); font-size: clamp(20px, 5.4vw, 30px); animation: qtx-pop-sig .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.qtx[data-state="call"] .qtx-sub,
.qtx[data-state="put"] .qtx-sub,
.qtx[data-state="none"] .qtx-sub { color: var(--text); }

.qtx .qtx-verdict-row { margin-top: 20px; text-align: center; }
.qtx .qtx-verdict {
  display: inline-block; padding: 9px 20px; border-radius: 999px; border: 1px solid transparent;
  font-size: 13px; font-weight: 600; letter-spacing: .03em; color: var(--muted);
  background: linear-gradient(#0a0f1d, #0a0f1d) padding-box, linear-gradient(90deg, var(--accent), var(--accent2)) border-box;
  transition: color .4s;
}
.qtx[data-state="call"] .qtx-verdict,
.qtx[data-state="put"] .qtx-verdict,
.qtx[data-state="none"] .qtx-verdict { color: var(--accent); }
.qtx[data-state="scan"] .qtx-verdict { color: var(--text); animation: qtx-blink 1s ease-in-out infinite; }

/* ===== Stat tiles ===== */
.qtx .qtx-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.qtx .qtx-stat { padding: 18px 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(10px); }
.qtx .qtx-stat-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.qtx .qtx-stat-k { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.qtx .qtx-pass-v { font-family: 'DM Mono', ui-monospace, Consolas, monospace; font-size: 14px; color: var(--muted); }
.qtx .qtx-pass-v b { font-family: 'Space Grotesk', sans-serif; font-size: 34px; font-weight: 700; line-height: 1; color: var(--text); transition: color .4s, text-shadow .4s; }
.qtx[data-state="call"] .qtx-pass-v b,
.qtx[data-state="put"] .qtx-pass-v b,
.qtx[data-state="none"] .qtx-pass-v b { color: var(--accent); text-shadow: 0 0 22px var(--accent); }

.qtx .qtx-bar { position: relative; padding-bottom: 16px; }
.qtx .qtx-bar-track { position: relative; height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .08); }
.qtx .qtx-bar-fill {
  position: absolute; inset: 0; border-radius: 99px; overflow: hidden;
  background: linear-gradient(90deg, var(--accent), var(--accent2)); box-shadow: 0 0 18px -2px var(--accent);
  -webkit-clip-path: inset(0 100% 0 0 round 99px); clip-path: inset(0 100% 0 0 round 99px);
}
.qtx .qtx-bar-fill::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .28) 0 6px, transparent 6px 14px); background-size: 28px 100%; animation: qtx-stripes 1s linear infinite;
}
.qtx .qtx-bar-seg { position: absolute; inset: 0; border-radius: 99px; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1.5px), rgba(6, 9, 18, .7) calc(10% - 1.5px), rgba(6, 9, 18, .7) 10%); }
.qtx .qtx-bar-knob { position: absolute; top: 50%; left: 0; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; opacity: 0; background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .15), 0 0 16px 2px var(--accent); }
.qtx .qtx-bar-tick { position: absolute; left: 96%; top: -4px; height: 20px; width: 2px; margin-left: -1px; background: #fff; border-radius: 2px; opacity: .85; }
.qtx .qtx-bar-tick em { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 1px; font: 500 10px/1 'DM Mono', ui-monospace, Consolas, monospace; font-style: normal; color: var(--muted); }

.qtx .qtx-counts { display: flex; gap: 22px; }
.qtx .qtx-count { display: flex; align-items: center; gap: 10px; }
.qtx .qtx-count i { width: 8px; height: 30px; border-radius: 99px; }
.qtx .qtx-count-p i { background: var(--mint); box-shadow: 0 0 12px rgba(25, 230, 160, .7); }
.qtx .qtx-count-f i { background: var(--rose); box-shadow: 0 0 12px rgba(255, 85, 119, .7); }
.qtx .qtx-count b { font-size: 34px; font-weight: 700; line-height: 1; }
.qtx .qtx-count em { font-style: normal; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.qtx .qtx-next-v { font-family: 'DM Mono', ui-monospace, Consolas, monospace; font-size: 13px; color: var(--muted); }
.qtx .qtx-next-v b { display: inline-block; font-family: 'Space Grotesk', sans-serif; font-size: 34px; font-weight: 700; line-height: 1; color: var(--text); }
.qtx .qtx-clock.is-hot { color: var(--accent); text-shadow: 0 0 16px var(--accent); animation: qtx-beat 1s ease-in-out infinite; }
.qtx .qtx-minute-track { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.qtx .qtx-minute { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width 1s linear; }

/* ===== Chart ===== */
.qtx .qtx-chart-head { display: flex; align-items: center; gap: 14px; margin: 30px 2px 12px; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.qtx .qtx-chart-head i { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }
.qtx .qtx-chart { height: 500px; border-radius: 22px; overflow: hidden; background: #000; border: 1px solid var(--border); box-shadow: 0 30px 60px -40px var(--accent); }
.qtx .qtx-frame { display: block; width: 100%; height: 100%; border: 0; }
.qtx .qtx-note { margin: 20px 4px 0; font-size: 12px; color: var(--muted); text-align: center; }

/* ===== Keyframes ===== */
@keyframes qtx-spin { to { transform: rotate(360deg); } }
@keyframes qtx-drift-a { to { transform: translate(80px, 60px) scale(1.15); } }
@keyframes qtx-drift-b { to { transform: translate(-70px, -50px) scale(1.2); } }
@keyframes qtx-shine { to { background-position: 200% 0; } }
@keyframes qtx-pulse { 0% { box-shadow: 0 0 0 0 rgba(25, 230, 160, .6); } 70%, 100% { box-shadow: 0 0 0 9px rgba(25, 230, 160, 0); } }
@keyframes qtx-blink { 50% { opacity: .4; } }
@keyframes qtx-pop-sig { 0% { transform: scale(.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes qtx-stripes { to { background-position: 28px 0; } }
@keyframes qtx-beat { 50% { transform: scale(1.2); } }
@keyframes qtx-tick { 0% { transform: scaleY(.2); opacity: .2; filter: brightness(2.4); } 100% { transform: scaleY(1); opacity: 1; filter: brightness(1); } }
@keyframes qtx-idle { 0%, 100% { background: rgba(255, 255, 255, .12); } 50% { background: var(--accent); box-shadow: 0 0 8px var(--accent); } }

/* ===== Responsive ===== */
@media (max-width: 760px) {
  .qtx { border-radius: 22px; }
  .qtx .qtx-stats { grid-template-columns: minmax(0, 1fr); }
  .qtx .qtx-chart { height: 380px; }
  .qtx .qtx-live { margin-left: auto; }
  .qtx .qtx-sub { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .qtx, .qtx *, .qtx *::before, .qtx *::after { animation: none !important; transition: none !important; }
}
