/* behavior-page.css — Hero Behavioral Signals Page */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #000;
  --surface: #0c0c0e;
  --surface2:#141416;
  --surface3:#1c1c1e;
  --border:  rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.12);
  --accent:  #30d158;
  --amber:   #ff9f0a;
  --cyan:    #00c8ff;
  --blue:    #64d2ff;
  --gray:    #86868b;
  --gray2:   #48484a;
  --font:    'Inter', -apple-system, sans-serif;
  --ease:    cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: #fff;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Nav ── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 48px;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 20;
  position: relative;
}

.nav-back {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
  min-width: 80px;
}
.nav-back:hover { opacity: 0.7; }

.nav-center {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-title { font-size: 13px; color: var(--gray); font-weight: 500; }
.nav-badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(48,209,88,0.12);
  border: 1px solid rgba(48,209,88,0.25);
  border-radius: 4px;
  padding: 2px 6px;
}

.nav-status { font-size: 12px; color: var(--gray); text-align: right; min-width: 100px; }
.nav-status.active { color: rgba(48,209,88,0.9); }

/* ── Layout ── */
.behavior-main {
  display: grid;
  grid-template-columns: 1fr 300px;
  flex: 1;
  overflow: hidden;
}

/* ── Primary (left) ── */
.behavior-primary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 36px 48px;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(30,160,80,0.08) 0%, transparent 70%), #050507;
  position: relative;
  overflow: hidden;
}

/* Visualization canvas */
.behavior-viz-canvas {
  width: 100%;
  max-width: 520px;
  height: 120px;
  border-radius: 14px;
  background: rgba(48,209,88,0.04);
  border: 1px solid rgba(48,209,88,0.10);
  display: block;
}

/* Signal display */
.signal-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 72px;
  justify-content: center;
}

.signal-label {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.4s var(--ease);
  color: rgba(255,255,255,0.85);
}
.signal-label.no-signal { color: rgba(255,255,255,0.2); font-weight: 400; }

.signal-confidence {
  font-size: 12px;
  color: var(--gray);
  font-variant-numeric: tabular-nums;
  min-height: 16px;
}

/* Intent badge */
.intent-badge {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 6px 18px;
  border-radius: 980px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  min-height: 32px;
  display: flex;
  align-items: center;
}
.intent-badge.visible     { opacity: 1; transform: translateY(0); }
.intent-badge.match {
  background: rgba(48,209,88,0.14);
  border: 1px solid rgba(48,209,88,0.4);
  color: rgba(120,230,150,1);
}

/* Metrics strip */
.metrics-strip {
  display: flex;
  gap: 20px;
  max-width: 520px;
  width: 100%;
}

.metric-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.metric-label {
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gray);
  font-weight: 600;
}
.metric-bar-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
}
.metric-bar-fill {
  height: 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 0.25s var(--ease);
}
.metric-bar-fill.typing { background: var(--accent); }
.metric-bar-fill.mouse  { background: var(--cyan); }
.metric-bar-fill.scroll { background: var(--blue); }

.metric-value {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  font-variant-numeric: tabular-nums;
}

/* Typing area */
.type-area-wrap {
  width: 100%;
  max-width: 520px;
}
.type-area {
  width: 100%;
  min-height: 56px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 12px 16px;
  color: rgba(255,255,255,0.75);
  font-family: var(--font);
  font-size: 14px;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.5;
}
.type-area::placeholder { color: rgba(255,255,255,0.2); }
.type-area:focus { border-color: rgba(48,209,88,0.35); }

.monitor-note {
  font-size: 12px;
  color: var(--gray);
  opacity: 0.7;
  text-align: center;
  max-width: 400px;
}

/* ── Panel (right) ── */
.behavior-panel {
  border-left: 1px solid var(--border);
  background: var(--surface);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--gray2) transparent;
}

.bp-section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.bp-label {
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gray);
  font-weight: 600;
  margin-bottom: 10px;
}

/* Hint chips */
.hint-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hint-chip {
  font-family: var(--font);
  font-size: 12px;
  background: rgba(48,209,88,0.07);
  border: 1px solid rgba(48,209,88,0.22);
  color: rgba(120,220,140,0.9);
  border-radius: 980px;
  padding: 4px 12px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.hint-chip:hover {
  background: rgba(48,209,88,0.16);
  border-color: rgba(48,209,88,0.5);
}

/* Signal log */
.signal-log {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 160px;
  overflow-y: auto;
}
.signal-log li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 3px 0;
}
.sl-signal { font-weight: 500; }
.sl-conf   { flex: 1; color: var(--gray); font-size: 11px; padding: 0 6px; }
.sl-time   { color: var(--gray2); font-size: 10px; font-variant-numeric: tabular-nums; }

/* Signal map */
.signal-map {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--surface3);
  font-size: 11px;
  transition: background 0.25s;
}
.sm-row.active { background: rgba(48,209,88,0.10); }
.sm-dot  {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sm-label  { font-weight: 500; color: rgba(255,255,255,0.75); min-width: 76px; }
.sm-desc   { flex: 1; color: var(--gray); font-size: 10px; line-height: 1.3; }
.sm-intent { color: rgba(255,255,255,0.3); font-size: 10px; }

/* Navigation links */
.nav-links-section { flex: 1; }
.nav-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px;
  border-radius: 8px;
  text-decoration: none;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}
.nav-link-item:hover {
  background: rgba(48,209,88,0.08);
  color: rgba(140,230,160,0.9);
}
.nav-link-icon { font-size: 16px; width: 22px; text-align: center; }

/* ── Idle overlay ── */
.idle-timer {
  font-size: 11px;
  color: var(--gray2);
  font-variant-numeric: tabular-nums;
  text-align: center;
  min-height: 16px;
  transition: color 0.4s;
}
.idle-timer.long { color: rgba(134,134,139,0.6); }

/* ── Responsive ── */
@media (max-width: 860px) {
  body { overflow: auto; }
  .behavior-main { grid-template-columns: 1fr; }
  .behavior-panel {
    max-height: none;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.07);
    overflow: visible;
  }
  .behavior-primary { padding: 28px 20px; }
}
