:root {
  --bg: #02050a;
  --panel: #080d14;
  --panel-2: #0d1621;
  --line: #173043;
  --text: #f2fbff;
  --muted: #8aa4b7;
  --accent: #00e5ff;
  --accent-2: #0a7cff;
  --good: #4df6ff;
  --danger: #ff2f6d;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 22% -12%, rgba(0, 229, 255, 0.16), transparent 34%),
    linear-gradient(180deg, #02050a 0%, #050912 48%, #02050a 100%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.gate-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.gate {
  width: min(92vw, 520px);
  display: grid;
  justify-items: center;
  gap: 22px;
  padding: 28px;
}

.gate-logo {
  width: min(58vw, 320px);
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 0 34px rgba(0, 229, 255, 0.35));
}

.gate h1 {
  margin: -6px 0 8px;
  font-size: clamp(34px, 7vw, 64px);
  line-height: 1;
  text-align: center;
}

.gate-form {
  width: 100%;
  display: grid;
  gap: 10px;
}

.gate-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.gate-form div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.gate-form input {
  min-width: 0;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: rgba(2, 6, 10, 0.92);
  color: var(--text);
  padding: 0 14px;
  text-align: center;
  letter-spacing: 2px;
}

.gate-form input:focus {
  border-color: rgba(0, 229, 255, 0.82);
  box-shadow: 0 0 26px rgba(0, 229, 255, 0.16);
}

.gate-form button {
  height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #041015;
  cursor: pointer;
  font-weight: 900;
  padding: 0 18px;
}

.gate-form p {
  min-height: 20px;
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.gate-form p.ok {
  color: var(--good);
}

.gate-form p.error {
  color: var(--danger);
}

.admin-toggle {
  margin-top: 4px;
  border: 1px solid rgba(138, 164, 183, 0.26);
  border-radius: 999px;
  background: rgba(8, 13, 20, 0.42);
  color: rgba(138, 164, 183, 0.76);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
}

.admin-toggle:hover {
  border-color: rgba(0, 229, 255, 0.4);
  color: var(--accent);
}

.admin-form {
  width: min(100%, 320px);
  display: grid;
  gap: 8px;
  margin-top: -6px;
  padding: 12px;
  border: 1px solid rgba(23, 48, 67, 0.65);
  border-radius: 8px;
  background: rgba(2, 6, 10, 0.72);
}

.admin-form[hidden] {
  display: none;
}

.admin-form label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.admin-form input {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #02060a;
  color: var(--text);
  padding: 0 10px;
}

.admin-form button,
.admin-shell a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  padding: 0 12px;
}

.admin-form p {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.admin-form p.ok {
  color: var(--good);
}

.admin-form p.error {
  color: var(--danger);
}

.admin-page {
  min-height: 100dvh;
}

.admin-dashboard {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
}

.admin-header {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.admin-logo {
  width: 84px;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(0, 229, 255, 0.28));
}

.admin-header h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
}

.admin-header p {
  margin: 0;
  color: var(--muted);
}

.admin-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-header a,
.admin-header-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font-weight: 800;
  padding: 0 14px;
}

.admin-header-actions button {
  border: 0;
  background: var(--accent);
  color: #041015;
  cursor: pointer;
}

.movie-form-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 8, 13, 0.92);
  padding: 14px;
}

.movie-form-panel[hidden] {
  display: none;
}

.movie-form-panel form {
  display: grid;
  grid-template-columns: 1fr 1.35fr 220px auto;
  gap: 8px;
  align-items: end;
}

.movie-form-panel label {
  display: none;
}

.movie-form-panel input {
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #02060a;
  color: var(--text);
  padding: 0 10px;
}

.movie-form-panel div {
  display: flex;
  gap: 8px;
}

.movie-form-panel button {
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  padding: 0 12px;
  white-space: nowrap;
}

.movie-form-panel button[type="submit"] {
  background: var(--accent);
  color: #041015;
}

.movie-form-panel p {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.movie-form-panel p.ok {
  color: var(--good);
}

.movie-form-panel p.error {
  color: var(--danger);
}

.admin-stats {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
}

.admin-stats article,
.admin-guests,
.admin-users,
.admin-chat {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 8, 13, 0.88);
  box-shadow: 0 0 34px rgba(0, 229, 255, 0.07);
}

.admin-stats article {
  display: grid;
  gap: 7px;
  padding: 14px;
}

.admin-stats span,
.admin-guests h2,
.admin-users h2,
.admin-chat h2 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-stats strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 22px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(260px, 360px) minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

.admin-movies {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 8, 13, 0.88);
  padding: 12px;
}

.admin-movies h2 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

#adminMovies {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.admin-guests,
.admin-users,
.admin-chat {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
}

.admin-users,
.admin-chat {
  grid-template-rows: auto minmax(0, 1fr);
}

