/* ========================================================================== 
   AnimeStream cinematic refresh
   ========================================================================== */
:root {
  --bg-primary: #080808;
  --bg-secondary: #141414;
  --bg-card: #1b1b1b;
  --bg-card-hover: #292929;
  --accent: #e50914;
  --accent-hover: #f6121d;
  --accent-glow: rgba(229, 9, 20, 0.28);
  --text-main: #f5f5f1;
  --text-muted: #a3a3a3;
  --border-color: rgba(255, 255, 255, 0.12);
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
}

html {
  scroll-behavior: smooth;
  background: var(--bg-primary);
}

body {
  background: var(--bg-primary);
  color: var(--text-main);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 76px;
  padding: 0 clamp(20px, 4vw, 64px);
  background: rgba(8, 8, 8, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  gap: 0.55rem;
  flex-shrink: 0;
  letter-spacing: 0;
}

.brand-monogram {
  color: var(--accent);
  font-size: 2.25rem;
  line-height: 0.9;
  font-weight: 950;
  font-style: italic;
  letter-spacing: -0.16em;
  transform: skew(-8deg);
  text-shadow: 0 2px 18px rgba(229, 9, 20, 0.3);
}

.brand-wordmark {
  color: #f7f7f7;
  display: inline-flex;
  align-items: baseline;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.055em;
}

.brand-wordmark span {
  color: var(--accent);
  margin-left: 0.12rem;
}

.brand-badge {
  background: rgba(255, 255, 255, 0.11);
  color: #e5e5e5;
  padding: 0.16rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 3px;
  font-size: 0.58rem;
  letter-spacing: 0.11em;
}

.search-box {
  flex: 0 1 340px;
  max-width: 340px;
}

.search-box input {
  padding: 0.62rem 1rem 0.62rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
}

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

.search-box input:focus {
  background: rgba(0, 0, 0, 0.86);
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.14);
}

.search-icon {
  color: #fff;
  font-size: 1.55rem;
  line-height: 1;
  left: 0.75rem;
}

/* Wide, cinematic featured title area. */
.hero-banner {
  width: 100%;
  min-height: 560px;
  height: min(82vh, 790px);
  margin-top: -76px;
  margin-bottom: -1.5rem;
  padding: 9rem clamp(24px, 5vw, 76px) 7rem;
  border-radius: 0;
  background-color: #151515;
  background-position: center 24%;
  box-shadow: none;
  align-items: center;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(8, 8, 8, 0.96) 0%, rgba(8, 8, 8, 0.79) 28%, rgba(8, 8, 8, 0.28) 62%, rgba(8, 8, 8, 0.05) 100%),
    linear-gradient(0deg, var(--bg-primary) 0%, rgba(8, 8, 8, 0.2) 38%, rgba(8, 8, 8, 0.05) 72%, rgba(8, 8, 8, 0.28) 100%);
}

.hero-content {
  max-width: 620px;
  padding-top: 1.4rem;
}

.hero-badge {
  margin-bottom: 0.85rem;
  padding: 0.25rem 0.55rem;
  border-radius: 3px;
  background: rgba(229, 9, 20, 0.92);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.hero-title {
  max-width: 700px;
  margin-bottom: 0.85rem;
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-shadow: 0 3px 22px rgba(0, 0, 0, 0.65);
}

.hero-desc {
  max-width: 560px;
  margin-bottom: 1.45rem;
  color: #e3e3e3;
  font-size: clamp(0.93rem, 1.2vw, 1.12rem);
  line-height: 1.55;
  -webkit-line-clamp: 4;
}

.hero-actions {
  gap: 0.7rem;
}

.hero-actions .btn-primary {
  background: #f5f5f1;
  color: #111;
  box-shadow: none;
}

.hero-actions .btn-primary:hover {
  background: #d9d9d9;
}

.hero-actions .btn-secondary {
  background: rgba(109, 109, 110, 0.72);
  border-color: transparent;
  color: #fff;
}

.hero-actions .btn-secondary:hover {
  background: rgba(109, 109, 110, 0.48);
}

.btn-primary,
.btn-secondary {
  border-radius: 4px;
}

/* Category navigation and catalogue heading. */
.tabs-container {
  position: relative;
  z-index: 10;
  padding: 0.75rem clamp(20px, 4vw, 64px) 0.5rem;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.main-tabs {
  gap: 0.75rem;
  padding-bottom: 0;
  scrollbar-width: none;
}

.main-tabs::-webkit-scrollbar,
.sub-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  position: relative;
  padding: 0.65rem 0.45rem 0.72rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #bdbdbd;
  font-size: 0.9rem;
  font-weight: 550;
}

.tab-btn:hover {
  background: transparent;
  color: #fff;
}

.tab-btn.active {
  background: transparent;
  border-color: transparent;
  color: #fff;
  box-shadow: none;
}

.tab-btn.active::after {
  position: absolute;
  right: 0.45rem;
  bottom: 0;
  left: 0.45rem;
  height: 2px;
  background: var(--accent);
  content: "";
}

.sub-tabs {
  gap: 0.35rem;
  padding: 0.15rem 0 0.35rem;
  scrollbar-width: none;
}

.sub-tab-btn {
  padding: 0.35rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #a6a6a6;
}

.sub-tab-btn:hover {
  background: #242424;
  color: #fff;
}

.sub-tab-btn.active {
  background: #242424;
  border-color: #3c3c3c;
  color: #fff;
}

.genre-filter-container {
  width: 100%;
  margin-top: 0.45rem;
  padding: 0.25rem 0;
}

.genre-filter-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.2rem 0.2rem 0.4rem;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}

