/* ============================================================
   InterLogs Trade — 24-Hour Market Pulse Grid & News Wire
   Sleek Dark Charcoal / Obsidian Palette with Glossy Glass Cells
   Light Green (#3CE88E) & Coral Red (#FF2E56)
   Responsive Two-Column Layout + Twitter-Style Market Wire
   ============================================================ */

:root {
  /* Dark Charcoal / Obsidian theme (No blue tint) */
  --bg-deep: #0B0C0F;
  --bg-primary: #111317;
  --bg-surface: #161820;
  --bg-card: #181A22;
  --bg-wire: #0E1015;
  --bg-wire-card: rgba(22, 25, 33, 0.7);
  --bg-wire-card-hover: rgba(28, 32, 42, 0.95);

  /* Accent colors */
  --green: #3CE88E;         /* Modern vibrant light green */
  --green-light: #5FF2A6;
  --green-dim: rgba(60, 232, 142, 0.25);
  --green-glow: rgba(60, 232, 142, 0.15);
  --red: #FF2E56;           /* Crisp coral red */
  --red-dim: rgba(255, 46, 86, 0.25);
  --red-glow: rgba(255, 46, 86, 0.15);
  --silver: #E2E8F0;
  --silver-dim: #94A3B8;

  /* Glossy borders */
  --border-cell: rgba(255, 255, 255, 0.07);
  --border-cell-top: rgba(255, 255, 255, 0.15);
  --border-glow: rgba(255, 255, 255, 0.08);
  --border-active: rgba(60, 232, 142, 0.55);

  /* Fully Adaptive Dimensions */
  --label-width: clamp(120px, 10vw, 165px);
  --cell-gap: 2px;
  --row-gap: 3px;
  --cell-size: clamp(24px, calc((100vw - var(--label-width) - 400px) / 24 - var(--cell-gap)), 50px);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  color: #E2E8F0;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---- HEADER ---- */
#header {
  height: 60px;
  flex: 0 0 60px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(12px, 2vw, 24px);
  background: rgba(17, 19, 23, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-glow);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(60, 232, 142, 0.12), rgba(255, 255, 255, 0.04));
  border-radius: 10px;
  border: 1px solid rgba(60, 232, 142, 0.25);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.header-titles h1 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 2px;
  color: #F8FAFC;
}

