/* ============================================
   CLIPWISE — STYLES
   Palette: Acid Neon / Dark SaaS
   Fonts: Syne (display) + Plus Jakarta Sans (body)
   ============================================ */

:root {
  --bg: #0a0a0f;
  --bg-2: #0f0f18;
  --bg-3: #141420;
  --card: #12121c;
  --card-border: #1e1e2e;
  --card-hover: #16162a;
  --primary: #7c5cfc;
  --primary-light: #9b7ffe;
  --primary-glow: rgba(124, 92, 252, 0.25);
  --primary-subtle: rgba(124, 92, 252, 0.1);
  --accent: #c8ff00;
  --accent-glow: rgba(200, 255, 0, 0.2);
  --accent-subtle: rgba(200, 255, 0, 0.08);
  --blue: #3b9eff;
  --blue-subtle: rgba(59, 158, 255, 0.1);
  --orange: #ff7b3b;
  --orange-subtle: rgba(255, 123, 59, 0.1);
  --green: #22c55e;
  --green-subtle: rgba(34, 197, 94, 0.1);
  --red: #ef4444;
  --red-subtle: rgba(239, 68, 68, 0.1);
  --text: #e8e6f0;
  --text-2: #9896b0;
  --text-3: #5a5870;
  --border: #1e1e2e;
  --border-light: #252535;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --font-display: 'Syne', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   SHARED COMPONENTS
   ============================================ */

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-subtle);
  border: 1px solid rgba(124, 92, 252, 0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo-badge {
  font-size: 0.6rem;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--primary-glow);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-full { width: 100%; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary-light); }

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

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-icon:hover { border-color: var(--border-light); color: var(--text); }

.btn-icon-sm {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-icon-sm:hover { background: var(--card-hover); color: var(--text-2); }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.card-header h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.card-header svg { color: var(--text-3); flex-shrink: 0; }

/* Form elements */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.optional { font-weight: 400; color: var(--text-3); }

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 12px;
  color: var(--text-3);
  pointer-events: none;
  flex-shrink: 0;
}
.input-wrap input,
.input-wrap textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px 10px 38px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.input-wrap input::placeholder,
.input-wrap textarea::placeholder { color: var(--text-3); }
.input-wrap input:focus,
.input-wrap textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-subtle);
}

textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  line-height: 1.6;
}
textarea::placeholder { color: var(--text-3); }
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-subtle);
}

.toggle-pw {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.toggle-pw:hover { color: var(--text-2); }

.form-error {
  background: var(--red-subtle);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.8rem;
  color: #fca5a5;
}

.hidden { display: none !important; }

/* ============================================
   AUTH PAGE
   ============================================ */

.auth-page {
  background: var(--bg);
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 92, 252, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 92, 252, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.bg-glow-1 {
  width: 600px;
  height: 600px;
  background: rgba(124, 92, 252, 0.12);
  top: -200px;
  right: -100px;
}
.bg-glow-2 {
  width: 400px;
  height: 400px;
  background: rgba(200, 255, 0, 0.06);
  bottom: -100px;
  left: -100px;
}

.auth-nav {
  position: relative;
  z-index: 10;
  padding: 20px 48px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.auth-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 0;
  min-height: calc(100vh - 73px);
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 48px;
  align-items: center;
}

/* Hero Side */
.hero-side {
  padding-right: 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-subtle);
  border: 1px solid rgba(200, 255, 0, 0.2);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 28px;
}
.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 20px;
}

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

.hero-desc {
  font-size: 1rem;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-2);
}
.feature-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feature-icon.green { background: var(--green-subtle); color: var(--green); }
.feature-icon.blue { background: var(--blue-subtle); color: var(--blue); }
.feature-icon.purple { background: var(--primary-subtle); color: var(--primary-light); }
.feature-icon.orange { background: var(--orange-subtle); color: var(--orange); }

.stats-row {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px 28px;
  width: fit-content;
}
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 24px;
}
.stat-item:first-child { padding-left: 0; }
.stat-item:last-child { padding-right: 0; }
.stat-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-3);
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* Auth Side */
.auth-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.auth-tab {
  padding: 14px;
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}
.auth-tab:hover { color: var(--text-2); }
.auth-tab.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary);
  background: var(--primary-subtle);
}

