/**
 * Observer Protocol — style.css
 * Sci-fi civilization monitoring console
 */

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

:root {
  --bg: #0a0a0b;
  --surface: #0e0e10;
  --surface-2: #131316;
  --border: #1a1a1e;
  --border-active: #2a2a30;
  --text: #d4d4d8;
  --text-dim: #71717a;
  --text-muted: #52525b;
  --accent: #3b82f6;
  --accent-dim: #1d4ed8;
  --warning: #f59e0b;
  --danger: #ef4444;
  --success: #22c55e;
  --cyan: #06b6d4;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', -apple-system, sans-serif;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
}

/* Subtle grid overlay */
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, black 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, black 0%, transparent 80%);
}

/* Scanning line effect */
.grid-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, transparent 100%);
  animation: scanLine 8s linear infinite;
}

@keyframes scanLine {
  0% { transform: translateY(-100px); }
  100% { transform: translateY(100vh); }
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(10, 10, 11, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.back-link {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--text);
}

.header-title {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text);
}

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

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-in-out infinite;
}

.status-text {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--success);
  letter-spacing: 0.1em;
}

/* Data receiving indicator */
.header::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--accent) 20%,
    var(--cyan) 50%,
    var(--accent) 80%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: dataStream 3s linear infinite;
  opacity: 0.5;
}

@keyframes dataStream {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Main */
.main {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

/* HOST LOG */
.host-log {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 24px;
  transition: border-color 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.host-log:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

.host-log::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--cyan), var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.host-log:hover::before {
  opacity: 0.8;
}

.host-log::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.05), transparent);
  animation: hostScan 4s linear infinite;
}

@keyframes hostScan {
  0% { left: -50%; }
  100% { left: 150%; }
}

.log-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 16px;
}

.log-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.log-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.log-key {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.log-value {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
}

.log-value.status-nominal {
  color: var(--success);
}

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr 340px;
    position: relative;
  }
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.right-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 1024px) {
  .right-column {
    position: sticky;
    top: 80px;
    height: calc(100vh - 104px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
  }

  .right-column::-webkit-scrollbar {
    width: 4px;
  }

  .right-column::-webkit-scrollbar-track {
    background: transparent;
  }

  .right-column::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
  }
}

/* Panels */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  position: relative;
  overflow: hidden;
}

.panel::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.03), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}

.panel:hover::after {
  left: 100%;
}

.panel:hover {
  border-color: var(--border-active);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.panel-subtext {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-muted);
}

.panel-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 3s ease-in-out infinite;
}

/* Summary Panel */
.summary-intro {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.summary-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-list li {
  font-size: 14px;
  color: var(--text);
  padding-left: 16px;
  position: relative;
  transition: all 0.3s;
  cursor: default;
}

.summary-list li:hover {
  color: white;
  transform: translateX(4px);
}

.summary-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  transition: transform 0.3s, text-shadow 0.3s;
}

.summary-list li:hover::before {
  transform: scale(1.5);
  text-shadow: 0 0 8px var(--accent);
}

/* Mode Selector */
.mode-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mode-btn {
  font-family: var(--mono);
  font-size: 11px;
  padding: 8px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
}

.mode-btn:hover {
  border-color: var(--border-active);
  color: var(--text);
}

.mode-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.mode-btn.active::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: modeShimmer 2s linear infinite;
}

@keyframes modeShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.mode-btn {
  position: relative;
  overflow: hidden;
}

/* Reports Section */
.reports-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.report-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
}

.reports-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Report Card */
.report-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.report-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.report-card:hover::before {
  transform: scaleX(1);
}

.report-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.03) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.report-card:hover::after {
  opacity: 1;
}

.report-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.report-card.highlighted {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.15);
}

.report-card.highlighted::before {
  transform: scaleX(1);
}

