/* Zenou Unblocked, movies.
 *
 * Page-level components for movies.html only. The design tokens, buttons,
 * top bar and footer all come from style.css; nothing here redefines them.
 */

.movies-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px var(--gutter) 90px;
}

/* ---------- hero ---------- */

.movies-hero { margin-bottom: 26px; }

.movies-kicker {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.movies-hero h1 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 54px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.02em;
  font-stretch: 112%;
}

.movies-hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #fff 12%, rgb(var(--accent-rgb)) 62%, rgb(var(--accent-2-rgb)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.movies-deck {
  max-width: 78ch;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.62;
}

.movies-deck b { color: var(--text); font-weight: 600; }

/* ---------- watch panel ---------- */

.movies-watch {
  margin: 0 0 22px;
  padding: 18px 20px 16px;
  border: 1px solid rgb(var(--accent-rgb) / .28);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 130% at 0% 0%, rgb(var(--accent-rgb) / .13), transparent 58%),
    var(--surface);
  box-shadow: 0 24px 60px -50px rgb(var(--accent-rgb) / .95);
}

.movies-watch-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.movies-watch-head > div:first-child { flex: 1; min-width: 0; }

.movies-watch-head .movies-kicker { margin-bottom: 6px; }

.movies-watch-head h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(19px, 2.4vw, 26px);
  font-weight: 750;
  letter-spacing: -.015em;
}

.movies-watch-head p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.movies-seg {
  display: inline-flex;
  flex: none;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(0, 0, 0, .28);
}

.movies-seg button {
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease);
}

.movies-seg button[aria-pressed="true"] {
  color: var(--accent-ink);
  background: linear-gradient(120deg, rgb(var(--accent-rgb)), rgb(var(--accent-2-rgb)));
}

.movies-watch-form {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.movies-watch-form > input {
  flex: 1 1 320px;
  min-width: 220px;
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(0, 0, 0, .32);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.movies-watch-form > input:focus {
  outline: none;
  border-color: rgb(var(--accent-rgb) / .7);
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / .14);
}

.movies-watch-form input::placeholder { color: var(--muted-2); }

.movies-watch-form select {
  padding: 12px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #10131f;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.movies-ep {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-size: 12px;
}

.movies-ep[hidden] { display: none; }

.movies-ep input {
  width: 62px;
  padding: 12px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(0, 0, 0, .32);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: center;
}

.movies-ep input:focus {
  outline: none;
  border-color: rgb(var(--accent-rgb) / .7);
}

.movies-watch-hint {
  margin: 11px 0 0;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.55;
}

.movies-watch-hint code,
.movies-watch-head code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .07);
  font-size: 11px;
}

/* ---------- section heads ---------- */

.movies-section { margin-bottom: 34px; }

.movies-section-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 14px;
}

.movies-section-head > div { flex: 1; min-width: 0; }

.movies-section-head h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(19px, 2.4vw, 26px);
  font-weight: 750;
  letter-spacing: -.015em;
}

.movies-section-sub {
  margin: 0;
  max-width: 82ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.movies-player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: var(--grid-gap);
}

.movie-card.is-player {
  background:
    radial-gradient(140% 100% at 100% 0%, rgb(var(--accent-2-rgb) / .12), transparent 58%),
    var(--surface);
  border-color: rgb(var(--accent-2-rgb) / .22);
}

/* ---------- stage ---------- */

.movies-stage {
  position: relative;
  margin: 0 0 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
  box-shadow: 0 26px 70px -50px rgb(var(--accent-rgb) / .9);
  overflow: hidden;
}

.movies-stage-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 11, 18, .72);
}

.movies-stage-id {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.movies-stage-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  color: #fff;
  background: linear-gradient(140deg, rgb(var(--accent-rgb)), rgb(var(--accent-2-rgb)));
}

.movies-stage-name {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.movies-stage-name b {
  font-size: 13.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movies-stage-name small {
  font-size: 11.5px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movies-stage-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.movies-stage-tools .btn { padding: 7px 12px; font-size: 12px; }

.movies-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 320px;
  background: #04050a;
}

.movies-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #04050a;
}

.movies-stage.is-full {
  position: fixed;
  inset: 12px;
  z-index: 90;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.movies-stage.is-full .movies-frame { flex: 1; aspect-ratio: auto; min-height: 0; }

/* ---------- idle + blocked states ---------- */

.movies-idle,
.movies-blocked {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  text-align: center;
  background:
    radial-gradient(120% 90% at 50% 0%, rgb(var(--accent-rgb) / .12), transparent 62%),
    #05060c;
}

.movies-idle[hidden],
.movies-blocked[hidden] { display: none; }

.movies-state-inner { max-width: 52ch; }

.movies-state-inner span {
  display: block;
  margin-bottom: 10px;
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.movies-state-inner h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 25px);
  font-weight: 700;
  letter-spacing: -.01em;
}

.movies-state-inner p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.movies-state-inner .play-tools { justify-content: center; flex-wrap: wrap; }

/* ---------- filters ---------- */

.movies-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.movies-search {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1 1 280px;
  min-width: 220px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.movies-search:focus-within {
  border-color: rgb(var(--accent-rgb) / .55);
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / .12);
}

.movies-search .icon { width: 16px; height: 16px; fill: var(--muted-2); flex: none; }

.movies-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  outline: none;
}