.header-titles h1 .accent {
  background: linear-gradient(135deg, var(--green), #68D391);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #64748B;
  margin-top: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-toggle-wire {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #CBD5E1;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-toggle-wire:hover {
  background: rgba(60, 232, 142, 0.1);
  border-color: rgba(60, 232, 142, 0.3);
  color: var(--green);
}

.btn-toggle-wire.active {
  background: rgba(60, 232, 142, 0.15);
  border-color: rgba(60, 232, 142, 0.4);
  color: var(--green);
}

.wire-btn-icon {
  font-size: 12px;
  color: var(--green);
}

.wire-counter {
  padding: 1px 5px;
  background: rgba(60, 232, 142, 0.2);
  color: var(--green);
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clock {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  color: #CBD5E1;
  letter-spacing: 0.5px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: background 0.3s;
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 8px var(--green), 0 0 16px var(--green-dim);
  animation: pulse-dot 2s infinite;
}

.status-dot.offline {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

.status-text {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #64748B;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================================
   MAIN TWO-COLUMN WORKSPACE LAYOUT
   ============================================================ */

.main-layout {
  display: flex;
  flex: 1;
  height: calc(100vh - 60px);
  overflow: hidden;
}

/* ---- LEFT: 24-HOUR MARKET GRID ---- */
.pulse-column {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: auto;
}

.hour-headers {
  display: flex;
  align-items: flex-end;
  padding: 8px clamp(12px, 1.5vw, 20px) 4px;
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--bg-deep);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.label-spacer {
  flex: 0 0 var(--label-width);
  min-width: var(--label-width);
}

.hours-row {
  display: flex;
  gap: var(--cell-gap);
  flex: 1;
}

.hour-label {
  width: var(--cell-size);
  flex: 0 0 var(--cell-size);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  color: #475569;
  letter-spacing: 0.5px;
}

.hour-label.current-hour {
  color: var(--green);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(60, 232, 142, 0.4);
}

.grid-container {
  display: flex;
  flex-direction: column;
  gap: var(--row-gap);
  padding: 4px clamp(12px, 1.5vw, 20px) 40px;
  flex: 1;
}

/* ---- ASSET ROW ---- */
.asset-row {
  display: flex;
  align-items: center;
  height: var(--cell-size);
  gap: 0;
}

/* ---- ASSET LABEL ---- */
.asset-label {
  flex: 0 0 var(--label-width);
  min-width: var(--label-width);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 10px;
  height: 100%;
}

.asset-ticker {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  color: #F1F5F9;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.asset-price-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.asset-price {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  color: #94A3B8;
  transition: color 0.35s ease, text-shadow 0.35s ease;
}

.asset-price.flash-up {
  color: var(--green) !important;
  text-shadow: 0 0 12px rgba(60, 232, 142, 0.85);
}

.asset-price.flash-down {
  color: var(--red) !important;
  text-shadow: 0 0 12px rgba(255, 46, 86, 0.85);
}

.asset-change {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.asset-change.up {
  color: var(--green);
  background: var(--green-glow);
  border: 1px solid rgba(60, 232, 142, 0.3);
}

.asset-change.down {
  color: var(--red);
  background: var(--red-glow);
  border: 1px solid rgba(255, 46, 86, 0.3);
}

/* ---- CELL STRIP (24 Glossy Squares) ---- */
.cell-strip {
  display: flex;
  gap: var(--cell-gap);
  height: var(--cell-size);
  flex: 1;
}

.cell {
  width: var(--cell-size);
  height: var(--cell-size);
  flex: 0 0 var(--cell-size);
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, #1C1E26 0%, #15171F 50%, #111217 100%);
  border: 1px solid var(--border-cell);
  border-top: 1px solid var(--border-cell-top);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11), 0 2px 5px rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  contain: strict;
}

.cell::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 38%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.0) 100%);
  pointer-events: none;
  border-radius: 3px 3px 0 0;
}

.cell:hover {
  border-color: rgba(255, 255, 255, 0.28) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 12px rgba(60, 232, 142, 0.25) !important;
  transform: translateY(-1px);
  z-index: 10;
  cursor: crosshair;
}

.cell.current {
  border-color: var(--border-active);
  border-top-color: rgba(95, 242, 166, 0.7);
  box-shadow: inset 0 1px 0 rgba(95, 242, 166, 0.3), 0 0 14px rgba(60, 232, 142, 0.2), inset 0 0 10px rgba(60, 232, 142, 0.08);
}

.cell.future {
  background: linear-gradient(180deg, #14151B 0%, #0F1014 100%);
  border-color: rgba(255, 255, 255, 0.03);
  border-top-color: rgba(255, 255, 255, 0.06);
  opacity: 0.6;
}

.cell canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 4px;
}

.section-divider .divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.section-divider .divider-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: #64748B;
  font-weight: 600;
}

/* ============================================================
   RIGHT: TWITTER-STYLE MARKET WIRE PANEL
   ============================================================ */

.wire-column {
  width: clamp(340px, 26vw, 440px);
  flex: 0 0 clamp(340px, 26vw, 440px);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-wire);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.wire-header {
  padding: 12px 16px 10px;
  background: rgba(18, 20, 26, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wire-title-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wire-badge-live {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wire-live-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 1.8s infinite;
}

.wire-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #F8FAFC;
}

.wire-status-info {
  font-family: var(--font-mono);
  font-size: 9px;
  color: #64748B;
  letter-spacing: 0.5px;
}

/* Filter pills (Twitter-style) */
.wire-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.wire-filter-bar::-webkit-scrollbar {
  height: 2px;
}

.wire-filter-btn {
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  color: #94A3B8;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.wire-filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #F1F5F9;
}

.wire-filter-btn.active {
  background: rgba(60, 232, 142, 0.15);
  border-color: rgba(60, 232, 142, 0.4);
  color: var(--green);
}

/* Feed container */
.news-feed-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 14px 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-loading-skeleton {
  text-align: center;
  padding: 40px 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #64748B;
}

/* Twitter-style News Card */
.wire-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: var(--bg-wire-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.wire-card:hover {
  background: var(--bg-wire-card-hover);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.wire-card.expanded {
  background: #141721;
  border-color: rgba(60, 232, 142, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(60, 232, 142, 0.12);
}

.wire-card.expanded[data-sentiment="negative"] {
  border-color: rgba(255, 46, 86, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(255, 46, 86, 0.12);
}

.wire-card.expanded[data-sentiment="neutral"] {
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(148, 163, 184, 0.1);
}

/* Top metadata row */
.wire-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.wire-card-meta-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.wire-source-tag {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.wire-source-tag.oilprice,
.wire-source-tag.energyintel,
.wire-source-tag.commoditydesk {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.wire-source-tag.coindesk,
.wire-source-tag.cointelegraph,
.wire-source-tag.cryptoinsight,
.wire-source-tag.cryptowire,
.wire-source-tag.derivativeswire {
  background: rgba(6, 182, 212, 0.15);
  color: #06B6D4;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.wire-source-tag.yahoo,
.wire-source-tag.cnbc,
.wire-source-tag.reutersdesk,
.wire-source-tag.fedwatch {
  background: rgba(168, 85, 247, 0.15);
  color: #A855F7;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.wire-source-tag.marketwatch,
.wire-source-tag.bloombergwire,
.wire-source-tag.metalswire,
.wire-source-tag.macrowire,
.wire-source-tag.wallstreetflash {
  background: rgba(56, 189, 248, 0.15);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.wire-time {
  font-family: var(--font-mono);
  font-size: 9px;
  color: #64748B;
}

.wire-card-meta-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-card-open-modal {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  color: var(--green);
  background: rgba(60, 232, 142, 0.08);
  border: 1px solid rgba(60, 232, 142, 0.25);
  border-radius: 4px;
  padding: 1px 6px;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.wire-card:hover .btn-card-open-modal {
  background: var(--green);
  color: #0B0C0F;
  box-shadow: 0 0 8px rgba(60, 232, 142, 0.35);
}

/* Sentiment Badge */
.sentiment-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.sentiment-badge.positive {
  background: rgba(60, 232, 142, 0.12);
  color: var(--green);
  border: 1px solid rgba(60, 232, 142, 0.3);
}

.sentiment-badge.negative {
  background: rgba(255, 46, 86, 0.12);
  color: var(--red);
  border: 1px solid rgba(255, 46, 86, 0.3);
}

.sentiment-badge.neutral {
  background: rgba(255, 255, 255, 0.05);
  color: #94A3B8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Wire Card Headline */
.wire-card-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: #F1F5F9;
  margin: 0;
  cursor: pointer;
  transition: color 0.15s ease;
}

.wire-card:hover .wire-card-title {
  color: var(--green);
}

/* Headline Link */
.wire-title-link {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: #F1F5F9;
  text-decoration: none;
  transition: color 0.15s ease;
  display: block;
}

.wire-title-link:hover {
  color: var(--green);
}

/* Summary preview (collapsed mode) */
.wire-summary {
  font-size: 10px;
  line-height: 1.45;
  color: #8B949E;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wire-card.expanded .wire-summary {
  display: none;
}

/* Expanded body container */
.wire-expanded-body {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  animation: expand-fade 0.22s ease-out;
}

.wire-card.expanded .wire-expanded-body {
  display: flex;
}

@keyframes expand-fade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wire-full-text {
  font-size: 11px;
  line-height: 1.6;
  color: #CBD5E1;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 10px;
  border-radius: 4px;
  border-left: 2px solid var(--green);
}

.wire-card[data-sentiment="negative"] .wire-full-text {
  border-left-color: var(--red);
}

.wire-card[data-sentiment="neutral"] .wire-full-text {
  border-left-color: #94A3B8;
}

/* Quant Sentiment Gauge Box */
.wire-quant-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wire-quant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.8px;
}

.wire-quant-title {
  color: #64748B;
  font-weight: 700;
}

.wire-quant-val {
  font-weight: 700;
}

.wire-quant-val.positive {
  color: var(--green);
}

.wire-quant-val.negative {
  color: var(--red);
}

.wire-quant-val.neutral {
  color: #94A3B8;
}

.sentiment-gauge-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #FF2E56 0%, #64748B 50%, #3CE88E 100%);
  position: relative;
  margin: 4px 0 2px;
}

.sentiment-gauge-pointer {
  position: absolute;
  top: -4px;
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: #FFFFFF;
  box-shadow: 0 0 6px #FFFFFF, 0 2px 4px rgba(0, 0, 0, 0.8);
  transform: translateX(-50%);
  transition: left 0.3s ease;
}

.sentiment-gauge-scales {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: #64748B;
  font-weight: 600;
}

/* Expanded Action Buttons */
.wire-expanded-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.wire-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wire-action-source {
  background: rgba(60, 232, 142, 0.14);
  color: var(--green);
  border: 1px solid rgba(60, 232, 142, 0.35);
}

.wire-action-source:hover {
  background: rgba(60, 232, 142, 0.25);
  border-color: rgba(60, 232, 142, 0.6);
  color: #FFFFFF;
}

.wire-action-copy {
  background: rgba(255, 255, 255, 0.05);
  color: #CBD5E1;
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.wire-action-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.wire-action-collapse {
  background: transparent;
  color: #64748B;
  border: 1px solid transparent;
  margin-left: auto;
}

.wire-action-collapse:hover {
  color: #CBD5E1;
}

/* Bottom footer with tickers */
.wire-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
}

.wire-tickers-list {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.wire-ticker-chip {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  color: #CBD5E1;
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.wire-card-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.wire-btn-fullcard {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: #E2E8F0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 2px 7px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.wire-btn-fullcard:hover {
  background: rgba(60, 232, 142, 0.18);
  color: var(--green);
  border-color: rgba(60, 232, 142, 0.4);
}

.wire-btn-source-ext {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  color: #64748B;
  text-decoration: none;
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all 0.16s ease;
}

.wire-btn-source-ext:hover {
  color: #CBD5E1;
  background: rgba(255, 255, 255, 0.06);
}

/* Slide in animation for new breaking news items */
.wire-card.new-alert {
  animation: slide-in-top 0.4s cubic-bezier(0.16, 1, 0.3, 1), highlight-pulse 2s ease;
}

@keyframes slide-in-top {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes highlight-pulse {
  0%, 25% {
    border-color: rgba(60, 232, 142, 0.7);
    box-shadow: 0 0 20px rgba(60, 232, 142, 0.35);
  }
  100% {
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  }
}

/* ---- TOOLTIP ---- */
#trade-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  background: rgba(19, 21, 27, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 1px solid rgba(60, 232, 142, 0.4);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.8), 0 0 16px rgba(60, 232, 142, 0.12);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  color: #E2E8F0;
  transition: opacity 0.12s ease, transform 0.12s ease;
  opacity: 0;
  transform: translateY(6px);
  min-width: 210px;
}

#trade-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.tooltip-ticker {
  font-weight: 700;
  font-size: 13px;
  color: var(--green);
}

.tooltip-hour {
  font-size: 10px;
  color: #94A3B8;
}

.tooltip-status {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.tooltip-status.past {
  color: #94A3B8;
  background: rgba(255, 255, 255, 0.06);
}

.tooltip-status.current {
  color: var(--green);
  background: rgba(60, 232, 142, 0.15);
  border: 1px solid rgba(60, 232, 142, 0.35);
}

.tooltip-status.future {
  color: #64748B;
  background: rgba(255, 255, 255, 0.03);
}

.tooltip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  font-size: 10px;
  margin-top: 4px;
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.tooltip-lbl {
  color: #64748B;
}

.tooltip-val {
  font-weight: 600;
  color: #F8FAFC;
}

.tooltip-change {
  grid-column: span 2;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  font-weight: 700;
}

/* ---- RESPONSIVE SCROLLBAR ---- */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: #0B0C0F;
}

::-webkit-scrollbar-thumb {
  background: #232631;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #333847;
}

/* ---- MOBILE & TABLET DRAWER MODE ---- */
@media (max-width: 1200px) {
  .wire-column {
    position: fixed;
    top: 60px;
    right: 0;
    bottom: 0;
    width: 360px;
    z-index: 200;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.8);
    transform: translateX(100%);
  }

  .wire-column.open {
    transform: translateX(0);
  }
}

/* ============================================================
   INDEPENDENT CARD WINDOWS IN MARKET WIRE FEED
   ============================================================ */

/* Top Windows Management Toolbar */
.wire-windows-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.win-toolbar-status {
  color: #64748B;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.win-toolbar-status.active {
  color: var(--green);
  font-weight: 700;
}

.win-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.win-tool-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #CBD5E1;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.win-tool-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

/* Card Open Window Button */
.btn-card-open-window {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  color: var(--green);
  background: rgba(60, 232, 142, 0.08);
  border: 1px solid rgba(60, 232, 142, 0.3);
  border-radius: 4px;
  padding: 2px 6px;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.btn-card-open-window:hover,
.wire-card:hover .btn-card-open-window {
  background: var(--green);
  color: #0B0C0F;
  box-shadow: 0 0 10px rgba(60, 232, 142, 0.35);
}

.wire-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 7px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.16s ease;
}

.wire-btn-open-win {
  background: rgba(60, 232, 142, 0.1);
  color: var(--green);
  border: 1px solid rgba(60, 232, 142, 0.3);
}

.wire-btn-open-win:hover {
  background: var(--green);
  color: #0B0C0F;
}

.wire-btn-source {
  background: rgba(255, 255, 255, 0.05);
  color: #64748B;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.wire-btn-source:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #CBD5E1;
}

/* ============================================================
   INDEPENDENT WINDOW CARD IN FEED (.wire-window-card)
   ============================================================ */

.wire-window-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #181B24 0%, #111319 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 2px solid var(--green);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 6px 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 14px rgba(60, 232, 142, 0.1);
  position: relative;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  animation: window-slide-open 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.wire-window-card[data-sentiment="negative"] {
  border-top-color: var(--red);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 14px rgba(255, 46, 86, 0.1);
}

.wire-window-card[data-sentiment="neutral"] {
  border-top-color: #94A3B8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 14px rgba(148, 163, 184, 0.08);
}

@keyframes window-slide-open {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Wide Mode in Feed */
.wire-window-card.window-wide {
  margin-left: -24px;
  width: calc(100% + 24px);
  z-index: 50;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.8), 0 0 20px rgba(60, 232, 142, 0.18);
}

/* Window Titlebar */
.window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  margin-bottom: 10px;
}

.window-titlebar-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  overflow: hidden;
}

.window-traffic-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #3CE88E;
  box-shadow: 0 0 6px #3CE88E;
}

.window-traffic-dot.negative {
  background: #FF2E56;
  box-shadow: 0 0 6px #FF2E56;
}

.window-traffic-dot.neutral {
  background: #94A3B8;
  box-shadow: 0 0 5px #94A3B8;
}

.window-category-pill {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #94A3B8;
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 5px;
  border-radius: 3px;
}

.window-time-meta {
  font-family: var(--font-mono);
  font-size: 9px;
  color: #64748B;
}

/* Window Control Buttons: _ (min), ⤢ (wide), ✕ (close) */
.window-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.window-control-btn {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94A3B8;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.window-control-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

.window-control-btn.btn-win-minimize:hover {
  background: rgba(245, 158, 11, 0.25);
  color: #F59E0B;
  border-color: rgba(245, 158, 11, 0.45);
}

.window-control-btn.btn-win-wide:hover {
  background: rgba(60, 232, 142, 0.2);
  color: var(--green);
  border-color: rgba(60, 232, 142, 0.45);
}

.window-control-btn.btn-win-close:hover {
  background: rgba(255, 46, 86, 0.25);
  color: var(--red);
  border-color: rgba(255, 46, 86, 0.45);
}

/* Minimized Window Mode */
.wire-window-card.window-minimized {
  padding: 6px 8px;
  margin: 4px 0;
  cursor: pointer;
  border-top-width: 1px;
  background: #141720;
}

.minimized-titlebar {
  margin-bottom: 0;
  background: transparent;
  border: none;
  padding: 0;
}

.window-minimized-title {
  font-size: 11px;
  font-weight: 600;
  color: #CBD5E1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.btn-win-restore {
  font-size: 8px;
  color: var(--green);
}

/* Window Interior Contents */
.window-interior {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.window-headline-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.window-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  color: #F8FAFC;
  margin: 0;
  letter-spacing: -0.1px;
}

.window-exact-time {
  font-family: var(--font-mono);
  font-size: 9px;
  color: #64748B;
}

/* Loughran-McDonald Sentiment Gauge inside Window */
.wire-window-gauge-box {
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wire-window-gauge-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.wire-window-gauge-top .gauge-lbl {
  color: #64748B;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.wire-window-gauge-top .gauge-score {
  font-weight: 800;
}

.wire-window-gauge-top .gauge-score.positive {
  color: var(--green);
}

.wire-window-gauge-top .gauge-score.negative {
  color: var(--red);
}

.wire-window-gauge-top .gauge-score.neutral {
  color: #94A3B8;
}

.wire-window-gauge-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #FF2E56 0%, #64748B 50%, #3CE88E 100%);
  position: relative;
  margin: 2px 0;
}

.wire-window-gauge-needle {
  position: absolute;
  top: -4px;
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: #FFFFFF;
  box-shadow: 0 0 6px #FFFFFF, 0 1px 4px rgba(0, 0, 0, 0.8);
  transform: translateX(-50%);
  transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.wire-window-gauge-scales {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: #64748B;
  font-weight: 600;
}

/* Structured Multi-Section Analysis */
.window-analysis-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.window-section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.window-section-block {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.window-brief-block {
  border-left: 3px solid var(--green);
}

.wire-window-card[data-sentiment="negative"] .window-brief-block {
  border-left-color: var(--red);
}

.wire-window-card[data-sentiment="neutral"] .window-brief-block {
  border-left-color: #94A3B8;
}

.window-section-title {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--green);
  margin: 0;
  text-transform: uppercase;
}

.wire-window-card[data-sentiment="negative"] .window-section-title {
  color: var(--red);
}

.wire-window-card[data-sentiment="neutral"] .window-section-title {
  color: #94A3B8;
}

.window-text-para {
  font-size: 11px;
  line-height: 1.55;
  color: #E2E8F0;
  margin: 0;
}

/* Impacted Assets Row */
.window-tickers-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.window-tickers-lbl {
  font-family: var(--font-mono);
  font-size: 8px;
  color: #64748B;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.window-chip {
  font-size: 9px;
  padding: 2px 6px;
}

/* Window Action Toolbar */
.window-action-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.window-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.window-btn-source {
  background: rgba(60, 232, 142, 0.15);
  color: var(--green);
  border: 1px solid rgba(60, 232, 142, 0.4);
}

.window-btn-source:hover {
  background: var(--green);
  color: #0B0C0F;
  box-shadow: 0 0 10px rgba(60, 232, 142, 0.35);
}

.window-btn-copy {
  background: rgba(255, 255, 255, 0.06);
  color: #E2E8F0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.window-btn-copy:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

.window-btn-dismiss {
  background: transparent;
  color: #64748B;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-left: auto;
}

.window-btn-dismiss:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #CBD5E1;
}


