:root {
  --bg-main: #111924;
  --bg-header: #1a2332;
  --bg-sidebar: #182333;
  --bg-sidebar-soft: #111927;
  --bg-panel: #2c3645;
  --bg-card: #242f3f;
  --line: #263446;
  --line-soft: #334154;
  --text: #d6e0ee;
  --text-muted: #74859f;
  --accent: #00a7ff;
  --ok: #1f9d55;
  --err: #e53e3e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Poppins, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg-main);
}

a { color: #8ecbff; }

.container { max-width: 1120px; margin: 24px auto; padding: 0 16px; }
.narrow { max-width: 430px; }

.login-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px 16px;
}

.login-card {
  padding: 22px;
  width: 100%;
  max-width: 430px;
  margin: 0;
}

.login-captcha-wrap {
  margin: 20px 0 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 90px;
}

.login-captcha-wrap .h-captcha {
  max-width: 100%;
}

.card {
  background: #1c2635;
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

h1, h2, h3 { margin: 0 0 12px 0; }

label { display: block; margin: 8px 0 6px; color: #9eb1ce; }

input, textarea, select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #11192a;
  color: var(--text);
}

textarea { min-height: 88px; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.btn.secondary { background: #2b3648; }

.link-btn {
  background: none;
  border: 0;
  color: #ff8a8a;
  cursor: pointer;
  padding: 0;
}

.alert {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.alert.success { background: rgba(31,157,85,.2); border: 1px solid rgba(31,157,85,.5); }
.alert.error { background: rgba(229,62,62,.2); border: 1px solid rgba(229,62,62,.5); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.big { font-size: 30px; font-weight: 700; }

table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; }

.video-wrap { position: relative; padding-top: 56.25%; }
.video-wrap iframe { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }

.episode-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 8px; }
.episode-item {
  display: block;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
  text-decoration: none;
}

/* Dashboard */
.app-shell { min-height: 100vh; background: var(--bg-main); }

.app-header {
  height: 54px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.brand {
  font-size: 34px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.5px;
  color: #f1f6ff;
}

.brand-mark {
  display: inline-block;
  margin-left: 2px;
  color: #8dd9ff;
  font-size: 28px;
  vertical-align: top;
  transform: translateY(-2px);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.notif-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2a3548;
  border: 1px solid #3a485d;
  color: #ff4e4e;
  font-weight: 700;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-box { text-align: right; }
.user-name { font-size: 13px; color: #bdd0e8; font-weight: 600; }
.user-role { font-size: 11px; color: #7f92af; }

.app-main {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 54px);
}

.sidebar-panel {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--line);
}

.sidebar-topbar {
  height: 44px;
  background: #101010;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
}

.hamburger { color: #a7b7ce; font-size: 18px; }
.sidebar-title { color: #f0f6ff; font-size: 22px; font-weight: 600; }

.sidebar-nav { padding: 4px 0 10px; }

.nav-item {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #8fa1bc;
  text-decoration: none;
  padding: 0 14px;
  border-left: 2px solid transparent;
}

.nav-item:hover,
.nav-item.active {
  background: #1d2838;
  border-left-color: var(--accent);
  color: #e4edfb;
}

.nav-icon {
  width: 22px;
  text-align: center;
  color: #b4c4d8;
  font-size: 16px;
}

.nav-label {
  font-size: 16px;
  font-weight: 500;
}

.nav-arrow {
  margin-left: auto;
  color: #a4b5cb;
  font-size: 12px;
}

.nav-group.open .nav-item {
  background: #1d2838;
  border-left-color: var(--accent);
}


.nav-submenu {
  background: var(--bg-sidebar-soft);
  border-top: 1px solid #1f2d42;
  border-bottom: 1px solid #1f2d42;
  padding: 6px 0;
}

.nav-subitem {
  display: block;
  color: #9cb0cb;
  text-decoration: none;
  padding: 8px 44px;
  font-size: 15px;
}

.nav-subitem:hover {
  color: #dbe8fa;
  background: #172133;
}

.app-content {
  min-width: 0;
  background: #1a2433;
}

.content-topbar {
  height: 40px;
  background: #101010;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.page-tab {
  color: #dde9f8;
  font-size: 31px;
  font-weight: 600;
  line-height: 1;
  height: 100%;
  display: flex;
  align-items: center;
  padding-bottom: 0;
  border-bottom: 3px solid var(--accent);
}

.breadcrumb {
  color: #879ab7;
  font-size: 12px;
  font-weight: 600;
}

.dashboard-wrap { padding: 18px 20px; }

.activity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 18px;
}

.activity-title {
  color: #f0f6ff;
  font-size: 33px;
  font-weight: 600;
  margin: 0 0 10px;
}

.activity-card {
  min-height: 640px;
  background: var(--bg-panel);
  border-radius: 4px;
  border: 1px solid #334254;
  padding: 18px 16px;
}

.month-chip {
  width: 195px;
  height: 36px;
  background: #242f40;
  border: 1px solid #334253;
  border-radius: 3px;
  color: #f2f7ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-left: 4px;
}

.timeline {
  margin-top: 16px;
  padding-left: 40px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 16px;
  top: -6px;
  bottom: 10px;
  width: 2px;
  background: #37455a;
}

.timeline-item {
  position: relative;
  margin-bottom: 16px;
}

.timeline-dot {
  position: absolute;
  left: -25px;
  top: 30px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  background: #1c2738;
  box-shadow: inset 0 0 0 2px #1c2738;
}

.timeline-box {
  background: var(--bg-card);
  border: 1px solid #2f3d50;
  border-radius: 8px;
  padding: 12px 16px;
  min-height: 78px;
}

.timeline-date {
  color: #6f829f;
  font-size: 11px;
  margin-bottom: 3px;
  font-weight: 600;
}

.timeline-name {
  color: #a9b8ce;
  font-size: 13px;
  line-height: 1.36;
  font-weight: 500;
}

.timeline-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  margin-left: 4px;
}


.list-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.list-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border-radius: 4px;
  border: 1px solid #2f3d50;
  background: #1c2738;
  color: #00a7ff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.list-page-btn:hover {
  background: #243247;
  color: #4ac6ff;
}

.list-page-btn.is-active {
  background: #00a7ff;
  border-color: #00a7ff;
  color: #ffffff;
}

.list-page-btn.is-disabled {
  opacity: .5;
  pointer-events: none;
  color: #6f849f;
}

.list-page-nav {
  min-width: 78px;
}

@media (max-width: 1600px) {
  .brand { font-size: 30px; }
  .sidebar-title { font-size: 20px; }
  .page-tab { font-size: 20px; }
  .nav-label, .nav-subitem { font-size: 14px; }
  .activity-title { font-size: 28px; }
}

@media (max-width: 1280px) {
  .activity-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 860px) {
  .app-main { grid-template-columns: 58px 1fr; }
  .sidebar-title,
  .nav-label,
  .nav-arrow,
  .nav-submenu { display: none; }
  .sidebar-topbar { justify-content: center; padding: 0; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-icon { width: auto; }

  .activity-grid,
  .grid2,
  .grid3 { grid-template-columns: 1fr; }

  .dashboard-wrap { padding: 12px; }
  .content-topbar { padding: 0 10px; }
  .page-tab { font-size: 16px; }
  .breadcrumb { font-size: 10px; }
}

/* List pages (Animes / Filmes / Todos) */
.list-shell .app-header {
  height: 54px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.list-main {
  display: grid;
  grid-template-columns: 38px 1fr;
  min-height: calc(100vh - 54px);
}

.list-sidebar {
  background: #111a28;
  border-right: 1px solid #253447;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 6px;
  gap: 4px;
}

.list-icon-link {
  width: 100%;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8fa1bc;
  text-decoration: none;
  border-left: 2px solid transparent;
  font-size: 14px;
}

.list-icon-link:hover,
.list-icon-link.active {
  background: #1a2637;
  border-left-color: #00a7ff;
  color: #e5efff;
}

.list-content {
  min-width: 0;
  background: #1a2433;
}

.list-topbar {
  height: 40px;
  background: #101010;
  border-bottom: 1px solid #253447;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.list-topbar-title {
  color: #dde9f8;
  font-size: 31px;
  font-weight: 600;
  padding-bottom: 7px;
  border-bottom: 3px solid #00a7ff;
}

.list-breadcrumb {
  color: #879ab7;
  font-size: 12px;
  font-weight: 600;
}

.list-subnav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 0;
}

.list-subnav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 4px;
  border: 1px solid #334254;
  background: #1b2738;
  color: #9db1ce;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
}

.list-subnav-link:hover,
.list-subnav-link.active {
  border-color: #00a7ff;
  color: #eaf4ff;
  background: #223247;
}

.list-page-wrap {
  padding: 18px 16px;
}

.list-panel {
  background: #2c3645;
  border: 1px solid #334254;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
}

.list-panel-head {
  min-height: 62px;
  padding: 10px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid #334254;
}

.list-panel-title {
  color: #eff6ff;
  font-size: 31px;
  font-weight: 600;
}


.list-panel-stats {
  margin-top: 2px;
  color: #95a7c3;
  font-size: 12px;
  font-weight: 500;
}

.list-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.list-add-btn,
.list-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #00a7ff;
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 4px;
  height: 28px;
  padding: 0 14px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.list-close-btn {
  background: #4f5f76;
}

.list-table-shell {
  padding: 12px;
}

.list-search-row {
  margin-bottom: 10px;
}

.list-search {
  width: 100%;
  height: 32px;
  border-radius: 4px;
  border: 1px solid #2f3d50;
  background: #202b3c;
  color: #d8e3f4;
  padding: 0 12px;
}

.list-search::placeholder {
  color: #8ea1bd;
}

.list-table-wrap {
  overflow-x: auto;
  border: 1px solid #2f3d50;
}

.list-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.list-table thead th {
  height: 40px;
  background: #1f2a39;
  color: #b8c8de;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  padding: 0 10px;
  border-right: 1px solid #2c3b4f;
}

.list-table tbody td {
  height: 72px;
  background: #1f2938;
  color: #93a8c5;
  font-size: 12px;
  padding: 0 10px;
  border-right: 1px solid #2c3b4f;
  border-top: 1px solid #2a394d;
  vertical-align: middle;
}

.list-table tbody tr:nth-child(odd) td {
  background: #242f3f;
}

.list-table th:last-child,
.list-table td:last-child {
  border-right: 0;
}

.bg-cell {
  width: 112px;
}

.bg-thumb {
  width: 94px;
  height: 52px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid #334254;
  display: block;
}

.bg-thumb-empty {
  background: #152131;
  color: #6f849f;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.id-link {
  color: #00a7ff;
  text-decoration: none;
  font-weight: 600;
}

.actions-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.actions-cell a {
  color: #84c8ff;
  text-decoration: none;
  font-size: 11px;
}

.actions-cell form {
  margin: 0;
}

.mini-del {
  border: 0;
  background: transparent;
  color: #f09b9b;
  cursor: pointer;
  padding: 0;
  font-size: 11px;
}

.empty-row {
  text-align: center;
  color: #90a3bf;
}

.add-panel .list-panel-head {
  align-items: center;
}

.add-form {
  padding: 14px;
}

.add-form .list-add-btn {
  margin-top: 10px;
}

.add-box {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #2f3f54;
  border-radius: 8px;
  background: #1a2637;
}

.add-box-title {
  font-size: 18px;
  font-weight: 700;
  color: #e6effb;
  margin-bottom: 6px;
}

.add-box-desc {
  color: #9ab0cc;
  font-size: 12px;
  margin-bottom: 10px;
}

.add-field-help {
  margin-top: 6px;
  font-size: 12px;
  color: #8fa6c3;
}

.add-field-help code {
  background: #111a29;
  border: 1px solid #2c3a4f;
  border-radius: 4px;
  padding: 1px 6px;
  color: #d7e6fa;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 6px;
}

.radio-row label {
  margin: 0;
  font-size: 13px;
  color: #cfe0f6;
}

.radio-row input[type="radio"] {
  width: auto;
  margin-right: 4px;
}

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

.status-wrap {
  display: flex;
  align-items: center;
}

@media (max-width: 1600px) {
  .list-topbar-title,
  .list-panel-title {
    font-size: 20px;
  }
}

@media (max-width: 860px) {
  .list-main {
    grid-template-columns: 34px 1fr;
  }

  .list-topbar {
    padding: 0 10px;
  }

  .list-topbar-title {
    font-size: 16px;
    padding-bottom: 5px;
  }

  .list-breadcrumb {
    font-size: 10px;
  }

  .list-page-wrap {
    padding: 10px;
  }

  .grid5 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Original-like player page */
.player-page.original-player {
  margin: 0;
  background: #070b12;
  color: #dce6f5;
}

.player-original-wrap {
  max-width: 1500px;
  margin: 14px auto 28px;
  padding: 0 14px;
}

.player-layout {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.player-main-column {
  min-width: 0;
}

.player-side-column {
  min-width: 0;
}

.player-side-card {
  border: 1px solid #2a3343;
  border-radius: 8px;
  background: #121823;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .28);
}

.player-side-title {
  padding: 9px 10px;
  border-bottom: 1px solid #293548;
  background: #171f2d;
  color: #edf5ff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.player-side-body {
  padding: 10px;
}

.player-side-cover-wrap {
  width: 100%;
  max-width: 172px;
  margin: 0 auto 10px;
  border: 1px solid #334358;
  border-radius: 6px;
  overflow: hidden;
  background: #0d131d;
}

.player-side-cover {
  width: 100%;
  aspect-ratio: 225 / 348;
  object-fit: cover;
  display: block;
}

.player-side-cover-empty {
  width: 100%;
  aspect-ratio: 225 / 348;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #889bb6;
  font-size: 12px;
}

.player-side-info {
  border-top: 1px solid #233146;
}

.player-side-row {
  padding: 7px 0;
  border-bottom: 1px dashed #253247;
  color: #dce7f8;
  font-size: 13px;
  line-height: 1.35;
}

.player-side-row:last-child {
  border-bottom: 0;
}

.player-side-row--genres {
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px dashed #253247;
}

.player-side-row strong {
  color: #ffffff;
  font-weight: 700;
}

.player-side-synopsis {
  padding: 10px;
  color: #d7e3f4;
  font-size: 13px;
  line-height: 1.45;
}

.player-side-synopsis strong {
  color: #ffffff;
}

.player-side-related-list {
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-side-related-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 6px;
  border: 1px solid #2b374b;
  border-radius: 6px;
  background: #111826;
  text-decoration: none;
  color: #e5eefb;
}

.player-side-related-item:hover {
  border-color: #00a7ff;
}

.player-side-related-thumb-wrap {
  width: 56px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #33445a;
  background: #0c121b;
}

.player-side-related-thumb,
.player-side-related-thumb-empty {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
}

.player-side-related-thumb {
  object-fit: cover;
}

.player-side-related-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #8ea0b9;
}

.player-side-related-text {
  min-width: 0;
}

.player-side-related-name {
  font-size: 12px;
  line-height: 1.25;
  color: #eff6ff;
  font-weight: 600;
}

.player-side-related-genres {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.3;
  color: #90a2bd;
}

.player-top-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  margin-bottom: 14px;
}

.player-source-switch {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.player-source-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  height: 30px;
  padding: 0 12px;
  border-radius: 4px;
  text-decoration: none;
  color: #d8e4f6;
  background: #171d28;
  border: 1px solid #263246;
  font-size: 12px;
  font-weight: 700;
}

.player-source-btn:hover {
  border-color: #00a7ff;
  color: #ecf6ff;
}

.player-source-btn.is-active {
  border-color: #00a7ff;
  color: #ecf6ff;
  background: #0f2234;
}

.player-top-actions-right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.player-season-nav {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.player-season-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 126px;
  height: 30px;
  padding: 0 12px;
  border-radius: 4px;
  text-decoration: none;
  color: #d8e4f6;
  background: #171d28;
  border: 1px solid #263246;
  font-size: 12px;
  font-weight: 600;
}

.player-season-link:hover {
  border-color: #00a7ff;
  color: #ecf6ff;
}
.player-episode-counts {
  margin: 0 0 14px;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid #1f2938;
  background: #0b1018;
  color: #b7c8df;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.player-episode-counts-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.player-episode-counts-item strong {
  color: #ecf5ff;
  font-weight: 700;
}

.player-last-watch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  padding: 7px 10px;
  border-radius: 4px;
  border: 1px solid #1f2938;
  background: #05070c;
  color: #dce7f8;
  font-size: 13px;
  line-height: 1.2;
}

.player-last-watch strong {
  color: #f0cc47;
  font-weight: 700;
}

.player-last-watch-clear {
  border: 0;
  height: 26px;
  padding: 0 10px;
  border-radius: 4px;
  background: #d0121d;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.player-admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  height: 30px;
  padding: 0 12px;
  border-radius: 4px;
  text-decoration: none;
  color: #d8e4f6;
  background: #171d28;
  border: 1px solid #263246;
  font-size: 12px;
  font-weight: 600;
}

.player-admin-link:hover {
  border-color: #00a7ff;
  color: #ecf6ff;
}

.player-empty-list {
  border: 1px solid #1f2a3c;
  border-radius: 8px;
  background: #111723;
  color: #9bb0ce;
  padding: 16px;
  text-align: center;
  font-size: 14px;
}

.player-episode-section {
  margin-bottom: 22px;
}

.player-episode-section:last-child {
  margin-bottom: 0;
}

.player-episode-section-title {
  margin: 0 0 12px;
  padding: 9px 12px;
  border: 1px solid #283448;
  border-radius: 6px;
  background: #121926;
  color: #e9f2ff;
  font-size: 18px;
  font-weight: 700;
}
.player-episode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.player-episode-card {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: #d9e4f7;
  border: 1px solid #2a3343;
  background: #171d27;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .28);
  transition: transform .12s ease, border-color .12s ease;
}

.player-episode-card:hover {
  transform: translateY(-2px);
  border-color: #3c4b62;
}

.player-episode-card.is-active {
  border-color: #ff1e2a;
}

.player-thumb-wrap {
  position: relative;
}

.player-episode-thumb,
.player-episode-thumb-empty {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #101722;
}

.player-episode-thumb {
  object-fit: cover;
}

.player-episode-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7f92ae;
  font-size: 12px;
}

.player-episode-quality,
.player-episode-last-badge {
  position: absolute;
  top: 8px;
  height: 20px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  z-index: 2;
}

.player-episode-quality {
  right: 8px;
  background: #d6121d;
}

.player-episode-last-badge {
  left: 8px;
  background: #b60016;
  display: none;
}

.player-episode-card.was-last .player-episode-last-badge {
  display: inline-flex;
}

.player-episode-meta {
  padding: 10px 12px 12px;
  background: #171d27;
}

.player-episode-title {
  font-size: 17px;
  font-weight: 600;
  color: #ebf2ff;
  margin-bottom: 5px;
  line-height: 1.25;
}

.player-episode-index {
  color: #ff2130;
  margin-right: 5px;
}

.player-episode-desc {
  font-size: 13px;
  color: #90a2bf;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.episode-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, .86);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
}

.episode-loading-overlay[hidden] {
  display: none !important;
}

.player-load-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid #4d5768;
  border-top-color: #ff1b29;
  animation: player-spin .7s linear infinite;
}

.player-load-text {
  color: #dfe8f8;
  font-size: 36px;
  font-weight: 500;
}

.player-page.original-player.player-mode {
  background: #000;
}

.player-watch-stage {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 20;
}

.player-back-btn {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 40;
  min-width: 80px;
  height: 40px;
  padding: 0 12px;
  border-radius: 3px;
  background: #d00d1d;
  color: #fff;
  text-decoration: none;
  font-size: 35px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.player-back-btn:hover {
  background: #eb1528;
}

.player-source-switch-play {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 41;
  margin: 0;
}

.player-watch-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-full-iframe {
  border: 0;
}

.player-full-video {
  object-fit: contain;
}

.player-watch-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9aacca;
  font-size: 14px;
}

.player-watch-loading {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .88);
  z-index: 35;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
}