.auth-form {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-header h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.form-header p {
  font-size: 0.8rem;
  color: var(--text-3);
}

.forgot-link {
  font-size: 0.75rem;
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 500;
}
.forgot-link:hover { text-decoration: underline; }

.auth-switch {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-3);
}
.auth-switch a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;
}
.auth-switch a:hover { text-decoration: underline; }

.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-3);
}
.trust-item svg { color: var(--text-3); }

/* ============================================
   DASHBOARD PAGE
   ============================================ */

.dashboard-page {
  background: var(--bg);
}

.dash-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.dash-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-display);
}
.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-2);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-logout:hover { border-color: var(--red); color: #fca5a5; }

.dash-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--border-light); }
.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-card-icon.purple { background: var(--primary-subtle); color: var(--primary-light); }
.stat-card-icon.blue { background: var(--blue-subtle); color: var(--blue); }
.stat-card-icon.orange { background: var(--orange-subtle); color: var(--orange); }
.stat-card-label {
  font-size: 0.78rem;
  color: var(--text-3);
  font-weight: 500;
  margin-bottom: 4px;
}
.stat-card-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  align-items: start;
}

.panel-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Input Tabs */
.input-tabs {
  display: flex;
  gap: 0;
  padding: 12px 16px 0;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.01);
}
.input-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  margin-bottom: -1px;
}
.input-tab:hover { color: var(--text-2); }
.input-tab.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary);
}

.tab-panel {
  display: none;
  padding: 16px;
}
.tab-panel.active { display: block; }

/* YouTube form */
.yt-form { display: flex; flex-direction: column; gap: 10px; }
.input-row { display: flex; gap: 8px; }
.input-row .input-wrap { flex: 1; }
.input-row .input-wrap input { border-radius: var(--radius-sm); }
.btn-analyze { padding: 10px 16px; flex-shrink: 0; }
.input-hint { font-size: 0.75rem; color: var(--text-3); line-height: 1.5; }

/* Transcript form */
.transcript-form { display: flex; flex-direction: column; gap: 14px; }
.btn-analyze-full { margin-top: 4px; }

/* Duration options */
.duration-options {
  display: flex;
  gap: 8px;
}
.radio-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
  justify-content: center;
}
.radio-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-subtle);
  color: var(--primary-light);
}
.radio-option input { display: none; }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.upload-zone:hover {
  border-color: var(--primary);
  background: var(--primary-subtle);
}
.upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-subtle);
}
.upload-icon { color: var(--text-3); }
.upload-title { font-size: 0.875rem; font-weight: 600; color: var(--text-2); }
.upload-sub { font-size: 0.75rem; color: var(--text-3); }

.file-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0;
}
.file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-2);
}
.file-info svg { color: var(--primary-light); flex-shrink: 0; }
.file-info span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tips card */
.tips-card .card-header { border-bottom: 1px solid var(--border); }
.tips-list {
  list-style: none;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tips-list li {
  font-size: 0.78rem;
  color: var(--text-3);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}
.tips-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
}
.tips-list code {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.72rem;
  color: var(--accent);
  font-family: 'Courier New', monospace;
}

/* Results card */
.results-card { min-height: 400px; }
.results-count {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--primary-subtle);
  color: var(--primary-light);
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid rgba(124, 92, 252, 0.2);
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 12px;
  text-align: center;
}
.empty-icon {
  width: 72px;
  height: 72px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  margin-bottom: 4px;
}
.empty-state h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-2);
}
.empty-state p {
  font-size: 0.8rem;
  color: var(--text-3);
  max-width: 260px;
}

/* Loading state */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px;
  gap: 14px;
  text-align: center;
}
.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.loading-state p { font-size: 0.8rem; color: var(--text-3); }

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 260px;
  margin-top: 8px;
}
.loading-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--text-3);
  transition: color 0.3s;
}
.loading-step.active { color: var(--text-2); }
.loading-step.done { color: var(--green); }
.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-light);
  flex-shrink: 0;
  transition: background 0.3s;
}
.loading-step.active .step-dot {
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
  animation: pulse 1s infinite;
}
.loading-step.done .step-dot { background: var(--green); }