.report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.report-id {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.report-confidence {
  font-family: var(--mono);
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.report-confidence.high {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.report-confidence.moderate {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.report-confidence.low {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.report-signal {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--cyan);
  margin-bottom: 8px;
}

.report-evidence {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.5;
}

.report-analysis {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 16px;
}

.report-trajectory {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  padding: 12px 16px;
  background: var(--surface-2);
  border-radius: 6px;
  margin-bottom: 16px;
}

.report-trajectory-label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 4px;
}

.report-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.system-tag {
  font-family: var(--mono);
  font-size: 10px;
  padding: 4px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
}

.system-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Stability Panel */
.status-panel {
  transition: all 0.3s;
}

.status-panel:hover .stability-value {
  text-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

.stability-index {
  text-align: center;
  margin-bottom: 16px;
}

.stability-value {
  font-family: var(--mono);
  font-size: 48px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  transition: text-shadow 0.3s, transform 0.3s;
}

.stability-value::after {
  content: '%';
  font-size: 20px;
  color: var(--text-muted);
  margin-left: 2px;
}

.stability-value.fluctuating {
  animation: fluctuate 0.5s ease;
}

@keyframes fluctuate {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.02); }
  50% { transform: scale(0.98); }
  75% { transform: scale(1.01); }
}

.stability-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

.stability-bar {
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  margin-top: 12px;
  overflow: hidden;
}

.stability-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--danger), var(--warning), var(--success));
  border-radius: 2px;
  transition: width 0.5s ease;
}

.trend-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 6px;
  margin-bottom: 16px;
}

.trend-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.trend-value {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}

.trend-value.declining {
  color: var(--warning);
}

.trend-value.stable {
  color: var(--text-dim);
}

.trend-value.improving {
  color: var(--success);
}

.drivers-list {
  margin-top: 8px;
}

.drivers-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.drivers-list ul {
  list-style: none;
}

.drivers-list li {
  font-size: 12px;
  color: var(--text-dim);
  padding: 4px 0;
  padding-left: 12px;
  position: relative;
}

.drivers-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* Signals Panel */
.signals-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.signal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: 6px;
  border-left: 3px solid var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.signal-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 6px;
  pointer-events: none;
}

.signal-item:hover::before,
.signal-item.highlighted::before {
  opacity: 1;
}

.signal-item:hover,
.signal-item.highlighted {
  transform: translateX(4px);
  border-left-width: 4px;
}

.signal-item.strong {
  border-left-color: var(--accent);
}

.signal-item.moderate {
  border-left-color: var(--warning);
}

.signal-item.weak {
  border-left-color: var(--text-muted);
}

.signal-item.highlighted.strong {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.signal-item.highlighted.moderate {
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.signal-name {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  transition: color 0.3s;
}

.signal-item:hover .signal-name,
.signal-item.highlighted .signal-name {
  color: white;
}

.signal-strength {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  transition: color 0.3s;
}

.signal-item:hover .signal-strength {
  color: var(--text-dim);
}

/* Timeline Panel */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
  cursor: default;
}

.timeline-item:hover {
  padding-left: 8px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.05) 0%, transparent 100%);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-name {
  font-size: 12px;
  color: var(--text-dim);
  transition: color 0.3s;
}

.timeline-item:hover .timeline-name {
  color: var(--text);
}

.timeline-trend {
  font-family: var(--mono);
  font-size: 12px;
  transition: transform 0.3s, text-shadow 0.3s;
}

.timeline-item:hover .timeline-trend {
  transform: scale(1.2);
}

.timeline-trend.up {
  color: var(--success);
}

.timeline-item:hover .timeline-trend.up {
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.timeline-trend.down {
  color: var(--danger);
}

.timeline-item:hover .timeline-trend.down {
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.timeline-trend.stable {
  color: var(--text-muted);
}

/* Convergence Panel */
.convergence-panel {
  border-color: var(--warning);
  animation: convergencePulse 3s ease-in-out infinite;
}

@keyframes convergencePulse {
  0%, 100% { box-shadow: 0 0 0 rgba(245, 158, 11, 0); }
  50% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.15); }
}

.convergence-label {
  color: var(--warning) !important;
  animation: convergenceBlink 2s ease-in-out infinite;
}