.player-watch-loading.is-visible {
  display: flex;
}

@keyframes player-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 1180px) {
  .player-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .player-episode-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .player-load-text {
    font-size: 28px;
  }

  .player-back-btn {
    font-size: 18px;
  }
}

@media (max-width: 900px) {
  .player-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .player-top-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .player-top-actions-right {
    justify-content: flex-start;
  }

  .player-season-nav {
    justify-content: flex-start;
  }

  .player-episode-counts {
    gap: 8px 10px;
  }

  .player-last-watch {
    max-width: 100%;
  }

  .player-episode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width: 560px) {
  .player-original-wrap {
    padding: 0 10px;
  }

  .player-episode-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .player-episode-title {
    font-size: 16px;
  }

  .player-load-text {
    font-size: 24px;
  }

  .player-back-btn {
    min-width: 74px;
    height: 36px;
    font-size: 16px;
    top: 10px;
    left: 10px;
  }

  .player-source-switch-play {
    top: 54px;
    left: 10px;
    right: auto;
    max-width: calc(100% - 20px);
  }
}


.link-edit {
  color: #59c1ff;
  text-decoration: none;
  margin-right: 10px;
}

.link-edit:hover {
  text-decoration: underline;
}

.link-btn.link-edit {
  color: #1ea7ff;
  text-decoration: none;
  margin-right: 10px;
}

.link-btn.link-edit:hover {
  color: #64c3ff;
  text-decoration: underline;
}
