/* ===== NAV ===== */
.app-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--fg-primary);
}

/* ===== APP MAIN ===== */
.app-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
}

/* ===== PAGE HEADER ===== */
.page-header {
  margin-bottom: 3rem;
}

.page-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--accent-soft);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--accent-glow);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
}

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

.page-header h1,
.results-header h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.page-header h1 .highlight,
.results-header h1 .highlight {
  background: linear-gradient(135deg, var(--accent-glow) 0%, var(--hot) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-sub {
  color: var(--fg-muted);
  font-size: 1.05rem;
  max-width: 560px;
  line-height: 1.7;
}

/* ===== UPLOAD ZONE ===== */
.upload-zone {
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.upload-zone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 3rem 2rem;
  cursor: pointer;
  width: 100%;
  text-align: center;
}

.upload-icon {
  color: var(--fg-dim);
  margin-bottom: 0.75rem;
}

.upload-prompt {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg-primary);
}

.upload-hint {
  color: var(--fg-muted);
  font-size: 0.9rem;
}

.upload-limit {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--fg-dim);
  margin-top: 0.25rem;
}

/* ===== UPLOAD PROGRESS ===== */
.upload-progress {
  width: 100%;
  padding: 2.5rem 2rem;
}

.progress-filename {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-bar-wrap {
  height: 4px;
  background: var(--bg-surface);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-glow) 100%);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.progress-label {
  font-size: 0.85rem;
  color: var(--fg-muted);
}

/* ===== UPLOAD ERROR ===== */
.upload-error {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: var(--radius);
  color: var(--hot);
  font-size: 0.9rem;
}

/* ===== RESULTS HEADER ===== */
.results-header {
  margin-bottom: 2rem;
}

.done-tag {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--green);
}

.dot.green {
  background: var(--green);
}

.error-tag {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--hot);
}

/* ===== VIDEO SOURCE ROW ===== */
.video-source {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: var(--accent-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: transparent;
  color: var(--fg-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s;
}

.btn-secondary:hover {
  border-color: rgba(139, 137, 160, 0.4);
  color: var(--fg-primary);
}

/* ===== ANALYZING SPINNER ===== */
.analyzing-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 4rem 2rem;
  text-align: center;
}

.analyzing-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.analyzing-steps {
  color: var(--fg-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  max-width: 360px;
  line-height: 1.6;
}

/* ===== HIGHLIGHT CARDS ===== */
.highlights-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.highlight-card {
  display: flex;
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  align-items: flex-start;
  transition: border-color 0.2s, transform 0.2s;
}

.highlight-card:hover {
  border-color: rgba(124, 58, 237, 0.35);
  transform: translateY(-1px);
}

.highlight-rank {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg-dim);
  min-width: 2.5rem;
  padding-top: 0.1rem;
}

.highlight-card:first-child .highlight-rank {
  background: linear-gradient(135deg, var(--accent-glow), var(--hot));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.highlight-body {
  flex: 1;
  min-width: 0;
}

.highlight-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.highlight-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent-glow);
  background: var(--accent-soft);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.highlight-timestamp {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--fg-dim);
}

.highlight-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--fg-primary);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.highlight-desc {
  color: var(--fg-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* ===== HYPE BAR ===== */
.hype-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hype-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  min-width: 32px;
}

.hype-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-surface);
  border-radius: 2px;
  overflow: hidden;
  max-width: 200px;
}

.hype-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hype-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 30px;
  text-align: right;
}

/* ===== ERROR BLOCK ===== */
.error-block {
  padding: 2rem;
  background: rgba(244, 63, 94, 0.06);
  border: 1px solid rgba(244, 63, 94, 0.2);
  border-radius: var(--radius);
  color: var(--fg-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== HISTORY LIST ===== */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--fg-primary);
  transition: border-color 0.2s, transform 0.15s;
  gap: 1rem;
}

.history-item:hover {
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-1px);
}

.history-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.history-filename {
  font-weight: 500;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 400px;
}

.history-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--fg-dim);
}

.history-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--fg-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg-dim);
  flex-shrink: 0;
}

.status-dot.green { background: var(--green); }
.status-dot.yellow { background: #fbbf24; animation: pulse 1.5s infinite; }
.status-dot.red { background: var(--hot); }
.status-dot.muted { background: var(--fg-dim); }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--fg-muted);
}

/* ===== HERO CTA (landing page additions) ===== */
.hero-cta {
  margin-top: 2.5rem;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 0 0 0 rgba(124, 58, 237, 0);
}

.btn-cta:hover {
  background: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.35);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .highlight-card {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem;
  }
  .highlight-rank {
    font-size: 1rem;
  }
  .video-source {
    flex-direction: column;
    align-items: flex-start;
  }
  .history-filename {
    max-width: 200px;
  }
}
