:root {
  --teal: #009b83;
  --teal-bright: #00d5b4;
  --green-dark: #082622;
  --yellow: #f2be10;
  --red: #f7003a;
  --purple: #38035d;
  --cream: #fbf8f4;
  --sand: #f4ece1;
  --ink: #1d2b29;
  --muted: #6b7672;
  --line: #e7e1d7;
  --white: #fff;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(8, 38, 34, .08);
  --font: "Noto Kufi Arabic", "Open Sans", Tahoma, sans-serif;
  --font-display: "Baloo Bhaijaan 2", "Noto Kufi Arabic", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.logo img { height: 44px; width: auto; }
.nav { display: flex; gap: 22px; margin-inline-start: 12px; }
.nav a { text-decoration: none; font-weight: 700; font-size: 15px; color: var(--green-dark); }
.nav a:hover { color: var(--teal); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 6px; padding: 10px 18px;
  font: 700 14px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform .15s, background .15s, color .15s;
}
.btn:active { transform: scale(.97); }
.btn-yellow { background: var(--yellow); color: var(--green-dark); margin-inline-start: auto; }
.btn-yellow:hover { background: #ffd43a; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: #00866f; }
.btn-ghost { background: transparent; color: var(--teal); box-shadow: inset 0 0 0 2px var(--teal); }
.btn-ghost:hover { background: var(--teal); color: #fff; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.play { width: 0; height: 0; border-block: 5px solid transparent; border-inline-end: 8px solid currentColor; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(0,213,180,.22), transparent 45%),
    radial-gradient(circle at 90% 90%, rgba(242,190,16,.16), transparent 40%),
    var(--green-dark);
  color: #fff;
  padding: 56px 0 76px;
}
.hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.eyebrow { margin: 0; color: var(--teal-bright); font-weight: 700; letter-spacing: .5px; }
.hero h1 {
  margin: 4px 0 6px; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(42px, 7vw, 72px); line-height: 1.1; color: #fff;
}
.hero-sub { margin: 0; font-size: 18px; opacity: .85; }
.film-strip {
  position: absolute; inset-inline: 0; bottom: 0; height: 22px;
  background:
    repeating-linear-gradient(90deg, transparent 0 14px, rgba(255,255,255,.18) 14px 28px) center / 100% 8px no-repeat,
    var(--yellow);
}

.next-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  padding: 18px; display: flex; gap: 16px; align-items: center;
  width: min(440px, 100%);
}
.next-card .poster { width: 84px; flex: none; }
.next-label { font-size: 13px; font-weight: 700; color: var(--yellow); margin: 0; }
.next-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; margin: 0; line-height: 1.25; }
.next-when { margin: 2px 0 10px; font-size: 14px; opacity: .85; }
.countdown { font-variant-numeric: tabular-nums; color: var(--teal-bright); font-weight: 700; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-cream { background: var(--cream); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.section h2 {
  margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 34px; color: var(--green-dark);
  position: relative; padding-bottom: 6px;
}
.section h2::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 48px; height: 4px; border-radius: 4px; background: var(--yellow); }

.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--teal); width: 18px; height: 18px; }

