/* Alpha Bull - Command Deck v3 (performance-first: no backdrop-filter, no big blur, transform/opacity animations only) */
.ab {
  --bg: #07080d;
  --panel: rgba(255, 255, 255, .035);
  --border: rgba(255, 255, 255, .08);
  --text: #f6f7fb;
  --muted: #8d93ad;
  --accent: #ffc933;
  --accent2: #ff8a00;
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(14px, 3vw, 32px);
  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: linear-gradient(180deg, #0b0c13, var(--bg) 40%);
  border-radius: 30px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  box-shadow: 0 40px 90px -50px var(--accent);
  transition: border-color .6s, box-shadow .6s;
  contain: layout paint;
  animation: ab-enter .8s cubic-bezier(.2, .8, .2, 1) both;
}
.ab *, .ab *::before, .ab *::after { box-sizing: border-box; }
.ab > * { position: relative; z-index: 2; }
.ab > .ab-bg, .ab > .ab-glow, .ab > .ab-flash { position: absolute; }
.ab[data-state="scan"] { --accent: #38e1ff; --accent2: #8b7bff; }
.ab[data-state="call"] { --accent: #00ffa3; --accent2: #8dffd6; }
.ab[data-state="put"]  { --accent: #ff2e5b; --accent2: #ff8a5c; }
.ab[data-state="none"] { --accent: #ffb84d; --accent2: #ffe08a; }

/* background layers */
.ab .ab-bg { inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.ab .ab-glow { z-index: 0; width: 560px; height: 560px; border-radius: 50%; pointer-events: none; will-change: transform; opacity: .2; transition: opacity .6s; }
.ab .ab-glow-a { top: -260px; left: -200px; background: radial-gradient(closest-side, var(--accent), transparent); animation: ab-drift-a 18s ease-in-out infinite alternate; }
.ab .ab-glow-b { bottom: -280px; right: -220px; background: radial-gradient(closest-side, var(--accent2), transparent); animation: ab-drift-b 22s ease-in-out infinite alternate; }
.ab .ab-flash { inset: 0; z-index: 5; pointer-events: none; opacity: 0; background: radial-gradient(circle at 35% 40%, var(--accent), transparent 70%); will-change: opacity; }
.ab.ab-boom .ab-flash { animation: ab-flash 1s ease-out; }

/* HUD panel */
.ab .ab-panel, .ab .ab-dialbox, .ab .ab-chart {
  position: relative; border-radius: 20px; border: 1px solid var(--border); background: var(--panel);
  transition: border-color .5s;
}
.ab .ab-hud::before, .ab .ab-hud::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; z-index: 3;
  background:
    linear-gradient(var(--accent), var(--accent)) 0 0 / 16px 2px,
    linear-gradient(var(--accent), var(--accent)) 0 0 / 2px 16px,
    linear-gradient(var(--accent), var(--accent)) 100% 0 / 16px 2px,
    linear-gradient(var(--accent), var(--accent)) 100% 0 / 2px 16px;
  background-repeat: no-repeat; opacity: .85; transition: opacity .4s;
}
.ab .ab-hud::after {
  background:
    linear-gradient(var(--accent), var(--accent)) 0 100% / 16px 2px,
    linear-gradient(var(--accent), var(--accent)) 0 100% / 2px 16px,
    linear-gradient(var(--accent), var(--accent)) 100% 100% / 16px 2px,
    linear-gradient(var(--accent), var(--accent)) 100% 100% / 2px 16px;
  background-repeat: no-repeat;
}
.ab .ab-panel:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }

/* reveal (opacity + transform only) */
.ab.ab-js .ab-rv { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2, .8, .2, 1) var(--rd, 0ms), transform .7s cubic-bezier(.2, .8, .2, 1) var(--rd, 0ms), border-color .5s; }
.ab.ab-js .ab-rv.in { opacity: 1; transform: none; }

/* ===== Header ===== */
.ab .ab-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.ab .ab-brand { display: flex; align-items: center; gap: 18px; }
.ab .ab-logo { position: relative; width: 84px; height: 84px; flex: none; display: grid; place-items: center; }
.ab .ab-bull-logo { width: 68px; height: 68px; animation: ab-float 4s ease-in-out infinite; }
.ab .ab-logo-ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--accent) 60%, transparent); animation: ab-spin 16s linear infinite; will-change: transform; }
.ab .ab-logo-ring::after { content: ''; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px 2px var(--accent); }
.ab .ab-eye { animation: ab-eye 4.5s infinite; transform-box: fill-box; transform-origin: 50% 50%; }
.ab .ab-title { margin: 0; padding: 0; border: 0; font-family: 'Rajdhani', 'Space Grotesk', sans-serif; font-size: clamp(36px, 7vw, 62px); font-weight: 700; letter-spacing: .1em; line-height: .92; text-transform: uppercase; color: var(--text); display: flex; flex-wrap: wrap; gap: 0 .28em; }
.ab .ab-l { display: inline-block; animation: ab-letter .7s cubic-bezier(.2, 1.4, .4, 1) calc(var(--i) * 70ms + 150ms) both; }
.ab .ab-w2 .ab-l { background: linear-gradient(180deg, #fff3b0, #ffc933 55%, #ff8a00); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ab .ab-tag { margin: 10px 0 0; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); animation: ab-fade 1s .9s both; }
.ab .ab-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.ab .ab-live { display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--muted); }
.ab .ab-now { font-family: 'DM Mono', ui-monospace, Consolas, monospace; font-size: 13px; letter-spacing: .04em; color: var(--text); }
.ab .ab-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #00ffa3; }
.ab .ab-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #00ffa3; animation: ab-ping 2s ease-out infinite; }
.ab .ab-snd { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 50%; cursor: pointer; background: var(--panel); border: 1px solid var(--border); color: var(--muted); transition: color .25s, border-color .25s, transform .25s; }
.ab .ab-snd svg { width: 20px; height: 20px; }
.ab .ab-snd .ab-snd-w { opacity: 0; transition: opacity .25s; }
.ab .ab-snd[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.ab .ab-snd[aria-pressed="true"] .ab-snd-w { opacity: 1; }
.ab .ab-snd:hover { transform: scale(1.1); }

/* marquee */
.ab .ab-marquee { margin: 22px -4px 0; overflow: hidden; border-block: 1px solid var(--border); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.ab .ab-track { display: flex; width: max-content; animation: ab-marq 40s linear infinite; will-change: transform; }
.ab .ab-track span { display: inline-flex; align-items: center; gap: 12px; padding: 10px 22px; font: 500 12px/1 'DM Mono', ui-monospace, Consolas, monospace; letter-spacing: .14em; color: var(--muted); white-space: nowrap; }
.ab .ab-track i { width: 5px; height: 5px; border-radius: 1px; background: var(--accent); transform: rotate(45deg); }

/* ===== Main grid ===== */
.ab .ab-main { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; margin-top: 24px; align-items: start; }
.ab .ab-dialbox { padding: clamp(14px, 3vw, 26px) clamp(10px, 2vw, 22px) 22px; background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 65%), var(--panel); }
.ab .ab-dial { position: relative; width: min(100%, 520px); aspect-ratio: 1; margin: 0 auto; }
.ab .ab-cv { position: absolute; left: -18%; top: -18%; width: 136%; height: 136%; pointer-events: none; }
.ab .ab-core { position: absolute; inset: 23%; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 6%; }
.ab .ab-bull { width: 34%; height: auto; margin-bottom: 4px; will-change: transform; transition: transform .5s cubic-bezier(.2, 1.5, .4, 1); }
.ab[data-state="idle"] .ab-bull { animation: ab-float 4s ease-in-out infinite; }
.ab[data-state="scan"] .ab-bull { animation: ab-bullscan .45s ease-in-out infinite alternate; }
.ab[data-state="call"] .ab-bull { animation: ab-charge 1.1s ease-in-out infinite; }
.ab[data-state="put"] .ab-bull { transform: rotate(180deg); animation: ab-charge-d 1.1s ease-in-out infinite; }
.ab[data-state="none"] .ab-bull { opacity: .65; }
.ab .ab-sig { font-size: clamp(18px, 4.4vw, 28px); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.1; color: var(--muted); }
.ab .ab-sub { margin-top: 6px; font-size: 12px; color: var(--muted); max-width: 150px; }
.ab[data-state="scan"] .ab-sig { color: var(--text); animation: ab-blink 1s ease-in-out infinite; }
.ab[data-state="call"] .ab-sig, .ab[data-state="put"] .ab-sig {
  font-family: 'Rajdhani', 'Space Grotesk', sans-serif; font-size: clamp(30px, 8vw, 52px); font-weight: 700; letter-spacing: .03em; color: var(--accent);
  text-shadow: 0 0 22px color-mix(in srgb, var(--accent) 60%, transparent); animation: ab-pop .55s cubic-bezier(.2, 1.5, .4, 1) both;
}
.ab[data-state="none"] .ab-sig { color: var(--accent); animation: ab-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.ab[data-state="call"] .ab-sub, .ab[data-state="put"] .ab-sub, .ab[data-state="none"] .ab-sub { color: var(--text); }
.ab .ab-verdict-row { margin-top: 18px; text-align: center; }
.ab .ab-verdict { display: inline-block; padding: 11px 24px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); font-size: 13px; font-weight: 600; letter-spacing: .03em; color: var(--muted); background: #0a0c13; transition: color .4s, background .4s, border-color .4s; }
.ab[data-state="call"] .ab-verdict { color: #02150e; background: linear-gradient(90deg, #00ffa3, #8dffd6); animation: ab-pop .5s cubic-bezier(.2, 1.5, .4, 1) both; }
.ab[data-state="put"] .ab-verdict { color: #fff; background: linear-gradient(90deg, #ff2e5b, #ff7a50); animation: ab-pop .5s cubic-bezier(.2, 1.5, .4, 1) both; }
.ab[data-state="none"] .ab-verdict { color: var(--accent); }
.ab[data-state="scan"] .ab-verdict { color: var(--text); animation: ab-blink 1s ease-in-out infinite; }

/* ===== Side panels ===== */
.ab .ab-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ab .ab-panel { padding: 16px 18px; }
.ab .ab-pair { display: flex; align-items: center; padding: 5px; }
.ab .ab-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; }
.ab .ab-pair-k { padding: 11px 16px; border-radius: 13px; font-size: 11px; font-weight: 700; letter-spacing: .2em; color: #120c00; background: linear-gradient(120deg, var(--accent), var(--accent2)); }
.ab .ab-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); }
.ab .ab-select:focus { outline: none; }
.ab .ab-pair:focus-within { border-color: var(--accent); }
.ab .ab-select option { background: #0b0d14; color: #f6f7fb; }

.ab .ab-stat-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.ab .ab-stat-k { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.ab .ab-pass-v { font-family: 'DM Mono', ui-monospace, Consolas, monospace; font-size: 14px; color: var(--muted); }
.ab .ab-pass-v b, .ab .ab-count b, .ab .ab-next-v b { font-family: 'Rajdhani', sans-serif; font-size: 42px; font-weight: 700; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.ab[data-state="call"] .ab-pass-v b, .ab[data-state="put"] .ab-pass-v b, .ab[data-state="none"] .ab-pass-v b { color: var(--accent); }

.ab .ab-bar { position: relative; padding-bottom: 16px; }
.ab .ab-bar-track { position: relative; height: 12px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.ab .ab-bar-fill { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--accent), var(--accent2)); will-change: transform; }
.ab .ab-bar-fill::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .25) 0 6px, transparent 6px 14px); background-size: 28px 100%; animation: ab-stripes 1s linear infinite; }
.ab .ab-bar-seg { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1.5px), rgba(7, 8, 13, .75) calc(10% - 1.5px), rgba(7, 8, 13, .75) 10%); }
.ab .ab-bar-tick { position: absolute; left: 96%; top: -4px; height: 20px; width: 2px; margin-left: -1px; background: #fff; border-radius: 2px; opacity: .85; }
.ab .ab-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); }

