/* ==========================================================================
   POLMEXBOT /preview/signals — Celestial Obsidian & Liquid-Gold Signal Desk
   Preserves 100% of signals.html live 1-second polling, 5-minute countdown
   ring, 6-coin board, laggard gate checks, alerts audio/notifications, and
   signal history tape while removing clouds/aurora, unifying gold identity,
   adding real /assets/coins/*.svg icons, and perfecting mobile layout.
   ========================================================================== */

:root {
  --pmx-gold: #f0c64f;
  --pmx-gold-hi: #fae39e;
  --pmx-gold-deep: #cf9224;
  --pmx-gold-line: rgba(240, 198, 79, 0.34);
  --pmx-hair: rgba(235, 214, 170, 0.14);
  --pmx-ink: #fbf8f1;
  --pmx-ink-2: #d3c6ae;
  --pmx-ink-3: #9d8f76;
  --pmx-up: #34e08a;
  --pmx-down: #f45872;
}

/* ── 1. Cosmic Obsidian Canvas (Kill sky, clouds, aurora blobs) ──────────── */
body.pmx-sig-v2 {
  background:
    radial-gradient(1000px 600px at 14% -6%, rgba(240, 198, 79, 0.14), transparent 62%),
    radial-gradient(860px 640px at 90% 14%, rgba(34, 58, 108, 0.24), transparent 64%),
    radial-gradient(860px 620px at 50% 108%, rgba(168, 118, 34, 0.14), transparent 62%),
    linear-gradient(175deg, #0d0c0f 0%, #12100d 46%, #0c0c10 100%) !important;
  color: var(--pmx-ink) !important;
  overflow-x: hidden !important;
  position: relative;
}

body.pmx-sig-v2::before,
body.pmx-sig-v2 .sky,
body.pmx-sig-v2 .clouds,
body.pmx-sig-v2 #k2-aurora,
body.pmx-sig-v2 #k2-stars,
body.pmx-sig-v2 #k2-glow {
  display: none !important;
}

.pmx-app-nebula {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60vw 44vw at 48% -12vh, rgba(240, 198, 79, 0.10), transparent 70%),
    radial-gradient(48vw 48vw at 96% 96%, rgba(44, 78, 138, 0.15), transparent 70%);
}

#pmxSpaceCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.72;
}

body.pmx-sig-v2 #hud,
body.pmx-sig-v2 > .wrap {
  position: relative;
  z-index: 2;
}

body.pmx-sig-v2 h1,
body.pmx-sig-v2 h2,
body.pmx-sig-v2 h3,
body.pmx-sig-v2 .brand b,
body.pmx-sig-v2 .ring .t,
body.pmx-sig-v2 .coin .nm,
body.pmx-sig-v2 .coin .dl,
body.pmx-sig-v2 .stat b,
body.pmx-sig-v2 .lagrow .who,
body.pmx-sig-v2 .sig .lead {
  font-family: 'Space Grotesk', system-ui, 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif !important;
}

/* ── 2. Preview Strip ────────────────────────────────────────────────────── */
.pmx-app-preview-bar {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  height: 30px;
  background: rgba(10, 9, 11, 0.94);
  border-bottom: 1px solid rgba(240, 198, 79, 0.22);
  font-family: 'Space Grotesk', system-ui, 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 11px;
  color: var(--pmx-ink-2);
}

.pmx-app-preview-left {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pmx-app-preview-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pmx-gold);
  box-shadow: 0 0 8px rgba(240, 198, 79, 0.75);
  flex: 0 0 6px;
}

.pmx-app-preview-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.pmx-app-preview-bar a {
  color: var(--pmx-gold-hi);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.pmx-app-preview-bar a:hover {
  text-decoration: underline;
}

/* ── 3. Floating Glass Pill HUD ──────────────────────────────────────────── */
body.pmx-sig-v2 #hud {
  padding: 16px 0 22px !important;
}

body.pmx-sig-v2 #hud .bar {
  background: linear-gradient(180deg, rgba(28, 24, 18, 0.88), rgba(15, 14, 16, 0.94)) !important;
  backdrop-filter: blur(18px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.4) !important;
  border: 1px solid rgba(240, 198, 79, 0.32) !important;
  border-top-color: rgba(250, 227, 158, 0.50) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 218, 0.12),
    0 16px 40px -18px rgba(0, 0, 0, 0.90) !important;
  padding: 8px 12px 8px 14px !important;
}

