/* ── Upload Page ── */
.upload-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.upload-container {
  width: 100%;
  max-width: 520px;
}
.upload-header {
  text-align: center;
  margin-bottom: 36px;
}
.upload-title {
  font-family: 'Sora', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.upload-subtitle {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.5;
}

/* Tabs */
.upload-tabs {
  display: flex;
  gap: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
}
.upload-tab {
  flex: 1;
  padding: 10px 20px;
  border: none;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.upload-tab:hover {
  color: var(--text-1);
}
.upload-tab.active {
  background: var(--charcoal);
  color: white;
}

/* Panels */
.upload-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 16px;
}
.upload-panel.hidden {
  display: none;
}

/* Form */
.upload-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.input-group {
  width: 100%;
}
.url-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--text-1);
  background: var(--cream);
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.url-input:focus {
  outline: none;
  border-color: var(--amber);
}
.url-input::placeholder {
  color: var(--text-3);
}

/* Submit Button */
.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  background: var(--charcoal);
  color: white;
  border: none;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #1a1a1a;
}
.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--amber);
  background: var(--amber-light);
}
.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.drop-zone-content.hidden {
  display: none;
}
.drop-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-1);
  margin-top: 8px;
}
.drop-subtext {
  font-size: 13px;
  color: var(--text-3);
}
.drop-formats {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
}
.file-selected {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--cream);
  border-radius: 8px;
}
.file-selected.hidden {
  display: none;
}
#file-name {
  font-size: 14px;
  color: var(--text-1);
  font-weight: 500;
}

/* Status */
.upload-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px;
  text-align: center;
}
.upload-status.hidden {
  display: none;
}
.status-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.status-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-1);
}
.status-subtext {
  font-size: 13px;
  color: var(--text-3);
}

/* Error */
.upload-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 10px;
  color: #DC2626;
  font-size: 14px;
}
.upload-error.hidden {
  display: none;
}

/* ── Clips Page ── */
.clips-page {
  min-height: calc(100vh - 64px);
  padding: 48px 24px;
}
.clips-container {
  max-width: 800px;
  margin: 0 auto;
}
.clips-header {
  text-align: center;
  margin-bottom: 32px;
}
.clips-title {
  font-family: 'Sora', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.clips-subtitle {
  font-size: 16px;
  color: var(--text-2);
}

/* Video Status */
.video-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
  padding: 12px 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 100px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-indicator.pending {
  background: #F59E0B;
  animation: pulse 1.5s infinite;
}
.status-indicator.ready {
  background: #22C55E;
}
.status-indicator.failed {
  background: #EF4444;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.status-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

/* Highlights List */
.highlights-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.highlight-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  transition: box-shadow 0.2s;
}
.highlight-card:hover {
  box-shadow: 0 4px 20px rgba(10,10,10,0.06);
}
.highlight-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.highlight-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--amber-light);
  border-radius: 8px;
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
}
.highlight-score {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--amber);
  background: var(--amber-light);
  padding: 4px 10px;
  border-radius: 100px;
}
.highlight-label {
  font-size: 14px;
  color: var(--text-1);
  line-height: 1.5;
  margin-bottom: 16px;
}
.highlight-timestamps {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.timestamp-input-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.timestamp-input-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.timestamp-input {
  width: 80px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--text-1);
  background: var(--cream);
}
.timestamp-input:focus {
  outline: none;
  border-color: var(--amber);
}
.timestamp-sep {
  color: var(--text-3);
  font-size: 13px;
}
.highlight-duration {
  font-size: 12px;
  color: var(--text-3);
  margin-left: auto;
}

/* Export Button */
.export-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: var(--charcoal);
  color: white;
  border: none;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.export-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #1a1a1a;
}
.export-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.export-btn.exporting {
  background: #F59E0B;
}

/* Empty State */
.clips-empty {
  text-align: center;
  padding: 60px 24px;
}
.clips-empty.hidden {
  display: none;
}
.empty-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-1);
  margin-top: 16px;
  margin-bottom: 8px;
}
.empty-subtext {
  font-size: 14px;
  color: var(--text-3);
}

/* Export All */
.export-all {
  margin-top: 24px;
  text-align: center;
}
.export-all.hidden {
  display: none;
}
.export-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--amber);
  color: var(--charcoal);
  border: none;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.export-all-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255,178,36,0.3);
}

/* Nav CTA */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--charcoal);
  color: white;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}
.nav-cta:hover {
  background: #1a1a1a;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.modal.hidden {
  display: none;
}
.modal-content {
  background: white;
  border-radius: 20px;
  padding: 40px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-3);
  cursor: pointer;
}
.modal-close:hover {
  color: var(--text-1);
}
.modal-icon {
  margin-bottom: 20px;
}
.modal-title {
  font-family: 'Sora', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 12px;
}
.modal-body {
  font-size: 15px;
  color: var(--text-2);
  margin-bottom: 24px;
}
.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  background: var(--charcoal);
  color: white;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}
.download-btn:hover {
  transform: translateY(-1px);
  background: #1a1a1a;
}
