@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Cinzel:wght@600;800&family=Pirata+One&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #000000;
  --bg-elevated: #000000;
  --bg-soft: #030303;
  --card: #050505;
  --text: #f2f1ec;
  --text-dim: #a6a29c;
  --accent: #b5121b;
  --accent-hover: #d4181f;
  --gold: #cda349;
  --border: rgba(255, 255, 255, 0.12);
  --radius: 6px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

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

::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}
::-webkit-scrollbar-thumb {
  background: #3a3a3a;
  border-radius: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}

header.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4vw;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

header.site-header.scrolled {
  background: var(--bg-elevated);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 34px;
  min-width: 0;
  flex: 1 1 auto;
}

.search-wrap,
.header-actions {
  flex: 0 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  flex-shrink: 0;
}

.brand-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: screen;
  transition: transform 0.4s var(--ease);
}

.brand:hover .brand-logo {
  transform: scale(1.05);
}

nav.main-nav {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  min-width: 0;
}
nav.main-nav::-webkit-scrollbar {
  display: none;
}
nav.main-nav button {
  flex-shrink: 0;
}

nav.main-nav button {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.94rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  position: relative;
  transition: color 0.2s;
}

nav.main-nav button::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width 0.25s var(--ease);
}

nav.main-nav button:hover {
  color: var(--text);
}

nav.main-nav button.active {
  color: var(--text);
  font-weight: 700;
}

nav.main-nav button.active::after {
  width: 100%;
}

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

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.search-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}
.search-toggle svg {
  width: 19px;
  height: 19px;
}

#searchInput.search-input {
  width: 0;
  opacity: 0;
  margin-left: 0;
  padding: 8px 0;
  border: none;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  transition: width 0.25s var(--ease), opacity 0.25s var(--ease), margin-left 0.25s var(--ease),
    border-color 0.25s;
}
.search-input::placeholder {
  color: var(--text-dim);
}
.search-wrap.open #searchInput.search-input {
  width: 200px;
  opacity: 1;
  margin-left: 8px;
  border-bottom-color: var(--border);
}
.search-wrap.open .search-input:focus {
  outline: none;
  border-bottom-color: var(--gold);
}

.search-results {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  max-height: 70vh;
  overflow-y: auto;
  background: rgba(10, 10, 10, 0.98);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.7);
  display: none;
  z-index: 130;
}
.search-results.open {
  display: block;
}

.search-empty {
  padding: 16px;
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
}

.search-result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.search-result-row:last-child {
  border-bottom: none;
}
.search-result-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.search-result-thumb {
  width: 42px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(150deg, #121212, #000000);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.search-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.search-result-info {
  overflow: hidden;
}
.search-result-title {
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-meta {
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 2px;
}

@media (max-width: 640px) {
  .search-wrap.open #searchInput.search-input {
    width: 120px;
  }
  .search-results {
    width: 260px;
  }
}

.header-actions .ghost-link {
  color: var(--text-dim);
  font-size: 0.82rem;
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 4px;
  transition: 0.2s;
}
.header-actions .ghost-link:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.auth-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.auth-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #111;
}

.user-chip button {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.user-chip button:hover {
  color: var(--text);
}

.hero {
  position: relative;
  height: 78vh;
  min-height: 460px;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 18%;
  animation: kenburns 22s ease-in-out infinite alternate;
}

@keyframes kenburns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.08);
  }
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
      to top,
      var(--bg) 2%,
      rgba(0, 0, 0, 0.55) 32%,
      rgba(0, 0, 0, 0.15) 60%
    ),
    linear-gradient(to right, rgba(0, 0, 0, 0.85) 8%, rgba(0, 0, 0, 0.05) 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 4vw 64px;
  max-width: 620px;
  animation: heroIn 0.9s var(--ease) both;
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-badge {
  display: inline-block;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero-title {
  font-family: 'Bebas Neue', 'Cinzel', sans-serif;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  letter-spacing: 1px;
  line-height: 1;
  margin: 0 0 16px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.hero-meta .tag {
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
}

.hero-desc {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-actions {
  display: flex;
  gap: 12px;
}

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--text);
  color: #111;
  border: none;
  padding: 12px 26px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn-play:hover {
  background: #d9d9d3;
  transform: translateY(-1px);
}
.btn-play svg {
  width: 18px;
  height: 18px;
}

main {
  position: relative;
  z-index: 3;
  padding-bottom: 60px;
  margin-top: -70px;
}

main.no-hero {
  margin-top: 0;
  padding-top: 96px;
}

.row-section {
  padding: 26px 4vw 6px;
}

.row-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 14px;
  letter-spacing: 0.2px;
}

.row-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 6px 2px 18px;
  scroll-snap-type: x proximity;
}

.card {
  flex: 0 0 auto;
  width: 190px;
  scroll-snap-align: start;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
  opacity: 0;
  transform: translateY(16px);
  animation: cardIn 0.5s var(--ease) forwards;
}

@keyframes cardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.55);
  z-index: 5;
}