body.pmx-sig-v2 .brand b {
  background: linear-gradient(125deg, #fbf0ce 0%, #f0c64f 52%, #cf9224 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  font-weight: 700 !important;
}

body.pmx-sig-v2 .brand small {
  color: var(--pmx-gold-hi) !important;
  opacity: 0.85;
}

body.pmx-sig-v2 .navlinks a {
  font-family: 'Space Grotesk', system-ui, 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--pmx-ink-2) !important;
  padding: 8px 13px !important;
  border: 1px solid transparent !important;
}

body.pmx-sig-v2 .navlinks a:hover {
  background: rgba(240, 198, 79, 0.12) !important;
  color: #ffffff !important;
}

body.pmx-sig-v2 .navlinks a[aria-current] {
  background: linear-gradient(122deg, #faecc4 0%, #f0c64f 45%, #d69828 100%) !important;
  color: #181207 !important;
  font-weight: 700 !important;
  border-color: rgba(255, 246, 218, 0.65) !important;
  box-shadow: 0 6px 18px -8px rgba(240, 198, 79, 0.72) !important;
}

/* Pills — obsidian-gold, emerald, rose (no loud cyan!) */
body.pmx-sig-v2 .pill {
  background: rgba(18, 16, 15, 0.84) !important;
  border: 1px solid rgba(235, 214, 170, 0.22) !important;
  color: var(--pmx-ink-2) !important;
  font-family: 'Space Grotesk', system-ui, 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

body.pmx-sig-v2 .pill.y {
  background: rgba(240, 198, 79, 0.12) !important;
  border-color: rgba(240, 198, 79, 0.42) !important;
  color: var(--pmx-gold-hi) !important;
}

body.pmx-sig-v2 .pill.g {
  background: rgba(52, 224, 138, 0.12) !important;
  border-color: rgba(52, 224, 138, 0.40) !important;
  color: var(--pmx-up) !important;
}

body.pmx-sig-v2 .pill.p {
  background: rgba(244, 88, 114, 0.12) !important;
  border-color: rgba(244, 88, 114, 0.40) !important;
  color: #ff8ea2 !important;
}

body.pmx-sig-v2 #btcPill {
  color: var(--pmx-gold-hi) !important;
  border-color: rgba(240, 198, 79, 0.30) !important;
}

body.pmx-sig-v2 .dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: var(--pmx-up) !important;
  box-shadow: 0 0 0 3px rgba(52, 224, 138, 0.22), 0 0 10px rgba(52, 224, 138, 0.75) !important;
}

body.pmx-sig-v2 .dot.off {
  background: var(--pmx-down) !important;
  box-shadow: 0 0 0 3px rgba(244, 88, 114, 0.22) !important;
}

/* Alerts button — brushed gold pill */
body.pmx-sig-v2 #alertBtn.btn {
  background: linear-gradient(122deg, #faecc4 0%, #f0c64f 44%, #d69828 88%) !important;
  color: #181207 !important;
  border: 1px solid rgba(255, 246, 218, 0.68) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 8px 22px -10px rgba(240, 198, 79, 0.72) !important;
  font-family: 'Space Grotesk', system-ui, 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 9px 16px !important;
}

body.pmx-sig-v2 #alertBtn.btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

body.pmx-sig-v2 #alertBtn.btn.on {
  background: linear-gradient(122deg, #74f2b3 0%, #34e08a 55%, #1cb36a 100%) !important;
  border-color: rgba(210, 255, 232, 0.7) !important;
  color: #062113 !important;
  box-shadow: 0 8px 22px -10px rgba(52, 224, 138, 0.72) !important;
}

/* ── 4. Main Round Card & Countdown Ring ─────────────────────────────────── */
body.pmx-sig-v2 .card,
body.pmx-sig-v2 .stat,
body.pmx-sig-v2 .lagrow,
body.pmx-sig-v2 .sig,
body.pmx-sig-v2 .note {
  background: linear-gradient(166deg, rgba(34, 29, 22, 0.88) 0%, rgba(15, 14, 17, 0.95) 100%) !important;
  border: 1px solid rgba(240, 198, 79, 0.30) !important;
  border-top-color: rgba(250, 227, 158, 0.46) !important;
  border-radius: 20px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 218, 0.10),
    0 20px 48px -24px rgba(0, 0, 0, 0.90),
    0 0 32px -18px rgba(240, 198, 79, 0.22) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.pmx-sig-v2 .ring svg circle:first-child {
  stroke: rgba(235, 214, 170, 0.12) !important;
}

