/* ── Reset & Base ─────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #aeaeb2;
  --accent: #0071e3;
  --border: #d2d2d7;
  --card-bg: #fbfbfd;
  --error: #ff3b30;
  --error-bg: #fff2f2;
  --success-bg: #f0fff0;
  --radius: 16px;
  --radius-sm: 10px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
    "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ──────────────────────────────────────────── */
.header {
  padding: 20px 32px;
  display: flex;
  align-items: center;
}

.logo {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

/* ── Main ────────────────────────────────────────────── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 80px;
}

/* ── Footer ──────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 24px;
}

.disclaimer {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto;
}

/* ── Hero ────────────────────────────────────────────── */
.hero {
  text-align: center;
  max-width: 600px;
  width: 100%;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  color: var(--text);
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.5;
}

/* ── Input Group ─────────────────────────────────────── */
.input-group {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-bottom: 24px;
}

.url-input {
  flex: 1;
  height: 52px;
  padding: 0 20px;
  font-size: 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.url-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.url-input::placeholder {
  color: var(--text-tertiary);
}

.submit-btn {
  height: 52px;
  padding: 0 28px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: #1d1d1f;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
}

.submit-btn:hover {
  background: #000;
}

.submit-btn:active {
  transform: scale(0.98);
}

.submit-btn:disabled {
  background: var(--text-tertiary);
  cursor: not-allowed;
}

/* ── Platforms ───────────────────────────────────────── */
.platforms {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.platform-badge {
  font-size: 12px;
  color: var(--text-secondary);
  background: #f5f5f7;
  padding: 6px 14px;
  border-radius: 20px;
}

.platform-badge--more {
  color: var(--text-tertiary);
  background: transparent;
  border: 1px dashed var(--border);
}

/* ── Status / Spinner ────────────────────────────────── */
.status-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

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

.spinner--small {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-right: 6px;
}

.transcript-loading {
  color: var(--text-secondary) !important;
  font-style: italic;
}

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

.status-text {
  font-size: 15px;
  color: var(--text-secondary);
}

.status-sub {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ── Error ───────────────────────────────────────────── */
.error-area {
  margin-bottom: 24px;
}

.error-text {
  font-size: 15px;
  color: var(--error);
  background: var(--error-bg);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* ── Hidden ──────────────────────────────────────────── */
.hidden {
  display: none !important;
}

/* ── Result Page ─────────────────────────────────────── */
.result-container {
  max-width: 680px;
  width: 100%;
}

.back-link {
  display: inline-block;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 24px;
}

.back-link:hover {
  text-decoration: underline;
}

.result-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}

.result-card--success {
  border-color: #d2d2d7;
}

.result-card--error {
  border-color: var(--error);
  background: var(--error-bg);
}

.platform-tag {
  display: inline-block;
  font-size: 12px;
  color: var(--text-secondary);
  background: #f5f5f7;
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 16px;
  text-transform: capitalize;
}

.result-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  word-break: break-word;
}

.result-section {
  margin-bottom: 28px;
}

.result-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.result-desc {
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.result-desc--transcript {
  font-size: 16px;
  line-height: 2;
  padding: 20px;
  background: #fafafa;
  border-radius: var(--radius-sm);
  border: 1px solid #eee;
  color: #333;
}

.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  text-align: center;
  transition: background 0.2s, transform 0.1s;
}

.action-btn:active {
  transform: scale(0.98);
}

.action-btn--primary {
  color: #fff;
  background: #1d1d1f;
}

.action-btn--primary:hover {
  background: #000;
}

.action-btn--secondary {
  color: #1d1d1f;
  background: #fff;
  border: 1.5px solid var(--border);
}

.action-btn--secondary:hover {
  background: #f5f5f7;
}

/* ── Video Preview ───────────────────────────────────── */
.video-preview {
  margin-bottom: 24px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
}

.video-player {
  display: block;
  width: 100%;
  max-height: 480px;
  outline: none;
}

.error-message {
  font-size: 15px;
  color: var(--error);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 600px) {
  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .input-group {
    flex-direction: column;
  }

  .result-card {
    padding: 24px;
  }

  .result-title {
    font-size: 20px;
  }
}