.card .poster {
  aspect-ratio: 2 / 3;
  background: linear-gradient(150deg, #121212, #000000);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

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

.card .poster .initials {
  font-family: 'Cinzel', serif;
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-dim);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.25s;
  display: flex;
  align-items: flex-end;
  padding: 10px;
}

.card:hover .card-overlay {
  opacity: 1;
}

.card-overlay .ct {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
}

.lock-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid var(--gold);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.lock-badge svg {
  width: 14px;
  height: 14px;
}

.progress-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
}
.progress-bar > i {
  display: block;
  height: 100%;
  background: var(--accent);
}

.card .meta-line {
  padding: 8px 10px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 120px 20px 80px;
}

.hover-preview {
  position: fixed;
  width: 300px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 26px 50px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: scale(0.88);
  transform-origin: center center;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  pointer-events: none;
  z-index: 150;
}
.hover-preview.show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hp-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(150deg, #121212, #000000);
}
.hp-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
  pointer-events: none;
}
.hp-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.35) 50%, rgba(0, 0, 0, 0.85) 100%);
  z-index: 1;
}
.hp-title-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 10%;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.3px;
  line-height: 1.25;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 6px 18px rgba(0, 0, 0, 0.8);
  z-index: 2;
}

.hp-body {
  padding: 14px 16px 6px;
}

.hp-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.hp-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--text);
  color: #111;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
}
.hp-play-btn:hover {
  background: #d9d9d3;
  transform: scale(1.08);
}
.hp-play-btn svg {
  width: 18px;
  height: 18px;
}

.hp-ep-btn {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.hp-ep-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}
.hp-ep-btn svg {
  width: 17px;
  height: 17px;
}

.hp-meta {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.hp-desc {
  color: var(--text-dim);
  font-size: 0.84rem;
  line-height: 1.45;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hp-episodes {
  max-height: 230px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  display: none;
}
.hp-episodes.open {
  display: block;
}

.hp-episode-row {
  display: flex;
  flex-direction: column;
  padding: 9px 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.hp-episode-row:hover {
  background: rgba(255, 255, 255, 0.06);
}
.hp-episode-label {
  font-size: 0.83rem;
  font-weight: 700;
}
.hp-episode-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 1px;
}
.hp-episodes-empty {
  padding: 12px 16px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
  padding: 0 4vw 40px;
}
.section-grid .card {
  width: 100%;
}

.tv-layout {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 100px 4vw 40px;
}

.tv-sidebar {
  width: 260px;
  flex-shrink: 0;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tv-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.2px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.tv-cat-item:hover {
  border-color: var(--gold);
}
.tv-cat-item.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #131313;
}

.tv-cat-count {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-weight: 800;
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 12px;
  flex-shrink: 0;
}
.tv-cat-item.active .tv-cat-count {
  background: rgba(0, 0, 0, 0.22);
  color: #131313;
}

.tv-grid {
  flex: 1;
  padding: 0;
}

@media (max-width: 860px) {
  .tv-layout {
    flex-direction: column;
  }
  .tv-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    position: static;
    max-height: none;
  }
  .tv-cat-item {
    flex: 0 0 auto;
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal {
  width: 380px;
  max-width: 92vw;
  background: rgba(15, 15, 15, 0.96);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 34px 32px 28px;
  transform: translateY(24px) scale(0.98);
  opacity: 0;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}
.modal-backdrop.open .auth-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.auth-modal h2 {
  margin: 0 0 20px;
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.3rem;
  cursor: pointer;
}
.modal-close:hover {
  color: var(--text);
}

.auth-modal-wrap {
  position: relative;
}

.account-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 1.05rem;
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 2px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  transition: color 0.15s;
}
.account-row:hover {
  color: var(--gold);
}
.account-chevron {
  color: var(--text-dim);
  font-size: 1.3rem;
  transition: transform 0.2s;
}
.account-row.open .account-chevron {
  transform: rotate(90deg);
}

#changePasswordForm {
  padding-top: 14px;
}

.watch-header-spacer {
  height: 78px;
}

.watch-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 4vw 60px;
}

