/* 01Watch floating panel — matches narrative.css aesthetic */

.wd-trigger { cursor: pointer; transition: border-color 0.2s, transform 0.15s; }
.wd-trigger:hover { border-color: var(--accent, #c9d4e0); transform: translateY(-2px); }
.wd-trigger:focus-visible { outline: 2px solid var(--accent, #c9d4e0); outline-offset: 2px; }

.wd-view-live { color: #6ee7b7; font-weight: 600; }

.wd-panel {
  position: fixed; inset: 0; z-index: 9999;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.wd-panel.wd-open { display: flex; }

.wd-backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 6, 8, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.wd-card {
  position: relative; width: 100%; max-width: 560px; max-height: 85vh;
  background: var(--bg-card, #0d1117);
  border: 1px solid var(--border, #1e2433);
  border-radius: 16px;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.03);
  animation: wd-in 0.25s ease-out;
}

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

/* Header */
.wd-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 20px 14px; border-bottom: 1px solid var(--border, #1e2433);
}

.wd-title h3 {
  font: 600 18px/1.3 'IBM Plex Sans', sans-serif;
  color: var(--fg, #e6edf3); margin: 6px 0 4px;
}
.wd-title small {
  font: 400 12px/1.4 'IBM Plex Mono', monospace;
  color: var(--fg-dim, #8b949e);
}

.wd-badge {
  display: inline-block; padding: 2px 8px;
  font: 600 10px/1.6 'IBM Plex Mono', monospace;
  letter-spacing: 0.5px; text-transform: uppercase;
  color: #6ee7b7; background: rgba(110,231,183,0.12);
  border: 1px solid rgba(110,231,183,0.3);
  border-radius: 4px;
  animation: wd-pulse 2s infinite;
}

@keyframes wd-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.wd-close {
  background: none; border: none; color: var(--fg-dim, #8b949e);
  font-size: 22px; line-height: 1; padding: 4px 8px; cursor: pointer;
  border-radius: 6px; transition: color 0.15s, background 0.15s;
}
.wd-close:hover { color: var(--fg, #e6edf3); background: rgba(255,255,255,0.06); }

/* Body */
.wd-body {
  flex: 1; overflow-y: auto; padding: 16px 20px;
  font: 400 13px/1.5 'IBM Plex Mono', monospace;
  color: var(--fg, #e6edf3);
}

.wd-loading {
  color: var(--fg-dim, #8b949e); text-align: center; padding: 40px 0;
  font: 400 13px 'IBM Plex Mono', monospace;
}

/* Stats bar */
.wd-stats {
  display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border, #1e2433);
  border-radius: 10px;
  font: 500 12px/1.4 'IBM Plex Mono', monospace;
  color: var(--fg-dim, #8b949e);
}
.wd-stats b { color: var(--fg, #e6edf3); font-weight: 600; }
.wd-live { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.wd-live i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #6ee7b7; display: inline-block;
  animation: wd-pulse 1.5s infinite;
}

/* Sections */
.wd-section { margin-bottom: 18px; }
.wd-section h4 {
  font: 600 11px/1.4 'IBM Plex Mono', monospace;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--fg-dim, #8b949e); margin-bottom: 10px;
}

/* Top 10 table */
.wd-table { width: 100%; border-collapse: collapse; }
.wd-table td {
  padding: 6px 4px; border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.wd-rank { width: 32px; text-align: center; font-size: 14px; }
.wd-name { font-weight: 500; }
.wd-name small {
  display: inline-block; margin-left: 6px;
  font: 400 10px/1 'IBM Plex Mono', monospace;
  color: var(--fg-dim, #8b949e); text-transform: uppercase;
  padding: 1px 5px; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 3px;
}
.wd-val {
  text-align: right; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Launches */
.wd-launches { display: flex; flex-direction: column; gap: 6px; }
.wd-launch {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; border-radius: 6px;
  background: rgba(255,255,255,0.02);
}
.wd-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.wd-green { background: #6ee7b7; }
.wd-yellow { background: #f0b45a; }
.wd-launch code {
  font: 400 12px 'IBM Plex Mono', monospace;
  color: var(--fg, #e6edf3);
}
.wd-launch small { margin-left: auto; color: var(--fg-dim, #8b949e); }

/* CTA */
.wd-cta {
  margin-top: 18px; padding: 14px;
  background: rgba(110,231,183,0.06);
  border: 1px solid rgba(110,231,183,0.15);
  border-radius: 10px; text-align: center;
}
.wd-cta p {
  font: 400 12px/1.5 'IBM Plex Mono', monospace;
  color: var(--fg-dim, #8b949e); margin-bottom: 10px;
}
.wd-cta a {
  display: inline-block; padding: 10px 20px;
  font: 600 13px/1 'IBM Plex Sans', sans-serif;
  color: #080b09; background: #6ee7b7;
  border-radius: 8px; text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.wd-cta a:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(110,231,183,0.3);
}

/* Footer */
.wd-foot {
  padding: 10px 20px; border-top: 1px solid var(--border, #1e2433);
  text-align: center;
}
.wd-foot small {
  font: 400 10px/1 'IBM Plex Mono', monospace;
  color: var(--fg-dim, #8b949e); letter-spacing: 0.3px;
}

/* Responsive */
@media (max-width: 640px) {
  .wd-card { max-height: 90vh; border-radius: 12px; }
  .wd-body { padding: 12px 14px; }
  .wd-stats { gap: 8px; font-size: 11px; }
  .wd-table .wd-name small { display: none; }
}
