/* Shahid4U – Base Styles (from design) */
:root {
  --blue:        #2563eb;
  --blue-dark:   #1e40af;
  --blue-deep:   #1e3a8a;
  --blue-mid:    #3b82f6;
  --dark:        #3b82f6;
  --blue-lt:     #93c5fd;
  --blue-soft:   #dbeafe;
  --blue-xlx:    #eff6ff;
  --blue-muted:  #60a5fa;
  --surface:     #ffffff;
  --surface-2:   #f8fafc;
  --border:      #e2e8f0;
  --border-blue: #bfdbfe;
  --text:        #0f172a;
  --text-2:      #334155;
  --muted:       #64748b;
  --red:         #ef4444;
  --red-dark:    #dc2626;
  --green:       #22c55e;
  --amber:       #f59e0b;
  --radius:      16px;
  --radius-sm:   10px;
  --radius-xs:   8px;
  --shadow:      0 1px 3px rgba(15,23,42,.04), 0 4px 12px rgba(37,99,235,.06);
  --shadow-md:   0 4px 20px rgba(37,99,235,.12);
  --shadow-lg:   0 12px 40px rgba(37,99,235,.16);
  --font:        'Tajawal', system-ui, -apple-system, sans-serif;
  --nav-h:       60px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
body {
  font-family: var(--font);
  background: var(--blue-xlx);
  color: var(--text);
  line-height: 1.7;
  min-height: 100svh;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  max-width: 100vw;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.skip-nav {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-nav:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 18px;
  margin: 0;
  clip: auto;
  background: var(--blue-deep);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  z-index: 9999;
  overflow: visible;
}

/* ── NAV ── */
.nav {
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 100%);
  height: var(--nav-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(30, 64, 175, .35);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -.3px;
  line-height: 1;
}
.nav-ball { font-size: 22px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.2)); }
.nav-name em { font-style: normal; color: var(--blue-lt); }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}
.live-pill-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  animation: blink 1.4s ease-in-out infinite;
  box-shadow: 0 0 8px var(--green);
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.25} }

/* ── HERO ── */
.hero {
  background-color: var(--blue);
  background-image:
linear-gradient(157deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.04) 12%, rgba(0,0,0,.03) 12%, rgba(0,0,0,.03) 24%, rgba(255,255,255,.05) 24%, rgba(255,255,255,.05) 43%, rgba(0,0,0,.04) 43%, rgba(0,0,0,.04) 54%, rgba(255,255,255,.03) 54%, rgba(255,255,255,.03) 71%, rgba(0,0,0,.05) 71%, rgba(0,0,0,.05) 93%, rgba(255,255,255,.04) 93%, rgba(255,255,255,.04) 100%),
    radial-gradient(ellipse 80% 55% at 50% -5%, rgba(147,197,253,.28), transparent 65%),
    linear-gradient(160deg, var(--blue-deep) 0%, var(--blue) 55%, var(--dark) 100%);
  color: #fff;
  position:relative;
  padding: 36px 20px 48px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position:absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(191,219,254,.18), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 16px;
  background: var(--blue-xlx);
  /*clip-path: ellipse(60% 100% at 50% 100%);*/
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
  backdrop-filter: blur(6px);
}
.hero-badge-dot {
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: blink 1.4s infinite;
  box-shadow: 0 0 6px var(--green);
}
.hero h1 {
  font-size: clamp(24px, 5.5vw, 40px);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -.4px;
  text-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.hero h1 em { font-style: normal; color: var(--blue-lt); }
.hero-sub {
  font-size: clamp(13.5px, 2.6vw, 16px);
  color: rgba(255,255,255,.82);
  max-width: 620px;
  margin: 0 auto 22px;
  line-height: 1.85;
}
.hero-sub strong { color: #fff; font-weight: 700; }

.chip-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 6px;
}
.chip {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.92);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 15px;
  border-radius: 999px;
  transition: all .2s ease;
  backdrop-filter: blur(4px);
}
.chip:hover {
  background: rgba(255,255,255,.22);
  transform: translateY(-1px);
}
.chip-hot {
  background: linear-gradient(135deg, rgba(239,68,68,.45), rgba(220,38,38,.35));
  border-color: rgba(239,68,68,.5);
  color: #fff;
  box-shadow: 0 2px 10px rgba(239,68,68,.25);
}

/* ── WRAP ── */
.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 8px 16px 48px;
}

/* ── DATE BAR ── */
.date-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
  box-shadow: var(--shadow);
}
.date-bar-left {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 800;
  color: var(--blue-deep);
}
.date-bar-right {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  background: var(--blue-xlx);
  padding: 4px 12px;
  border-radius: 999px;
}
.live-dot {
  width: 9px; height: 9px;
  background: var(--red);
  border-radius: 50%;
  flex-shrink: 0;
  animation: blink 1.4s infinite;
  box-shadow: 0 0 6px rgba(239,68,68,.5);
}

/* ── SEARCH ── */
.search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border-blue);
  border-radius: 14px;
  padding: 0 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}
