/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --bg: #0B0E14;
  --surface: #131720;
  --text-primary: #E4E7EC;
  --text-secondary: #C7CCD6;
  --text-muted: #7C8695;
  --color-whale: #F2B84B;
  --color-liquidation: #EF5A5A;
  --color-anomaly: #4FC3E0;
  --color-positive: #3DDC84;
  --color-spike: #B967FF;
  --color-change-positive: #10b981;
  --color-change-negative: #ef4444;
  --series-weekday: #3987e5;
  --series-weekend: #d95926;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

.terminal-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.whale-cta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  text-align: center;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(180deg, rgba(242, 184, 75, 0.1), rgba(242, 184, 75, 0.02));
  border-bottom: 1px solid rgba(242, 184, 75, 0.25);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s ease;
}

.whale-cta-bar:hover {
  background: linear-gradient(180deg, rgba(242, 184, 75, 0.16), rgba(242, 184, 75, 0.04));
}

.whale-cta-text strong {
  color: var(--color-whale);
  font-weight: 600;
}

.whale-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--color-whale);
  color: #1a1200;
  padding: 0.375rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1.5rem;
}

.terminal-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.glow-orb {
  width: 16px;
  height: 16px;
  background: var(--color-anomaly);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--color-anomaly), 0 0 30px var(--color-anomaly);
}

.terminal-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.03em;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(61, 220, 132, 0.1);
  color: var(--color-positive);
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid rgba(61, 220, 132, 0.2);
}

.pulse {
  width: 8px;
  height: 8px;
  background-color: var(--color-positive);
  border-radius: 50%;
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.5); }
}

.alerts-feed {
  display: flex;
  flex-direction: column;
}

.alert-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.alert-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.alert-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.08);
}

.slide-in {
  animation: slideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.alert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
}

.alert-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
}

.window-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  white-space: nowrap;
}

.alert-time {
  font-size: 0.875rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.alert-body p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-primary);
  font-weight: 400;
}

/* Asset context line: icon + ticker + price */
.asset-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.asset-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 800;
  color: #0B0E14;
  flex-shrink: 0;
}

.asset-ticker {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.asset-price {
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
}

.alert-headline {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  color: var(--text-primary);
  font-weight: 400;
}

.alert-headline .positive { color: var(--color-change-positive); font-weight: 600; }
.alert-headline .negative { color: var(--color-change-negative); font-weight: 600; }

/* Stat grid: the OI CHANGE / PX CHANGE / TOTAL OI style row */
.stat-grid {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.375rem;
  letter-spacing: 0.05em;
  font-weight: 600;
  display: block;
}

.stat-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 600;
}

.stat-value.positive { color: var(--color-change-positive); }
.stat-value.negative { color: var(--color-change-negative); }

.stat-value .stat-sub {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.8rem;
}

/* Alert Types */
.type-whale-fill::before { background: var(--color-whale); }
.type-whale-fill .alert-badge {
  color: var(--color-whale);
  border-color: rgba(242, 184, 75, 0.3);
  background: rgba(242, 184, 75, 0.1);
}

.type-liquidation-cascade::before { background: var(--color-liquidation); }
.type-liquidation-cascade .alert-badge {
  color: var(--color-liquidation);
  background: rgba(239, 90, 90, 0.1);
  border: 1px solid rgba(239, 90, 90, 0.2);
}

.type-funding-anomaly::before { background: var(--color-anomaly); }
.type-funding-anomaly .alert-badge {
  color: var(--color-anomaly);
  border-color: rgba(79, 195, 224, 0.3);
  background: rgba(79, 195, 224, 0.1);
}

.type-oi-spike::before { background: var(--color-spike); }
.type-oi-spike .alert-badge {
  color: var(--color-spike);
  border-color: rgba(185, 103, 255, 0.3);
  background: rgba(185, 103, 255, 0.1);
}

/* Explain This */
.explain-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1.25rem;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.875rem;
  border-radius: 20px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.explain-btn:hover {
  color: var(--text-primary);
  border-color: rgba(185, 103, 255, 0.4);
  background: rgba(185, 103, 255, 0.08);
}

.explain-dialog {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 2.25rem;
  max-width: 600px;
  width: calc(100vw - 3rem);
  max-height: calc(100vh - 4rem);
  /* Glow + hairline instead of a heavy black drop-shadow - reads calmer on a dark surface. */
  box-shadow: 0 0 0 1px rgba(185, 103, 255, 0.08), 0 20px 60px rgba(0, 0, 0, 0.35), 0 0 80px rgba(185, 103, 255, 0.06);
  position: relative;
  overflow-y: auto;
}

.explain-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.explain-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.explain-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.explain-loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  padding: 1rem 0;
}

.explain-loading-dots {
  display: inline-flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.explain-loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-spike);
  animation: explain-loading-pulse 1.2s ease-in-out infinite;
}

.explain-loading-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.explain-loading-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes explain-loading-pulse {
  0%, 80%, 100% {
    opacity: 0.25;
    transform: scale(0.85);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .explain-loading-dots span {
    animation: none;
    opacity: 0.6;
  }
}

/* Eyebrow: orients the reader (which alert this explains) and gives the
   modal its one visual anchor, tying it to the same accent as the trigger
   button rather than competing with the alert-type badge colors. */
.explain-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-spike);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 1.5rem;
  padding-right: 2.5rem;
}

.explain-error {
  color: var(--color-change-negative);
  margin: 0;
}