.genre-filter-pills::-webkit-scrollbar {
  height: 4px;
}

.genre-filter-pills::-webkit-scrollbar-track {
  background: transparent;
}

.genre-filter-pills::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

.genre-pill {
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  background: #1e1e1e;
  color: #a3a3a3;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.genre-pill:hover {
  background: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.genre-pill:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.genre-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(229, 9, 20, 0.35);
}

.section-header {
  padding: 1.35rem clamp(20px, 4vw, 64px) 0.85rem;
}

.section-title {
  gap: 0.65rem;
  font-size: clamp(1.18rem, 1.9vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.section-count {
  font-size: 0.78rem;
  color: #929292;
}

/* Artwork-forward cards, with readable text retained below every poster. */
.grid-container {
  padding: 0 clamp(20px, 4vw, 64px) 2.6rem;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.45rem 0.95rem;
}

@media (min-width: 640px) {
  .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 1.65rem 1.05rem;
  }
}

@media (min-width: 1100px) {
  .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 1.8rem 1.15rem;
  }
}

.card {
  overflow: visible;
  border: 0;
  border-radius: 5px;
  background: transparent;
  box-shadow: none;
}

.card:hover {
  z-index: 2;
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: none;
}

.card-poster {
  aspect-ratio: 2 / 3;
  border-radius: 5px;
  background: #171717;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.3);
}

.card-poster img {
  border-radius: inherit;
}

.card:hover .card-poster img {
  transform: scale(1.045);
}

.card-badge {
  top: 0.55rem;
  left: 0.55rem;
  border: 0;
  border-radius: 2px;
  background: rgba(229, 9, 20, 0.94);
  color: #fff;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

.card-year {
  bottom: 0.55rem;
  right: 0.55rem;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.75);
}

.card-info {
  padding: 0.62rem 0.1rem 0.1rem;
}

.card-title {
  margin-bottom: 0.32rem;
  color: #f3f3f3;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.35;
}

.card-desc {
  color: #969696;
  font-size: 0.73rem;
}

.load-more-container {
  padding: 0.5rem 1.5rem 3rem;
}

.load-more-container .btn-secondary {
  border: 1px solid #444;
  background: #202020;
  color: #ededed;
}

.load-more-container .btn-secondary:hover {
  background: #303030;
}

/* Keep details, episode selection, and the player consistent with the new theme. */
.modal-overlay {
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
}

.modal-content {
  border-color: rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: #141414;
}