.search-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12), var(--shadow);
}
.search-wrap .search-icon {
  color: var(--blue);
  font-size: 18px;
  flex-shrink: 0;
  opacity: .7;
}
.search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 15px 0;
  font: 600 14.5px var(--font);
  direction: rtl;
  color: var(--text);
  background: transparent;
}
.search-wrap input::placeholder { color: var(--muted); font-weight: 500; }

/* ── EPISODES BOX ── */
.episodes-box {
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid var(--border-blue);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ── STATES ── */
.state {
  text-align: center;
  padding: 52px 20px;
  background: var(--surface);
  color: var(--muted);
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--blue-soft);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .75s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.state h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.state p { font-size: 14px; line-height: 1.75; }
#error-state { display: none; }
.retry-btn {
  margin-top: 16px;
  padding: 11px 28px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  font-family: var(--font);
  transition: background .2s, transform .15s;
  box-shadow: 0 2px 10px rgba(37,99,235,.25);
}
.retry-btn:hover { background: var(--blue-dark); transform: translateY(-1px); }

/* ── EPISODE GRID ── */
.episode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
}
.episode-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s;
  position: relative;
}
.episode-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-soft);
}
.episode-card a { display: block; height: 100%; }

.episode-thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  background: linear-gradient(145deg, #dbeafe 0%, #bfdbfe 50%, #93c5fd 100%);
  overflow: hidden;
}
.episode-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.episode-card:hover .episode-thumb img { transform: scale(1.06); }

/* Placeholder when no image */
.episode-thumb .thumb-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--blue);
  font-size: 36px;
  opacity: .4;
  pointer-events: none;
  background: linear-gradient(145deg, #dbeafe 0%, #bfdbfe 50%, #93c5fd 100%);
}
.episode-thumb .thumb-fallback span {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
  opacity: .85;
}

.episode-number {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  color: #fff;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(30,64,175,.35);
  z-index: 2;
  letter-spacing: .02em;
}
.episode-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15,23,42,.45);
  opacity: 0;
  transition: opacity .25s ease;
  color: #fff;
  font-size: 42px;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
  z-index: 1;
}
.episode-card:hover .episode-play { opacity: 1; }

.episode-info {
  padding: 12px 13px 14px;
}
.episode-title {
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.55;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
  margin-bottom: 8px;
}
.episode-meta {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.episode-meta .watch-now {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue);
  font-weight: 700;
}
.episode-meta .time {
  font-variant-numeric: tabular-nums;
  opacity: .85;
}

/* ── PAGINATION ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 22px 0 6px;
}
.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--blue-deep);
  font: 800 13.5px var(--font);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all .2s ease;
}
.page-btn:hover:not(:disabled):not(.active) {
  background: var(--blue-xlx);
  border-color: var(--blue-soft);
}
.page-btn.active {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 12px rgba(37,99,235,.3);
}
.page-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ── SEO SECTION ── */
.section {
  background: var(--surface);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius);
  padding: 26px 24px;
  margin-top: 28px;
  box-shadow: var(--shadow);
}
.section-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--blue-deep);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--blue-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title em { font-style: normal; color: var(--blue); }
.section h3 {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-2);
  margin: 16px 0 6px;
}
.section p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.95;
  margin-bottom: 8px;
}
.section p:last-child { margin-bottom: 0; }
.section strong { color: var(--blue-deep); }
.section a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── FEATURES ── */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin: 18px 0 8px;
}
.feat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--blue-xlx);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  transition: background .2s;
}
.feat-item:hover { background: var(--blue-soft); }
.feat-icon { font-size: 20px; flex-shrink: 0; }

/* ── FAQ ── */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
}
.faq-item:last-child { border-bottom: none; padding-bottom: 0; }
.faq-q {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.faq-a {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.9;
}

/* ── FOOTER ── */
footer {
  background: linear-gradient(145deg, var(--blue-deep) 0%, var(--blue) 100%);
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 36px 20px 28px;
  font-size: 12.5px;
  margin-top: 36px;
}
footer strong {
  font-size: 16px;
  color: #fff;
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
}
.foot-sub {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  margin-bottom: 14px;
}
.foot-tags {
  display: flex;
  gap: 7px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 14px 0 16px;
}
.foot-tag {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.78);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 13px;
  border-radius: 999px;
  transition: background .2s;
}
.foot-tag:hover { background: rgba(255,255,255,.18); }
.foot-copy {
  opacity: .55;
  font-size: 11.5px;
  margin-top: 6px;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .episode-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
}
@media (max-width: 640px) {
  .nav { padding: 0 16px; }
  .nav-brand { font-size: 18px; }
  .hero { padding: 28px 16px 40px; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 18px 16px; }
  .episode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
  }
  .episode-info { padding: 10px 11px 12px; }
  .episode-title { font-size: 12.5px; min-height: 39px; }
  .page-btn { min-width: 36px; height: 36px; font-size: 13px; }
  .search-wrap { padding: 0 14px; }
  .search-wrap input { padding: 13px 0; font-size: 14px; }
}
@media (max-width: 380px) {
  .episode-grid { gap: 8px; padding: 10px; }
  .chip { font-size: 11.5px; padding: 5px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
