/* App page styles — extends theme.css tokens */
.app-page {
  min-height: 100vh;
  padding: 100px 40px 60px;
}

.app-header {
  max-width: 900px;
  margin: 0 auto 48px;
}
.app-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 36px;
  letter-spacing: -1px;
  color: var(--fg);
  margin-bottom: 8px;
}
.app-sub {
  font-size: 16px;
  color: var(--muted);
}

/* Analyze form */
.analyzer {
  max-width: 900px;
  margin: 0 auto 60px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}
.analyzer-label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  color: var(--fg);
  margin-bottom: 12px;
}
.input-row {
  display: flex;
  gap: 12px;
}
.url-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.url-input:focus { border-color: var(--accent); }
.url-input::placeholder { color: var(--muted); }
.analyze-btn {
  background: var(--accent);
  color: #0d0d0f;
  border: none;
  border-radius: 10px;
  padding: 14px 28px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.analyze-btn:hover { opacity: 0.85; }
.analyze-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Status messages */
.status-msg {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}
.status-msg.error { color: #FF5F57; }
.status-msg.success { color: var(--accent); }

/* Video result */
.video-result {
  max-width: 900px;
  margin: 0 auto 48px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.vid-thumb {
  width: 200px;
  border-radius: 12px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.vid-info { flex: 1; }
.vid-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  color: var(--fg);
  margin-bottom: 12px;
  line-height: 1.3;
}
.vid-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}
.vid-badge {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(0,229,255,0.2);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-family: var(--font-head);
  font-weight: 600;
}

/* Clips grid */
.clips-section {
  max-width: 900px;
  margin: 0 auto;
}
.clips-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.clips-section-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  color: var(--fg);
}
.clips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.clip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.2s;
}
.clip-card:hover { border-color: rgba(0,229,255,0.2); }
.clip-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.clip-num {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 28px;
  color: var(--accent);
  opacity: 0.5;
  letter-spacing: -1px;
  line-height: 1;
}
.clip-score-badge {
  background: var(--accent);
  color: #0d0d0f;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
}
.clip-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  color: var(--fg);
  margin-bottom: 8px;
  line-height: 1.4;
}
.clip-times {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-body);
}
.clip-actions {
  display: flex;
  gap: 8px;
}
.clip-btn {
  flex: 1;
  background: var(--accent-dim);
  border: 1px solid rgba(0,229,255,0.2);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
}
.clip-btn:hover { background: rgba(0,229,255,0.15); }

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(0,229,255,0.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty state */
.empty-state {
  max-width: 900px;
  margin: 80px auto;
  text-align: center;
  color: var(--muted);
}
.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.3; }
.empty-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  color: var(--fg);
  margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .app-page { padding: 90px 20px 40px; }
  .input-row { flex-direction: column; }
  .clips-grid { grid-template-columns: 1fr; }
  .video-result { flex-direction: column; }
  .vid-thumb { width: 100%; }
}