.modal-hero-overlay {
  background: linear-gradient(0deg, #141414 0%, rgba(20, 20, 20, 0.55) 55%, rgba(0, 0, 0, 0.15) 100%);
}

.modal-poster {
  border-radius: 5px;
}

.tag,
.cast-chip,
.ep-btn {
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.ep-btn {
  background: #232323;
}

.ep-btn.active,
.ep-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.modal-close {
  border: 0;
  background: rgba(0, 0, 0, 0.72);
}

/* ==========================================================================
   Netflix-Style Cast Carousel (Daftar Pemain)
   ========================================================================== */
.modal-cast-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-cast-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.95rem;
  letter-spacing: -0.015em;
}

.cast-scroll-container {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.25rem 0.25rem 0.85rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.cast-scroll-container::-webkit-scrollbar {
  height: 4px;
}

.cast-scroll-container::-webkit-scrollbar-track {
  background: transparent;
}

.cast-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.cast-card {
  flex: 0 0 88px;
  width: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  user-select: none;
}

.cast-avatar-wrapper {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: #202020;
  border: 2px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 0.55rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.cast-card:hover .cast-avatar-wrapper {
  transform: scale(1.08);
  border-color: rgba(255, 255, 255, 0.45);
}

.cast-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cast-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2b2b2b, #191919);
  color: #e5e5e5;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.cast-meta {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.cast-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f3f3f3;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.cast-character {
  font-size: 0.72rem;
  color: #9ca3af;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

footer {
  border-top-color: rgba(255, 255, 255, 0.1);
  background: #080808;
}

/* ==========================================================================
   Netflix-Style Navigation & Links
   ========================================================================== */
.nav-left {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 36px);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link,
.nav-link-btn {
  background: transparent;
  border: 0;
  color: #e5e5e5;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  padding: 0.4rem 0.2rem;
  transition: color 0.2s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-link:hover,
.nav-link-btn:hover {
  color: #b3b3b3;
}

.nav-link.active {
  color: #fff;
  font-weight: 700;
}

/* ==========================================================================
   Netflix-Style Continue Watching
   ========================================================================== */
.continue-watching-section {
  position: relative;
  z-index: 2;
  margin-top: 0;
  padding-bottom: 1.5rem;
}

.cw-section-header {
  padding-bottom: 0.5rem;
}

.continue-watching-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.25rem clamp(20px, 4vw, 64px) 1rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.continue-watching-row::-webkit-scrollbar {
  height: 5px;
}

.continue-watching-row::-webkit-scrollbar-track {
  background: transparent;
}

.continue-watching-row::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.cw-card {
  flex: 0 0 clamp(200px, 22vw, 260px);
  max-width: 280px;
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.cw-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
}

.cw-poster-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
}

.cw-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.cw-card:hover .cw-poster {
  transform: scale(1.05);
}

.cw-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  border: 0;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.cw-card:hover .cw-play-overlay {
  opacity: 1;
  background: rgba(0, 0, 0, 0.45);
}

.cw-play-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.85);
  border: 2px solid #fff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  padding-left: 3px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.cw-card:hover .cw-play-icon {
  transform: scale(1.1);
  background: var(--accent);
  border-color: var(--accent);
}

.cw-dismiss-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  z-index: 5;
  transition: background-color 0.15s ease;
}

.cw-dismiss-btn:hover {
  background: rgba(229, 9, 20, 0.88);
  border-color: var(--accent);
}

.cw-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.28);
  z-index: 4;
}

.cw-progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.cw-info {
  padding: 0.75rem 0.85rem;
}

.cw-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.3rem;
}

.cw-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.cw-badge {
  color: #e5e5e5;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cw-time-left {
  color: #a3a3a3;
  font-size: 0.72rem;
  white-space: nowrap;
}

/* ==========================================================================
   Watch History Modal
   ========================================================================== */
