/* ============================================================================
   ZL Explore (زل إكسبلور) — creators.html
   Region-based TikTok discovery, 100% driven by window.ZL_EXPLORER_DATA.
   Identity = the approved v47 template: Tajawal, sea #004F6C / cyan #00ABC7 /
   brown #996230 / gold #E6B563, sand #F6F2E9, ink #0E2F3D, pill controls,
   soft shadows, sandy backgrounds, a light wave in the hero.
   Loads ONLY on creators.html. Visual/content only.
   ========================================================================== */
:root{
  --zx-sea:#004F6C; --zx-sea-deeper:#063a4f; --zx-sea-700:#005f80;
  --zx-cyan:#00ABC7; --zx-cyan-ink:#017e93;
  --zx-brown:#996230; --zx-brown-d:#7c4e24;
  --zx-gold:#E6B563; --zx-gold-soft:#f0cf8f; --zx-gold-d:#d49f3e;
  --zx-ink:#0E2F3D; --zx-muted:#5F7480;
  --zx-sand:#F6F2E9; --zx-sand-2:#efe6d5; --zx-line:#e6dcc9; --zx-white:#fff;
  --zx-hr:22px; --zx-hr-sm:14px;
  --zx-sh-sm:0 6px 20px -8px rgba(14,47,61,.16);
  --zx-sh:0 14px 44px -14px rgba(14,47,61,.22);
  --zx-ez:cubic-bezier(.22,.61,.36,1);
  --zx-wrap:1200px;
  /* follow the site's live identity (Tajawal) via the shared vars */
  --zx-h:var(--font-heading,'Tajawal',system-ui,sans-serif);
  --zx-b:var(--font-arabic,'Tajawal',system-ui,sans-serif);
}
body{ background:var(--zx-sand); }
.zx-wrap{ font-family:var(--zx-b); color:var(--zx-ink); }
.zx-wrap *{ box-sizing:border-box; }
.zx-wrap h1,.zx-wrap h2,.zx-wrap h3{ font-family:var(--zx-h); }