.paywall {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: linear-gradient(150deg, #171208, #000000);
  border: 1px solid var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}
.paywall svg {
  width: 42px;
  height: 42px;
  color: var(--gold);
  margin-bottom: 16px;
}
.paywall h2 {
  font-family: 'Cinzel', serif;
  margin: 0 0 10px;
}
.paywall p {
  color: var(--text-dim);
  max-width: 420px;
  line-height: 1.5;
  margin: 0;
}

.player-wrap {
  position: relative;
  border-radius: var(--radius);
  background: #000;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  aspect-ratio: 16 / 9;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
  cursor: pointer;
  border-radius: inherit;
}

.player-wrap.idle {
  cursor: none;
}

.player-info-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 6% 5% 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  border-radius: inherit;
}

.player-wrap.show-info .player-info-overlay {
  opacity: 1;
  transform: translateY(0);
}

.info-eyebrow {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.info-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.3rem, 3vw, 2rem);
  margin: 0 0 6px;
}

.info-meta {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.info-desc {
  color: var(--text);
  max-width: 560px;
  font-size: 0.9rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 4% 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  border-radius: inherit;
}

.player-wrap.idle .player-controls {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.seek-bar {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  margin-bottom: 14px;
  transition: height 0.15s;
}
.seek-bar:hover {
  height: 6px;
}

.seek-buffered,
.seek-played {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 2px;
}
.seek-buffered {
  background: rgba(255, 255, 255, 0.35);
  width: 0%;
}
.seek-played {
  background: var(--accent);
  width: 0%;
}
.seek-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 13px;
  height: 13px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.15s;
}
.seek-bar:hover .seek-handle {
  transform: translate(-50%, -50%) scale(1);
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.controls-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ctrl-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s, transform 0.15s;
  position: relative;
}
.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.06);
}
.ctrl-btn svg {
  width: 22px;
  height: 22px;
}

.skip-btn {
  flex-direction: column;
}
.skip-btn span {
  position: absolute;
  font-size: 0.55rem;
  font-weight: 700;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.skip-btn svg {
  width: 24px;
  height: 24px;
}

.time-label {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
}

.live-badge {
  display: none;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  color: var(--accent);
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: 0.5px;
}

.player-wrap.is-live .seek-bar,
.player-wrap.is-live .skip-btn,
.player-wrap.is-live .time-label {
  display: none;
}
.player-wrap.is-live .live-badge {
  display: inline-flex;
}
.player-wrap.is-live .controls-row {
  margin-top: 6px;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 2px;
}

.volume-slider {
  width: 0;
  opacity: 0;
  margin-left: 0;
  accent-color: var(--accent);
  cursor: pointer;
  transition: width 0.2s var(--ease), opacity 0.2s var(--ease), margin-left 0.2s var(--ease);
}
.volume-control:hover .volume-slider,
.volume-slider:focus-visible {
  width: 84px;
  opacity: 1;
  margin-left: 6px;
}

.controls-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.watch-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}

.watch-title {
  margin: 0 0 4px;
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  font-weight: 700;
}

.episode-label {
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 700;
}

.watch-desc {
  color: var(--text-dim);
  max-width: 720px;
  line-height: 1.55;
}

.episodes-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 100%);
  background: rgba(8, 8, 8, 0.97);
  border-left: 1px solid var(--border);
  z-index: 40;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.32s var(--ease), opacity 0.32s var(--ease);
  pointer-events: none;
}
.episodes-panel.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.episodes-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.episodes-panel-header button {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.episodes-panel-header button:hover {
  color: var(--text);
}

.episodes-panel-body {
  overflow-y: auto;
  flex: 1;
}

.watch-episode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  transition: background 0.15s;
}
.watch-episode-row:last-child {
  border-bottom: none;
}
.watch-episode-row:hover {
  background: rgba(255, 255, 255, 0.06);
}
.watch-episode-row.current {
  background: rgba(181, 18, 27, 0.15);
  border-left-color: var(--accent);
}
.watch-episode-title {
  font-weight: 700;
  font-size: 0.9rem;
}
.watch-episode-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 3px;
  line-height: 1.4;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.back-link:hover {
  color: var(--accent);
}

.player-error {
  color: #ff8080;
  margin-top: 12px;
}

.resume-toast {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--gold);
  opacity: 0;
  transition: opacity 0.4s;
}
.resume-toast.show {
  opacity: 1;
}

.game-page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 4vw 60px;
}

.game-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  margin-top: 16px;
  align-items: start;
}

.game-info-col,
.game-side-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.game-info-main {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
}

