.page-heading h1 {
  font-size: 36px;
  letter-spacing: -1px;
  margin: 12px 0;
}
.detail-hero {
  min-height: 360px;
}
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 12px;
}
.episode-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0;
}
.episode {
  padding: 10px 15px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #20242c;
  font-size: 14px;
}
.episode.active {
  background: var(--accent);
  color: #171b0a;
}
.episode-trailer {
  margin-inline-start: 3px;
  padding: 1px 4px;
  border-radius: 4px;
  background: #ffd39a;
  color: #582e12;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.video-wrap {
  background: #000;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 15px;
}
.video-wrap video {
  width: 100%;
  height: 100%;
}
.video-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.player-meta {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}
.player-meta h2 {
  margin: 0 0 8px;
}
.player-meta select {
  width: auto;
  max-width: 220px;
}
.comment {
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}
.comment strong {
  font-size: 15px;
}
.comment p {
  font-size: 15px;
  margin: 9px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.comment small {
  font-size: 13px;
}
.comment details summary {
  font-size: 14px;
  cursor: pointer;
  color: var(--accent);
}
form.stack,
.stack {
  display: grid;
  gap: 16px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.auth {
  max-width: 430px;
  margin: 40px auto;
}
.auth h1 {
  font-size: 32px;
  letter-spacing: -1px;
}
.link {
  color: var(--accent);
  font-size: 14px;
}
.admin-layout {
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr);
  min-height: calc(100vh - 82px);
}
.sidebar {
  border-right: 1px solid var(--line);
  padding: 28px 18px;
}
.sidebar small {
  display: block;
  margin: 0 12px 20px;
  font-size: 13px;
  letter-spacing: 2px;
}
.sidebar a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border-radius: 8px;
  margin-bottom: 6px;
  color: #a7aeb9;
  font-size: 15px;
}
.sidebar a.active {
  color: var(--accent);
  background: #ffca5810;
}
.admin-main {
  padding: 32px;
  min-width: 0;
}
.admin-main h1 {
  font-size: 30px;
  letter-spacing: -1px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: 10px;
}
.stat strong {
  display: block;
  font-size: 30px;
  color: var(--accent);
  margin: 13px 0 0;
}
.stat small {
  font-size: 14px;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}
th {
  color: #8f99a8;
  font-size: 13px;
  letter-spacing: 0.5px;
  font-weight: 500;
  background: #1c2026;
  padding: 15px;
}
td {
  padding: 15px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
td p {
  margin: 5px 0;
  color: var(--muted);
  max-width: 420px;
  overflow-wrap: anywhere;
}
td .actions {
  flex-wrap: nowrap;
}
.status {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 5px;
  background: #ffca5810;
  color: var(--accent);
  font-size: 13px;
}
.status.pending,
.status.draft {
  color: #f8c879;
  background: #f8c87910;
}
.status.hidden,
.status.rejected {
  color: var(--danger);
  background: #ff879310;
}
.queue-table .status.pending {
  color: #ffa0aa;
  background: #ff879323;
  font-weight: 900;
}
.queue-table .status.approved {
  color: #91e6ad;
  background: #67d68b20;
  font-weight: 900;
}
[data-theme="light"] .queue-table .status.pending {
  color: #a12136;
  background: #fce7eb;
}
[data-theme="light"] .queue-table .status.approved {
  color: #1d673a;
  background: #e0f3e6;
}
.notice {
  border: 1px solid #ffca5830;
  background: #ffca5808;
  padding: 16px 20px;
  border-radius: 10px;
  color: #b8c4a0;
  font-size: 14px;
  line-height: 1.6;
  margin: 20px 0;
}
.notice a {
  color: var(--accent);
}
.error {
  color: var(--danger);
  white-space: pre-wrap;
}
.json {
  font-family: Consolas, monospace;
  font-size: 14px;
  min-height: 220px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 350px;
  overflow: auto;
  background: #101216;
  padding: 16px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
}
dialog {
  background: #191c21;
  border: 1px solid #414751;
  border-radius: 16px;
  color: var(--text);
  padding: 28px;
  width: min(780px, calc(100% - 30px));
  max-height: 90vh;
}
dialog::backdrop {
  background: #000b;
  backdrop-filter: blur(5px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.modal-head h2 {
  margin: 0;
}
.close {
  font-size: 25px;
  color: #9da6b5;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 22px;
  background: var(--accent);
  color: #171d0b;
  border-radius: 8px;
  z-index: 20;
  box-shadow: 0 8px 30px #0008;
  display: none;
  max-width: 90vw;
  font-size: 15px;
}