body.pmx-sig-v2 #entryArc {
  stroke: rgba(52, 224, 138, 0.45) !important;
}

body.pmx-sig-v2 #prog {
  stroke: #f0c64f !important;
  filter: drop-shadow(0 0 10px rgba(240, 198, 79, 0.55));
}

body.pmx-sig-v2 .ring .t {
  font-weight: 700 !important;
  color: var(--pmx-ink) !important;
  letter-spacing: -0.02em;
}

body.pmx-sig-v2 .ring .lbl {
  color: var(--pmx-gold-hi) !important;
  opacity: 0.78;
}

body.pmx-sig-v2 .verdict h2 {
  font-weight: 700 !important;
  color: var(--pmx-ink) !important;
}

body.pmx-sig-v2 .verdict p,
body.pmx-sig-v2 .sec .sub {
  color: var(--pmx-ink-2) !important;
}

/* ── 5. Six-Coin Board with Real /assets/coins/*.svg Icons ───────────────── */
body.pmx-sig-v2 .coin {
  background: linear-gradient(166deg, rgba(30, 26, 20, 0.90) 0%, rgba(14, 13, 16, 0.96) 100%) !important;
  border: 1px solid rgba(235, 214, 170, 0.18) !important;
  border-top-color: rgba(250, 227, 158, 0.30) !important;
  border-radius: 18px !important;
  padding: 16px 12px !important;
  box-shadow: inset 0 1px 0 rgba(255, 246, 218, 0.08), 0 14px 32px -18px rgba(0, 0, 0, 0.88) !important;
  transition: transform 0.18s ease, border-color 0.18s ease !important;
}

body.pmx-sig-v2 .coin:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 198, 79, 0.44) !important;
}

body.pmx-sig-v2 .coin.UP {
  background: linear-gradient(166deg, rgba(20, 40, 30, 0.90) 0%, rgba(12, 17, 15, 0.96) 100%) !important;
  border-color: rgba(52, 224, 138, 0.44) !important;
  box-shadow: inset 0 1px 0 rgba(160, 255, 206, 0.12), 0 14px 32px -18px rgba(52, 224, 138, 0.25) !important;
}

body.pmx-sig-v2 .coin.DOWN {
  background: linear-gradient(166deg, rgba(44, 20, 27, 0.90) 0%, rgba(18, 12, 15, 0.96) 100%) !important;
  border-color: rgba(244, 88, 114, 0.44) !important;
  box-shadow: inset 0 1px 0 rgba(255, 165, 182, 0.12), 0 14px 32px -18px rgba(244, 88, 114, 0.25) !important;
}

body.pmx-sig-v2 .coin.lag {
  background: linear-gradient(166deg, rgba(46, 37, 18, 0.94) 0%, rgba(18, 15, 12, 0.97) 100%) !important;
  border-color: rgba(240, 198, 79, 0.78) !important;
  box-shadow: 0 0 0 3px rgba(240, 198, 79, 0.20), 0 16px 36px -16px rgba(240, 198, 79, 0.45) !important;
}

.pmx-sig-coin-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(240, 198, 79, 0.28);
  padding: 2px;
  flex: 0 0 22px;
}

.pmx-sig-coin-ic img {
  width: 16px;
  height: 16px;
  display: block;
}

body.pmx-sig-v2 .coin .dl {
  font-weight: 700 !important;
  color: var(--pmx-ink) !important;
}

body.pmx-sig-v2 .coin.UP .dl {
  color: var(--pmx-up) !important;
}

body.pmx-sig-v2 .coin.DOWN .dl {
  color: #ff7c93 !important;
}

body.pmx-sig-v2 .coin .sp {
  color: var(--pmx-ink-2) !important;
}

body.pmx-sig-v2 .coin .tag {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(235, 214, 170, 0.16);
  color: var(--pmx-ink-2) !important;
}

body.pmx-sig-v2 .coin.UP .tag {
  background: rgba(52, 224, 138, 0.14) !important;
  border-color: rgba(52, 224, 138, 0.36);
  color: var(--pmx-up) !important;
}