/* ── Hero: deep-sea → cyan gradient + light wave, compact (≈260px) ─────────── */
.zx-hero{
  position:relative; overflow:hidden; text-align:center; color:#fff;
  padding:34px 20px 40px;
  background:linear-gradient(120deg,var(--zx-sea-deeper) 0%,var(--zx-sea) 44%,var(--zx-cyan) 100%);
}
.zx-hero::before{ /* warm gold breath, keeps it "light" not flat */
  content:''; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(120% 96% at 84% -10%,rgba(230,181,99,.26),transparent 58%);
}
.zx-hero::after{ /* light wave along the bottom edge + fade into the sand page */
  content:''; position:absolute; left:0; right:0; bottom:0; height:78px; pointer-events:none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1440' height='120' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath d='M0 70 C240 24 480 116 720 74 C960 34 1200 110 1440 66 L1440 120 L0 120 Z' fill='rgba(255,255,255,0.05)'/%3E%3Cpath d='M0 96 C300 60 540 122 780 92 C1020 62 1260 118 1440 90 L1440 120 L0 120 Z' fill='rgba(246,242,233,0.5)'/%3E%3C/svg%3E") bottom/100% 100% no-repeat;
}
.zx-hero-in{ position:relative; z-index:1; max-width:720px; margin:0 auto; }
.zx-hero h1{ font-weight:700; font-size:clamp(1.9rem,4.4vw,2.7rem); line-height:1.15; margin:0 0 8px; letter-spacing:-.01em; }
.zx-hero p{ font-size:1rem; line-height:1.6; opacity:.9; margin:0 auto 20px; max-width:520px; }
/* search — white container, big radius, soft shadow */
.zx-search{ position:relative; max-width:560px; margin:0 auto; }
.zx-search input{
  width:100%; box-sizing:border-box; padding:15px 52px; border:none; border-radius:100px;
  font-family:var(--zx-b); font-size:1rem; color:var(--zx-ink);
  background:#fff; box-shadow:0 16px 40px -16px rgba(0,26,38,.5);
}
.zx-search input::placeholder{ color:#93a2a8; }
.zx-search input:focus{ outline:3px solid var(--zx-gold); }
.zx-search .zx-s-ico{ position:absolute; top:50%; transform:translateY(-50%); inset-inline-start:20px;
  color:var(--zx-gold-d); font-size:1.05rem; pointer-events:none; }
.zx-search .zx-s-clear{ position:absolute; top:50%; transform:translateY(-50%); inset-inline-end:14px;
  width:30px; height:30px; border:none; border-radius:50%; background:#eef1f0; color:#6b7c83;
  cursor:pointer; display:none; align-items:center; justify-content:center; }
.zx-search.has-q .zx-s-clear{ display:flex; }

/* ── Region filter chips (v47 pills) ───────────────────────────────────────── */
.zx-filters-wrap{ position:sticky; top:72px; z-index:40; background:rgba(246,242,233,.94);
  backdrop-filter:blur(8px); border-bottom:1px solid var(--zx-line); }
.zx-filters{ max-width:var(--zx-wrap); margin:0 auto; padding:12px 20px; display:flex; gap:9px;
  flex-wrap:wrap; justify-content:center; }
.zx-chip{ flex:0 0 auto; display:inline-flex; align-items:center; gap:7px; background:#fff;
  border:1.5px solid var(--zx-line); color:#546169; border-radius:100px; padding:8px 17px;
  font-family:var(--zx-b); font-weight:700; font-size:.9rem; cursor:pointer; white-space:nowrap;
  transition:.2s var(--zx-ez); }
.zx-chip:hover{ border-color:var(--zx-gold); color:var(--zx-brown); transform:translateY(-1px); }
.zx-chip.active{ background:linear-gradient(135deg,var(--zx-gold),var(--zx-gold-d)); color:#3a2a10;
  border-color:var(--zx-gold); box-shadow:0 10px 22px -12px rgba(153,98,48,.7); }
.zx-chip-n{ font-weight:700; font-size:.76em; opacity:.75;
  background:rgba(14,47,61,.07); border-radius:100px; padding:1px 7px; }
.zx-chip.active .zx-chip-n{ background:rgba(0,0,0,.12); opacity:.9; }

/* ── Layout shell ──────────────────────────────────────────────────────────── */
#zxMain{ max-width:var(--zx-wrap); margin:0 auto; padding:20px 20px 72px; min-height:60vh; }
.zx-summary{ color:var(--zx-muted); font-size:.92rem; text-align:center; margin:6px 0 6px; }
.zx-summary b{ color:var(--zx-sea); font-weight:700; }
.zx-summary:empty{ display:none; }

/* section header (eyebrow + title + count + explore CTA) */
.zx-sec{ margin:30px 0 0; }
.zx-sec-head{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:0 0 16px; }
.zx-eyebrow{ display:inline-flex; align-items:center; gap:9px; color:var(--zx-brown);
  font-weight:700; font-size:.86rem; }
.zx-eyebrow::before{ content:''; width:24px; height:2px; background:var(--zx-cyan); border-radius:2px; }
.zx-sec-title{ font-weight:700; font-size:clamp(1.3rem,2.6vw,1.6rem); color:var(--zx-sea);
  margin:0; letter-spacing:-.01em; display:inline-flex; align-items:center; gap:10px; }
.zx-sec-title i{ color:var(--zx-gold-d); font-size:.9em; }
.zx-sec-count{ background:#fff; border:1px solid var(--zx-line); color:var(--zx-brown);
  border-radius:100px; padding:3px 12px; font-size:.8rem; font-weight:700; }
.zx-sec-exp{ margin-inline-start:auto; display:inline-flex; align-items:center; gap:7px;
  text-decoration:none; color:var(--zx-sea); border:1.5px solid var(--zx-line); background:#fff;
  border-radius:100px; padding:8px 16px; font-weight:700; font-size:.84rem; transition:.2s var(--zx-ez); }
.zx-sec-exp:hover{ border-color:var(--zx-cyan); color:var(--zx-cyan-ink); background:#f0fafc; transform:translateY(-1px); }

/* ── Grid: 4 / 3 / 2 / 1 at 1440 / 1024 / 768 / 390 ────────────────────────── */
.zx-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; }
@media(max-width:1179px){ .zx-grid{ grid-template-columns:repeat(3,1fr); } }
@media(max-width:991px){ .zx-grid{ grid-template-columns:repeat(2,1fr); gap:14px; } }
@media(max-width:619px){ .zx-grid{ grid-template-columns:1fr; gap:16px; } }

/* ── Immersive vertical video card ─────────────────────────────────────────── */
.zx-card{ position:relative; display:block; width:100%; aspect-ratio:3/4; border-radius:var(--zx-hr);
  overflow:hidden; background:#0b1f28; box-shadow:var(--zx-sh-sm); cursor:pointer;
  border:0; padding:0; text-align:start; font-family:var(--zx-b);
  transition:transform .3s var(--zx-ez),box-shadow .3s var(--zx-ez); }
.zx-card:hover{ transform:translateY(-6px); box-shadow:var(--zx-sh); }
.zx-card:focus-visible{ outline:3px solid var(--zx-gold); outline-offset:2px; }
.zx-card-img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  transition:transform .45s var(--zx-ez); }
.zx-card:hover .zx-card-img{ transform:scale(1.05); }
/* wave placeholder shown behind the image (also the loading look until it paints) */
.zx-card-fallback{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center;
  justify-content:center; gap:12px; color:#fff; text-align:center; padding:18px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='300' viewBox='0 0 400 300' preserveAspectRatio='none'%3E%3Cpath d='M0 210 C90 170 150 250 220 214 C290 178 340 236 400 206 L400 300 L0 300 Z' fill='rgba(255,255,255,0.05)'/%3E%3Cpath d='M0 244 C100 210 160 276 240 246 C320 216 360 268 400 246 L400 300 L0 300 Z' fill='rgba(255,255,255,0.06)'/%3E%3C/svg%3E") bottom/100% auto no-repeat,
    linear-gradient(150deg,#0b1f28,#123243 58%,#0d2733); }
.zx-card-fallback i{ font-size:1.7rem; color:var(--zx-gold); }
.zx-card-fallback strong{ font-family:var(--zx-h); font-size:1.02rem; }
.zx-card-grad{ position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(to top,rgba(4,18,26,.93) 0%,rgba(4,18,26,.5) 32%,rgba(4,18,26,.05) 60%,rgba(4,18,26,.12) 100%); }
.zx-card-badge{ position:absolute; top:12px; inset-inline-start:12px; z-index:2; display:inline-flex;
  align-items:center; gap:6px; background:rgba(4,18,26,.55); color:#fff; border-radius:100px;
  padding:5px 11px; font-size:.74rem; font-weight:700; backdrop-filter:blur(4px); }
.zx-card-badge i{ color:var(--zx-gold); font-size:.85em; }
.zx-play{ position:absolute; top:42%; left:50%; transform:translate(-50%,-50%); z-index:2;
  width:56px; height:56px; border-radius:50%; background:rgba(230,181,99,.95); color:#173241;
  display:flex; align-items:center; justify-content:center; font-size:1.15rem; padding-inline-start:3px;
  box-shadow:0 10px 26px rgba(0,0,0,.45); transition:transform .18s var(--zx-ez),background .18s; }
.zx-card:hover .zx-play{ transform:translate(-50%,-50%) scale(1.1); background:var(--zx-gold); }
.zx-card-body{ position:absolute; inset-inline:0; bottom:0; z-index:2; padding:14px 14px 13px; color:#fff; }
.zx-card-reg{ display:inline-flex; align-items:center; gap:6px; color:var(--zx-gold-soft);
  font-weight:700; font-size:.78rem; margin-bottom:5px; }
.zx-card-title{ font-size:.92rem; line-height:1.5; font-weight:600; margin:0;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  text-shadow:0 1px 8px rgba(0,0,0,.4); }
.zx-card-actions{ display:flex; align-items:center; gap:8px; margin-top:11px; }
.zx-watch{ flex:1; display:inline-flex; align-items:center; justify-content:center; gap:7px;
  background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.34); color:#fff;
  border-radius:100px; padding:8px 12px; font-family:var(--zx-b); font-weight:700; font-size:.8rem;
  backdrop-filter:blur(6px); transition:.2s var(--zx-ez); }
.zx-card:hover .zx-watch{ background:rgba(255,255,255,.26); }
.zx-tt{ flex:0 0 auto; width:36px; height:36px; border-radius:50%; display:inline-flex;
  align-items:center; justify-content:center; background:rgba(4,18,26,.5); border:1px solid rgba(255,255,255,.28);
  color:#fff; text-decoration:none; transition:.2s var(--zx-ez); }
.zx-tt:hover{ background:#000; }

/* ── "Show all region videos" / "load more" ────────────────────────────────── */
.zx-more{ margin:18px 0 0; text-align:center; }
.zx-more button{ background:#fff; border:1.5px solid var(--zx-line); color:var(--zx-sea);
  border-radius:100px; padding:11px 26px; font-family:var(--zx-b); font-weight:700; font-size:.88rem;
  cursor:pointer; display:inline-flex; align-items:center; gap:9px; transition:.2s var(--zx-ez); }
.zx-more button:hover{ border-color:var(--zx-gold); color:var(--zx-brown); background:#fffaf0; transform:translateY(-1px); }
.zx-more button i{ font-size:.8rem; }

/* ── Skeleton loading (matches the card box → no layout shift) ──────────────── */
.zx-skel{ position:relative; width:100%; aspect-ratio:3/4; border-radius:var(--zx-hr); overflow:hidden;
  background:#efe7d6; }
.zx-skel::after{ content:''; position:absolute; inset:0; transform:translateX(-100%);
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.6),transparent); animation:zxShimmer 1.25s infinite; }
[dir="rtl"] .zx-skel::after{ animation-name:zxShimmerRtl; }
@keyframes zxShimmer{ 100%{ transform:translateX(100%); } }
@keyframes zxShimmerRtl{ 100%{ transform:translateX(100%); } }
.zx-skel-note{ text-align:center; color:var(--zx-muted); font-size:.9rem; margin:20px 0 0;
  display:flex; align-items:center; justify-content:center; gap:9px; }
.zx-skel-note i{ color:var(--zx-gold-d); }

/* ── Error state — bounded card, never a huge empty page ───────────────────── */
.zx-state{ max-width:460px; margin:40px auto; background:#fff; border:1px solid var(--zx-line);
  border-radius:var(--zx-hr); box-shadow:var(--zx-sh-sm); padding:34px 26px; text-align:center; }
.zx-state-ico{ width:66px; height:66px; border-radius:50%; margin:0 auto 16px; display:flex;
  align-items:center; justify-content:center; font-size:1.6rem; }
.zx-state.err .zx-state-ico{ background:#fdecec; color:#c0453e; }
.zx-state.empty .zx-state-ico{ background:var(--zx-sand-2); color:var(--zx-brown); }
.zx-state h3{ font-size:1.3rem; color:var(--zx-sea); margin:0 0 8px; }
.zx-state p{ color:var(--zx-muted); line-height:1.7; margin:0 auto 20px; max-width:360px; }
.zx-state-btns{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
.zx-btn-primary{ display:inline-flex; align-items:center; gap:8px; background:var(--zx-sea); color:#fff;
  border:0; border-radius:100px; padding:11px 24px; font-family:var(--zx-b); font-weight:700; font-size:.88rem;
  cursor:pointer; text-decoration:none; transition:.2s var(--zx-ez); }
.zx-btn-primary:hover{ background:var(--zx-sea-deeper); transform:translateY(-1px); }
.zx-btn-primary i{ color:var(--zx-gold); }
.zx-btn-secondary{ display:inline-flex; align-items:center; gap:8px; background:#fff; color:var(--zx-sea);
  border:1.5px solid var(--zx-line); border-radius:100px; padding:11px 22px; font-family:var(--zx-b);
  font-weight:700; font-size:.88rem; cursor:pointer; text-decoration:none; transition:.2s var(--zx-ez); }
.zx-btn-secondary:hover{ border-color:var(--zx-cyan); color:var(--zx-cyan-ink); }

/* ── Video modal (click-to-load; one iframe at a time) ─────────────────────── */
.zx-modal{ position:fixed; inset:0; z-index:2000; display:none; align-items:center; justify-content:center;
  padding:20px; background:rgba(4,16,22,.82); backdrop-filter:blur(4px); }
.zx-modal.open{ display:flex; }
.zx-modal-dialog{ position:relative; width:100%; max-width:380px; background:#000; border-radius:18px;
  overflow:hidden; box-shadow:0 30px 80px rgba(0,0,0,.55); animation:zxPop .22s ease; }
@keyframes zxPop{ from{ opacity:0; transform:translateY(14px) scale(.97); } to{ opacity:1; transform:none; } }
.zx-modal-frame{ position:relative; width:100%; aspect-ratio:9/16; background:#000; max-height:82vh; }
.zx-modal-frame iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; display:block; }
.zx-modal-frame .zx-modal-load{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:var(--zx-gold); font-size:1.6rem; }
.zx-modal-cap{ background:#fff; padding:11px 14px; display:flex; align-items:center; gap:10px; }
.zx-modal-cap .zx-mc-reg{ font-family:var(--zx-h); font-weight:700; color:var(--zx-sea); font-size:.95rem; display:flex; align-items:center; gap:7px; }
.zx-modal-cap .zx-mc-reg i{ color:var(--zx-gold-d); }
.zx-modal-cap a{ margin-inline-start:auto; display:inline-flex; align-items:center; gap:6px; text-decoration:none; color:var(--zx-brown); font-weight:700; font-size:.82rem; }
.zx-modal-close{ position:absolute; top:10px; inset-inline-end:10px; z-index:5; width:38px; height:38px;
  border:none; border-radius:50%; background:rgba(0,0,0,.55); color:#fff; cursor:pointer; font-size:1rem;
  display:flex; align-items:center; justify-content:center; backdrop-filter:blur(3px); }
.zx-modal-close:hover{ background:rgba(0,0,0,.8); }

/* ── Mobile ────────────────────────────────────────────────────────────────── */
@media(max-width:768px){
  .zx-hero{ padding:24px 16px 34px; }
  .zx-hero p{ font-size:.94rem; }
  .zx-filters-wrap{ top:64px; }
  .zx-filters{ flex-wrap:nowrap; overflow-x:auto; justify-content:flex-start; padding:11px 14px;
    scrollbar-width:none; -ms-overflow-style:none; }
  .zx-filters::-webkit-scrollbar{ display:none; }
  #zxMain{ padding:14px 14px 96px; }   /* bottom room so floats never cover cards */
  .zx-sec{ margin-top:26px; }
  .zx-sec-exp{ margin-inline-start:0; }
}
@media(max-width:520px){
  .zx-hero h1{ font-size:1.7rem; }
  .zx-sec-head{ gap:9px; }
  .zx-sec-exp{ width:100%; justify-content:center; }
  .zx-modal{ padding:0; }
  .zx-modal-dialog{ max-width:none; height:100%; border-radius:0; display:flex; flex-direction:column; }
  .zx-modal-frame{ flex:1; aspect-ratio:auto; max-height:none; }
}
@media(prefers-reduced-motion:reduce){
  .zx-card,.zx-card-img,.zx-play,.zx-modal-dialog,.zx-skel::after{ transition:none; animation:none; }
}
