:root {
  color-scheme: dark;
  --bg: #101012;
  --ink: #f7f5f1;
  --muted: #aaa8b1;
  --red: #e43d42;
  --line: #ffffff18;
  --max: 1440px;
  font-family: system-ui, -apple-system, "Noto Sans Arabic", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); }
button, input, a { font: inherit; }
button { color: inherit; }

.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 40px; max-width: var(--max); height: 76px; margin: auto; padding: 0 5.2%; border-bottom: 1px solid #ffffff12; background: #101012eF; backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-family: system-ui, sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -1px; text-decoration: none; direction: ltr; }
.brand-mark { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; background: var(--red); color: white; font-size: 17px; font-style: italic; box-shadow: 0 5px 22px #e43d4240; }
.brand-light { color: #aaa; font-weight: 500; }
.main-nav { display: flex; flex: 1; align-items: center; gap: 25px; }
.nav-link, .footer-links button { padding: 8px 0; border: 0; background: none; color: #c4c2ca; font-size: 13px; cursor: pointer; transition: .2s; }
.nav-link:hover, .nav-link.active { color: white; }
.nav-link.active { font-weight: 700; }
.nav-link span { color: var(--red); font-size: 10px; }
.top-actions { display: flex; align-items: center; gap: 15px; }
.search-box { display: flex; align-items: center; gap: 8px; width: 190px; height: 38px; padding: 0 11px; border: 1px solid #ffffff25; border-radius: 7px; background: #111116aa; color: #bbb; }
.search-box span { font-size: 22px; line-height: 1; }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; background: none; color: white; font-size: 12px; }
.search-box input::placeholder { color: #888; }
.avatar { width: 32px; height: 32px; border: 0; border-radius: 7px; background: linear-gradient(135deg,#e44a55,#8533a8); font-weight: 700; cursor: pointer; }

.hero { position: relative; display: flex; align-items: center; min-height: 495px; max-height: 680px; height: min(625px,72vw); overflow: hidden; background: radial-gradient(ellipse at 74% 43%,#7d342b 0,#42231f 17%,#242024 35%,#121216 64%); }
.hero-photo { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 38%; opacity: .88; filter: saturate(1.12); }
.hero-photo[hidden] { display: none; }
.hero::before { position: absolute; z-index: 1; inset: 0; background: linear-gradient(270deg,#101012f5 0%,#101012d9 29%,#10101270 61%,#10101212 100%),linear-gradient(0deg,#101012 0%,transparent 34%); content: ""; }
.hero-art { position: absolute; z-index: 1; inset: 0; overflow: hidden; background: radial-gradient(ellipse at 68% 40%,color-mix(in srgb,var(--hero-accent,#e77e48),transparent 65%) 0,color-mix(in srgb,var(--hero-accent,#e77e48),transparent 82%) 17%,transparent 41%); opacity: .42; pointer-events: none; }
.hero-orb { position: absolute; top: 12%; right: 18%; width: min(41vw,560px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 34%,var(--hero-highlight,#f4b66e),var(--hero-accent,#b55746) 43%,#4c262e 72%,transparent 73%); opacity: .82; box-shadow: 0 0 100px color-mix(in srgb,var(--hero-accent,#e26039),transparent 68%); }
.hero-horizon { position: absolute; right: 0; bottom: 6%; width: 75%; height: 34%; opacity: .83; background: linear-gradient(180deg,#694044,#32252f 58%,#17171d); clip-path: polygon(0 55%,12% 48%,22% 62%,39% 24%,47% 44%,59% 30%,68% 58%,81% 36%,100% 50%,100% 100%,0 100%); }
.hero-horizon::after { position: absolute; inset: 45% 0 0; background: linear-gradient(180deg,#211d26,#121216); content: ""; }
.hero-grain { position: absolute; inset: 0; opacity: .18; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E"); mix-blend-mode: soft-light; }
.hero-content { position: relative; z-index: 2; width: min(590px,54%); margin: 0 9.2% 14px 0; }
.eyebrow, .section-overline { margin: 0 0 12px; color: #f17b7e; font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: #ed5157; box-shadow: 0 0 12px #f04; }
.hero-kicker { margin: 22px 0 5px; color: #d0c5bd; font-size: 13px; }
.hero h1 { margin: 0 0 14px; font-size: clamp(40px,5.8vw,74px); font-weight: 800; line-height: 1.2; letter-spacing: -2.5px; }
.hero h1 em { color: #f4aaa0; font-style: normal; }
.hero-copy { max-width: 435px; margin: 0 0 16px; color: #ddd5d2; font-size: 14px; line-height: 1.9; }
.hero-meta { display: flex; align-items: center; gap: 12px; color: #dbd9df; font-size: 11px; }
.badge { padding: 3px 8px; border: 1px solid #ffffff29; border-radius: 3px; background: #ffffff20; color: #fff; }
.quality { padding: 1px 5px; border: 1px solid #aaa; border-radius: 3px; font-size: 9px; }
.hero-buttons { display: flex; gap: 10px; margin-top: 23px; }
.button { display: flex; align-items: center; gap: 9px; padding: 11px 17px; border: 0; border-radius: 5px; font-size: 13px; font-weight: 700; cursor: pointer; transition: transform .2s,background .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: #f2eee9; color: #161416; }
.button-primary:hover { background: white; }
.button-secondary { border: 1px solid #ffffff1e; background: #ffffff20; color: white; }
.button-secondary:hover { background: #ffffff30; }
.button span { font-size: 17px; }
.hero-credit { margin-top: 18px; color: #b9a8a4; font-size: 10px; }
.hero-side-note { position: absolute; bottom: 20%; left: 5.5%; z-index: 2; display: flex; align-items: center; gap: 9px; color: #c9c5c8; font-size: 10px; direction: ltr; }
.hero-side-note i { display: block; width: 47px; height: 2px; background: linear-gradient(90deg,var(--red) 25%,#ffffff55 25%); }

.browse-section { max-width: var(--max); margin: auto; padding: 26px 5.2% 58px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.section-overline { margin-bottom: 4px; color: #92909a; font-size: 10px; }
.section-heading h2, .notice-band h2 { margin: 0; font-size: 22px; font-weight: 700; }
.section-description { margin: 5px 0 0; color: #aaa8b1; font-size: 12px; }
.genre-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.genre-pill { padding: 7px 14px; border: 1px solid #ffffff19; border-radius: 99px; background: #1c1c21; color: #bcbac2; font-size: 11px; cursor: pointer; transition: .2s; }
.genre-pill:hover, .genre-pill.selected { border-color: #f5f1ed; background: #f5f1ed; color: #1a191a; font-weight: 700; }
.movie-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 30px 18px; }
.movie-card { position: relative; min-width: 0; cursor: pointer; }
.poster { position: relative; isolation: isolate; width: 100%; height: auto; aspect-ratio: 1.76; overflow: hidden; border: 1px solid #ffffff1b; border-radius: 10px; background: var(--poster-bg,#342126); cursor: pointer; transition: transform .28s,box-shadow .28s,border-color .28s; }
.movie-card:hover .poster { transform: scale(1.035); box-shadow: 0 14px 35px #0009; }
.poster:hover { border-color: #ffffff58; }
.poster-image { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.poster:hover .poster-image { transform: scale(1.07); }
.poster::before { position: absolute; z-index: 1; inset: 0; background: linear-gradient(180deg,#08080a20 0%,transparent 35%,#08080a9c 100%); content: ""; opacity: .95; }
.poster::after { position: absolute; z-index: 2; inset: 48% -5% -20%; background: linear-gradient(180deg,#1b1b1c00,#0a0b10 74%); clip-path: polygon(0 35%,17% 26%,27% 41%,41% 7%,51% 28%,66% 22%,78% 46%,100% 25%,100% 100%,0 100%); content: ""; opacity: .55; }
.poster-art { position: absolute; z-index: 3; inset: 0; display: flex; align-items: flex-end; padding: 16px; }
.poster-title { max-width: 85%; font-family: system-ui,sans-serif; font-size: clamp(17px,2.1vw,26px); font-weight: 800; line-height: 1; letter-spacing: -.8px; text-align: left; text-shadow: 0 3px 12px #000; white-space: pre-line; direction: ltr; }
.poster-symbol { position: absolute; z-index: 4; top: 13px; right: 13px; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #fff9; border-radius: 50%; background: #111b; color: white; font-family: serif; font-size: 14px; transition: transform .2s,background .2s; }
.poster:hover .poster-symbol { transform: scale(1.1); background: var(--red); }
.film-badge { position: absolute; z-index: 4; right: 12px; bottom: 12px; padding: 5px 8px; border: 1px solid #ffffff4d; border-radius: 4px; background: #111c; color: #fff; font-size: 9px; font-weight: 700; backdrop-filter: blur(7px); }
.card-save { position: absolute; z-index: 5; top: 10px; left: 10px; width: 31px; height: 31px; border: 1px solid #ffffff67; border-radius: 50%; background: #090a137a; color: white; font-size: 17px; line-height: 1; cursor: pointer; backdrop-filter: blur(8px); }
.card-save.saved { border-color: #ff7a7d; background: #2a1118dc; color: #ff7a7d; }
.movie-card h3 { overflow: hidden; margin: 12px 2px 6px; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { display: flex; align-items: center; gap: 8px; margin: 0 2px; color: #aaa8b1; font-size: 11px; }
.card-meta span + span::before { margin-left: 8px; color: #666; content: "·"; }
.empty-state { padding: 55px 10px; color: var(--muted); text-align: center; }
.empty-state > span { color: #ec5559; font-size: 30px; }
.empty-state h3 { margin: 4px; color: white; }
.empty-state p { font-size: 13px; }
.text-button { border: 0; background: none; color: #f28d8f; font-size: 13px; cursor: pointer; }
.notice-band { display: flex; align-items: center; gap: 17px; max-width: calc(var(--max) - 10.4%); margin: 0 auto 68px; padding: 26px 28px; border: 1px solid #ffffff14; border-radius: 11px; background: linear-gradient(110deg,#1d171a,#19191c); }
.notice-icon { display: grid; flex: none; width: 40px; height: 40px; place-items: center; border-radius: 10px; background: #e43d4226; color: #f37b80; font-size: 23px; }
.notice-band h2 { font-size: 16px; }
.notice-band p { margin: 5px 0 0; color: #aaa8b1; font-size: 11px; line-height: 1.8; }
.notice-band a { margin-right: auto; color: #f28d8f; font-size: 11px; text-decoration: none; white-space: nowrap; }

.footer { display: flex; flex-wrap: wrap; align-items: center; gap: 15px 26px; max-width: var(--max); margin: auto; padding: 29px 5.2% 26px; border-top: 1px solid var(--line); color: #85838b; }
.footer-brand { font-size: 16px; }
.footer-brand .brand-mark { width: 23px; height: 23px; font-size: 14px; }
.footer p { margin: 0; font-size: 10px; }
.footer-links { display: flex; align-items: center; gap: 18px; margin-right: auto; }
.footer-links button, .footer-links a { color: #aaa8b1; font-size: 10px; text-decoration: none; }
.footer small { width: 100%; color: #6f6d75; font-size: 9px; }

.player-dialog, .info-dialog { position: relative; width: min(900px,calc(100% - 28px)); padding: 0; overflow: visible; border: 1px solid #ffffff22; border-radius: 12px; background: #17171b; color: white; box-shadow: 0 22px 90px #000b; }
.player-dialog::backdrop, .info-dialog::backdrop { background: #050507d9; backdrop-filter: blur(5px); }
.dialog-close { position: absolute; z-index: 3; top: -13px; left: -13px; width: 36px; height: 36px; border: 1px solid #ffffff55; border-radius: 50%; background: #242429; color: white; font-size: 24px; cursor: pointer; }
.player-frame { overflow: hidden; aspect-ratio: 16/9; border-radius: 12px 12px 0 0; background: #08080a; }
.player-frame iframe { width: 100%; height: 100%; border: 0; }
.player-info { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 22px 8px; }
.player-info h2 { margin: 0 0 7px; font-size: 20px; }
.player-info p:not(.section-overline) { margin: 0; color: #aaa8b1; font-size: 12px; line-height: 1.8; }
.player-info > a, .info-actions > a { padding: 9px 12px; border: 1px solid #ffffff22; border-radius: 5px; background: #ffffff13; color: white; font-size: 10px; text-decoration: none; white-space: nowrap; }
.license-note { margin: 8px 0 0; padding: 13px 22px 16px; border-top: 1px solid #ffffff16; color: #9c9aa3; font-size: 10px; }
.info-dialog { max-width: 500px; padding: 30px; }
.info-dialog .dialog-close { top: 12px; left: 12px; }
.info-dialog h2 { margin: 0 0 13px; font-size: 25px; }
.info-dialog > p:not(.section-overline) { color: #b7b5bc; font-size: 13px; line-height: 1.9; }
.info-actions { display: flex; gap: 9px; margin-top: 20px; }
.toast { position: fixed; z-index: 10; bottom: 22px; left: 50%; padding: 10px 16px; transform: translate(-50%,16px); border-radius: 6px; background: #f3efeb; color: #171619; font-size: 12px; opacity: 0; pointer-events: none; transition: .25s; box-shadow: 0 5px 25px #0008; }
.toast.show { transform: translate(-50%,0); opacity: 1; }

@media (max-width: 940px) {
  .topbar { gap: 22px; padding: 0 4%; }
  .main-nav { gap: 16px; }
  .main-nav .nav-link { font-size: 11px; }
  .search-box { width: 145px; }
  .hero { height: 570px; }
  .hero-content { width: 58%; margin-right: 7%; }
  .movie-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .notice-band { max-width: 92%; }
}
@media (max-width: 650px) {
  .topbar { height: 64px; gap: 15px; padding: 0 17px; }
  .brand { font-size: 19px; }
  .brand-mark { width: 25px; height: 25px; }
  .main-nav { position: absolute; top: 64px; right: 0; left: 0; height: 38px; overflow: auto; gap: 21px; padding: 0 17px; background: #111113; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar, .genre-pills::-webkit-scrollbar { display: none; }
  .main-nav .nav-link { padding: 8px 0; font-size: 11px; white-space: nowrap; }
  .top-actions { gap: 9px; margin-right: auto; }
  .search-box { width: 36px; padding: 0 8px; transition: width .2s; }
  .search-box:focus-within { width: 140px; }
  .search-box input { font-size: 11px; }
  .avatar { width: 29px; height: 29px; }
  .hero { align-items: flex-end; height: 590px; min-height: 0; margin-top: 38px; background: radial-gradient(ellipse at 60% 25%,#8c4236 0,#3c2425 26%,#141418 68%); }
  .hero::before { background: linear-gradient(0deg,#101012 5%,#101012e8 30%,transparent 100%),linear-gradient(90deg,#10101244,transparent); }
  .hero-art { top: 0; height: 67%; background: radial-gradient(ellipse at 60% 38%,#e77e4860 0,transparent 50%); }
  .hero-orb { top: 5%; right: 11%; width: 72vw; }
  .hero-horizon { bottom: 0; width: 100%; height: 32%; }
  .hero-content { width: auto; margin: 0 22px 31px; }
  .hero-kicker { margin-top: 0; }
  .hero h1 { font-size: 46px; letter-spacing: -1.5px; }
  .hero-copy { max-width: 400px; font-size: 12px; }
  .hero-meta { gap: 9px; font-size: 10px; }
  .hero-buttons { margin-top: 18px; }
  .button { padding: 10px 14px; font-size: 12px; }
  .hero-credit { margin-top: 12px; font-size: 9px; }
  .hero-side-note { top: 23%; bottom: auto; left: 20px; }
  .browse-section { padding: 27px 17px 45px; }
  .section-heading { display: block; margin-bottom: 15px; }
  .section-heading h2 { font-size: 19px; }
  .genre-pills { flex-wrap: nowrap; overflow: auto; margin-top: 15px; padding-bottom: 4px; scrollbar-width: none; }
  .genre-pill { padding: 7px 12px; white-space: nowrap; }
  .movie-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 19px 11px; }
  .poster { border-radius: 6px; }
  .poster-art { padding: 10px; }
  .poster-title { font-size: clamp(14px,4vw,21px); }
  .poster-symbol { top: 9px; right: 9px; width: 20px; height: 20px; }
  .card-save { top: 7px; left: 7px; width: 27px; height: 27px; font-size: 15px; }
  .movie-card h3 { margin-top: 8px; font-size: 11px; }
  .card-meta { gap: 6px; font-size: 9px; }
  .card-meta span + span::before { margin-left: 6px; }
  .notice-band { flex-wrap: wrap; align-items: flex-start; gap: 12px; margin: 0 17px 42px; padding: 18px; }
  .notice-band h2 { font-size: 14px; }
  .notice-band p { font-size: 10px; }
  .notice-band a { margin-right: 52px; }
  .footer { gap: 13px; padding: 23px 17px; }
  .footer p { order: 3; width: 100%; line-height: 1.7; }
  .footer-links { margin-right: auto; }
  .footer small { order: 4; }
  .player-info { display: block; padding: 14px; }
  .player-info h2 { font-size: 17px; }
  .player-info > a { display: inline-block; margin-top: 11px; }
  .license-note { padding: 11px 14px; }
  .dialog-close { top: 8px; left: 8px; background: #111c; }
  .info-dialog { padding: 25px 20px; }
  .info-dialog h2 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
