/**
 * CinemaPointer V4 — Premium cinema UI
 * Clean, readable, no page overflow.
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Syne:wght@600;700;800&display=swap');

:root {
  --cp-bg: #0a0a0c;
  --cp-surface: #141418;
  --cp-surface-2: #1c1c22;
  --cp-amber: #f5a623;
  --cp-amber-2: #ffc14a;
  --cp-amber-deep: #c9840f;
  --cp-text: #f5f5f6;
  --cp-muted: rgba(245, 245, 246, 0.62);
  --cp-line: rgba(255, 255, 255, 0.08);
  --cp-radius: 16px;
  --cp-font: "Outfit", system-ui, sans-serif;
  --cp-display: "Syne", "Outfit", sans-serif;
}

html, body {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

html body {
  font-family: var(--cp-font) !important;
  background:
    radial-gradient(900px 380px at 8% -5%, rgba(245, 166, 35, 0.12), transparent 55%),
    var(--cp-bg) !important;
  color: var(--cp-text) !important;
}

/* ========== HEADER ========== */
html body .theme-header {
  background: rgba(10, 10, 12, 0.9) !important;
  backdrop-filter: blur(18px) !important;
  border-bottom: 1px solid var(--cp-line) !important;
  padding: 0.35rem 0 !important;
  overflow: visible !important;
}

html body .theme-header .container-fluid {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

html body .brand-name {
  font-family: var(--cp-display) !important;
  font-weight: 800 !important;
  font-size: 1.35rem !important;
  letter-spacing: -0.03em !important;
  color: var(--cp-amber) !important;
  background: none !important;
  -webkit-text-fill-color: unset !important;
}

html body .brand-logo {
  width: 40px !important;
  height: 40px !important;
  border: 2px solid rgba(245, 166, 35, 0.45) !important;
}

html body .navbar-nav-desktop {
  display: flex !important;
  align-items: center;
  gap: 0.75rem !important;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

html body .nav-items {
  display: flex !important;
  align-items: center;
  gap: 0.25rem !important;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--cp-line);
  border-radius: 999px;
  padding: 0.25rem;
}

html body .nav-item-content {
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.4rem !important;
}

html body .nav-item-link {
  min-width: 0 !important;
  padding: 0.5rem 0.85rem !important;
  border-radius: 999px !important;
  border: none !important;
  color: var(--cp-muted) !important;
  background: transparent !important;
}

html body .nav-item-link i {
  font-size: 1rem !important;
}

html body .nav-item-label {
  display: inline !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: inherit !important;
  white-space: nowrap !important;
}

html body .nav-item-link:hover {
  color: var(--cp-text) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  transform: none !important;
  box-shadow: none !important;
}

html body .nav-item-link.active {
  color: #111 !important;
  background: linear-gradient(135deg, var(--cp-amber-2), var(--cp-amber)) !important;
  box-shadow: none !important;
}

html body .nav-actions {
  display: flex !important;
  align-items: center;
  gap: 0.45rem !important;
  flex-shrink: 0;
}

html body .nav-action-btn {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--cp-line) !important;
  color: var(--cp-text) !important;
}

html body .theme-primary-btn {
  background: linear-gradient(135deg, var(--cp-amber-2), var(--cp-amber-deep)) !important;
  color: #111 !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  padding: 0.55rem 1.15rem !important;
  border: none !important;
  box-shadow: none !important;
}

@media (max-width: 1199.98px) {
  html body .nav-item-label { display: none !important; }
  html body .nav-item-link { padding: 0.55rem !important; }
}

/* ========== HOME DISCOVER ========== */
html body .cp-home-top {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.25rem 1rem 0.5rem !important;
}

html body .cp-discover-label {
  font-family: var(--cp-display);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cp-muted);
  text-align: center;
  margin-bottom: 0.75rem;
}

html body .social-media-bar,
html body .cp-social-strip {
  display: none !important; /* keep socials in footer only — less clutter */
}