.admin-panel-title,
.admin-users h2,
.admin-chat h2 {
  margin: 0;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.admin-guests h2,
.admin-users h2,
.admin-chat h2 {
  margin: 0;
}

.admin-create-user {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.admin-create-user input {
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #02060a;
  color: var(--text);
  padding: 0 10px;
}

.admin-create-user button {
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
  padding: 0 10px;
}

#adminGuests,
#adminUsers {
  overflow-y: auto;
  padding: 10px;
}

.admin-guest-row,
.admin-user-row {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-bottom: 1px solid rgba(23, 48, 67, 0.7);
}

.admin-guest-row {
  gap: 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  background: rgba(8, 13, 20, 0.58);
}

.guest-main {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.guest-main div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-user-row strong,
.admin-guest-row strong {
  color: var(--accent);
}

.guest-password {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
}

.guest-password code,
.guest-main code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Consolas", "Lucida Console", monospace;
  font-size: 13px;
}

.guest-password code {
  color: var(--good);
  min-height: 34px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(23, 48, 67, 0.75);
  border-radius: 8px;
  background: #02060a;
  padding: 0 10px;
}

.guest-main code {
  color: var(--muted);
}

.admin-guest-row .generate-password {
  width: 100%;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #041015;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 0 10px;
}

.copy-password {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(0, 229, 255, 0.34);
  border-radius: 8px;
  background: var(--panel-2);
  cursor: pointer;
}

.copy-password:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.copy-password span,
.copy-password span::before {
  position: absolute;
  width: 13px;
  height: 15px;
  border: 1.5px solid var(--accent);
  border-radius: 2px;
  content: "";
}

.copy-password span {
  top: 10px;
  left: 12px;
}

.copy-password span::before {
  top: -4px;
  left: -5px;
  background: var(--panel-2);
}

.guest-status {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #41515f;
}

.guest-status.online {
  background: var(--good);
  box-shadow: 0 0 16px rgba(77, 246, 255, 0.55);
}

.admin-user-row span,
.admin-guest-row span,
.admin-chat-log code,
.empty {
  color: var(--muted);
}

.admin-user-row code,
.admin-chat-log code {
  font-family: "Consolas", "Lucida Console", monospace;
  font-size: 12px;
}

.admin-chat-log {
  overflow-y: auto;
  padding: 12px 14px;
  background: #02060a;
  font-family: "Consolas", "Lucida Console", monospace;
  font-size: 16px;
}

.admin-chat-log p {
  display: grid;
  grid-template-columns: 52px minmax(90px, auto) minmax(0, 1fr) minmax(90px, auto);
  gap: 8px;
  margin: 0 0 7px;
  color: #c7e7f2;
}

.admin-chat-log strong {
  color: var(--accent);
}

@media (max-width: 900px) {
  .admin-dashboard {
    grid-template-rows: auto auto auto minmax(0, 1fr);
  }

  .admin-header {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .admin-header-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .admin-logo {
    width: 68px;
  }

  .movie-form-panel form {
    grid-template-columns: 1fr;
  }

  .movie-form-panel div {
    flex-wrap: wrap;
  }

  .admin-stats,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-grid {
    min-height: 720px;
  }
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: auto auto minmax(220px, 560px) auto;
  gap: 18px;
  align-items: center;
  height: 152px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 5, 10, 0.92);
  backdrop-filter: blur(18px);
}

.brand,
.nav-tabs,
.top-actions,
.search {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 126px;
  height: 126px;
  place-items: center;
  border-radius: 8px;
  background: #02050a;
  border: 1px solid rgba(0, 229, 255, 0.42);
  box-shadow: 0 0 34px rgba(0, 229, 255, 0.36);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.nav-tabs {
  gap: 8px;
}

.nav-tabs a {
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 700;
}

.nav-tabs a.active,
.nav-tabs a:hover {
  background: var(--panel-2);
  color: var(--text);
}

.search {
  min-width: 0;
  height: 40px;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
}

.search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.top-actions {
  justify-content: end;
  gap: 10px;
}

.icon-button,
.avatar,
.go-live,
.stream-info button,
.filters button {
  border: 0;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}

.icon-button,
.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: var(--panel-2);
}

.avatar {
  background: #061827;
  color: var(--accent);
  font-weight: 800;
}

.go-live,
.primary-link,
.stream-info button,
.filters button.selected {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 15px;
  background: var(--accent);
  color: #041015;
  font-weight: 800;
}

.sidebar {
  position: fixed;
  z-index: 10;
  top: 152px;
  bottom: 0;
  left: 0;
  width: 250px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(4, 8, 14, 0.96);
  padding: 18px 12px;
}

.side-title {
  margin: 0 8px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.side-title.recommended {
  margin-top: 24px;
}

.channel {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
}

.channel:hover {
  background: var(--panel-2);
}

.channel-avatar,
.stream-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #07131e, #06354a);
  color: var(--text);
  font-weight: 900;
}

.channel-avatar {
  width: 38px;
  height: 38px;
}

.channel strong,
.channel span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel strong {
  font-size: 14px;
}

.channel span {
  color: var(--muted);
  font-size: 12px;
}

.viewers {
  color: var(--good);
  font-size: 12px;
  font-weight: 800;
}

.layout {
  min-height: 100vh;
  padding: 176px 24px 48px 274px;
}

.featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 36px;
}