.history-modal-content {
  max-width: 680px;
  width: 92%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.history-modal-header {
  padding: 1.15rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #141414;
}

.history-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.history-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-clear-history {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #d1d5db;
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 38px;
}

.btn-clear-history:hover {
  background: rgba(229, 9, 20, 0.15);
  border-color: var(--accent);
  color: #fff;
}

.history-modal-body {
  padding: 1rem 1.4rem 1.5rem;
  overflow-y: auto;
  max-height: calc(85vh - 72px);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.85rem;
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  transition: background 0.15s ease;
}

.history-item:hover {
  background: #262626;
  border-color: rgba(255, 255, 255, 0.15);
}

.history-poster {
  width: 54px;
  height: 76px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: #111;
}

.history-details {
  flex: 1;
  min-width: 0;
}

.history-title {
  font-size: 0.95rem;
  font-weight: 650;
  color: #f3f3f3;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-sub {
  font-size: 0.8rem;
  color: #9ca3af;
}

.history-time {
  color: #d1d5db;
}

.history-item-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.history-play-btn {
  background: var(--accent);
  border: 0;
  color: #fff;
  padding: 0.45rem 0.9rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: background-color 0.15s ease;
  min-height: 38px;
}

.history-play-btn:hover {
  background: #f40612;
}

.history-delete-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #9ca3af;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.history-delete-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 640px) {
  .nav-left {
    gap: 0.65rem;
  }

  .nav-links {
    gap: 0.5rem;
  }

  .nav-link {
    display: none;
  }

  .nav-link-btn {
    font-size: 0.78rem;
    padding: 0.35rem 0.6rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.12);
  }

  .genre-filter-pills {
    padding: 0.2rem 16px 0.4rem;
    gap: 0.45rem;
  }

  .continue-watching-row {
    padding: 0.25rem 16px 0.85rem;
    gap: 0.75rem;
  }

  .cw-card {
    flex: 0 0 200px;
    max-width: 220px;
  }

  .cw-dismiss-btn {
    width: 36px;
    height: 36px;
    top: 4px;
    right: 4px;
  }

  .history-modal-content {
    width: 95%;
    max-height: 92vh;
  }

  .history-modal-body {
    padding: 0.75rem 1rem;
    max-height: calc(92vh - 66px);
  }

  .history-poster {
    width: 44px;
    height: 62px;
  }

  .history-title {
    font-size: 0.86rem;
  }

  .history-play-btn {
    padding: 0.4rem 0.65rem;
    font-size: 0.75rem;
  }

  .cast-scroll-container {
    gap: 0.95rem;
  }

  .cast-card {
    flex: 0 0 74px;
    width: 74px;
  }

  .cast-avatar-wrapper {
    width: 62px;
    height: 62px;
    margin-bottom: 0.45rem;
  }

  .cast-name {
    font-size: 0.76rem;
  }

  .cast-character {
    font-size: 0.68rem;
  }
  .navbar {
    height: 66px;
    padding: 0 16px;
    gap: 0.75rem;
  }

  .nav-brand {
    gap: 0.35rem;
  }

  .brand-monogram {
    font-size: 1.9rem;
  }

  .brand-wordmark {
    font-size: 0.88rem;
    letter-spacing: 0.035em;
  }

  .brand-badge {
    display: none;
  }

  .search-box {
    flex: 0 1 45%;
    max-width: 220px;
  }

  .search-box input {
    padding: 0.57rem 0.55rem 0.57rem 2.1rem;
    font-size: 0.78rem;
  }

  .search-icon {
    left: 0.55rem;
  }

  .hero-banner {
    min-height: 510px;
    height: 72vh;
    margin-top: -66px;
    margin-bottom: -1rem;
    padding: 7rem 22px 5.5rem;
    align-items: flex-end;
    background-position: 58% center;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, #080808 0%, rgba(8, 8, 8, 0.83) 27%, rgba(8, 8, 8, 0.3) 64%, rgba(8, 8, 8, 0.18) 100%),
      linear-gradient(90deg, rgba(8, 8, 8, 0.44), transparent 100%);
  }

  .hero-content {
    padding-top: 0;
  }

  .hero-title {
    font-size: clamp(2rem, 9vw, 3.1rem);
  }

  .hero-desc {
    margin-bottom: 1.1rem;
    font-size: 0.9rem;
    -webkit-line-clamp: 3;
  }

  .hero-actions {
    gap: 0.5rem;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    padding: 0.62rem 0.85rem;
    font-size: 0.84rem;
  }

  .tabs-container {
    padding: 0.5rem 16px 0.35rem;
  }

  .main-tabs {
    gap: 0.45rem;
  }

  .tab-btn {
    padding: 0.6rem 0.42rem 0.68rem;
    font-size: 0.82rem;
  }

  .section-header {
    padding: 1.15rem 16px 0.75rem;
  }

  .grid-container {
    padding: 0 16px 2rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem 0.7rem;
  }

  .card-title {
    font-size: 0.82rem;
  }

  .modal-content {
    max-height: 94vh;
  }
}

@media (max-width: 380px) {
  .brand-wordmark {
    font-size: 0.78rem;
  }

  .search-box input {
    font-size: 0.72rem;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    padding: 0.58rem 0.68rem;
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
