:root {
  --bg: #05060a;
  --bg-soft: #0d0e14;
  --surface: #17181e;
  --surface-2: #202128;
  --border: #2c2d35;
  --text: #f6f6f7;
  --muted: #a9a9b0;
  --muted-2: #767780;
  --accent: #ff315f;
  --accent-strong: #ff1f54;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 96% 10%, rgba(255, 49, 95, 0.08), transparent 24rem),
    linear-gradient(115deg, rgba(255, 49, 95, 0.1), transparent 22rem),
    var(--bg);
  color: var(--text);
}

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

button,
input {
  font: inherit;
}

textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 6, 10, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: inline-grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 12px 34px rgba(255, 49, 95, 0.42);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.brand-name {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
}

.legal-nav {
  display: flex;
  gap: 22px;
  color: #c8c8ce;
  font-size: 17px;
  font-weight: 800;
}

.legal-nav a:hover,
.legal-nav a:focus-visible {
  color: #fff;
}

.intro-section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(90deg, rgba(255, 49, 95, 0.08), rgba(228, 191, 99, 0.08), transparent);
}

.intro-copy {
  max-width: 1080px;
  padding: 20px 24px 26px;
}

.intro-copy h1 {
  max-width: 900px;
  margin: 0;
  color: #c3c0c8;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 500;
  line-height: 1.32;
}

.toolbar {
  padding: 26px 24px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.search-wrap {
  position: relative;
  display: block;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 24px;
  display: inline-flex;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  color: #7d7d86;
}

.search-icon svg,
.modal-close svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.search-wrap input {
  width: 100%;
  height: 76px;
  padding: 0 24px 0 64px;
  border: 2px solid #30313a;
  border-radius: 28px;
  outline: none;
  background: #1b1c22;
  color: var(--text);
  font-size: 25px;
  font-weight: 800;
}

.search-wrap input::placeholder {
  color: #797982;
}

.search-wrap input:focus {
  border-color: rgba(255, 49, 95, 0.82);
  box-shadow: 0 0 0 5px rgba(255, 49, 95, 0.16);
}

.filters {
  display: flex;
  gap: 13px;
  margin-top: 20px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter-button {
  flex: 0 0 auto;
  min-height: 54px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: #202127;
  color: #c6c4cb;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-button:hover {
  background: #292a31;
  color: #fff;
}

.filter-button.is-active {
  background: #fff;
  color: #05060a;
}

.catalog-section {
  padding: 26px 24px 44px;
}

.result-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.ghost-button {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: #dedee4;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  padding: 8px 14px;
  text-transform: uppercase;
}

.ghost-button:hover {
  border-color: var(--accent);
  color: #fff;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}

.drama-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #17181d;
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  min-height: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #30313b, #07080d);
}

.poster-wrap::after {
  position: absolute;
  inset: auto 0 0;
  height: 36%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.76));
  content: "";
  pointer-events: none;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 220ms ease;
}

.drama-card:hover .poster-wrap img {
  transform: scale(1.035);
}

.genre-chip {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1;
  max-width: calc(100% - 40px);
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(5, 6, 10, 0.74);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.watch-button {
  position: absolute;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 1;
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 14px 34px rgba(255, 49, 95, 0.38);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.watch-button:hover,
.watch-button:focus-visible {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.card-copy {
  min-height: 170px;
  padding: 22px;
}

.card-copy h2 {
  display: -webkit-box;
  min-height: 68px;
  margin: 0 0 12px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #fff;
  font-size: 25px;
  font-weight: 950;
  line-height: 1.22;
}

.card-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--muted);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.48;
}

.empty-state {
  max-width: 520px;
  margin: 68px auto;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(12px);
}

.modal-panel {
  position: relative;
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: #121319;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.64);
  color: #fff;
  cursor: pointer;
}

.video-frame {
  aspect-ratio: 16 / 9;
  background: #05060a;
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

.fallback-video {
  display: grid;
  height: 100%;
  min-height: 280px;
  place-items: center;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.modal-copy {
  padding: 24px;
}

.modal-tag {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.modal-copy h2 {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.15;
}

.modal-copy p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.unlock-link {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  padding: 0 22px;
  text-transform: uppercase;
}

.policy-page {
  max-width: 820px;
  padding: 64px 24px;
}

.policy-page h1 {
  margin: 0 0 18px;
  color: #fff;
  font-size: 44px;
  line-height: 1.1;
}

.policy-page p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
}

.admin-body {
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 49, 95, 0.18), transparent 28rem),
    radial-gradient(circle at 85% 10%, rgba(255, 123, 36, 0.1), transparent 28rem),
    var(--bg);
}

.admin-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 34px 24px 64px;
}