.video-stage {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  display: block;
}

.video-stage img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  display: block;
  object-fit: cover;
}

.video-stage::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.68)),
    linear-gradient(90deg, rgba(0, 229, 255, 0.22), transparent 44%);
}

.live-badge,
.player-bar,
.play-button {
  position: absolute;
  z-index: 2;
}

.live-badge {
  top: 18px;
  left: 18px;
  padding: 7px 9px;
  border-radius: 5px;
  background: var(--danger);
  font-size: 12px;
  font-weight: 900;
}

.play-button {
  display: grid;
  place-items: center;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  border: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.92);
  color: #05070a;
  cursor: pointer;
  font-size: 28px;
  box-shadow: var(--shadow);
}

.player-bar {
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--text);
  font-weight: 800;
}

.stream-info {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
}

.stream-avatar {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, #001e32, var(--accent));
  color: #02050a;
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.28);
}

.stream-info h1 {
  margin: 0 0 5px;
  font-size: clamp(21px, 3vw, 34px);
  line-height: 1.08;
}

.stream-info p {
  margin: 0;
  color: var(--muted);
}

.stream-info .support {
  background: var(--panel-2);
  color: var(--text);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 24px;
}

.section-heading a {
  color: var(--accent);
  font-weight: 800;
}

.category-grid,
.stream-grid {
  display: grid;
  gap: 16px;
}

.category-grid {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  margin-bottom: 38px;
}

.category-card,
.stream-card {
  overflow: hidden;
  border-radius: 8px;
  background: var(--panel);
}

.category-card img,
.stream-card img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.category-card img {
  aspect-ratio: 3 / 4;
}

.category-card div,
.stream-card div {
  padding: 11px;
}

.category-card strong,
.stream-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-card span,
.stream-card span,
.stream-card p {
  color: var(--muted);
  font-size: 13px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filters button {
  height: 34px;
  padding: 0 12px;
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 800;
}

.stream-grid {
  grid-template-columns: repeat(4, minmax(210px, 1fr));
}

.stream-card {
  border: 1px solid transparent;
  display: block;
}

.stream-card:hover {
  border-color: rgba(0, 229, 255, 0.72);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.12);
}

.stream-card img {
  aspect-ratio: 16 / 9;
}

.stream-card p {
  margin: 5px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
  }

  .nav-tabs {
    display: none;
  }

  .category-grid {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  .stream-grid {
    grid-template-columns: repeat(2, minmax(210px, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 1fr auto;
    height: auto;
    min-height: 152px;
    padding: 10px;
  }

  .search {
    grid-column: 1 / -1;
    order: 3;
  }

  .go-live,
  .icon-button {
    display: none;
  }

  .sidebar {
    display: none;
  }

  .layout {
    padding: 216px 14px 32px;
  }

  .video-stage,
  .video-stage img {
    min-height: 245px;
  }

  .stream-info {
    grid-template-columns: 48px 1fr;
  }

  .stream-info button {
    width: 100%;
  }

  .category-grid,
  .stream-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .player-bar {
    align-items: flex-start;
    flex-direction: column;
  }
}

.watch-layout {
  --watch-topbar: 96px;
  --watch-gap: 10px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) clamp(210px, 32vh, 260px);
  gap: var(--watch-gap);
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  padding: calc(var(--watch-topbar) + 12px) 18px 12px;
}

.watch-page .topbar {
  height: 96px;
}

.watch-page .brand-mark {
  width: 76px;
  height: 76px;
}

.watch-player {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: var(--watch-gap);
  min-height: 0;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
}

.live-player {
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 0;
  border: 1px solid rgba(0, 229, 255, 0.36);
  border-radius: 8px;
  background: #000;
  box-shadow:
    0 0 36px rgba(0, 229, 255, 0.13),
    var(--shadow);
}

.live-player iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.live-player img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-player::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.72)),
    linear-gradient(90deg, rgba(0, 229, 255, 0.2), transparent 42%);
}

.watch-info {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 0;
  padding-bottom: 0;
}

.watch-info h1 {
  margin: 0 0 5px;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.08;
}

.watch-info p {
  margin: 0;
  color: var(--muted);
}

