body {
  margin: 0;
  background: #0f0f0f;
  color: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Card stuff */
.card.similar-card {
  position: relative;
  cursor: pointer;
}

.card-menu-btn {
  position: absolute;
  right: 6px;
  bottom: 8px;
  background: none;
  border: none;
  color: #aaa;
  font-size: 18px;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 4px;
  z-index: 10;
  transition: background 0.15s, color 0.15s;
}

.card-menu-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.card .title,
.card .price {
  padding-right: 22px;
}

.card-popup-menu {
  display: none;
  position: fixed;
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.75);
  z-index: 99999;
  min-width: 170px;
  padding: 4px 0;
  backdrop-filter: blur(12px);
}

.card-popup-menu.show {
  display: block;
  animation: fadeIn 0.12s ease-out;
}

.card-popup-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  color: #eee;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.card-popup-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Coming to Theaters */
.coming-soon-section {
  margin-bottom: 24px;
}

.coming-soon-section h3 {
  font-size: 16px;
  margin: 0 0 8px 0;
  color: #fff;
  font-weight: 600;
}

.release-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.release-date {
  font-size: 15px;
  color: #e2e2e2;
}

.status-badge {
  font-size: 12px;
  color: #ccc;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px 9px;
  border-radius: 5px;
}

/* Poster + provider icon */
.card.similar-card .poster-container {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 6px;
}

.card.similar-card .poster-container img.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card.similar-card .card-provider-icon {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
  z-index: 5;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

/* Hero */
.hero-container {
  position: relative;
  width: 100%;
}

.hero-backdrop {
  width: 100%;
  height: 25vh;
  min-height: 285px;
  background-size: cover;
  background-position: center top;
  position: relative;
}

.hero-gradient-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, #0f0f0f 0%, rgba(15, 15, 15, 0.75) 45%, transparent 100%);
  pointer-events: none;
}

.floating-back-btn {
  position: absolute;
  top: 18px;
  left: 18px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(8px);
  z-index: 10;
  transition: background 0.2s;
}

.floating-back-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.play-trailer-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 62px;
  height: 62px;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  backdrop-filter: blur(6px);
  z-index: 10;
  transition: all 0.2s;
}

.play-trailer-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  transform: translate(-50%, -50%) scale(1.08);
}

.play-trailer-btn svg {
  width: 30px;
  height: 30px;
  margin-left: 3px;
}

