/* ─── Muvi website — dark glass, RTL, red accent ─────────────────────────── */

/* IRANSansX — self-hosted (same family as the iOS app's UI direction). */
@font-face {
  font-family: 'IRANSansX';
  src: url('/assets/fonts/IRANSansX-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IRANSansX';
  src: url('/assets/fonts/IRANSansX-Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IRANSansX';
  src: url('/assets/fonts/IRANSansX-DemiBold.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IRANSansX';
  src: url('/assets/fonts/IRANSansX-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IRANSansX';
  src: url('/assets/fonts/IRANSansX-ExtraBold.ttf') format('truetype');
  font-weight: 800; font-style: normal; font-display: swap;
}

:root {
  --bg: #0a0a0c;
  --card: rgba(255, 255, 255, 0.045);
  --card-border: rgba(255, 255, 255, 0.09);
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.6);
  --text-faint: rgba(255, 255, 255, 0.35);
  --accent: #e53935;
  --accent-dark: #c62828;
  --green: #34c759;
  --orange: #ff9f0a;
  --radius: 20px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'IRANSansX', 'Vazirmatn', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.8;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(229, 57, 53, 0.14), transparent),
    radial-gradient(ellipse 60% 40% at 90% 40%, rgba(229, 57, 53, 0.05), transparent);
  background-repeat: no-repeat;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 10, 12, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-inner {
  display: flex; align-items: center; gap: 28px;
  height: 64px;
}
/* ── MU▶I wordmark — replica of the app's native logo (MuviWordmark.swift):
      heavy white rounded letters, red play glyph as the V, LTR always. ── */
.wordmark {
  display: inline-flex; align-items: center; gap: 0.04em;
  direction: ltr; /* Latin wordmark stays LTR inside RTL layout */
  font-family: -apple-system, 'SF Pro Rounded', 'Arial Rounded MT Bold', system-ui, sans-serif;
  font-weight: 900; color: #fff; line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  user-select: none;
}
.wordmark .play {
  width: 0.62em; height: 0.68em; margin: 0 0.055em;
  filter: drop-shadow(0 1px 0.14em rgba(242, 51, 61, 0.55));
  flex-shrink: 0;
}
.wordmark .play polygon { fill: #f2333d; }
.nav .logo { font-size: 24px; }
.nav .logo .wordmark { font-size: 1em; }
.nav .links { display: flex; gap: 22px; font-size: 14px; color: var(--text-dim); }
.nav .links a:hover { color: var(--text); }
.nav .spacer { flex: 1; }
.nav .cta {
  background: #fff; color: #000; font-weight: 700; font-size: 14px;
  padding: 9px 22px; border-radius: 50px; border: none;
  transition: opacity 0.15s;
}
.nav .cta:hover { opacity: 0.85; }
@media (max-width: 640px) { .nav .links { display: none; } }

/* ── Hero ── */
.hero {
  display: flex; align-items: center; gap: 48px;
  padding: 72px 0 56px;
}
.hero-text { flex: 1; }
.hero h1 {
  font-size: clamp(30px, 5vw, 46px); font-weight: 800; line-height: 1.5;
}
.hero h1 .accent { color: var(--accent); }
.hero p.sub {
  font-size: 16px; color: var(--text-dim); margin: 18px 0 30px; max-width: 460px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 30px; border-radius: 50px; font-size: 15px; font-weight: 700;
  border: none; transition: transform 0.15s, opacity 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff; box-shadow: 0 6px 28px rgba(229, 57, 53, 0.35);
}
.btn-glass {
  background: var(--card); color: #fff;
  border: 1px solid var(--card-border);
}
.btn:hover { opacity: 0.9; }
.btn[aria-disabled="true"] { opacity: 0.4; cursor: default; pointer-events: none; }

@media (max-width: 860px) {
  .hero { flex-direction: column; text-align: center; padding-top: 48px; }
  .hero p.sub { margin-inline: auto; }
  .hero-ctas { justify-content: center; }
}

/* ── Phone mockup (pure CSS, no screenshots needed) ── */
.phone {
  width: 250px; height: 520px; flex-shrink: 0;
  border-radius: 42px; border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0d0d10;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(229, 57, 53, 0.08);
  padding: 14px; position: relative;
}
.phone::before {
  content: ''; position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 22px; background: #000; border-radius: 12px; z-index: 2;
}
.phone .screen {
  width: 100%; height: 100%; border-radius: 30px; overflow: hidden;
  background: linear-gradient(180deg, #131318, #0a0a0c);
  display: flex; flex-direction: column; padding: 40px 12px 12px;
  gap: 10px;
}
.phone .row { display: flex; gap: 8px; }
.phone .tile {
  flex: 1; aspect-ratio: 2 / 3; border-radius: 10px;
  background: linear-gradient(160deg, #2a2a33, #17171c);
  position: relative; overflow: hidden;
}
.phone .tile::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(200deg, rgba(229, 57, 53, 0.35), transparent 55%);
  opacity: 0.5;
}
.phone .tile.alt::after { background: linear-gradient(160deg, rgba(66, 133, 244, 0.3), transparent 55%); }
.phone .tile.alt2::after { background: linear-gradient(120deg, rgba(52, 199, 89, 0.25), transparent 55%); }
.phone .bar {
  height: 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.1);
}
.phone .bar.w60 { width: 60%; }
.phone .bar.w40 { width: 40%; }
.phone .chip-row { display: flex; gap: 6px; margin-top: 2px; }
.phone .chip {
  height: 20px; flex: 1; border-radius: 10px;
  background: rgba(229, 57, 53, 0.18); border: 1px solid rgba(229, 57, 53, 0.3);
}
.phone .chip.ghost { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.1); }
.phone .play-strip {
  margin-top: auto; height: 44px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex; align-items: center; padding: 0 12px; gap: 8px;
}
.phone .play-dot {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.phone .play-dot::after {
  content: ''; border-style: solid; border-width: 5px 8px 5px 0;
  border-color: transparent #fff transparent transparent; margin-right: 2px;
}
.phone .progress { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.15); position: relative; }
.phone .progress::after {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 45%;
  background: var(--accent); border-radius: 2px;
}

/* ── Sections ── */
section { padding: 56px 0; }
.section-title { font-size: 26px; font-weight: 800; text-align: center; margin-bottom: 8px; }
.section-sub { text-align: center; color: var(--text-dim); font-size: 14px; margin-bottom: 40px; }

/* Trending (TMDB) poster rows */
.row-title {
  font-size: 18px; font-weight: 800; margin: 26px 0 14px;
  display: flex; align-items: center; gap: 10px;
}
.row-title::before {
  content: ''; width: 4px; height: 20px; border-radius: 2px;
  background: var(--accent); display: inline-block;
}
.poster-row {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.poster-row::-webkit-scrollbar { display: none; }
.poster-card {
  flex: 0 0 138px; scroll-snap-align: start;
}
.poster-card .poster {
  width: 138px; height: 207px; border-radius: 14px; object-fit: cover;
  background: linear-gradient(160deg, #1c1c22, #121216);
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: block;
  transition: transform 0.2s, border-color 0.2s;
}
.poster-card:hover .poster { transform: translateY(-4px); border-color: rgba(229, 57, 53, 0.45); }
.poster-card .p-title {
  font-size: 12px; font-weight: 600; margin-top: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.poster-card .p-meta {
  font-size: 11px; color: var(--text-faint);
  display: flex; align-items: center; gap: 4px;
}
.poster-card .p-meta .star { color: #f5c518; font-size: 10px; }
.trending-loading { color: var(--text-faint); font-size: 13px; padding: 20px 0; }

/* Features */
.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px;
}
.feature {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 24px 20px;
}
.feature .ico {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 14px;
  background: rgba(229, 57, 53, 0.12);
}
.feature h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.feature p { font-size: 13px; color: var(--text-dim); }

/* Download */
.dl-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px;
}
.dl-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 22px 20px; text-align: center;
  transition: border-color 0.2s, transform 0.15s;
  display: block;
}
.dl-card:hover { border-color: rgba(229, 57, 53, 0.4); transform: translateY(-2px); }
.dl-card .ico { font-size: 30px; margin-bottom: 10px; }
.dl-card h3 { font-size: 15px; font-weight: 700; }
.dl-card p { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.dl-card .soon {
  display: inline-block; margin-top: 10px; font-size: 11px; font-weight: 700;
  color: var(--orange); background: rgba(255, 159, 10, 0.12);
  padding: 3px 12px; border-radius: 20px;
}
.dl-card[aria-disabled="true"] { opacity: 0.55; cursor: default; pointer-events: none; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.plan {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 26px 22px; text-align: center;
  position: relative;
}
.plan.popular { border-color: rgba(229, 57, 53, 0.5); }
.plan .badge {
  position: absolute; top: -12px; right: 50%; transform: translateX(50%);
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 14px; border-radius: 20px; white-space: nowrap;
}
.plan h3 { font-size: 16px; font-weight: 700; }
.plan .price { font-size: 26px; font-weight: 800; margin: 12px 0 2px; }
.plan .price small { font-size: 13px; font-weight: 400; color: var(--text-dim); }
.plan .base { font-size: 13px; color: var(--text-faint); text-decoration: line-through; min-height: 20px; }
.plan .off {
  display: inline-block; font-size: 11px; font-weight: 700; color: var(--green);
  background: rgba(52, 199, 89, 0.12); padding: 2px 10px; border-radius: 12px; margin-top: 4px;
}
.plan .btn { width: 100%; margin-top: 18px; padding: 12px; font-size: 14px; }
.plans-loading { text-align: center; color: var(--text-faint); font-size: 14px; padding: 30px; }

/* FAQ */
.faq { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq details {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 14px; padding: 16px 20px;
}
.faq summary { font-size: 14px; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { font-size: 13px; color: var(--text-dim); margin-top: 10px; }

/* Footer */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 32px 0; margin-top: 40px;
  text-align: center; font-size: 13px; color: var(--text-faint);
}
footer .foot-links { display: flex; gap: 20px; justify-content: center; margin-bottom: 12px; }
footer a:hover { color: var(--text-dim); }

/* ── Forms (auth / account) ── */
.form-wrap {
  max-width: 400px; margin: 48px auto; padding: 0 24px;
}
.form-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 24px; padding: 30px 24px;
}
.form-card h1 { font-size: 21px; font-weight: 800; margin-bottom: 4px; }
.form-card .hint { font-size: 13px; color: var(--text-dim); margin-bottom: 22px; }
.field { margin-bottom: 14px; }
.field input {
  width: 100%; background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 13px;
  color: #fff; padding: 13px 15px; font-size: 15px; font-family: inherit;
  text-align: right; direction: ltr; /* emails/passwords are LTR content */
}
.field input:focus { outline: none; border-color: rgba(229, 57, 53, 0.6); }
.field input::placeholder { color: var(--text-faint); direction: rtl; text-align: right; }
.field .err { font-size: 12px; color: #ff6b60; margin-top: 5px; display: none; }
.form-msg {
  font-size: 13px; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px;
  display: none; line-height: 1.7;
}
.form-msg.error { background: rgba(255, 59, 48, 0.12); border: 1px solid rgba(255, 59, 48, 0.3); color: #ff8a80; }
.form-msg.success { background: rgba(52, 199, 89, 0.1); border: 1px solid rgba(52, 199, 89, 0.3); color: #7ddc94; }
.form-card .btn { width: 100%; }
.form-foot { text-align: center; font-size: 13px; color: var(--text-dim); margin-top: 18px; }
.form-foot a { color: #fff; font-weight: 700; }
.tabs { display: flex; background: rgba(255,255,255,0.05); border-radius: 14px; padding: 4px; margin-bottom: 22px; }
.tabs button {
  flex: 1; background: none; border: none; color: var(--text-dim);
  font-size: 14px; font-weight: 700; padding: 9px; border-radius: 11px;
}
.tabs button.active { background: #fff; color: #000; }

/* Account rows */
.acc-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 16px; padding: 16px 18px; margin-bottom: 12px;
}
.acc-row .ico { font-size: 20px; }
.acc-row .lbl { font-size: 12px; color: var(--text-faint); }
.acc-row .val { font-size: 14px; font-weight: 700; }
.acc-row .tail { margin-right: auto; }
.pill {
  font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 20px;
  border: 1px solid;
}
.pill.green { color: var(--green); background: rgba(52,199,89,0.1); border-color: rgba(52,199,89,0.35); }
.pill.red { color: #ff6b60; background: rgba(255,59,48,0.1); border-color: rgba(255,59,48,0.35); }
.pill.orange { color: var(--orange); background: rgba(255,159,10,0.1); border-color: rgba(255,159,10,0.35); }
.pill.btn-like { cursor: pointer; }

/* Toast */
.toast {
  position: fixed; top: 16px; right: 50%; transform: translateX(50%);
  background: rgba(20, 20, 24, 0.95); border: 1px solid var(--card-border);
  border-radius: 14px; padding: 13px 20px; font-size: 13px; z-index: 100;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5); display: none; max-width: 90vw;
}
.toast.show { display: block; animation: slideDown 0.35s ease; }
.toast.error { border-color: rgba(255, 59, 48, 0.4); }
.toast.success { border-color: rgba(52, 199, 89, 0.4); }
@keyframes slideDown { from { opacity: 0; transform: translate(50%, -16px); } to { opacity: 1; transform: translate(50%, 0); } }

/* Terms page */
.prose { max-width: 720px; margin: 40px auto; padding: 0 24px; }
.prose h1 { font-size: 26px; font-weight: 800; margin-bottom: 20px; }
.prose h2 { font-size: 17px; font-weight: 700; margin: 26px 0 8px; }
.prose p, .prose li { font-size: 14px; color: var(--text-dim); }
.prose ul { padding-right: 20px; }
