/* الألوان والخطوط — عدّلها من هنا */
:root {
  --ink: #0f1b33;
  --paper: #eef1f6;
  --card: #ffffff;
  --red: #d6342c;
  --red-dark: #b32922;
  --gold: #e8b04a;
  --muted: #5b6577;
  --line: #d9dfe9;
  --radius: 14px;
  --font-display: "Changa", "Tajawal", sans-serif;
  --font-body: "Tajawal", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- الهيدر ---------- */
.site-header { background: var(--ink); color: #fff; }
.site-header .wrap { display: flex; align-items: baseline; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.logo { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: 0; }
.logo b { color: var(--gold); }
.tagline { color: #aab4c8; font-size: 15px; }

/* ---------- الغلاف (الفيلم المميز) ---------- */
.cover { background: var(--ink); color: #fff; padding: 28px 0 48px; }
.cover .wrap { display: grid; grid-template-columns: 300px 1fr; gap: 36px; align-items: center; }
.cover .poster { aspect-ratio: 2 / 3; border-radius: var(--radius); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.cover h1 { font-family: var(--font-display); font-size: clamp(38px, 6vw, 68px); line-height: 1.15; margin-bottom: 10px; }
.cover .meta { color: var(--gold); font-weight: 700; margin-bottom: 14px; }
.cover p.desc { color: #d5dbe8; max-width: 52ch; margin-bottom: 22px; }
.cover .ad-box { max-width: 420px; margin-top: 18px; }

/* ---------- العناوين ---------- */
.section-title { font-family: var(--font-display); font-size: 28px; margin: 40px 0 20px; }

/* ---------- شبكة الأفلام ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px; padding-bottom: 60px; }
.card { background: var(--card); border-radius: var(--radius); padding: 14px; border: 1px solid var(--line); display: flex; flex-direction: column; }
.card .poster { aspect-ratio: 2 / 3; border-radius: 10px; margin-bottom: 12px; }
.card h3 { font-family: var(--font-display); font-size: 21px; line-height: 1.3; }
.card .meta { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.card .btn { margin-top: auto; }

/* ---------- البوستر (صورة أو لون بديل) ---------- */
.poster {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #263a66, #0f1b33 70%);
  display: flex; align-items: flex-end; justify-content: center;
}
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poster-title { position: relative; z-index: 1; width: 100%; padding: 40px 14px 14px; text-align: center; color: #fff; font-family: var(--font-display); font-size: 22px; background: linear-gradient(transparent, rgba(0,0,0,.7)); }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-block; text-align: center; border: 0; cursor: pointer;
  background: var(--red); color: #fff; font: 700 17px var(--font-body);
  padding: 12px 22px; border-radius: 10px; transition: background .15s;
}
.btn:hover { background: var(--red-dark); }
.btn[aria-disabled="true"] { background: #9aa4b5; cursor: not-allowed; pointer-events: none; }
.btn-block { display: block; width: 100%; }

/* ---------- مساحات الإعلانات ---------- */
.ad-box { margin-top: 14px; text-align: center; min-height: 90px; }
.ad-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.cover .ad-label { color: #aab4c8; }
.ad-placeholder {
  min-height: 90px; display: flex; align-items: center; justify-content: center;
  border: 2px dashed #b9c2d3; border-radius: 10px; color: #8791a5; font-size: 14px;
}
.cover .ad-placeholder { border-color: #4a5a80; color: #8f9bb8; }

/* ---------- صفحة الانتظار ---------- */
.wait { max-width: 640px; margin: 0 auto; padding: 36px 20px 70px; text-align: center; }
.wait h1 { font-family: var(--font-display); font-size: 34px; }
.wait .sub { color: var(--muted); margin-bottom: 8px; }
.ring { position: relative; width: 150px; height: 150px; margin: 28px auto 20px; }
.ring svg { transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring .bg { stroke: var(--line); }
.ring .fg { stroke: var(--red); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.ring .num { position: absolute; inset: 0; display: grid; place-items: center; font: 700 46px var(--font-display); }
.wait .note { color: var(--muted); font-size: 15px; margin-top: 14px; }
.back { display: inline-block; margin-top: 26px; color: var(--muted); text-decoration: underline; }

.site-footer { border-top: 1px solid var(--line); padding: 22px 0 40px; text-align: center; color: var(--muted); font-size: 14px; }

@media (max-width: 760px) {
  .cover .wrap { grid-template-columns: 1fr; }
  .cover .poster { max-width: 240px; margin: 0 auto; }
  .cover { text-align: center; }
  .cover p.desc, .cover .ad-box { margin-inline: auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto; } }