.hero-content-wrapper {
  position: relative;
  padding: 0 20px 24px;
  margin-top: -80px;
  z-index: 5;
  display: flex;
  gap: 28px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.hero-main-info {
  flex: 1;
}

.hero-poster-desktop {
  display: none;
}

.hero-title {
  font-size: 34px;
  font-weight: 800;
  margin: 0 0 6px 0;
  line-height: 1.15;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.director-info,
.company-info {
  font-size: 14px;
  color: #ccc;
  margin-bottom: 10px;
}

.director-info a,
.company-info a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dotted #777;
}

.director-info a:hover,
.company-info a:hover {
  color: #4ade80;
  border-color: #4ade80;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #ccc;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.meta-rating {
  color: #f5c518;
  font-weight: 600;
}

.meta-maturity {
  border: 1px solid #666;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
}

.genres-row {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 18px;
}

/* Action buttons */
.action-buttons-container {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.action-btn {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 9px 16px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  backdrop-filter: blur(8px);
  transition: background 0.2s;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.action-btn .icon {
  font-size: 15px;
  opacity: 0.85;
}

.action-btn.btn-action-active {
  background: #4ade80;
  border-color: #4ade80;
  color: #fff;
}

.login-prompt {
  font-size: 13px;
  color: #888;
  font-style: italic;
}

/* Overview + Providers */
.overview-section h3,
.providers-section h3,
.coming-soon-section h3 {
  font-size: 16px;
  margin: 0 0 9px 0;
  color: #fff;
  font-weight: 600;
}

.overview-text {
  font-size: 14px;
  line-height: 1.55;
  color: #ccc;
  margin-bottom: 24px;
}

.providers-list {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.provider-badge {
  background: rgba(255, 255, 255, 0.07);
  padding: 5px 9px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #ddd;
}

.provider-badge img {
  width: 22px;
  height: 22px;
  border-radius: 3px;
}

/* Desktop */
@media (min-width: 768px) {
  .hero-backdrop {
    height: 68vh;
    min-height: 400px;
  }

  .hero-content-wrapper {
    margin-top: -110px;
    align-items: flex-end;
  }

  .hero-title {
    font-size: 46px;
  }

  .hero-poster-desktop {
    display: block;
    width: 240px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
    transform: translateY(-18px);
  }

  .hero-poster-desktop img {
    width: 100%;
    display: block;
  }
}

/* Content sections */
.content-sections {
  padding: 16px 20px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 28px 0 14px;
}

.section-header h2 {
  font-size: 18px;
  margin: 0;
}

.scroll-arrows {
  display: flex;
  gap: 6px;
}

.scroll-arrow {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: background 0.15s;
}

.scroll-arrow:hover {
  background: rgba(255, 255, 255, 0.22);
}

.horizontal-scroll-grid {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.horizontal-scroll-grid::-webkit-scrollbar {
  display: none;
}

/* Cast cards */
.cast-card {
  min-width: 108px;
  width: 108px;
  background: #1a1a1a;
  border-radius: 7px;
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s;
}

.cast-card:hover {
  transform: scale(1.04);
}

.cast-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.no-image {
  width: 100%;
  height: 160px;
  background: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #777;
}

.cast-name {
  font-size: 13px;
  font-weight: 600;
  margin: 7px 5px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cast-character {
  font-size: 11px;
  color: #888;
  margin: 0 5px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Similar cards */
.similar-section .horizontal-scroll-grid .card.similar-card {
  min-width: 138px;
  width: 138px;
  flex-shrink: 0;
  background: transparent;
}

@media (min-width: 768px) {
  .similar-section .horizontal-scroll-grid .card.similar-card {
    min-width: 155px;
    width: 155px;
  }
}

/* Seasons / Episodes */
.seasons-section {
  margin-top: 8px;
}

#season-select {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 7px 30px 7px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23ccc'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

#season-select:hover {
  background-color: rgba(255, 255, 255, 0.16);
}

#season-select option {
  background: #1a1a1a;
  color: #fff;
}

.episode-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.episode-card {
  display: flex;
  gap: 13px;
  background: #1a1a1a;
  border-radius: 8px;
  padding: 10px;
  transition: background 0.15s;
}

.episode-card:hover {
  background: #222;
}

.episode-card img {
  width: 138px;
  min-width: 138px;
  height: 78px;
  object-fit: cover;
  border-radius: 5px;
  background: #333;
}

.episode-info {
  flex: 1;
  min-width: 0;
}

.episode-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.episode-meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 5px;
}

.episode-overview {
  font-size: 13px;
  color: #ccc;
  line-height: 1.4;
  margin: 0 0 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cast-toggle-btn {
  background: rgba(255, 255, 255, 0.09);
  color: #ddd;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 5px 11px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.cast-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.cast-toggle-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.episode-cast {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 9px;
}

.ep-cast-card {
  min-width: 96px;
  width: 96px;
  background: #222;
  border-radius: 7px;
  overflow: hidden;
  text-align: center;
  flex-shrink: 0;
}

.ep-cast-card img {
  width: 100%;
  height: 125px;
  object-fit: cover;
  display: block;
}

.ep-cast-card .no-image {
  height: 125px;
  background: #2c2c2c;
  font-size: 11px;
  color: #777;
}

.ep-cast-name {
  font-size: 12px;
  font-weight: 600;
  margin: 5px 4px 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-cast-character {
  font-size: 10px;
  color: #888;
  margin: 0 4px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 768px) {
  .episode-card img {
    width: 175px;
    min-width: 175px;
    height: 98px;
  }
}

/* Modals */
.trailer-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.trailer-modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
}

.trailer-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.55);
  border: none;
  color: #fff;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  z-index: 10;
}

.trailer-close-btn:hover {
  background: #e11;
}

#trailerContainer {
  width: 100%;
  height: 100%;
}

/* List modal */
.list-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.list-modal {
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 11px;
  width: 90%;
  max-width: 390px;
  padding: 18px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.7);
}

.list-modal h3 {
  margin: 0 0 12px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #333;
}

.list-option {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid #2a2a2a;
  cursor: pointer;
}

.list-option:last-child {
  border-bottom: none;
}

.list-modal-close {
  margin-top: 14px;
  width: 100%;
  padding: 10px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.list-modal-close:hover {
  background: #444;
}