@keyframes convergenceBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.convergence-events {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.convergence-event {
  font-size: 12px;
  color: var(--text-dim);
  padding-left: 16px;
  position: relative;
}

.convergence-event::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--warning);
  font-family: var(--mono);
}

.convergence-analysis {
  font-size: 13px;
  color: var(--text);
  padding: 12px;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 6px;
  line-height: 1.6;
}

/* Overlay */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.overlay.visible {
  opacity: 1;
  visibility: visible;
}

.overlay-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 640px;
  max-height: 80vh;
  width: 100%;
  overflow-y: auto;
  position: relative;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 0 60px rgba(59, 130, 246, 0.2);
}

.overlay.visible .overlay-content {
  transform: scale(1) translateY(0);
}

.overlay-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.overlay-close:hover {
  color: var(--text);
  border-color: var(--border-active);
}

.deep-dive-body {
  padding: 32px;
}

.deep-dive-title {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.deep-dive-name {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.deep-dive-definition {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.deep-dive-section {
  margin-bottom: 24px;
}

.deep-dive-section-title {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.deep-dive-section p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 12px;
}

.related-systems {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related-tag {
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
}

.related-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  padding: 32px 24px;
  text-align: center;
}

.footer-text {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* Responsive */
@media (max-width: 768px) {
  .main {
    padding: 16px;
  }

  .host-log {
    padding: 16px;
  }

  .log-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stability-value {
    font-size: 36px;
  }

  .report-card {
    padding: 16px;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.report-card {
  animation: fadeIn 0.4s ease-out;
}

/* Report stagger animation */
.report-card:nth-child(1) { animation-delay: 0s; }
.report-card:nth-child(2) { animation-delay: 0.1s; }
.report-card:nth-child(3) { animation-delay: 0.2s; }
.report-card:nth-child(4) { animation-delay: 0.3s; }
.report-card:nth-child(5) { animation-delay: 0.4s; }
.report-card:nth-child(6) { animation-delay: 0.5s; }
.report-card:nth-child(7) { animation-delay: 0.6s; }
.report-card:nth-child(8) { animation-delay: 0.7s; }

/* Data stream effect for dimmed state */
body.hovering-signal .report-card:not(.highlighted) {
  opacity: 0.4;
  filter: grayscale(0.3);
  transition: opacity 0.3s, filter 0.3s;
}

body.hovering-report .signal-item:not(.highlighted) {
  opacity: 0.4;
  transition: opacity 0.3s;
}

/* System-wide data pulse when convergence detected */
.convergence-detected .status-dot {
  animation: pulse 0.5s ease-in-out infinite;
}

/* Ambient glow for active state */
.header-status::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.15) 0%, transparent 70%);
  animation: statusGlow 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes statusGlow {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.5); opacity: 1; }
}

.header-status {
  position: relative;
}

/* Report signal badge animation */
.report-signal {
  position: relative;
  display: inline-block;
}

.report-card:hover .report-signal::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--cyan);
  animation: signalUnderline 0.3s ease forwards;
}

@keyframes signalUnderline {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* System tag hover ripple */
.system-tag {
  position: relative;
  overflow: hidden;
}

.system-tag::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.system-tag:hover::after {
  width: 120%;
  height: 120%;
}

/* Log item hover effect */
.log-item {
  transition: transform 0.3s;
}

.log-item:hover {
  transform: translateX(4px);
}

.log-item:hover .log-value {
  color: var(--accent);
}

.log-value {
  transition: color 0.3s;
}

/* Stability bar pulse on hover */
.status-panel:hover .stability-fill {
  animation: stabilityPulse 1s ease-in-out infinite;
}

@keyframes stabilityPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
}

/* Drivers list hover */
.drivers-list li {
  transition: all 0.3s;
  cursor: default;
}

.drivers-list li:hover {
  color: var(--text);
  transform: translateX(4px);
}

.drivers-list li:hover::before {
  color: var(--warning);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