.movies-search input::placeholder { color: var(--muted-2); }

.movies-cats,
.movies-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.movies-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.movies-cat,
.movies-flag {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  padding: 6px 13px;
  cursor: pointer;
  transition: border-color .16s var(--ease), color .16s var(--ease), background .16s var(--ease);
}

.movies-cat:hover,
.movies-flag:hover { color: var(--text); border-color: var(--line-strong); }

.movies-cat[aria-pressed="true"],
.movies-flag[aria-pressed="true"] {
  color: var(--accent-ink);
  border-color: transparent;
  background: linear-gradient(120deg, rgb(var(--accent-rgb)), rgb(var(--accent-2-rgb)));
  font-weight: 650;
}

/* ---------- grid ---------- */

.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: var(--grid-gap);
  margin-bottom: 34px;
}

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(140% 100% at 0% 0%, rgb(var(--accent-rgb) / .07), transparent 58%),
    var(--surface);
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}

/* the whole tile is one button; the star sits above it so both stay valid */
.movie-open {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.movie-open:focus-visible {
  outline: 2px solid rgb(var(--accent-rgb) / .75);
  outline-offset: 6px;
  border-radius: 8px;
}

.movie-card:hover {
  transform: translateY(-2px);
  border-color: rgb(var(--accent-rgb) / .5);
  box-shadow: 0 18px 44px -30px rgb(var(--accent-rgb) / .95);
}

.movie-card.is-down { opacity: .55; }
.movie-card.is-down:hover { opacity: .8; }

.movie-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.movie-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #fff;
  background: linear-gradient(140deg, rgb(var(--accent-rgb)), rgb(var(--accent-2-rgb)));
  box-shadow: 0 8px 22px -14px rgb(var(--accent-rgb) / .95);
}

.movie-card:nth-child(3n+2) .movie-mark { background: linear-gradient(140deg, #22d3ee, rgb(var(--accent-2-rgb))); }
.movie-card:nth-child(3n+3) .movie-mark { background: linear-gradient(140deg, #f59e0b, rgb(var(--accent-rgb))); }

.movie-title { min-width: 0; flex: 1; }

.movie-title b {
  display: block;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-title small {
  display: block;
  font-size: 11.5px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-note {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
  min-height: 3.1em;
}

.movie-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.movie-badge {
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-size: 10.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
}

.movie-badge[data-tone="plays"] {
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, .38);
  background: rgba(52, 211, 153, .1);
}

.movie-badge[data-tone="tab"] {
  color: #fcd34d;
  border-color: rgba(251, 191, 36, .32);
  background: rgba(251, 191, 36, .09);
}

.movie-badge[data-tone="down"] {
  color: var(--danger);
  border-color: rgba(255, 92, 122, .34);
  background: rgba(255, 92, 122, .09);
}

/* the small star in the corner */
.movie-star {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-2);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  opacity: 0;
  transition: opacity .15s var(--ease), color .15s var(--ease), background .15s var(--ease);
}

.movie-card:hover .movie-star,
.movie-star:focus-visible,
.movie-star[aria-pressed="true"] { opacity: 1; }

.movie-star:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.movie-star[aria-pressed="true"] { color: var(--accent); }

.movies-empty {
  padding: 34px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
}

/* ---------- doors ---------- */

.movies-doors {
  margin-bottom: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.movies-doors > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  list-style: none;
}

.movies-doors > summary::-webkit-details-marker { display: none; }
.movies-doors > summary::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
}

.movies-doors[open] > summary::before { content: "−"; }

.movies-doors > summary small {
  margin-left: auto;
  color: var(--muted-2);
  font-weight: 400;
  font-size: 11.5px;
}

.movies-doors-body {
  padding: 0 18px 18px;
  border-top: 1px solid var(--line);
}

.movies-doors-body p {
  margin: 14px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.movies-door-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.movies-door-form input {
  flex: 1 1 240px;
  min-width: 200px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, .25);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.movies-door-form input:focus {
  outline: none;
  border-color: rgb(var(--accent-rgb) / .55);
}

.movies-door-select {
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #10131f;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  max-width: 100%;
}

.movies-door-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.movies-door-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
  font-size: 12.5px;
}

.movies-door-item b { font-weight: 600; }
.movies-door-item span {
  flex: 1;
  min-width: 0;
  color: var(--muted-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- notes ---------- */

.movies-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.movies-notes article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.movies-notes h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .01em;
}

.movies-notes p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.62;
}

.movies-notes code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .07);
  font-size: 11.5px;
}

/* ---------- small screens ---------- */

@media (max-width: 720px) {
  .movies-main { padding: 24px 16px 70px; }
  .movies-stage-bar { flex-wrap: wrap; }
  .movies-stage-tools { width: 100%; justify-content: flex-end; }
  .movies-grid { grid-template-columns: 1fr; }
  /* A 16/9 box squeezed under 240px of height grows *wider* to keep the ratio,
     which pushed the frame 70px past the stage and clipped it. Height wins here. */
  .movies-frame { aspect-ratio: auto; min-height: 240px; }
  /* The count asks for a full line here; without wrapping it ate the heading's
     width and the intro set one word per line. */
  .movies-section-head { flex-wrap: wrap; }
  .movies-count { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .movie-card,
  .movie-star,
  .movies-cat,
  .movies-flag { transition: none; }
  .movie-card:hover { transform: none; }
}
