/* ── Layout ──────────────────────────────────────── */
body {
  background: #0f1117;
  color: #e0e0e0;
  min-height: 100vh;
}

.sidebar {
  background: #1a1d27;
  border-right: 1px solid #2a2d3a;
  min-height: calc(100vh - 56px);
  overflow-y: auto;
  position: sticky;
  top: 56px;
  max-height: calc(100vh - 56px);
}

/* ── Form controls ───────────────────────────────── */
.form-control,
.form-select {
  background: #252836;
  border: 1px solid #3a3d50;
  color: #e0e0e0;
}

.form-control:focus,
.form-select:focus {
  background: #2e3145;
  border-color: #6c6fff;
  color: #e0e0e0;
  box-shadow: 0 0 0 2px rgba(108,111,255,.25);
}

.form-check-input {
  background-color: #252836;
  border-color: #4a4d60;
}

.form-check-input:checked {
  background-color: #6c6fff;
  border-color: #6c6fff;
}

/* ── Genre grid ──────────────────────────────────── */
.genre-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

/* ── Watch provider pills ────────────────────────── */
.provider-label {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #3a3d50;
  background: #252836;
  cursor: pointer;
  font-size: .8rem;
  color: #aaa;
  transition: all .15s ease;
  user-select: none;
}

.provider-label:hover {
  border-color: #6c6fff;
  color: #e0e0e0;
}

.provider-label.active {
  background: #6c6fff;
  border-color: #6c6fff;
  color: #fff;
}

/* ── Actor autocomplete ──────────────────────────── */
.suggestions-dropdown {
  position: absolute;
  z-index: 1000;
  background: #252836;
  border: 1px solid #3a3d50;
  border-radius: 6px;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
}

.suggestion-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: .875rem;
  transition: background .1s;
}

.suggestion-item:hover {
  background: #3a3d55;
}

.actor-tag {
  background: #6c6fff;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .8rem;
  padding: 4px 8px;
}

/* ── Movie cards ─────────────────────────────────── */
.movie-card {
  background: #1a1d27;
  border: 1px solid #2a2d3a;
  border-radius: 8px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  border-color: #6c6fff;
}

.future-release {
  border-color: #666 !important;
  border-style: dashed !important;
}

.poster-wrapper {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: #252836;
}

.poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-poster {
  width: 100%;
  height: 100%;
}

.rating-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,.75);
  color: #ffd700;
  font-size: .75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.movie-title {
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.x-small {
  font-size: .75rem;
}

/* ── Landing / empty state ───────────────────────── */
.landing-empty {
  opacity: .5;
}

/* ── Pagination ──────────────────────────────────── */
.btn-outline-secondary {
  border-color: #3a3d50;
  color: #aaa;
}

.btn-outline-secondary:hover {
  background: #3a3d55;
  color: #fff;
  border-color: #6c6fff;
}

/* ── Navbar ──────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
}

.letter-spacing {
  letter-spacing: .08em;
  font-size: .7rem;
}

/* ── Range input ─────────────────────────────────── */
.form-range::-webkit-slider-thumb {
  background: #6c6fff;
}

.form-range::-moz-range-thumb {
  background: #6c6fff;
}

/* ── Movie detail modal ──────────────────────────── */
.modal-backdrop {
  background-color: #000;
  opacity: .85 !important;
}

.modal-dark .modal-content {
  background: #07080f;
  border: 1px solid #1e2030;
  color: #e0e0e0;
}

.modal-dark .modal-body {
  background: #07080f;
}

.modal-backdrop-hero {
  position: relative;
  height: 220px;
  background-size: cover;
  background-position: center top;
  background-color: #07080f;
  border-radius: .375rem .375rem 0 0;
  overflow: hidden;
}

.modal-backdrop-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,.5) 0%,
    rgba(7,8,15,1) 100%
  );
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 10;
}

.rating-lg {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffd700;
}

/* ── Details grid (label + value pairs) ──────────── */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.detail-item {
  background: #0f1020;
  border-radius: 6px;
  padding: 8px 10px;
  border: 1px solid #1e2030;
}

.detail-label {
  display: block;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #888;
  margin-bottom: 2px;
}

/* ── Cast strip ──────────────────────────────────── */
.cast-member {
  width: 80px;
  flex-shrink: 0;
}

.cast-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: #0f1020;
  border: 2px solid #1e2030;
}

/* ── Streaming provider pills ────────────────────── */
.provider-pill {
  background: #0f1020;
  border: 1px solid #1e2030;
  border-radius: 10px;
  padding: 6px 12px;
  transition: border-color .15s;
}

.provider-pill:hover {
  border-color: #6c6fff;
}

.provider-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.provider-type-label {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #666;
  margin-bottom: 6px;
}

.cast-no-photo {
  color: #555;
}

.cast-name {
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cast-char {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ── Scrollbar ───────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #1a1d27;
}

::-webkit-scrollbar-thumb {
  background: #3a3d55;
  border-radius: 3px;
}