/* Story cards: one idea per card instead of a scrolling wall of prose. */
.story-cards {
  min-height: 220px;
  position: relative;
}

.story-card {
  display: none;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.story-card.active { display: block; }

.story-card-title {
  margin: 0 0 1.25rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.story-card-body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.story-visual {
  margin: 0 0 1.5rem;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* price */
.visual-price {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.visual-price-asset {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.visual-price-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* pressure */
.visual-pressure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.visual-pressure-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.visual-pressure-arrow { font-size: 1rem; }

.visual-pressure-up .visual-pressure-arrow,
.visual-pressure-up .visual-pressure-label { color: var(--color-change-positive); }

.visual-pressure-down .visual-pressure-arrow,
.visual-pressure-down .visual-pressure-label { color: var(--color-change-negative); }

/* stat */
.visual-stat {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.visual-stat-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-spike);
}

.visual-stat-value.positive { color: var(--color-change-positive); }
.visual-stat-value.negative { color: var(--color-change-negative); }

.visual-stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* flow */
.visual-flow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.visual-flow-node {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.375rem 0.875rem;
  border-radius: 8px;
}

.visual-flow-arrow {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.visual-flow-icon { font-size: 1.3rem; }

/* nav */
.story-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.story-nav-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.story-nav-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
}

.story-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.story-nav-btn-primary {
  border-color: rgba(185, 103, 255, 0.4);
  background: rgba(185, 103, 255, 0.1);
  color: var(--color-spike);
}

.story-nav-btn-primary:hover:not(:disabled) {
  background: rgba(185, 103, 255, 0.18);
}

.story-counter {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
  font-style: italic;
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 12px;
  background: rgba(255,255,255,0.01);
}

/* Navigation */
.top-nav {
  display: flex;
  gap: 1.5rem;
  margin-left: 2rem;
  flex: 1;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.nav-link.active {
  color: var(--color-anomaly);
  background: rgba(79, 195, 224, 0.1);
}

/* Leaderboard */
.leaderboard-table-container {
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  margin-top: 1rem;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.leaderboard-table th {
  padding: 1.2rem 1.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
}

.leaderboard-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.9rem;
}

.leaderboard-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.rank-col {
  width: 5%;
  font-weight: 700;
}

.top-rank {
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  color: #000;
  font-weight: 900;
}

.rank-1 { background: linear-gradient(135deg, #FFD700, #FDB931); box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
.rank-2 { background: linear-gradient(135deg, #E0E0E0, #BDBDBD); }
.rank-3 { background: linear-gradient(135deg, #CD7F32, #A0522D); }

.address-col { color: var(--text-muted); }
.value-col { font-weight: 600; }

.pnl-col.positive, .roi-col.positive { color: var(--color-positive); }
.pnl-col.negative, .roi-col.negative { color: var(--color-liquidation); }

/* Filters */
.filters-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.filter-btn.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}

/* Analytics */
.section-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-tile {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.stat-tile-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-tile-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.stat-tile-unit {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 0.15rem;
}

.stat-tile-text {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 1.3rem;
}

.chart-section {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.chart-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.chart-section-header .section-title {
  margin-bottom: 0;
}

.chart-legend {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-weekday { background: var(--series-weekday); }
.legend-weekend { background: var(--series-weekend); }

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 160px;
}

.bar-chart-scroll {
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 22px;
  flex-shrink: 0;
}

.weekday-chart {
  gap: 1rem;
}

.weekday-chart .bar-col {
  flex: 1;
  min-width: 0;
}

.bar-track {
  width: 100%;
  max-width: 28px;
  height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.bar-fill {
  width: 100%;
  border-radius: 4px 4px 0 0;
  min-height: 3px;
  transition: height 0.3s ease;
}

.bar-weekday { background: var(--series-weekday); }
.bar-weekend { background: var(--series-weekend); }

.bar-value {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.bar-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  white-space: nowrap;
}

.busiest-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.busiest-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  font-size: 0.9rem;
}

.busiest-date { color: var(--text-primary); font-weight: 500; }

.busiest-count {
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
}

/* Turbo Streams CSS Filter Logic */
.alerts-feed.filter-funding-anomaly .alert-card:not(.type-funding-anomaly),
.alerts-feed.filter-oi-spike .alert-card:not(.type-oi-spike),
.alerts-feed.filter-whale-fill .alert-card:not(.type-whale-fill),
.alerts-feed.filter-liquidation-cascade .alert-card:not(.type-liquidation-cascade) {
  display: none !important;
}

/* Insights */
.insights-feed {
  margin-bottom: 3rem;
}

.insight-card {
  background: var(--surface);
  border: 1px solid rgba(185, 103, 255, 0.15);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.insight-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--color-spike);
}

.insight-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
}

.insight-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  color: var(--color-spike);
  border: 1px solid rgba(185, 103, 255, 0.3);
  background: rgba(185, 103, 255, 0.1);
}

.insight-time {
  font-size: 0.875rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.insight-body p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-primary);
  font-weight: 400;
}

.insight-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.insight-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.insight-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.insight-link-btn,
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.875rem;
  border-radius: 20px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.insight-link-btn:hover,
.copy-btn:hover {
  color: var(--text-primary);
  border-color: rgba(185, 103, 255, 0.4);
  background: rgba(185, 103, 255, 0.08);
}

.back-link {
  display: inline-block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  transition: color 0.2s ease;
}

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