/* Clips list */
.clips-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px;
}

.clip-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.clip-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.2s;
}
.clip-card:hover {
  border-color: var(--border-light);
  background: var(--card-hover);
  transform: translateX(2px);
}
.clip-card:hover::before { opacity: 1; }

.clip-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.clip-rank {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-3);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  flex-shrink: 0;
}
.clip-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  flex: 1;
}
.clip-score {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.score-badge {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  line-height: 1;
}
.score-high { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.2); }
.score-mid { background: rgba(251, 191, 36, 0.15); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.2); }
.score-low { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }

.clip-timestamps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.ts-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  font-family: 'Courier New', monospace;
}
.ts-badge svg { color: var(--text-3); }
.ts-arrow { color: var(--text-3); font-size: 0.75rem; }
.ts-duration {
  font-size: 0.72rem;
  color: var(--text-3);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
}

.clip-hook {
  font-size: 0.78rem;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.clip-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
  letter-spacing: 0.02em;
}
.tag-emotion { background: var(--primary-subtle); color: var(--primary-light); border: 1px solid rgba(124,92,252,0.2); }
.tag-platform { background: var(--blue-subtle); color: var(--blue); border: 1px solid rgba(59,158,255,0.2); }
.tag-type { background: var(--orange-subtle); color: var(--orange); border: 1px solid rgba(255,123,59,0.2); }

/* History card */
.history-card { max-height: 420px; overflow: hidden; display: flex; flex-direction: column; }
.history-list {
  overflow-y: auto;
  flex: 1;
}
.history-list::-webkit-scrollbar { width: 4px; }
.history-list::-webkit-scrollbar-track { background: transparent; }
.history-list::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

.history-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
  border-left: 2px solid transparent;
}
.history-item:hover { background: var(--card-hover); border-left-color: var(--primary); }
.history-item:last-child { border-bottom: none; }
.history-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.history-status {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
}
.status-completed { background: var(--green-subtle); color: var(--green); }
.status-failed { background: var(--red-subtle); color: #f87171; }
.history-time { font-size: 0.7rem; color: var(--text-3); }

.empty-history {
  padding: 28px 18px;
  text-align: center;
}
.empty-history p { font-size: 0.78rem; color: var(--text-3); }

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
}
.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.modal-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-score-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.modal-score-big {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}
.modal-score-label { font-size: 0.75rem; color: var(--text-3); margin-top: 4px; }

.modal-section h4 {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.modal-section p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.6;
}

.modal-ts-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.modal-ts {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}
.modal-ts-sep { color: var(--text-3); font-size: 1.2rem; }
.modal-ts-dur {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-3);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
}

.modal-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.copy-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: var(--primary-subtle);
  border: 1px solid rgba(124,92,252,0.3);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-light);
  cursor: pointer;
  transition: all 0.2s;
  justify-content: center;
}
.copy-btn:hover { background: var(--primary); color: #fff; }

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .auth-main {
    grid-template-columns: 1fr;
    padding: 40px 28px;
    gap: 48px;
  }
  .hero-side { padding-right: 0; }
  .hero-title { font-size: 2.4rem; }
  .auth-side { max-width: 480px; margin: 0 auto; width: 100%; }
  .content-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .auth-nav { padding: 16px 20px; }
  .auth-main { padding: 28px 20px; }
  .hero-title { font-size: 2rem; }
  .stats-row { flex-wrap: wrap; gap: 16px; }
  .stat-divider { display: none; }
  .stat-item { padding: 0; }
  .dash-main { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr; gap: 10px; }
  .dash-header-inner { padding: 12px 16px; }
  .user-name { display: none; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.7rem; }
  .auth-form { padding: 20px; }
  .duration-options { flex-direction: column; }
  .input-tabs { overflow-x: auto; }
  .input-tab { font-size: 0.72rem; padding: 8px 10px; }
}