/* yt320mp3 — dark take on the flvto layout. Logical properties keep RTL (Arabic) correct. */
:root {
  --page: #0e0e11;
  --band: #141317;
  --panel: #1a1a1f;
  --line: #2a2a32;
  --ink: #ececf2;
  --muted: #9d9da8;
  --head: #16161a;
  --foot-line: #23232a;
  --copy: #0c0c0e;
  --orange: #e54d1f;
  --orange-deep: #c93810;
  --orange-lo: #ff8c33;
  --green: #088b55;
  --green-hi: #0c9e63;
  --hard: #33333c;
  --circle: #111116;
  --soft-text: #c6c6ce;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #33333c #0e0e11; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: #0e0e11; }
::-webkit-scrollbar-thumb { background: #33333c; border-radius: 6px; border: 2px solid #0e0e11; }
::-webkit-scrollbar-thumb:hover { background: #c93810; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
body {
  background: var(--page);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
a { color: var(--orange-lo); text-decoration: none; }
a:hover { text-decoration: underline; }
.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;
}
#converter, #how, #faq { scroll-margin-top: 72px; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Header ---------- */
.site-header { width: 100%; background: var(--head); border-bottom: 1px solid var(--foot-line); position: relative; z-index: 20; }
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px; height: 58px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { color: #fff; font-size: 20px; font-weight: 800; letter-spacing: 0.4px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand span { color: var(--orange); }
.nav-links { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.nav-links a {
  display: inline-block; text-transform: uppercase; font-size: 13px; letter-spacing: 0.3px;
  color: var(--muted); padding: 18px 12px; white-space: nowrap;
}
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-links .nav-cta {
  background: var(--green); color: #fff; border-radius: 6px; padding: 9px 18px;
  margin-inline-start: 10px; font-weight: 700;
}
.nav-links .nav-cta:hover { background: var(--green-hi); }

/* Language menu: a plain <details> list of links (crawlable, no JS needed) */
.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
  background: #1f1f25; color: var(--ink); border: 1px solid #34343e; border-radius: 6px;
  padding: 6px 10px; font-size: 13px; font-weight: 700;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { border-color: var(--orange); }
.lang-menu summary svg { width: 16px; height: 16px; stroke-width: 1.8; }
.lang-menu ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); list-style: none;
  background: #1f1f25; border: 1px solid #34343e; border-radius: 8px; padding: 6px;
  min-width: 170px; max-height: 70vh; overflow-y: auto; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.lang-menu li a { display: block; padding: 7px 10px; border-radius: 5px; color: var(--ink); font-size: 14px; }
.lang-menu li a:hover { background: #2a2a32; text-decoration: none; }
.lang-menu li a[aria-current] { color: var(--orange-lo); font-weight: 700; }

.lang-suggest {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  background: #231a13; border-bottom: 1px solid #3a2a1d; color: #f1e3d6; font-size: 14px; padding: 8px 44px;
  position: relative;
}
.lang-suggest a { background: var(--orange); color: #fff; border-radius: 5px; padding: 4px 12px; font-weight: 700; }
.lang-suggest a:hover { background: var(--orange-deep); text-decoration: none; }
.lang-suggest button {
  position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: #d9c7b8; font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 8px;
}

/* ---------- Converter band ---------- */
.converter {
  position: relative; overflow: hidden; width: 100%;
  background: radial-gradient(1200px 420px at 50% -80px, #241b12, var(--band) 72%);
}
.converter-wrap {
  position: relative; max-width: 1200px; margin: 0 auto; padding: 46px 20px;
  display: flex; align-items: center; justify-content: center;
}
.decor {
  position: absolute; top: 50%; transform: translateY(-50%); width: 340px; height: 340px;
  border-radius: 50%; pointer-events: none; filter: blur(6px);
}
.decor-l { left: -130px; background: radial-gradient(circle, rgba(229, 77, 31, 0.34), transparent 65%); }
.decor-r { right: -130px; background: radial-gradient(circle, rgba(255, 140, 51, 0.26), transparent 65%); }
.converter-content {
  position: relative; min-height: 280px; width: 100%;
  display: flex; align-items: center; justify-content: center;
}
.converter-content::before {
  content: ""; position: absolute; top: 50%; left: 50%; width: 780px; height: 400px;
  transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(ellipse closest-side, rgba(229, 77, 31, 0.55), rgba(229, 77, 31, 0) 100%);
}
.converter-inner { position: relative; width: 65%; min-width: 320px; text-align: center; }
.adslot { margin: 0 0 22px; }
.url-input {
  display: block; width: 100%; padding: 15px; border: none; border-radius: 4px;
  font-size: 18px; color: #1c1c22; background: #f2efe9;
}
.url-input::placeholder { color: #6f6a64; }
.url-input:focus { outline: none; }
.url-input:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.hint {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0;
  color: #fff; font-size: 14px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.hint-ico { display: inline-flex; }
.hint-ico svg { width: 15px; height: 15px; stroke: #fff; stroke-width: 2; }
.actions { display: flex; align-items: stretch; justify-content: space-between; gap: 12px; }
.fmt { display: flex; align-items: stretch; }
.fmt-label {
  display: flex; align-items: center; background: var(--orange); color: #fff;
  border: 2px solid var(--hard); border-inline-end: 0; border-start-start-radius: 10px; border-end-start-radius: 10px;
  padding: 0 18px; font-weight: 700; font-size: 15px;
}
.fmt-sel {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background: var(--orange-deep) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23fff'/%3E%3C/svg%3E") no-repeat right 15px center;
  color: #fff; border: 2px solid var(--hard); border-inline-start: 0;
  border-start-end-radius: 10px; border-end-end-radius: 10px;
  padding: 12px 42px 12px 16px; font: 700 15px Arial, Helvetica, sans-serif; min-height: 48px;
}
[dir="rtl"] .fmt-sel { background-position: left 15px center; padding: 12px 16px 12px 42px; }
.fmt-sel:hover { background-color: #b5320e; }
.fmt-sel option { background: #1f1f25; color: #fff; }
.btn-convert {
  background: var(--green); color: #fff; border: 2px solid var(--hard); border-radius: 10px;
  padding: 0 34px; font-weight: 700; text-transform: uppercase; font-size: 15px; cursor: pointer;
  white-space: nowrap; min-height: 48px;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-convert:hover { background: var(--green-hi); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); }
button:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.terms { color: #fff; font-size: 13px; margin-top: 14px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.terms a { color: #fff; text-decoration: underline; }
.trust { display: flex; align-items: center; justify-content: center; gap: 8px 24px; flex-wrap: wrap; margin-top: 12px; }
.trust > span { display: inline-flex; align-items: center; gap: 6px; color: #e8e4dd; font-size: 13px; }
.trust .tck { width: 15px; height: 15px; stroke: var(--green-hi); stroke-width: 2.4; }

/* ---------- Status, results, Gigra ---------- */
.status { margin-top: 18px; min-height: 22px; font-size: 15px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.status.err { color: #ffb3a6; }
.status.ok { color: #b7ffd4; }
.bar { margin-top: 12px; height: 8px; border-radius: 5px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.bar > div { height: 100%; width: 0%; background: var(--green-hi); transition: width 0.3s ease; }
.bar.indeterminate > div { width: 35% !important; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { margin-inline-start: -35%; } to { margin-inline-start: 100%; } }
.search-results, .result {
  margin-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.25); padding-top: 14px; text-align: start;
}
.search-results .thumb {
  width: 72px; height: 48px; object-fit: cover; border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.35); flex-shrink: 0;
}
.result .title { font-size: 16px; font-weight: 600; color: #fff; }
.result .channel { color: #f2d9c8; font-size: 13px; margin-top: 2px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 16px; }
.badge {
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px; color: #fff; font-size: 12px; padding: 5px 12px;
}
.badge.out { border-color: #b7ffd4; color: #b7ffd4; font-weight: 700; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.file-row .f-info { flex: 1; min-width: 0; }
.file-row .f-title { font-size: 14px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-row .f-sub { color: #e7cdbb; font-size: 12px; margin-top: 2px; }
.file-btn {
  display: inline-block; background: var(--green); color: #fff; border: 2px solid var(--hard);
  border-radius: 8px; padding: 8px 18px; font-weight: 700; font-size: 13px; white-space: nowrap; cursor: pointer;
}
.file-btn:hover { background: var(--green-hi); text-decoration: none; }
.result-note { color: #f2d9c8; font-size: 13px; margin-top: 10px; }
.link-btn {
  background: none; border: 0; color: var(--orange-lo); text-decoration: underline; cursor: pointer;
  font-size: 14px; margin-top: 8px; padding: 0;
}
.gigra {
  display: flex; align-items: center; gap: 14px; margin-top: 18px; text-align: start;
  background: rgba(12, 12, 14, 0.72); border: 1px solid #4a3b2f; border-radius: 12px; padding: 14px 16px;
}
.gigra-text { flex: 1; min-width: 0; }
.gigra-text b { display: block; color: #fff; font-size: 15px; }
.gigra-text p { color: #e2d3c6; font-size: 13px; margin-top: 3px; }
.gigra-btn {
  background: var(--orange); color: #fff; border-radius: 8px; padding: 10px 16px;
  font-weight: 700; font-size: 13px; white-space: nowrap;
}
.gigra-btn:hover { background: var(--orange-deep); text-decoration: none; }

/* ---------- Main content ---------- */
.page { width: 100%; max-width: 1000px; margin: 0 auto; padding: 44px 24px 60px; }
.page h1 { font-size: 28px; font-weight: 700; color: #fff; letter-spacing: 0.2px; margin: 0 0 8px; line-height: 1.25; }
.page h1 span { color: var(--orange); }
.tagline { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 0 0 8px; }
.updated { color: #7c7c86; font-size: 13px; }
.crumbs { font-size: 13px; color: #7c7c86; margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.article { padding-top: 26px; }
.article h2 { font-size: 24px; font-weight: 600; color: #fff; margin: 40px 0 16px; }
.article h3 { font-size: 18px; color: #fff; margin: 22px 0 6px; }
.article p { color: var(--soft-text); font-size: 16px; line-height: 1.7; margin-bottom: 12px; }
.article ul, .article ol { margin: 6px 0 16px; padding-inline-start: 22px; }
.article li { color: var(--soft-text); font-size: 16px; line-height: 1.7; }
.article strong, .article b { color: #fff; }
.article code { background: #1f1f25; border: 1px solid #2f2f38; border-radius: 5px; padding: 1px 6px; font-size: 14px; }
.article table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 15px; }
.article th, .article td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--soft-text); }
.article th { color: #fff; background: var(--panel); }
.page-legal .article { padding-top: 10px; }
.page-404 { text-align: center; padding-top: 80px; }
.page-404 h1 { font-size: 64px; color: var(--orange); }
.btn-home { display: inline-block; margin-top: 18px; background: var(--green); color: #fff; border-radius: 8px; padding: 12px 22px; font-weight: 700; }

/* Steps — big counter circles */
.article ol.steps { list-style: none; counter-reset: step; margin: 8px 0 10px; padding: 0; }
.article .steps li { counter-increment: step; position: relative; margin: 0 0 22px; padding-inline-start: 44px; }
.article .steps li::before {
  content: counter(step); position: absolute; inset-inline-start: 0; top: -1px; width: 30px; height: 30px;
  line-height: 28px; text-align: center; background: var(--circle); border: 1px solid #33333c;
  border-radius: 50%; color: var(--orange); font-size: 16px; font-weight: 700;
}

/* Feature cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.feat {
  text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px 16px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.feat:hover { transform: translateY(-3px); border-color: #4a3b2f; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35); }
.feat b { display: block; margin: 14px 0 6px; color: #fff; font-size: 18px; }
.feat p { font-size: 14px; color: #bbbbc4; margin: 0; line-height: 1.6; }
.ft-ico { display: inline-flex; color: var(--orange); }
.ft-ico svg { width: 52px; height: 52px; stroke-width: 1.8; }

/* FAQ */
.faq-q { font-size: 17px; font-weight: 700; color: #fff; margin: 22px 0 4px; }
.article .faq-a { margin: 0 0 14px; }

/* Related tools */
.related { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0 !important; }
.related a {
  display: inline-block; background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; color: var(--ink); font-size: 14px;
}
.related a:hover { border-color: var(--orange); text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer { width: 100%; background: var(--head); margin-top: auto; border-top: 1px solid var(--foot-line); }
.footer-cols {
  max-width: 1000px; margin: 0 auto; padding: 30px 24px 18px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.footer-cols h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.6px; color: #fff; margin-bottom: 10px; }
.footer-cols ul { list-style: none; }
.footer-cols li { margin: 6px 0; }
.footer-cols a { color: var(--muted); font-size: 14px; }
.footer-cols a:hover { color: #fff; }
.footer-copy { background: var(--copy); border-top: 1px solid #1c1c21; }
.footer-copy-inner {
  max-width: 1000px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  color: #b9b9c2; font-size: 13px;
}
.footer-copy-inner .brand { font-size: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .decor { display: none; }
  .converter-wrap { padding: 40px 20px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .nav-links .nav-cta { display: none; }
  .nav-links a { padding: 18px 8px; font-size: 12px; }
}
@media (max-width: 600px) {
  .header-inner { height: 54px; padding: 0 14px; }
  .nav-links { display: none; }
  .brand { font-size: 17px; }
  .converter { background: linear-gradient(160deg, #2a180b, #14110c 75%); }
  .converter-wrap { padding: 18px 14px; }
  .converter-content { min-height: 220px; }
  .converter-inner { width: 100%; min-width: 0; padding: 0 4px; }
  .converter-content::before { width: 460px; height: 320px; }
  .url-input { font-size: 16px; padding: 13px 14px; }
  .actions { flex-direction: column; }
  .fmt, .btn-convert { width: 100%; }
  .fmt-sel { flex: 1; }
  .btn-convert { padding: 15px 20px; }
  .gigra { flex-direction: column; align-items: stretch; text-align: center; }
  .cards { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .page { padding: 34px 18px 50px; }
  .page h1 { font-size: 24px; }
  .article h2 { font-size: 21px; }
  .article table { font-size: 13px; }
  .lang-suggest { padding: 8px 40px 8px 14px; justify-content: flex-start; }
}
