/* StreamOps App Styles — extends landing page design tokens */

:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: #1a1a25;
  --fg: #e8e8ed;
  --fg-muted: #8888a0;
  --accent: #00ff88;
  --accent-dim: rgba(0, 255, 136, 0.15);
  --accent-glow: rgba(0, 255, 136, 0.3);
  --danger: #ff4466;
  --danger-dim: rgba(255, 68, 102, 0.15);
  --border: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(0, 255, 136, 0.2);
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 60px;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo .dot { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: 0.85rem;
  color: var(--fg-muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover { color: var(--fg); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--accent); background: var(--accent-dim); }

/* ── Page Shell ── */
.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.page-header {
  margin-bottom: 40px;
}

.page-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  padding: 5px 14px;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 16px;
}

.page-title {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 10px;
}

.page-sub {
  color: var(--fg-muted);
  font-size: 1rem;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.card + .card { margin-top: 16px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover { background: #00e07a; box-shadow: 0 0 20px var(--accent-glow); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover { color: var(--fg); border-color: rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); }

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }

/* ── Upload Zone ── */
.upload-zone {
  border: 2px dashed var(--border-accent);
  border-radius: var(--radius);
  padding: 60px 40px;
  text-align: center;
  background: var(--accent-dim);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: rgba(0, 255, 136, 0.08);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon { font-size: 2.5rem; margin-bottom: 12px; }
.upload-label { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; }
.upload-hint { font-size: 0.82rem; color: var(--fg-muted); }

.upload-file-selected {
  display: none;
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--accent);
  font-family: var(--font-mono);
  text-align: left;
  word-break: break-all;
}

/* ── Form ── */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg-muted);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 0.95rem;
  transition: border-color 0.15s;
  outline: none;
}

.form-input:focus { border-color: var(--border-accent); }
.form-input::placeholder { color: var(--fg-muted); }

/* ── Progress ── */
.progress-bar-wrap {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 16px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  transition: width 0.3s;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ── Status Badge ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.status-processing { background: rgba(255, 200, 0, 0.12); color: #ffcc00; }
.status-done { background: var(--accent-dim); color: var(--accent); }
.status-error { background: var(--danger-dim); color: var(--danger); }

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-processing .status-dot { animation: pulse 1.5s ease-in-out infinite; }

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

/* ── Upload List ── */
.upload-list { display: flex; flex-direction: column; gap: 12px; }

.upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.15s, background 0.15s;
  gap: 16px;
}

.upload-item:hover { border-color: rgba(255,255,255,0.12); background: rgba(255,255,255,0.02); }

.upload-item-info { flex: 1; min-width: 0; }
.upload-item-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-item-meta { font-size: 0.8rem; color: var(--fg-muted); font-family: var(--font-mono); }

.upload-item-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.clip-count-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  padding: 3px 10px;
  border-radius: 100px;
}

/* ── Clips Preview ── */
.clips-grid { display: flex; flex-direction: column; gap: 20px; }

.clip-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.clip-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px 0;
  gap: 12px;
}

.clip-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-muted);
  background: var(--bg-elevated);
  padding: 3px 10px;
  border-radius: 100px;
  flex-shrink: 0;
}

.clip-title { font-size: 1.05rem; font-weight: 700; }
.clip-why { font-size: 0.85rem; color: var(--fg-muted); margin-top: 6px; }

.clip-timestamp {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.clip-platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  margin-top: 20px;
}

.platform-panel {
  background: var(--bg-card);
  padding: 16px 18px;
}

.platform-panel:first-child { border-radius: 0 0 0 var(--radius); }
.platform-panel:last-child { border-radius: 0 0 var(--radius) 0; }

.platform-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.platform-icon { font-size: 1rem; }

.platform-text {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--fg);
  margin-bottom: 8px;
}

.platform-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.hashtag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.1s;
}

.hashtag:hover { background: rgba(0, 255, 136, 0.25); }

.copy-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 8px;
  display: inline-block;
}

.copy-btn:hover { color: var(--fg); border-color: rgba(255,255,255,0.12); }
.copy-btn.copied { color: var(--accent); border-color: var(--border-accent); }

/* ── Upload processing state ── */
.processing-card {
  text-align: center;
  padding: 60px 40px;
}

.processing-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

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

.processing-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.processing-sub { font-size: 0.85rem; color: var(--fg-muted); }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 60px 40px;
  color: var(--fg-muted);
}

.empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-title { font-size: 1.05rem; font-weight: 600; color: var(--fg); margin-bottom: 8px; }
.empty-sub { font-size: 0.85rem; margin-bottom: 24px; }

/* ── Alert ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 20px;
  display: none;
}

.alert-error { background: var(--danger-dim); border: 1px solid rgba(255, 68, 102, 0.3); color: #ff8899; }
.alert-success { background: var(--accent-dim); border: 1px solid var(--border-accent); color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 680px) {
  .clip-platforms { grid-template-columns: 1fr; }
  .platform-panel:first-child, .platform-panel:last-child { border-radius: 0; }
  .platform-panel:last-child { border-radius: 0 0 var(--radius) var(--radius); }
  .page { padding: 32px 16px 60px; }
  .nav { padding: 0 16px; }
  .upload-item { flex-direction: column; align-items: flex-start; }
}
