:root {
  --bg-primary: #0a0a0f;
  --bg-card: #12121a;
  --bg-input: #1a1a28;
  --border: #2a2a3a;
  --border-focus: #6366f1;
  --text: #e8e8f0;
  --text-secondary: #8888a0;
  --text-muted: #55556a;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
  --success: #22c55e;
  --error: #ef4444;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

img { max-width: 100%; height: auto; }

/* ========== HEADER ========== */

.site-header {
  padding: 1rem 1.5rem;
  padding-top: max(1rem, env(safe-area-inset-top, 0));
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  min-width: 0;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
}
.lang-wrap { margin: 0; }
.lang-select {
  padding: 0.45rem 2rem 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  max-width: 11rem;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238888a0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
}
.lang-select:focus { outline: none; border-color: var(--border-focus); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
[dir="rtl"] .nav-container { flex-direction: row; }
[dir="rtl"] .nav-right { flex-direction: row; }
[dir="rtl"] .lang-select {
  background-position: left 0.65rem center;
  padding: 0.45rem 0.65rem 0.45rem 2rem;
}
[dir="rtl"] .check-list li { padding: 0.65rem 2rem 0.65rem 0; }
[dir="rtl"] .check-list li::before { left: auto; right: 0; }
.logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; flex-shrink: 0; }
.logo-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--gradient); color: #fff; font-size: 1rem; font-weight: 700;
}
.logo-text { font-size: 1.3rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.logo-accent { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 0.25rem 0;
}
.nav-links a:hover { color: var(--text); opacity: 1; }

.home-alt-desc {
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  padding: 0 0.5rem;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ========== HERO ========== */

.hero {
  padding: 4rem 2rem 2rem;
  text-align: center;
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  box-sizing: border-box;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(600px, 100vw);
  height: min(400px, 70vw);
  max-width: 100%;
  background: radial-gradient(ellipse, rgba(99,102,241,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #fff 0%, #a5a5c0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  margin-bottom: 2.5rem;
  max-width: 560px;
  margin-inline: auto;
  line-height: 1.6;
}

/* ========== SEARCH BOX ========== */

.search-box {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  gap: 0.75rem;
  position: relative;
}
.search-box input {
  flex: 1;
  min-width: 0;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.search-box input::placeholder { color: var(--text-muted); }

.btn-primary {
  display: inline-block;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--radius);
  background: var(--gradient);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  white-space: nowrap;
  text-align: center;
  text-decoration: none;
  min-height: 48px;
}
.btn-primary:hover { opacity: 0.9; color: #fff; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ========== MAIN CONTENT ========== */

.main-content {
  flex: 1;
  max-width: 1000px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 0 2rem 3rem;
  box-sizing: border-box;
}

/* ========== RESULT CARD ========== */

.result-card {
  display: none;
  margin-top: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: slideUp 0.3s ease;
}
.result-card.visible { display: block; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.video-info {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
}
.video-thumb {
  width: 280px;
  min-width: 200px;
  aspect-ratio: 16/9;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-input);
  flex-shrink: 0;
}
.video-details { flex: 1; display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.video-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.video-channel { color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; }
.video-meta { display: flex; gap: 1rem; color: var(--text-muted); font-size: 0.85rem; margin-top: 0.25rem; flex-wrap: wrap; }
.video-meta span { display: flex; align-items: center; gap: 0.3rem; }

/* ========== FORMAT OPTIONS ========== */

.format-section { padding: 0 1.5rem 1.5rem; }
.format-section h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.format-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.format-btn {
  padding: 0.6rem 1.2rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 44px;
}
.format-btn:hover { border-color: var(--accent); color: var(--text); }
.format-btn.selected {
  border-color: var(--accent);
  background: rgba(99,102,241,0.12);
  color: var(--accent);
}
.format-btn .type-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  margin-right: 0.4rem;
}
.format-btn .type-badge.audio { background: rgba(139,92,246,0.2); color: #a78bfa; }
.format-btn .type-badge.video { background: rgba(99,102,241,0.2); color: #818cf8; }

/* ========== DOWNLOAD AREA ========== */

.download-area {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.btn-download {
  flex: 1;
  padding: 0.9rem 2rem;
  border: none;
  border-radius: var(--radius);
  background: var(--gradient);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  text-align: center;
  min-height: 48px;
}
.btn-download:hover { opacity: 0.9; }
.btn-download:active { transform: scale(0.98); }
.btn-download:disabled { opacity: 0.5; cursor: not-allowed; }

/* ========== SUBTITLE SECTION ========== */

.subtitle-section {
  display: none;
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}
.subtitle-section h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  margin-top: 1rem;
}
.subtitle-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}
.sub-lang-select {
  flex: 1;
  min-width: 180px;
  padding: 0.6rem 2.2rem 0.6rem 0.85rem;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238888a0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
}
.sub-lang-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.subtitle-btns {
  display: flex;
  gap: 0.5rem;
}
.btn-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 1.2rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 44px;
  white-space: nowrap;
}
.btn-subtitle:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(99,102,241,0.08);
  color: var(--accent);
}
.btn-subtitle:disabled { opacity: 0.45; cursor: not-allowed; }
.sub-icon { font-size: 1rem; }
.subtitle-hint {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
[dir="rtl"] .sub-lang-select {
  background-position: left 0.65rem center;
  padding: 0.6rem 0.85rem 0.6rem 2.2rem;
}

/* ========== PROGRESS ========== */

.progress-container { display: none; padding: 0 1.5rem 1.5rem; }
.progress-container.visible { display: block; }
.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 4px;
  width: 0%;
  transition: width 0.4s ease;
}
.progress-text {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

/* ========== STATUS MESSAGES ========== */

.status-msg {
  display: none;
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  animation: slideUp 0.2s ease;
  word-break: break-word;
}
.status-msg.visible { display: block; }
.status-msg.error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.status-msg.success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #86efac; }

/* Spinner */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== SEO CONTENT SECTIONS ========== */

.seo-section {
  margin-top: 4rem;
  animation: fadeIn 0.5s ease;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
  box-sizing: border-box;
}
.seo-section h2 {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  text-align: center;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Steps grid (How It Works) */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
  min-width: 0;
}
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.step-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  flex-shrink: 0;
}
.step-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.step-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Vertical steps (How-To pages) */
.steps-vertical {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.step-card-v {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.step-card-v:hover { border-color: var(--accent); }
.step-card-v .step-num { flex-shrink: 0; }
.step-card-v h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.step-card-v p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
  min-width: 0;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Formats table */
.formats-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.formats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 480px;
}
.formats-table th {
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.formats-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.formats-table tr:last-child td { border-bottom: none; }
.formats-table tr:hover td { background: rgba(99,102,241,0.04); }
.formats-table td:first-child { font-weight: 600; color: var(--text); white-space: nowrap; }
[dir="rtl"] .formats-table th,
[dir="rtl"] .formats-table td { text-align: right; }

/* ========== FAQ ========== */

.faq-preview { max-width: 800px; margin-left: auto; margin-right: auto; }
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item:hover, .faq-item[open] { border-color: var(--accent); }
.faq-item summary {
  padding: 1.1rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.faq-more {
  text-align: center;
  margin-top: 1.5rem;
  font-weight: 600;
}

/* ========== CTA LINK CARDS ========== */

.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1.5rem;
  width: 100%;
  min-width: 0;
}
.cta-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
  min-width: 0;
  max-width: 100%;
}
.cta-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  opacity: 1;
}
.cta-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.cta-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ========== PAGE CTA ========== */

.page-cta {
  text-align: center;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.page-cta--top { margin-top: 0; }

/* ========== CHECK LIST ========== */

.check-list {
  list-style: none;
  padding: 0;
  max-width: 700px;
  margin: 0 auto;
}
.check-list li {
  position: relative;
  padding: 0.65rem 0 0.65rem 2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}
.check-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

/* ========== PAGE INTRO ========== */

.page-intro {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 700px;
  width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ========== FOOTER ========== */

.site-footer {
  padding: 3rem 2rem 2rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.footer-grid {
  max-width: 900px;
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.footer-col .footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footer-col .footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.2s;
  padding: 0.15rem 0;
}
.footer-col .footer-links a:hover { color: var(--text-secondary); opacity: 1; }
.footer-copy {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

/* ========== CONTENT PAGES ========== */

.content-page {
  max-width: 800px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 3rem 2rem;
  flex: 1;
  box-sizing: border-box;
  overflow-x: clip;
}
.content-page h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
}
.content-page h2 { font-size: 1.3rem; font-weight: 700; margin-top: 2rem; margin-bottom: 0.75rem; color: var(--text); }
.content-page p { color: var(--text-secondary); line-height: 1.7; margin-bottom: 1rem; overflow-wrap: anywhere; word-break: break-word; }
.content-page ul { color: var(--text-secondary); line-height: 1.7; margin-bottom: 1rem; padding-left: 1.5rem; }
.content-page li { margin-bottom: 0.4rem; }

/* ========== ERROR PAGE ========== */

.error-page { text-align: center; padding: 6rem 2rem; }
.error-page h1 { font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; margin-bottom: 1rem; }
.error-page p { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 2rem; }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* --- Tablets & small laptops (max 1024px) --- */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- Tablets portrait & large phones (max 768px) --- */
@media (max-width: 768px) {
  .site-header { padding: 0.75rem 1rem; padding-top: max(0.75rem, env(safe-area-inset-top, 0)); }

  /* Stacked header: logo on first row, links + language full width (no JS, always usable) */
  .nav-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .logo { align-self: flex-start; }
  .nav-right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    flex: none;
    justify-content: flex-start;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
  }
  .nav-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem 1rem;
    width: 100%;
  }
  .nav-links a {
    padding: 0.45rem 0;
    font-size: 0.9rem;
    white-space: normal;
    line-height: 1.3;
    max-width: 100%;
  }
  .lang-select { width: 100%; max-width: none; font-size: 0.9rem; padding: 0.6rem 2.5rem 0.6rem 0.85rem; }

  .hero { padding: 2.5rem 1.25rem 1.5rem; }
  .hero p { margin-bottom: 2rem; }
  .search-box { flex-direction: column; }
  .search-box input { width: 100%; font-size: 16px; }
  .btn-primary { width: 100%; }

  .main-content { padding: 0 1.25rem 2.5rem; }

  .video-info { flex-direction: column; gap: 1rem; padding: 1.25rem; }
  .video-thumb { width: 100%; min-width: unset; }
  .format-section { padding: 0 1.25rem 1.25rem; }
  .download-area { padding: 0 1.25rem 1.25rem; }
  .progress-container { padding: 0 1.25rem 1.25rem; }

  .steps-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .cta-grid { grid-template-columns: 1fr; }
  .subtitle-section { padding: 0 1.25rem 1.25rem; }
  .subtitle-controls { flex-direction: column; }
  .sub-lang-select { width: 100%; min-width: unset; }
  .subtitle-btns { width: 100%; }
  .btn-subtitle { flex: 1; justify-content: center; }

  .seo-section { margin-top: 3rem; }
  .seo-section h2 { margin-bottom: 1.25rem; }

  .step-card { padding: 1.5rem 1.25rem; }
  .feature-card { padding: 1.5rem 1.25rem; }
  .cta-card { padding: 1.5rem 1.25rem; }

  .step-card-v { padding: 1.25rem; gap: 1rem; }

  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .site-footer { padding: 2rem 1.25rem 1.5rem; }

  .content-page { padding: 2rem 1.25rem; }

  .faq-item summary { padding: 1rem 1.25rem; font-size: 0.9rem; }
  .faq-item p { padding: 0 1.25rem 1rem; font-size: 0.875rem; }

  .error-page { padding: 4rem 1.25rem; }
}

/* --- Small phones (max 480px) --- */
@media (max-width: 480px) {
  .site-header { padding: 0.6rem 0.75rem; }
  .nav-right { padding: 0.75rem 1rem 1.25rem; }
  .logo-text { font-size: 1.15rem; }
  .logo-icon { width: 32px; height: 32px; font-size: 0.85rem; }

  .hero { padding: 2rem 1rem 1.25rem; }
  .hero p { font-size: 0.9rem; margin-bottom: 1.5rem; }

  .search-box input { padding: 0.85rem 1rem; }
  .btn-primary { padding: 0.85rem 1.5rem; font-size: 0.95rem; }

  .main-content { padding: 0 0.75rem 2rem; }

  .video-info { padding: 1rem; gap: 0.75rem; }
  .video-title { font-size: 1rem; }
  .video-channel { font-size: 0.85rem; }
  .video-meta { font-size: 0.8rem; }
  .format-section { padding: 0 1rem 1rem; }
  .format-section h3 { font-size: 0.8rem; margin-bottom: 0.75rem; }
  .format-grid { gap: 0.5rem; }
  .format-btn { padding: 0.5rem 0.9rem; font-size: 0.8rem; }
  .download-area { padding: 0 1rem 1rem; }
  .subtitle-section { padding: 0 1rem 1rem; }
  .progress-container { padding: 0 1rem 1rem; }
  .btn-download { padding: 0.85rem 1rem; font-size: 0.95rem; }

  .seo-section { margin-top: 2.5rem; }
  .step-card { padding: 1.25rem 1rem; }
  .step-num { width: 40px; height: 40px; font-size: 1rem; }
  .step-card h3, .step-card-v h3, .feature-card h3 { font-size: 0.95rem; }
  .step-card p, .step-card-v p, .feature-card p { font-size: 0.85rem; }

  .feature-card { padding: 1.25rem 1rem; }
  .feature-icon { font-size: 1.7rem; margin-bottom: 0.75rem; }

  .step-card-v { padding: 1rem; gap: 0.75rem; }
  .step-card-v .step-num { width: 40px; height: 40px; font-size: 1rem; }

  .formats-table { font-size: 0.8rem; min-width: 380px; }
  .formats-table th { padding: 0.75rem 0.85rem; }
  .formats-table td { padding: 0.65rem 0.85rem; }

  .faq-item summary { padding: 0.9rem 1rem; font-size: 0.875rem; gap: 0.75rem; }
  .faq-item p { padding: 0 1rem 0.85rem; font-size: 0.85rem; }

  .cta-card { padding: 1.25rem 1rem; }
  .cta-card h3 { font-size: 1rem; }
  .cta-card p { font-size: 0.85rem; }

  .page-cta .btn-primary { width: 100%; }

  .check-list li { font-size: 0.9rem; padding-left: 1.75rem; }

  .page-intro { font-size: 0.95rem; margin-bottom: 1.5rem; }

  .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 1.5rem; }
  .footer-col .footer-links { align-items: center; }
  .site-footer { padding: 1.5rem 0.75rem 1.25rem; }
  .footer-copy { font-size: 0.75rem; padding-top: 1.25rem; }

  .content-page { padding: 1.5rem 0.75rem; }
  .content-page h1 { margin-bottom: 1rem; }
  .content-page p { font-size: 0.9rem; }

  .error-page { padding: 3rem 0.75rem; }
}

/* --- Very small phones (max 360px) --- */
@media (max-width: 360px) {
  .hero { padding: 1.5rem 0.75rem 1rem; }
  .hero h1 { margin-bottom: 0.5rem; }
  .hero p { margin-bottom: 1.25rem; }

  .search-box { gap: 0.5rem; }
  .search-box input { padding: 0.75rem 0.85rem; font-size: 0.95rem; }
  .btn-primary { padding: 0.75rem 1rem; font-size: 0.9rem; }

  .main-content { padding: 0 0.5rem 1.5rem; }

  .format-btn { padding: 0.45rem 0.7rem; font-size: 0.75rem; }
  .format-btn .type-badge { font-size: 0.6rem; padding: 0.1rem 0.3rem; margin-right: 0.25rem; }

  .step-num { width: 36px; height: 36px; font-size: 0.9rem; }
  .step-card-v .step-num { width: 36px; height: 36px; font-size: 0.9rem; }

  .faq-item summary { padding: 0.85rem 0.85rem; font-size: 0.825rem; }
  .faq-item summary::after { font-size: 1.1rem; }
  .faq-item p { padding: 0 0.85rem 0.75rem; font-size: 0.8rem; }

  .formats-table { min-width: 320px; font-size: 0.75rem; }
  .formats-table th { padding: 0.6rem 0.6rem; }
  .formats-table td { padding: 0.55rem 0.6rem; }

  .nav-right { padding: 0.5rem 0.75rem 1rem; }
  .lang-select { padding: 0.55rem 2.5rem 0.55rem 0.75rem; }
}

/* --- Landscape phones --- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding: 1.5rem 2rem 1rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero p { margin-bottom: 1rem; }
  .seo-section { margin-top: 2rem; }
}

/* --- Large screens (min 1200px) --- */
@media (min-width: 1200px) {
  .main-content { max-width: 1100px; }
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}