.watch-info button,
.chat-header button,
.chat-compose button {
  height: 38px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.watch-info button,
.chat-compose button {
  padding: 0 15px;
  background: var(--accent);
  color: #041015;
}

.watch-info .support,
.chat-header button {
  padding: 0 15px;
  background: var(--panel-2);
  color: var(--text);
}

.chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 8, 13, 0.94);
  box-shadow: 0 0 34px rgba(0, 229, 255, 0.08);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}

.chat-header h2 {
  margin: 0;
  font-size: 17px;
}

.chat-header span {
  color: var(--muted);
  font-family: "Consolas", "Lucida Console", monospace;
  font-size: 13px;
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 8px 14px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(0, 229, 255, 0.025) 0,
      rgba(0, 229, 255, 0.025) 1px,
      transparent 1px,
      transparent 28px
    ),
    #02060a;
  font-family: "Consolas", "Lucida Console", monospace;
  font-size: 14px;
}

.chat-log p {
  margin: 0;
  color: #c7e7f2;
}

.chat-log strong {
  color: var(--accent);
}

.chat-log .time {
  color: #6f8798;
}

.chat-compose {
  display: grid;
  gap: 6px;
  padding: 8px 14px 10px;
  border-top: 1px solid var(--line);
}

.chat-compose label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.chat-compose div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.chat-compose input {
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #02060a;
  color: var(--text);
  padding: 0 12px;
  font-family: "Consolas", "Lucida Console", monospace;
}

.watch-recommendations {
  display: none;
  max-width: 1320px;
  margin: 0 auto;
}

.clean-cinema .cinema-topbar {
  display: flex;
  justify-content: center;
  height: 112px;
}

.clean-cinema .brand {
  font-size: 28px;
}

.clean-cinema .brand-mark {
  width: 88px;
  height: 88px;
}

.clean-cinema .cinema-layout {
  --watch-topbar: 112px;
  grid-template-rows: minmax(0, 1fr) clamp(190px, 30vh, 260px);
  padding: calc(var(--watch-topbar) + 12px) 18px 12px;
}

.clean-cinema .watch-player,
.clean-cinema .cinema-lower {
  max-width: 1280px;
}

.cinema-lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 10px;
  min-height: 0;
  width: 100%;
  margin: 0 auto;
}

.cinema-lower .chat-panel {
  margin: 0;
}

.movie-sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 8, 13, 0.94);
  overflow: hidden;
}

.movie-sidebar h2 {
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

#movieSchedule {
  display: grid;
  gap: 8px;
  align-content: start;
  overflow-y: auto;
  padding: 10px;
}

.movie-mini-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(23, 48, 67, 0.78);
  border-radius: 8px;
  background: rgba(8, 13, 20, 0.72);
  padding: 8px;
}

.movie-mini-card img {
  width: 54px;
  height: 74px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--panel-2);
}

.movie-mini-card div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.movie-mini-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font-size: 14px;
  line-height: 1.15;
}

.movie-mini-card span {
  color: var(--muted);
  font-size: 12px;
}

.clean-cinema .live-player::after,
.clean-cinema .live-badge,
.clean-cinema .player-bar {
  display: none;
}

.clean-cinema .cinema-screen {
  border-color: rgba(0, 229, 255, 0.42);
}

.clean-cinema .chat-header button {
  display: none;
}

.clean-cinema .chat-header {
  padding: 8px 14px;
}

.clean-cinema .chat-log {
  padding: 8px 14px;
}

@media (max-width: 760px) {
  .watch-layout {
    --watch-topbar: 132px;
    grid-template-rows: minmax(0, 1fr) clamp(200px, 34vh, 270px);
    min-height: 0;
    padding: calc(var(--watch-topbar) + 10px) 12px 10px;
  }

  .watch-page .topbar {
    min-height: 132px;
  }

  .watch-page .brand-mark {
    width: 92px;
    height: 92px;
  }

  .live-player,
  .live-player iframe,
  .live-player img {
    height: 100%;
  }

  .watch-info {
    grid-template-columns: 48px 1fr;
  }

  .watch-info button {
    width: 100%;
  }

  .chat-compose div {
    grid-template-columns: 1fr;
  }

  .clean-cinema .cinema-topbar {
    min-height: 108px;
  }

  .clean-cinema .brand {
    font-size: 23px;
  }

  .clean-cinema .brand-mark {
    width: 78px;
    height: 78px;
  }

  .clean-cinema .cinema-layout {
    --watch-topbar: 108px;
    grid-template-rows: minmax(0, 1fr) clamp(260px, 42vh, 360px);
    padding: calc(var(--watch-topbar) + 10px) 10px 10px;
  }

  .cinema-lower {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .movie-sidebar {
    max-height: 132px;
  }

  #movieSchedule {
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 1fr);
    overflow-x: auto;
    overflow-y: hidden;
  }
}