.ab .ab-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ab .ab-counts { display: flex; gap: 18px; flex-wrap: wrap; }
.ab .ab-count { display: flex; align-items: center; gap: 8px; }
.ab .ab-count i { width: 6px; height: 34px; border-radius: 99px; }
.ab .ab-count-p i { background: linear-gradient(180deg, #a6ffd9, #00d48f); }
.ab .ab-count-f i { background: linear-gradient(180deg, #ff8fa1, #e0123c); }
.ab .ab-count-p b { color: #8dffd6; }
.ab .ab-count-f b { color: #ff7d92; }
.ab .ab-count em { font-style: normal; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ab .ab-split { display: flex; height: 6px; margin-top: 14px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.ab .ab-split i { display: block; height: 100%; width: 0; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.ab .ab-split-p { background: linear-gradient(90deg, #00b98a, #00ffa3); }
.ab .ab-split-f { background: linear-gradient(90deg, #ff2e5b, #ff7a50); }
.ab .ab-next-v { font-family: 'DM Mono', ui-monospace, Consolas, monospace; font-size: 13px; color: var(--muted); }
.ab .ab-next-v b { display: inline-block; }
.ab .ab-clock.is-hot { color: var(--accent2); animation: ab-beat 1s ease-in-out infinite; }
.ab .ab-minute-track { height: 6px; margin-top: 18px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.ab .ab-minute { height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent2)); will-change: transform; }

/* log */
.ab .ab-log { list-style: none; margin: 0; padding: 0; }
.ab .ab-log li { display: flex; align-items: center; gap: 12px; margin: 0; padding: 9px 4px; font-size: 13px; animation: ab-slidein .5s cubic-bezier(.2, 1.2, .4, 1) both; }
.ab .ab-log li + li { border-top: 1px solid rgba(255, 255, 255, .05); }
.ab .ab-log .ab-log-empty { color: var(--muted); animation: none; }
.ab .ab-log .t, .ab .ab-log .pc { font-family: 'DM Mono', ui-monospace, Consolas, monospace; color: var(--muted); }
.ab .ab-log .pr { font-weight: 600; letter-spacing: .06em; }
.ab .ab-log .pc { margin-left: auto; }
.ab .ab-log .bd { min-width: 70px; padding: 4px 10px; border-radius: 99px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.ab .ab-log .bd.call { color: #02150e; background: linear-gradient(90deg, #00ffa3, #8dffd6); }
.ab .ab-log .bd.put { color: #fff; background: linear-gradient(90deg, #ff2e5b, #ff7a50); }
.ab .ab-log .bd.none { color: #ffb84d; background: rgba(255, 184, 77, .12); border: 1px solid rgba(255, 184, 77, .4); }

/* chart */
.ab .ab-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); }
.ab .ab-chart-head::before { content: ''; width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); background: var(--accent); }
.ab .ab-chart-head i { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }
.ab .ab-chart { height: 500px; overflow: hidden; background: #000; }
.ab .ab-frame { display: block; width: 100%; height: 100%; border: 0; }
.ab .ab-note { margin: 22px 4px 0; font-size: 12px; color: var(--muted); text-align: center; }

/* pause everything when off-screen / tab hidden */
.ab.ab-paused *, .ab.ab-paused *::before, .ab.ab-paused *::after { animation-play-state: paused !important; }

/* keyframes (transform / opacity only) */
@keyframes ab-enter { from { opacity: 0; transform: translateY(26px); } }
@keyframes ab-spin { to { transform: rotate(360deg); } }
@keyframes ab-drift-a { to { transform: translate3d(120px, 80px, 0) scale(1.15); } }
@keyframes ab-drift-b { to { transform: translate3d(-110px, -70px, 0) scale(1.2); } }
@keyframes ab-float { 50% { transform: translateY(-5px); } }
@keyframes ab-eye { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes ab-letter { from { opacity: 0; transform: translateY(-36px) rotate(-10deg) scale(.5); } }
@keyframes ab-fade { from { opacity: 0; transform: translateX(-10px); } }
@keyframes ab-marq { to { transform: translate3d(-50%, 0, 0); } }
@keyframes ab-ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes ab-blink { 50% { opacity: .4; } }
@keyframes ab-bullscan { from { transform: translateX(-4px) rotate(-6deg); } to { transform: translateX(4px) rotate(6deg); } }
@keyframes ab-charge { 0%, 100% { transform: translateY(2px) scale(1); } 50% { transform: translateY(-6px) scale(1.1); } }
@keyframes ab-charge-d { 0%, 100% { transform: rotate(180deg) translateY(2px); } 50% { transform: rotate(180deg) translateY(-6px) scale(1.08); } }
@keyframes ab-pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes ab-stripes { to { background-position: 28px 0; } }
@keyframes ab-beat { 50% { transform: scale(1.18); } }
@keyframes ab-flash { 0% { opacity: .4; } 100% { opacity: 0; } }
@keyframes ab-slidein { from { opacity: 0; transform: translateX(-26px); } }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .ab .ab-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .ab { border-radius: 22px; }
  .ab .ab-chart { height: 380px; }
  .ab .ab-duo { grid-template-columns: minmax(0, 1fr); }
  .ab .ab-logo { width: 62px; height: 62px; }
  .ab .ab-bull-logo { width: 50px; height: 50px; }
  .ab .ab-sub { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .ab, .ab *, .ab *::before, .ab *::after { animation: none !important; transition: none !important; }
  .ab.ab-js .ab-rv { opacity: 1; transform: none; }
}
.ab .ab-minute { transition: transform 1s linear; }