.back-link {
  display: inline-flex;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.admin-login {
  display: grid;
  min-height: calc(100vh - 120px);
  min-height: calc(100dvh - 120px);
  place-items: center;
}

.admin-card {
  width: min(620px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  background: rgba(23, 24, 30, 0.86);
  box-shadow: var(--shadow);
  padding: 44px;
}

.admin-kicker {
  margin: 0 0 16px;
  color: #ffbd2e;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.admin-card h1,
.admin-topbar h1 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(42px, 6vw, 58px);
  line-height: 1.05;
}

.admin-card p,
.admin-message {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.admin-form,
.editor-form {
  display: grid;
  gap: 20px;
}

.admin-form label,
.editor-form label {
  display: grid;
  gap: 10px;
  color: #c9c9d0;
  font-size: 16px;
  font-weight: 900;
}

.admin-form input,
.editor-form input,
.editor-form textarea {
  width: 100%;
  border: 2px solid #282b36;
  border-radius: 16px;
  outline: none;
  background: #0d111b;
  color: #fff;
  font-size: 17px;
  padding: 16px;
}

.editor-form textarea {
  min-height: 110px;
  resize: vertical;
}

.admin-form input:focus,
.editor-form input:focus,
.editor-form textarea:focus {
  border-color: rgba(255, 49, 95, 0.82);
  box-shadow: 0 0 0 4px rgba(255, 49, 95, 0.14);
}

.admin-primary,
.admin-secondary,
.admin-danger,
.admin-text-button {
  border: 0;
  cursor: pointer;
  font-weight: 950;
}

.admin-primary {
  min-height: 58px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #ff7a24);
  box-shadow: 0 14px 34px rgba(255, 49, 95, 0.28);
  color: #fff;
  font-size: 17px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-secondary,
.admin-danger {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #202127;
  color: #fff;
  padding: 0 16px;
}

.admin-danger {
  border-color: rgba(255, 49, 95, 0.44);
  background: rgba(255, 49, 95, 0.12);
  color: #ff7f9b;
}

.admin-text-button {
  background: transparent;
  color: #fff;
}

.admin-message {
  min-height: 24px;
  margin: 0;
}

.admin-message.is-error {
  color: #ff7f9b;
}

.admin-dashboard {
  max-width: 1480px;
  margin: 52px auto 0;
}

.admin-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 24px;
}

.admin-list-panel,
.admin-editor-panel {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(23, 24, 30, 0.88);
  box-shadow: var(--shadow);
}

.admin-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  font-weight: 950;
  text-transform: uppercase;
}

.admin-list {
  display: grid;
  gap: 2px;
  max-height: 720px;
  overflow: auto;
  padding: 10px;
}

.admin-list-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 10px;
  text-align: left;
}

.admin-list-item:hover {
  background: #202127;
}

.admin-list-item img {
  width: 62px;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  object-fit: cover;
  background: #0d111b;
}

.upload-box {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(13, 17, 27, 0.68);
}

.cover-preview {
  display: grid;
  width: 140px;
  aspect-ratio: 3 / 4;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background-color: #0d111b;
  background-position: center;
  background-size: cover;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.file-picker {
  display: grid;
  gap: 10px;
  color: #c9c9d0;
  font-size: 16px;
  font-weight: 900;
}

.file-picker input {
  width: 100%;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: #0d111b;
  color: var(--muted);
  padding: 14px;
}

.admin-list-item strong {
  display: block;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-list-item small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.admin-empty {
  margin: 18px;
  color: var(--muted);
  font-size: 16px;
}

.admin-editor-panel {
  padding: 24px;
}

.admin-editor-panel h2 {
  margin: 0 0 20px;
  color: #fff;
  font-size: 30px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 16px;
}

.check-row {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 12px !important;
}

.check-row input {
  width: 20px;
  height: 20px;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.editor-actions .admin-primary {
  padding: 0 26px;
}

@media (max-width: 920px) {
  .admin-topbar,
  .admin-layout {
    display: grid;
  }

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

  .admin-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .admin-shell {
    padding: 22px 14px 44px;
  }

  .admin-card {
    padding: 26px;
    border-radius: 24px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .upload-box {
    grid-template-columns: 1fr;
  }

  .cover-preview {
    width: min(220px, 100%);
  }
}

@media (max-width: 1180px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .brand-name {
    font-size: 22px;
  }

  .legal-nav {
    gap: 14px;
    font-size: 15px;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 70px;
    padding: 0 16px;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
    font-size: 23px;
  }

  .brand-name {
    max-width: 146px;
    font-size: 19px;
    line-height: 1.05;
  }

  .legal-nav {
    font-size: 13px;
  }

  .intro-copy,
  .toolbar,
  .catalog-section {
    padding-right: 16px;
    padding-left: 16px;
  }

  .intro-copy h1 {
    font-size: 21px;
  }

  .search-wrap input {
    height: 62px;
    border-radius: 22px;
    font-size: 18px;
    padding-left: 54px;
  }

  .search-icon {
    left: 20px;
    width: 21px;
    height: 21px;
  }

  .filter-button {
    min-height: 46px;
    padding: 0 20px;
    font-size: 14px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .card-copy h2 {
    min-height: auto;
    font-size: 23px;
  }

  .card-copy p {
    font-size: 16px;
  }

  .watch-button {
    min-height: 50px;
    font-size: 16px;
  }

  .modal {
    padding: 12px;
  }

  .modal-panel {
    border-radius: 20px;
  }

  .modal-copy {
    padding: 18px;
  }

  .modal-copy h2 {
    font-size: 22px;
  }
}

@media (max-width: 360px) {
  .site-header {
    min-height: 62px;
    padding: 0 12px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .brand-name {
    max-width: 112px;
    font-size: 16px;
  }

  .legal-nav {
    gap: 10px;
    font-size: 12px;
  }

  .intro-copy,
  .toolbar,
  .catalog-section {
    padding-right: 12px;
    padding-left: 12px;
  }
}
