/**
 * CinemaPointer V3 — Clean redesign + overflow fixes
 */

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

/* ---- Kill horizontal scroll ---- */
html,
body {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

html body {
  font-family: "Outfit", system-ui, sans-serif !important;
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(245, 166, 35, 0.14), transparent 55%),
    #070708 !important;
  color: #f0f0f2 !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.container,
.container-fluid,
.row,
.cp-toolbar,
.cp-home-sections,
.table-list-container,
.theme-header,
.footer-modern,
.carousel-parent,
.movies,
.list-view,
.navbar-nav-desktop,
.nav-items {
  max-width: 100%;
}

/* Bootstrap row negative margins often cause page-wide horizontal scroll */
.cp-toolbar.row,
.cp-home .row.mx-0,
section.row.mx-0 {
  margin-left: 0 !important;
  margin-right: 0 !important;
  --bs-gutter-x: 0;
}

.cp-toolbar.row > [class*="col-"] {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* Nested containers shouldn't expand past parent */
.cp-home-sections .container,
.content-section .container {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ---- Header ---- */
html body .theme-header {
  background: rgba(7, 7, 8, 0.92) !important;
  backdrop-filter: blur(18px) !important;
  border-bottom: 1px solid rgba(245, 166, 35, 0.22) !important;
  padding: 0.4rem 0 !important;
  overflow: hidden !important;
}

html body .theme-header .container-fluid {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.75rem;
  overflow: hidden;
}

html body .navbar-nav-desktop {
  flex: 1 1 auto;
  min-width: 0 !important;
  justify-content: flex-end;
  gap: 0.75rem !important;
  overflow: hidden;
}

html body .nav-items {
  gap: 0.35rem !important;
  flex-wrap: nowrap !important;
  min-width: 0;
  overflow: hidden;
}

html body .nav-actions {
  gap: 0.5rem !important;
  flex-shrink: 0;
}

html body .brand-name {
  font-family: "Syne", sans-serif !important;
  font-weight: 800 !important;
  font-size: 1.25rem !important;
  letter-spacing: -0.03em !important;
  background: linear-gradient(100deg, #ffc14a, #fff 50%, #f5a623) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

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

html body .nav-item-link {
  min-width: 0 !important;
  padding: 0.45rem 0.7rem !important;
  border-radius: 999px !important;
  border: 1px solid transparent !important;
  color: rgba(255, 255, 255, 0.7) !important;
  flex-shrink: 1;
}

html body .nav-item-link i {
  font-size: 0.95rem !important;
  flex-shrink: 0;
}

html body .nav-item-label {
  font-size: 0.78rem !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,
html body .nav-item-link.active {
  background: rgba(245, 166, 35, 0.14) !important;
  border-color: rgba(245, 166, 35, 0.4) !important;
  color: #ffc14a !important;
  transform: none !important;
  box-shadow: none !important;
}

html body .theme-primary-btn {
  background: linear-gradient(135deg, #ffc14a, #d4890f) !important;
  color: #111 !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  padding: 0.45rem 1rem !important;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: none !important;
}

html body .nav-action-btn {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  flex-shrink: 0;
}

/* Hide long labels before they blow out the header */
@media (max-width: 1399.98px) {
  html body .nav-item-label {
    display: none !important;
  }
  html body .nav-item-link {
    padding: 0.5rem !important;
  }
}

@media (max-width: 991.98px) {
  html body .nav-item-label {
    display: none !important;
  }
}

/* ---- Social / search ---- */
html body .social-media-bar {
  padding: 0.75rem 0 0.25rem !important;
}

html body .social-bar-title {
  font-size: 0.72rem !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: rgba(255, 255, 255, 0.45) !important;
  margin: 0 !important;
}

html body .social-icon-home {
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
  font-size: 0.9rem !important;
}

html body .search-container-user-home {
  max-width: min(640px, calc(100% - 1.5rem)) !important;
  width: 100% !important;
  margin: 0.75rem auto 1.25rem !important;
  background: rgba(18, 18, 24, 0.95) !important;
  border: 1px solid rgba(245, 166, 35, 0.28) !important;
  border-radius: 999px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
}

html body #filterButton.icon-btn-home {
  background: linear-gradient(135deg, #ffc14a, #d4890f) !important;
  color: #111 !important;
  border-radius: 50% !important;
}

/* ---- Tabs / toolbar ---- */
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-left: 0 !important;
  margin-right: 0 !important;
}

html body .cp-toolbar .btn-group {
  flex-wrap: wrap;
  max-width: 100%;
}

html body .section-toggle,
html body .view-toggle,
html body .btn-outline-warning {
  border-radius: 999px !important;
  padding: 0.5rem 0.95rem !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  white-space: nowrap;
}

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

html body .btn-warning {
  background: linear-gradient(135deg, #ffc14a, #d4890f) !important;
  color: #111 !important;
  border: none !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

html body .content-section h2.h4 {
  font-family: "Syne", sans-serif !important;
  font-size: 1.35rem !important;
  color: #fff !important;
}

/* ---- List rows (no page overflow) ---- */
html body .table-list-container {
  width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch;
}

html body .table-rows {
  width: 100%;
  min-width: 0;
}

html body .table-row,
html body .cp-list-row {
  background: rgba(18, 18, 24, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-left: 3px solid #f5a623 !important;
  border-radius: 14px !important;
  padding: 0.75rem 0.85rem !important;
  margin-bottom: 0.65rem !important;
  box-shadow: none !important;
  overflow: hidden;
}

html body .table-row:hover {
  background: rgba(28, 28, 36, 0.98) !important;
  border-color: rgba(245, 166, 35, 0.35) !important;
  transform: none !important;
}

html body .table-thumbnail {
  width: 48px !important;
  height: 72px !important;
  object-fit: cover !important;
  border-radius: 8px !important;
  border: 1px solid rgba(245, 166, 35, 0.3) !important;
}

html body .table-row .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
  --bs-gutter-x: 0.5rem;
  min-width: 0;
}

html body .table-row [class*="col-"] {
  min-width: 0;
  overflow: hidden;
}

html body .movie-title-link,
html body .movie-title-link small {
  font-size: 0.9rem !important;
  font-weight: 650 !important;
  color: #fff !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 100%;
}

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 .mobile-table-row .btn-outline-info,
html body .mobile-table-row .btn-outline-success,
html body .mobile-table-row .btn-outline-secondary,
html body .mobile-table-row .btn-outline-warning {
  background: rgba(245, 166, 35, 0.1) !important;
  border: 1px solid rgba(245, 166, 35, 0.4) !important;
  color: #ffc14a !important;
  border-radius: 8px !important;
}

html body .badge.bg-info {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffc14a !important;
  border: 1px solid rgba(245, 166, 35, 0.3) !important;
}

html body .cp-list-head {
  background: rgba(245, 166, 35, 0.12) !important;
  border: none !important;
  border-radius: 12px !important;
}

/* ---- Block posters ---- */
html body .movie-poster {
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
  max-width: 100%;
}

html body .block-item,
html body .movies .col-4 {
  min-width: 0;
}

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

html body .go-to-top-btn {
  right: 16px !important;
  bottom: 96px !important;
  width: 48px !important;
  height: 48px !important;
}

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

html body .list-controls {
  background: rgba(16, 16, 22, 0.95) !important;
  border: 1px solid rgba(245, 166, 35, 0.25) !important;
  border-radius: 16px !important;
  overflow: hidden;
}

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

html body .theme-mobile-nav {
  overflow: hidden;
}

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

/* Light theme */
html[data-theme="light"] body {
  background:
    radial-gradient(900px 400px at 10% -10%, rgba(245, 166, 35, 0.12), transparent 50%),
    #f5f2eb !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-list-row {
  background: #fff !important;
}

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