.game-poster {
  width: 160px;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(150deg, #121212, #000000);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 2rem;
  color: var(--text-dim);
}
.game-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-title {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  margin: 0 0 10px;
}

.game-desc {
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0;
}

.game-info-extra {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 22px;
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.5;
}
.game-info-extra:empty {
  display: none;
}

.game-download-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
}
.game-download-panel h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  margin: 0 0 16px;
}

.game-option-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  margin-bottom: 12px;
  transition: transform 0.15s, background 0.2s;
}
.game-option-btn:last-child {
  margin-bottom: 0;
}
.game-option-btn:hover {
  transform: translateY(-1px);
}

.game-option-btn.free {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
}
.game-option-btn.free:hover {
  background: rgba(255, 255, 255, 0.14);
}

.game-option-btn.premium {
  background: linear-gradient(120deg, var(--gold), #a97f1f);
  color: #131313;
}
.game-option-btn.premium:hover {
  filter: brightness(1.08);
}

.game-option-btn.premium.locked {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: default;
  transform: none;
}
.game-option-btn.premium.locked:hover {
  transform: none;
}
.game-option-btn.premium.locked a {
  color: var(--gold);
  cursor: pointer;
  font-weight: 700;
}
.game-option-btn.premium.locked a:hover {
  text-decoration: underline;
}

.game-option-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: -4px 0 12px;
  line-height: 1.4;
}
.game-option-hint a {
  color: var(--gold);
  cursor: pointer;
  font-weight: 600;
}
.game-option-hint a:hover {
  text-decoration: underline;
}

.ad-slot {
  border: 1px dashed var(--border);
  border-radius: 8px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
}
.ad-slot-label {
  color: var(--text-dim);
  font-size: 0.78rem;
  text-align: center;
  padding: 0 12px;
}
.ad-slot-main {
  min-height: 250px;
}

@media (max-width: 860px) {
  .game-layout {
    grid-template-columns: 1fr;
  }
  .game-side-col {
    flex-direction: column-reverse;
  }
}

.admin-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 110px 24px 60px;
}

.card-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 26px;
  margin-bottom: 24px;
}

.card-panel h2 {
  margin-top: 0;
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
}

label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 14px 0 6px;
}

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

input[type='text'],
input[type='password'],
input[type='url'],
input[type='email'],
input[type='number'],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

textarea {
  resize: vertical;
  min-height: 70px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.checkbox-row input {
  width: auto;
}
.checkbox-row label {
  margin: 0;
}

button.primary {
  margin-top: 20px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s;
}
button.primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.form-msg {
  margin-top: 10px;
  font-size: 0.85rem;
  min-height: 1.2em;
}
.form-msg.error {
  color: #ff6b6b;
}
.form-msg.success {
  color: #7fd9a0;
}

.credentials-box {
  margin-top: 16px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(205, 163, 73, 0.1);
  border: 1px solid var(--gold);
}
.credentials-box .cred-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin-bottom: 2px;
}
.credentials-box .cred-value {
  font-family: 'Courier New', monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 10px;
  user-select: all;
}
.credentials-box .cred-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.user-row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.user-row-actions button {
  font-size: 0.75rem;
  padding: 5px 10px;
}
.sub-badge {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.68rem;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 3px;
  vertical-align: middle;
}
.sub-badge.active {
  color: #131313;
  background: var(--gold);
}
.sub-badge.inactive {
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.login-list {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.login-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-dim);
}
.login-device-icon {
  width: 18px;
  height: 18px;
  color: var(--gold);
  flex-shrink: 0;
  display: flex;
}
.login-device-icon svg {
  width: 100%;
  height: 100%;
}

.admin-movie-block {
  border-bottom: 1px solid var(--border);
}
.admin-movie-block:last-child {
  border-bottom: none;
}

.admin-movie-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 12px;
}

.ep-panel {
  padding: 0 0 16px;
}

.ep-admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.85rem;
  gap: 12px;
}

.ep-form {
  display: grid;
  grid-template-columns: 70px 60px 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.ep-form input {
  padding: 8px 10px;
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .ep-form {
    grid-template-columns: 1fr 1fr;
  }
}

.admin-movie-info {
  overflow: hidden;
}
.admin-movie-title {
  font-weight: 600;
}
.admin-movie-title .badge {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 3px;
  vertical-align: middle;
}
.admin-movie-url {
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}

.danger-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: #ff8080;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.danger-btn:hover {
  border-color: #ff8080;
}

@media (max-width: 640px) {
  nav.main-nav {
    gap: 14px;
  }
  .header-left {
    gap: 18px;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
}
