/* Goready.ai - Cosmic Precision Design System */

:root {
  --bg: #08090d;
  --text: #e2e8f0;
  --text-muted: #4a5568;
  --accent: #4F8EF7;
  --accent-purple: #A78BFA;
  --accent-cyan: #22D3EE;
  --glow: #7BA4F7;
  --font-en: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-cn: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  font-family: var(--font-cn);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

#network {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* --- Top overlay: brand --- */
.overlay-top {
  position: fixed;
  top: 28px;
  left: 36px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.brand {
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-name { color: rgba(226, 232, 240, 0.9); }

.brand-dot {
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* --- Bottom overlay --- */
.overlay-bottom {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

/* --- Timeline panel --- */
.timeline {
  width: 520px;
  max-width: 90vw;
  background: rgba(8, 9, 13, 0.88);
  border: 1px solid rgba(79, 142, 247, 0.12);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.timeline.expanded {
  box-shadow: 0 -8px 40px rgba(79, 142, 247, 0.08);
}

/* Bar (always visible) */
.timeline-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
}

/* Buttons */
.tl-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.15s;
}

.tl-btn:hover {
  background: rgba(79, 142, 247, 0.1);
}

.tl-icon {
  width: 16px;
  height: 16px;
  fill: #64748b;
  stroke: none;
}

.tl-icon polyline, .tl-icon path {
  fill: #64748b;
}

.tl-icon rect {
  fill: #64748b;
}

/* Play/pause icon toggling */
.timeline.paused .tl-icon-pause { display: none; }
.timeline:not(.paused) .tl-icon-play { display: none; }

/* Expand chevron */
.tl-expand .tl-icon {
  fill: none;
  stroke: #4a5568;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s ease;
}

.timeline.expanded .tl-expand .tl-icon {
  transform: rotate(180deg);
}

/* Step dots */
.tl-dots {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.tl-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #1e2533;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.tl-dot:hover {
  transform: scale(1.5);
  background: #4a5568;
}

.tl-dot.active {
  background: var(--accent);
  box-shadow: 0 0 6px rgba(79, 142, 247, 0.4);
}

.tl-dot.past {
  background: #2d3748;
}

/* Current text */
.tl-text {
  flex: 1;
  font-size: 13px;
  color: #7a8599;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Lyrics panel */
.timeline-lyrics {
  max-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border-top: 0 solid rgba(79, 142, 247, 0);
}

.timeline.expanded .timeline-lyrics {
  max-height: 260px;
  border-top: 1px solid rgba(79, 142, 247, 0.08);
}

/* Scrollbar */
.timeline-lyrics::-webkit-scrollbar {
  width: 4px;
}

.timeline-lyrics::-webkit-scrollbar-track {
  background: transparent;
}

.timeline-lyrics::-webkit-scrollbar-thumb {
  background: rgba(79, 142, 247, 0.15);
  border-radius: 2px;
}

/* Individual lyric line */
.tl-lyric {
  padding: 9px 16px 9px 20px;
  font-size: 12px;
  color: #3e4a5e;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
  position: relative;
}

.tl-lyric:hover {
  color: #64748b;
  background: rgba(79, 142, 247, 0.03);
}

.tl-lyric.active {
  color: var(--text);
  border-left-color: var(--accent);
  background: rgba(79, 142, 247, 0.06);
}

.tl-lyric.past {
  color: #4a5568;
}

/* Step number */
.tl-lyric-num {
  display: inline-block;
  width: 18px;
  font-size: 10px;
  color: #2d3748;
  font-family: var(--font-en);
  margin-right: 6px;
}

.tl-lyric.active .tl-lyric-num {
  color: var(--accent);
}

/* --- Legend --- */
.overlay-legend {
  position: fixed;
  top: 28px;
  right: 36px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: var(--text-muted);
}

.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-dot-user     { background: #c8d6f0; box-shadow: 0 0 4px rgba(200, 214, 240, 0.3); }
.legend-dot-career   { background: #4F8EF7; }
.legend-dot-legal    { background: #F59E0B; }
.legend-dot-medical  { background: #22D3EE; }
.legend-dot-mentor   { background: #A78BFA; }
.legend-dot-business { background: #F472B6; }

/* --- Agent Tooltip --- */
.agent-tooltip {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  background: rgba(8, 9, 13, 0.92);
  border: 1px solid rgba(79, 142, 247, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 10px;
  padding: 12px 16px;
  min-width: 150px;
}

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

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

.tooltip-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tooltip-name {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.tooltip-type-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.tooltip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.tooltip-type {
  font-size: 11px;
  color: #64748b;
}

.tooltip-power {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(79, 142, 247, 0.1);
}

.tooltip-power-label {
  font-size: 9px;
  color: #3e4a5e;
  font-family: var(--font-en);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tooltip-power-value {
  font-size: 12px;
  color: var(--glow);
  font-weight: 600;
  font-family: var(--font-en);
}

.tooltip-user {
  font-size: 10px;
  color: #3e4a5e;
  margin-top: 6px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .overlay-top { top: 16px; left: 16px; }
  .brand { font-size: 17px; }
  .tagline { font-size: 10px; }
  .overlay-legend { top: 16px; right: 16px; }
  .legend-item { font-size: 9px; }
  .overlay-bottom { bottom: 12px; }
  .timeline { width: 100%; max-width: 95vw; }
  .tl-text { font-size: 11px; }
  .tl-lyric { font-size: 11px; padding: 7px 12px 7px 16px; }
}

::selection {
  background: rgba(79, 142, 247, 0.25);
}