html body .search-container-user-home {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 auto 1.5rem !important;
  background: var(--cp-surface) !important;
  border: 1px solid rgba(245, 166, 35, 0.3) !important;
  border-radius: 999px !important;
  padding: 0.4rem 0.45rem 0.4rem 1.1rem !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35) !important;
}

html body .movie-search-input-home {
  background: transparent !important;
  border: none !important;
  color: var(--cp-text) !important;
  font-size: 1rem !important;
}

html body #filterButton.icon-btn-home {
  background: linear-gradient(135deg, var(--cp-amber-2), var(--cp-amber-deep)) !important;
  color: #111 !important;
  border-radius: 50% !important;
  width: 44px !important;
  height: 44px !important;
}

/* ========== TOOLBAR / TABS ========== */
html body .cp-home-sections {
  max-width: 1100px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

html body .cp-toolbar {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  margin: 0 0 1rem !important;
  padding: 0 !important;
}

html body .viewToggleText {
  color: var(--cp-muted) !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
}

html body .section-toggle,
html body .view-toggle,
html body .btn-outline-warning {
  border-radius: 999px !important;
  padding: 0.55rem 1rem !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  border: 1px solid rgba(245, 166, 35, 0.35) !important;
  color: var(--cp-amber) !important;
  background: transparent !important;
}

html body .section-toggle.active,
html body .view-toggle.active,
html body .btn-outline-warning.active {
  background: linear-gradient(135deg, var(--cp-amber-2), var(--cp-amber-deep)) !important;
  color: #111 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

html body .btn-warning {
  background: linear-gradient(135deg, var(--cp-amber-2), var(--cp-amber-deep)) !important;
  color: #111 !important;
  border: none !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  padding: 0.7rem 1.5rem !important;
  box-shadow: none !important;
}

html body .content-section h2.h4 {
  font-family: var(--cp-display) !important;
  font-size: 1.4rem !important;
  color: #fff !important;
  font-weight: 800 !important;
}

/* ========== MOVIE CARDS (list view) ========== */
html body .table-header,
html body .cp-list-head {
  display: none !important; /* spreadsheet headers removed */
}

html body .table-list-container {
  width: 100% !important;
  overflow: visible !important;
}

html body .table-rows {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

html body .table-row,
html body .cp-list-row,
html body .cp-movie-card {
  background: var(--cp-surface) !important;
  border: 1px solid var(--cp-line) !important;
  border-left: none !important;
  border-radius: var(--cp-radius) !important;
  padding: 0.85rem !important;
  margin-bottom: 0 !important;
  box-shadow: none !important;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

html body .table-row:hover,
html body .cp-movie-card:hover {
  background: var(--cp-surface-2) !important;
  border-color: rgba(245, 166, 35, 0.35) !important;
  transform: none !important;
}

/* New card layout */
html body .cp-movie-card__desktop {
  display: none;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 992px) {
  html body .cp-movie-card__desktop {
    display: flex !important;
  }
  html body .cp-movie-card .mobile-table-row,
  html body .table-row > .d-block.d-lg-none {
    display: none !important;
  }
}

html body .cp-movie-card__poster {
  flex: 0 0 64px;
  width: 64px;
  height: 96px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(245, 166, 35, 0.25);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

html body .table-thumbnail {
  width: 64px !important;
  height: 96px !important;
  object-fit: cover !important;
  border-radius: 10px !important;
  border: 1px solid rgba(245, 166, 35, 0.25) !important;
}

html body .cp-movie-card__main {
  flex: 1 1 auto;
  min-width: 0;
}

html body .cp-movie-card__title,
html body .movie-title-link,
html body .movie-title-link small {
  font-family: var(--cp-display) !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: #fff !important;
  text-decoration: none !important;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body .movie-title-link:hover,
html body .movie-title-link:hover small {
  color: var(--cp-amber) !important;
}

html body .cp-movie-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.45rem;
}

html body .cp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}

html body .cp-chip--year {
  background: rgba(255, 255, 255, 0.06);
  color: var(--cp-muted);
  border: 1px solid var(--cp-line);
}

html body .cp-chip--genre,
html body .badge.bg-warning {
  background: rgba(245, 166, 35, 0.16) !important;
  color: var(--cp-amber-2) !important;
  border: 1px solid rgba(245, 166, 35, 0.3) !important;
  border-radius: 999px !important;
}

html body .cp-chip--platform,
html body .badge.bg-info {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--cp-muted) !important;
  border: 1px solid var(--cp-line) !important;
  border-radius: 999px !important;
}

html body .cp-chip--match {
  background: rgba(245, 166, 35, 0.12);
  color: var(--cp-amber);
}

html body .cp-movie-card__stats {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-shrink: 0;
}

html body .cp-stat,
html body .quick-rate-btn,
html body .quick-rate-btn-poop {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 64px;
  padding: 0.35rem 0.65rem !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--cp-line) !important;
  cursor: pointer;
}

html body .cp-movie-card__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

html body .cp-movie-card__actions .btn,
html body .table-row .btn-outline-info,
html body .table-row .btn-outline-success,
html body .table-row .btn-outline-secondary,
html body .table-row .btn-outline-warning,
html body .table-row .btn-success {
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 10px !important;
  background: rgba(245, 166, 35, 0.1) !important;
  border: 1px solid rgba(245, 166, 35, 0.35) !important;
  color: var(--cp-amber) !important;
}

html body .table-row .btn-success {
  background: linear-gradient(135deg, var(--cp-amber-2), var(--cp-amber-deep)) !important;
  color: #111 !important;
  border: none !important;
}

/* Hide old bootstrap column desktop grid when card layout present */
html body .cp-movie-card > .row.d-none.d-lg-flex {
  display: none !important;
}

/* Mobile rows */
html body .mobile-table-row {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

html body .mobile-table-row .table-thumbnail {
  width: 100% !important;
  height: 150px !important;
}

/* Block posters */
html body .movie-poster {
  border-radius: 12px !important;
  border: 1px solid var(--cp-line) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4) !important;
}

/* Footer / misc */
html body .theme-footer {
  background: #08080b !important;
  border-top: 1px solid rgba(245, 166, 35, 0.18) !important;
}

html body .carousel-parent {
  overflow: hidden !important;
  max-width: 100%;
  border-radius: 0 0 18px 18px;
}

html body .theme-mobile-nav .mobile-nav-container {
  background: rgba(10, 10, 12, 0.97) !important;
  border-top: 1px solid rgba(245, 166, 35, 0.25) !important;
  border-radius: 16px 16px 0 0 !important;
}

html body .go-to-top-btn {
  background: linear-gradient(135deg, var(--cp-amber-2), var(--cp-amber-deep)) !important;
  color: #111 !important;
  right: 16px !important;
  bottom: 96px !important;
}

html body .modal-content {
  background: var(--cp-surface) !important;
  border: 1px solid rgba(245, 166, 35, 0.25) !important;
  border-radius: 18px !important;
}

html body .list-controls {
  background: var(--cp-surface) !important;
  border: 1px solid rgba(245, 166, 35, 0.22) !important;
  border-radius: 16px !important;
}

html[data-theme="light"] body {
  background: radial-gradient(900px 380px at 8% -5%, rgba(245, 166, 35, 0.1), transparent 55%), #f3f0e9 !important;
  color: #171717 !important;
}

html[data-theme="light"] body .theme-header {
  background: rgba(255, 255, 255, 0.94) !important;
}

html[data-theme="light"] body .table-row,
html[data-theme="light"] body .cp-movie-card,
html[data-theme="light"] body .search-container-user-home,
html[data-theme="light"] body .nav-items {
  background: #fff !important;
}

html[data-theme="light"] body .movie-title-link,
html[data-theme="light"] body .movie-title-link small,
html[data-theme="light"] body .cp-movie-card__title {
  color: #171717 !important;
}
