:root {
  --blue: #2f6bff;
  --blue-soft: #eef4ff;
  --bg: #f5f7fc;
  --text: #172033;
  --muted: #7f8ba3;
  --line: #e8eef8;
  --white: #ffffff;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --shadow: 0 14px 35px rgba(20, 34, 66, 0.08);
  --radius-xl: 28px;
  --radius-lg: 24px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Poppins", sans-serif;
  background: var(--bg);
  color: var(--text);
}

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

button,
input {
  font-family: inherit;
}

.page {
  padding: 26px 0 60px;
}

.container {
  width: min(1248px, calc(100% - 48px));
  margin: 0 auto;
}

/* NAVBAR */
.navbar {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 0 34px;
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.logo {
  flex: 0 0 auto;
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -1.5px;
}

.logo span {
  position: relative;
}

.logo span::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--blue);
  top: 2px;
  right: -9px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 36px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.nav-link.active {
  background: var(--blue-soft);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  width: 58px;
  height: 3px;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--blue);
}

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.search-box {
  width: 260px;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid #d9e1f2;
  border-radius: 14px;
  background: var(--white);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
}

.search-box input::placeholder {
  color: #9aa6bd;
}

.search-icon {
  width: 19px;
  height: 19px;
  border: 2px solid #8fa0bf;
  border-radius: 50%;
  position: relative;
  flex: 0 0 auto;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  background: #8fa0bf;
  transform: rotate(45deg);
  right: -6px;
  bottom: -3px;
  border-radius: 99px;
}

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1.5px solid var(--blue);
  padding: 0 22px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 10px 20px rgba(47, 107, 255, 0.2);
}

.btn-outline {
  background: var(--white);
  color: var(--blue);
}

.btn-white {
  background: var(--white);
  color: var(--blue);
  border-color: var(--white);
}

/* SHARED */
.content-grid {
  display: grid;
  grid-template-columns: 820px 396px;
  gap: 32px;
  align-items: start;
}

.left-stack,
.right-stack {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

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

.section-title {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.see-all {
  font-size: 12px;
  font-weight: 800;
  color: var(--blue);
}

/* DETAIL PAGE */
.detail-page {
  margin-top: 32px;
}

.detail-hero {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: var(--shadow);
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.10));
}

.detail-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  padding: 44px 42px;
}

.detail-poster {
  width: 220px;
  height: 300px;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
  background: #e8eef8;
}

.detail-hero-info {
  max-width: 760px;
  color: var(--white);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.detail-hero-info h1 {
  margin-top: 18px;
  font-size: 42px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1px;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
}

.detail-hero-info .subtitle {
  margin-top: 10px;
  font-size: 17px;
  font-weight: 700;
  color: #eef4ff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.detail-hero-info .short-desc {
  width: min(640px, 100%);
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.7;
  font-weight: 600;
  color: #f5f7ff;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 26px;
}

.hero-actions .btn {
  min-width: 176px;
  height: 48px;
}

/* DETAIL CONTENT */
.detail-body {
  margin-top: 32px;
}

.synopsis-card {
  padding: 28px;
}

.synopsis-text {
  color: #5f6b82;
  font-size: 14px;
  line-height: 1.8;
  font-weight: 600;
}

.genre-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.genre-list span {
  height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.info-card {
  padding: 26px 28px;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.info-item label {
  display: block;
  margin-bottom: 3px;
  color: #1f2937;
  font-size: 13px;
  font-weight: 800;
}

.info-item p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.episodes-card {
  padding: 28px;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.episode-card {
  position: relative;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  transition: 0.2s ease;
}

.episode-card:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(47, 107, 255, 0.10);
}

.episode-card.active {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.episode-card strong {
  font-size: 13px;
  font-weight: 800;
}

.episode-card small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.latest-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
}

.download-card {
  padding: 22px 18px;
}

.download-card .section-title {
  font-size: 18px;
  margin-bottom: 10px;
}

.download-desc {
  margin-bottom: 16px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text);
  font-weight: 700;
}

.download-table {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.download-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
  background: #f8faff;
}

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

.download-cell {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}

.download-btn {
  min-width: 98px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

/* QUICK LINKS */
.quick-card {
  padding: 26px 28px;
  text-align: center;
}

.quick-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
  align-items: center;
}

.quick-link {
  width: 220px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8faff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.quick-link.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

/* WATCH PAGE */
.watch-page {
  margin-top: 32px;
}

.video-player {
  position: relative;
  height: 460px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #111827 url("assets/watch-bg.jpg") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.stream-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #111827;
}


.video-player::before {
  content: none;
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue);
  font-size: 34px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.20);
}

.video-controls {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 24px;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
}

.progress {
  position: relative;
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.35);
}

.progress span {
  position: absolute;
  left: 0;
  top: 0;
  width: 36%;
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
}

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

.watch-info {
  margin-top: 32px;
  padding: 28px;
}

.watch-label {
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.watch-info-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.watch-info h1 {
  font-size: 25px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.watch-info p {
  max-width: 620px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  font-weight: 700;
}

.episode-nav {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.episode-nav .btn {
  height: 42px;
  min-height: 42px;
}

.detail-side-card {
  padding: 28px;
}

.detail-side-content {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.side-poster {
  width: 110px;
  height: 150px;
  border-radius: 16px;
  object-fit: cover;
  background: #e8eef8;
}

.side-info h3 {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 800;
}

.side-info p {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
}

.detail-side-card .btn {
  width: 100%;
  height: 44px;
  margin-top: 24px;
}

.continue-card {
  padding: 28px;
}

.continue-card h2 {
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 800;
}

.continue-card p {
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 800;
}

.continue-progress {
  height: 8px;
  margin: 22px 0;
  border-radius: 999px;
  background: var(--line);
}

.continue-progress span {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
}

.continue-card .btn {
  min-width: 190px;
}

.recommend-card {
  padding: 26px 24px 30px;
  margin-top: 32px;
}

.recommend-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px;
}

.recommend-item img {
  width: 100%;
  height: 78px;
  border-radius: 14px;
  object-fit: cover;
  background: #e8eef8;
}

.recommend-item h3 {
  margin-top: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 800;
}

.recommend-item p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

/* FOOTER */
.footer {
  min-height: 160px;
  display: grid;
  grid-template-columns: 1.7fr 0.7fr 0.8fr 0.95fr 0.8fr;
  gap: 40px;
  align-items: start;
  margin-top: 34px;
  padding: 32px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.footer .logo {
  display: inline-block;
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.copyright {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #c1cadb;
}

.footer-title {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 800;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.socials {
  display: flex;
  gap: 11px;
}

.socials img {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
}

/* RESPONSIVE */
@media (max-width: 1180px) {
  .navbar {
    height: auto;
    min-height: 72px;
    flex-wrap: wrap;
    padding: 20px 24px;
  }

  .nav-menu {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
  }

  .nav-actions {
    margin-left: auto;
  }

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

  .right-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-card,
  .continue-card {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 28px, 1248px);
  }

  .nav-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .search-box {
    width: 100%;
  }

  .detail-hero-content {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 22px;
  }

  .detail-poster {
    width: 160px;
    height: 220px;
  }

  .detail-hero-info h1 {
    font-size: 30px;
  }

  .hero-actions,
  .watch-info-grid,
  .episode-nav {
    flex-direction: column;
  }

  .episode-grid,
  .recommend-row {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .right-stack {
    display: flex;
  }

  .video-player {
    height: 280px;
  }

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