/* ---------- Day chips ---------- */
.day-chips {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 14px; margin-bottom: 8px;
  scrollbar-width: thin;
}
.chip {
  flex: none; display: flex; flex-direction: column; align-items: center; min-width: 76px;
  padding: 8px 12px; border-radius: 12px; border: 2px solid var(--line); background: #fff;
  text-decoration: none; color: var(--green-dark); transition: border-color .15s, background .15s;
}
.chip:hover { border-color: var(--teal); }
.chip .d-name { font-size: 12px; color: var(--muted); }
.chip .d-num { font-family: var(--font-display); font-size: 26px; font-weight: 800; line-height: 1.1; }
.chip.is-today { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.chip.is-today .d-name { color: var(--yellow); }
.chip.is-past { opacity: .45; }

/* ---------- Day blocks ---------- */
.day { margin-top: 28px; }
.day-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.day-head h3 { margin: 0; font-size: 20px; color: var(--green-dark); }
.badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--sand); color: var(--green-dark); }
.badge-today { background: var(--yellow); }
.badge-live { background: var(--red); color: #fff; }
.badge-done { background: #eceeed; color: var(--muted); }

.show {
  display: grid; grid-template-columns: 112px 64px 1fr auto; align-items: center; gap: 18px;
  padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.show.is-past { opacity: .5; box-shadow: none; }
.show.is-live { border-color: var(--red); box-shadow: 0 0 0 2px rgba(247,0,58,.15), var(--shadow); }
.time { text-align: center; border-inline-end: 2px dashed var(--line); padding-inline-end: 14px; }
.time-start { font-family: var(--font-display); font-size: 30px; font-weight: 800; color: var(--teal); line-height: 1.05; font-variant-numeric: tabular-nums; }
.time-end { font-size: 12px; color: var(--muted); white-space: nowrap; }
.show .poster { width: 64px; }
.show-info { min-width: 0; }
.show-title { margin: 0; font-size: 18px; font-weight: 700; color: var(--green-dark); line-height: 1.4; }
.show-title .en { display: block; font-family: "Open Sans", sans-serif; font-size: 13px; font-weight: 400; color: var(--muted); direction: ltr; text-align: right; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--cream); border: 1px solid var(--line); color: var(--ink); }
.tag-dur { background: #e6f6f3; border-color: #bfe9e1; color: #00705f; font-weight: 700; }
.show-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- Posters ---------- */
.poster {
  position: relative; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden;
  background: var(--c, var(--teal)); color: #fff;
}
.poster img { width: 100%; height: 100%; object-fit: cover; }
.poster .ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 8%; font-weight: 700; font-size: 11px; line-height: 1.3;
  background:
    linear-gradient(180deg, transparent 35%, rgba(0,0,0,.35)),
    repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 6px, transparent 6px 14px);
}
.poster .ph::before {
  content: ""; position: absolute; top: 12%; inset-inline-start: 50%; transform: translateX(50%);
  width: 30%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.2);
}

/* ---------- Movie grid ---------- */
.movie-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.movie {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; border: 1px solid var(--line);
}
.movie .poster { border-radius: 0; }
.movie .poster .ph { font-size: 22px; font-family: var(--font-display); }
.movie .poster-btn {
  position: absolute; inset: 0; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer;
}
.movie .poster-btn span {
  width: 56px; height: 56px; border-radius: 50%; background: rgba(242,190,16,.95); color: var(--green-dark);
  display: grid; place-items: center; transform: scale(.9); opacity: .9; transition: transform .2s, opacity .2s;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.movie .poster-btn span .play { border-block-width: 9px; border-inline-end-width: 14px; margin-inline-end: -3px; }
.movie:hover .poster-btn span { transform: scale(1.05); opacity: 1; }
.movie-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.movie-body h3 { margin: 0; font-size: 18px; color: var(--green-dark); line-height: 1.4; }
.movie-body h3 .en { display: block; font: 400 13px "Open Sans", sans-serif; color: var(--muted); direction: ltr; text-align: right; }
.times-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.times-list li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.times-list li b { color: var(--teal); font-variant-numeric: tabular-nums; }
.times-list li.is-past { color: var(--muted); text-decoration: line-through; }
.times-list li.is-past b { color: var(--muted); }
.movie-body .btn { margin-top: auto; }

.empty { color: var(--muted); padding: 24px; text-align: center; background: var(--cream); border-radius: var(--radius); }

/* ---------- Trailer dialog ---------- */
.trailer { border: 0; padding: 0; background: transparent; width: min(960px, 100% - 24px); max-width: none; }
.trailer::backdrop { background: rgba(8,38,34,.85); }
.trailer-box { background: #000; border-radius: var(--radius); overflow: hidden; }
.trailer-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--green-dark); color: #fff; }
.trailer-head h3 { margin: 0; font-size: 16px; }
.icon-btn { border: 0; background: rgba(255,255,255,.12); color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 16px; cursor: pointer; }
.icon-btn:hover { background: var(--yellow); color: var(--green-dark); }
.trailer-frame { aspect-ratio: 16 / 9; }
.trailer-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-dark); color: rgba(255,255,255,.8); padding: 28px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner img { height: 40px; width: auto; }
.footer-inner p { margin: 0; font-size: 14px; }
.footer-inner a { color: var(--yellow); text-decoration: none; }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .nav { display: none; }
  .hero { padding: 36px 0 60px; }
  .show { grid-template-columns: 78px 52px 1fr; gap: 12px; padding: 12px; }
  .show .poster { width: 52px; }
  .time { padding-inline-end: 10px; }
  .time-start { font-size: 24px; }
  .show-actions { grid-column: 1 / -1; }
  .show-actions .btn { flex: 1; }
  .movie-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .movie-body { padding: 12px; }
  .movie-body h3 { font-size: 15px; }
  .section h2 { font-size: 28px; }
}
@media (max-width: 380px) {
  .movie-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
