/* Mdluex IPTV landing page — the app's design language (brand red, bold type, rounded cards),
   light by default with a dark option; English and Arabic (right-to-left). */
@font-face {
  font-family: "Cairo"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(img/cairo-arabic.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF;
}
:root {
  --accent: #d11515; --accent2: #ff4a4a; --accent-ink: #fff;
  --bg: #f6f6f7; --bg2: #ffffff; --panel: #ffffff; --panel2: #f0f0f2; --line: #e4e4e8;
  --text: #141416; --muted: #5d5d68; --soft: #fdecec;
  --ok: #1f9d55; --warn: #c27b00; --bad: #c62828;
  --shadow: 0 1px 2px rgba(20,20,22,.06), 0 8px 30px rgba(20,20,22,.07);
  --radius: 14px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0a0a0c; --bg2: #111114; --panel: #17171b; --panel2: #202026; --line: #2c2c33;
  --text: #f4f4f6; --muted: #a2a2ae; --soft: rgba(209,21,21,.14);
  --ok: #2ecc71; --warn: #f5a524; --bad: #ff4d5e;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  /* the same fonts as the app: SamsungOne / Segoe UI for Latin, the bundled Cairo for Arabic */
  font-family: "SamsungOne", "Cairo", "SamsungOneArabic", "Segoe UI", Tahoma, "Noto Sans Arabic", Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 820px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 24px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 20px; letter-spacing: .2px; white-space: nowrap; }
.brand.small { font-size: 16px; }
.logo { height: 38px; width: auto; }
.brand.small .logo { height: 26px; }
.logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: block; }
.nav { display: flex; gap: 22px; margin-inline-start: auto; font-weight: 600; font-size: 15px; color: var(--muted); }
.nav a:hover { color: var(--accent); }
.tools { display: flex; gap: 8px; }
.tool { height: 40px; min-width: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.tool:hover { border-color: var(--accent); color: var(--accent); }
.tool.icon { padding: 0; width: 40px; }
.tool svg { width: 20px; height: 20px; }
.i-sun { display: none; }
[data-theme="dark"] .i-sun { display: block; }
[data-theme="dark"] .i-moon { display: none; }

/* ---------- hero ---------- */
.hero { padding: 56px 0 30px; background: radial-gradient(ellipse 70% 60% at 85% 20%, var(--soft), transparent 70%); }
.hero-in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.kicker, .eyebrow { color: var(--accent); font-weight: 800; font-size: 14px; letter-spacing: 1.5px; text-transform: uppercase; }
html[lang="ar"] .kicker, html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 15px; }
h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.08; font-weight: 900; margin: 10px 0 18px; letter-spacing: -.5px; }
html[lang="ar"] h1 { line-height: 1.35; letter-spacing: 0; }
.lead { font-size: 19px; color: var(--muted); max-width: 560px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }
.btn { height: 52px; padding: 0 26px; border-radius: 10px; display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px rgba(209,21,21,.28); }
.btn.primary:hover { background: #b80f0f; }
.btn.ghost { background: var(--panel); border-color: var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.version-line { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.version-line .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.tv { position: relative; }
.tv-screen { border-radius: 14px; overflow: hidden; border: 10px solid #141416; background: #000; box-shadow: 0 30px 60px rgba(20,20,22,.25); aspect-ratio: 16 / 9; }
.tv-screen img { width: 100%; height: 100%; object-fit: cover; }
.tv-stand { width: 34%; height: 14px; margin: 0 auto; background: linear-gradient(#2a2a2e, #141416); border-radius: 0 0 10px 10px; }

.note { display: flex; gap: 14px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-inline-start: 4px solid var(--accent); border-radius: var(--radius); padding: 16px 20px; margin: 10px 0 0; box-shadow: var(--shadow); }
.note svg { width: 24px; height: 24px; flex: none; color: var(--accent); margin-top: 2px; }
.note p { color: var(--muted); }

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.section.alt-bg { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; font-weight: 900; margin: 6px 0 10px; letter-spacing: -.3px; }
html[lang="ar"] h2 { line-height: 1.45; letter-spacing: 0; }
.sub { color: var(--muted); font-size: 17px; max-width: 680px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }

/* ---------- pick your TV ---------- */
.pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 30px; }
.pick-card { text-align: start; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 22px 20px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; color: var(--text); font: inherit; box-shadow: var(--shadow); transition: border-color .15s ease, transform .15s ease; }
.pick-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.pick-card.active { border-color: var(--accent); box-shadow: 0 0 0 4px var(--soft), var(--shadow); }
.pick-ico { width: 64px; height: 64px; border-radius: 16px; background: var(--panel2); display: grid; place-items: center; margin-bottom: 8px; }
.pick-ico img { width: 40px; height: 40px; }
.pick-card strong { font-size: 18px; font-weight: 800; }
.pick-card small { color: var(--muted); font-size: 14px; line-height: 1.45; }
.badge { margin-top: auto; align-self: flex-start; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; margin-top: 10px; }
.badge.easy { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge.medium { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.badge.hard { background: var(--soft); color: var(--accent); }

/* ---------- guides ---------- */
.guides { padding-top: 0; }
.guide { display: none; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 36px; box-shadow: var(--shadow); }
.guide.show { display: block; animation: rise .35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.guide-intro { color: var(--muted); max-width: 760px; margin-bottom: 8px; }
.steps { list-style: none; counter-reset: s; display: grid; gap: 18px; margin-top: 22px; }
.step { counter-increment: s; display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.step-art { border-radius: 12px; overflow: hidden; background: var(--panel2); }
.step-art img { width: 100%; height: auto; }
.step-art.wide { border-radius: 16px; box-shadow: var(--shadow); }
.step-text h3 { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 12px; margin-bottom: 6px; line-height: 1.35; }
.step-text h3::before { content: counter(s); flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 16px; font-weight: 900; display: grid; place-items: center; }
.step-text p { color: var(--muted); }
.step-text p + p { margin-top: 8px; }
.tip { font-size: 14px; background: var(--panel2); border-radius: 10px; padding: 8px 12px; }
.code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.code code { font-family: Consolas, "SF Mono", Menlo, monospace; font-size: 16px; font-weight: 700; color: var(--text); background: var(--panel2); border: 1px dashed var(--line); padding: 8px 12px; border-radius: 8px; word-break: break-all; }
.copy { height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.copy:hover { border-color: var(--accent); color: var(--accent); }
.link { color: var(--accent); font-weight: 700; }
.link:hover { text-decoration: underline; }
.small-print { color: var(--muted); font-size: 14px; margin-top: 18px; }
.alt { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; background: var(--bg); }
.alt summary { cursor: pointer; font-weight: 800; }
.mini { margin: 12px 0 0; padding-inline-start: 22px; color: var(--muted); display: grid; gap: 6px; }
.mini.big { font-size: 18px; gap: 10px; margin: 18px 0; color: var(--text); }

/* ---------- downloads ---------- */
.downloads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 26px; }
.dl-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); min-height: 190px; }
.dl-card .dl-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--panel2); display: grid; place-items: center; }
.dl-card .dl-ico img { width: 28px; height: 28px; }
.dl-card strong { font-size: 17px; font-weight: 800; }
.dl-card small { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.dl-card .btn { margin-top: auto; height: 44px; justify-content: center; font-size: 15px; }
.dl-card .meta { font-size: 12.5px; color: var(--muted); }
.skeleton { background: linear-gradient(90deg, var(--panel) 25%, var(--panel2) 50%, var(--panel) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.feat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.feat img { width: 46px; height: 46px; margin-bottom: 12px; }
.feat h3 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.feat p { color: var(--muted); font-size: 15px; }
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 26px; }
.shots figure { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.shots img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.shots figcaption { font-size: 13.5px; font-weight: 700; padding: 8px 12px; color: var(--muted); }

/* ---------- help ---------- */
.faq { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 12px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 22px; line-height: 1; }
.faq[open] summary::after { content: '–'; }
.faq p { padding: 0 20px 18px; color: var(--muted); }
#help .sub { margin-top: 20px; }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.contact-card { display: flex; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.contact-card:hover { border-color: var(--accent); }
.contact-card svg { width: 30px; height: 30px; flex: none; color: var(--accent); }
.contact-card strong { display: block; font-weight: 800; }
.contact-card small { color: var(--muted); font-size: 15px; }
@media (max-width: 680px) { .contact { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 30px 0 40px; color: var(--muted); font-size: 14px; }
.footer-in { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; }
.footer .brand { color: var(--text); }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-weight: 700; opacity: 0; transition: .25s ease; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- small screens ---------- */
@media (max-width: 980px) {
  .hero-in, .two { grid-template-columns: 1fr; gap: 30px; }
  .pick, .downloads { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .step { grid-template-columns: 220px 1fr; }
}
@media (max-width: 680px) {
  .nav { display: none; }
  .tools { margin-inline-start: auto; }
  .topbar-in { gap: 12px; }
  .hero { padding-top: 34px; }
  .lead { font-size: 17px; }
  .pick, .downloads, .features { grid-template-columns: 1fr; }
  .guide { padding: 20px 16px; border-radius: 16px; }
  .step { grid-template-columns: 1fr; gap: 14px; }
  .section { padding: 54px 0; }
}