body.pmx-sig-v2 .coin.DOWN .tag {
  background: rgba(244, 88, 114, 0.14) !important;
  border-color: rgba(244, 88, 114, 0.36);
  color: #ff8ea2 !important;
}

body.pmx-sig-v2 .coin.lag .tag {
  background: rgba(240, 198, 79, 0.18) !important;
  border-color: rgba(240, 198, 79, 0.50);
  color: var(--pmx-gold-hi) !important;
}

body.pmx-sig-v2 .coin .odds {
  color: var(--pmx-ink-3) !important;
}

body.pmx-sig-v2 .coin .odds b {
  color: var(--pmx-ink) !important;
}

/* Laggards, Tape & Stats */
body.pmx-sig-v2 .lagrow,
body.pmx-sig-v2 .sig,
body.pmx-sig-v2 .stat {
  border-radius: 16px !important;
}

body.pmx-sig-v2 .lagrow.pass {
  border-color: rgba(240, 198, 79, 0.68) !important;
}

body.pmx-sig-v2 .stat b {
  color: var(--pmx-ink) !important;
}

body.pmx-sig-v2 #sWin {
  color: var(--pmx-up) !important;
}

body.pmx-sig-v2 #sLoss {
  color: #ff7c93 !important;
}

body.pmx-sig-v2 .stat s {
  color: var(--pmx-ink-3) !important;
}

body.pmx-sig-v2 .note {
  border-style: dashed !important;
  border-color: rgba(240, 198, 79, 0.28) !important;
  color: var(--pmx-ink-2) !important;
}

body.pmx-sig-v2 .empty {
  background: rgba(18, 16, 15, 0.72);
  border: 1px dashed rgba(235, 214, 170, 0.18);
  border-radius: 16px;
  color: var(--pmx-ink-2);
}

/* ── 6. Mobile Sub-Nav Pill Strip & Responsive Polish (<=860px / <=560px) ── */
.pmx-sig-mnav {
  display: none;
}

@media (max-width: 860px) {
  body.pmx-sig-v2 #hud .navlinks a:not([href="/app"]) {
    display: none !important;
  }
  body.pmx-sig-v2 #hud .navlinks a[href="/app"] {
    display: inline-flex !important;
    background: rgba(240, 198, 79, 0.12) !important;
    border: 1px solid rgba(240, 198, 79, 0.34) !important;
    color: var(--pmx-gold-hi) !important;
  }

  /* Slim scrollable sub-nav right under HUD on tablets & phones so EVERY console page is 1 tap away */
  .pmx-sig-mnav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 14px;
  }
  .pmx-sig-mnav::-webkit-scrollbar {
    display: none;
  }
  .pmx-sig-mnav a {
    flex: 0 0 auto;
    text-decoration: none;
    padding: 7px 13px;
    border-radius: 999px;
    font-family: 'Space Grotesk', system-ui, 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--pmx-ink-2);
    background: rgba(20, 18, 16, 0.86);
    border: 1px solid rgba(235, 214, 170, 0.18);
    white-space: nowrap;
  }
  .pmx-sig-mnav a.is-on {
    background: linear-gradient(122deg, #faecc4 0%, #f0c64f 45%, #d69828 100%);
    color: #181207;
    border-color: rgba(255, 246, 218, 0.65);
  }
}

@media (max-width: 600px) {
  .pmx-app-preview-hide-sm {
    display: none !important;
  }
  .pmx-app-preview-bar {
    padding: 0 12px;
    font-size: 10px;
  }
  body.pmx-sig-v2 .wrap {
    padding: 0 12px !important;
  }
  body.pmx-sig-v2 .card {
    padding: 18px 16px !important;
  }
  body.pmx-sig-v2 .ring {
    width: 188px !important;
    height: 188px !important;
  }
  body.pmx-sig-v2 .ring .t {
    font-size: 42px !important;
  }
  body.pmx-sig-v2 .coins {
    gap: 10px !important;
  }
  body.pmx-sig-v2 .coin {
    padding: 13px 10px !important;
  }
  body.pmx-sig-v2 .coin .dl {
    font-size: 19px !important;
  }
  body.pmx-sig-v2 .lagrow .gates {
    margin-left: 0 !important;
    width: 100%;
  }
  body.pmx-sig-v2 .stats {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  body.pmx-sig-v2 .stat {
    min-width: 0 !important;
  }
}
