/* MyWatchedMovies v2.1: one fixed dark palette; existing Bootstrap components. */
:root {
  color-scheme: dark;
  --mwm-background: #101114; --mwm-surface: #1b1e24; --mwm-surface-raised: #22262e;
  --mwm-border: #30343b; --mwm-text-primary: #f4f5f7; --mwm-text-secondary: #aeb5bf;
  --mwm-accent: #ff7c32; --mwm-button: #ff7c32; --mwm-on-accent: #101114;
  --mwm-watched: #6acb91; --mwm-danger: #f58c94; --mwm-focus: #ffb787;
  --mwm-table-alternate: #1e2229;
}
html[data-theme] {
  --mwm-light-bg: var(--mwm-background); --mwm-dark-text: var(--mwm-text-primary);
  --mwm-muted-text: var(--mwm-text-secondary); --mwm-blue-1: var(--mwm-accent);
  --mwm-blue-2: var(--mwm-accent); --mwm-blue-3: var(--mwm-surface-raised);
  --mwm-green-1: var(--mwm-watched); --mwm-green-3: var(--mwm-surface-raised);
  --mwm-orange-1: var(--mwm-accent); --mwm-orange-3: var(--mwm-surface-raised);
  --bs-body-bg: var(--mwm-background); --bs-body-color: var(--mwm-text-primary);
  --bs-border-color: var(--mwm-border); --bs-secondary-color: var(--mwm-text-secondary);
}
html[data-theme] body { background: var(--mwm-background); color: var(--mwm-text-primary); font-size: 14px; line-height: 1.5; }
html[data-theme] .container { width: 100%; max-width: 1320px !important; padding-inline: 40px; }
html[data-theme] main { min-width: 0; }
html[data-theme] h1, html[data-theme] .h3 { font-size: 30px; } html[data-theme] h5 { font-size: 19px; }
html[data-theme] a { color: var(--mwm-accent); }
html[data-theme] :focus-visible { outline: 3px solid var(--mwm-focus) !important; outline-offset: 3px; box-shadow: none !important; }
html[data-theme] .text-muted, html[data-theme] .text-secondary, html [data-mwm-muted] { color: var(--mwm-text-secondary) !important; }
html[data-theme] .text-primary { color: var(--mwm-accent) !important; }
html[data-theme] .text-success { color: var(--mwm-watched) !important; }
html[data-theme] .text-danger { color: var(--mwm-danger) !important; }
html[data-theme] .card, html[data-theme] .auth-card, html[data-theme] .modal-content, html[data-theme] .dropdown-menu,
html[data-theme] .offcanvas, html[data-theme] .list-group-item {
  background: var(--mwm-surface); color: var(--mwm-text-primary); border-color: var(--mwm-border); border-radius: 8px;
}
html[data-theme] .card-body { background: transparent; }
html[data-theme] .card-header, html[data-theme] .card-footer, html[data-theme] .modal-header, html[data-theme] .modal-footer {
  background: var(--mwm-surface); color: var(--mwm-text-primary); border-color: var(--mwm-border); padding: 12px 16px;
}
html[data-theme] .card-header h5, html[data-theme] .card-header h6 { color: inherit; }
html[data-theme] .card-header.bg-primary { background: var(--mwm-surface) !important; color: var(--mwm-text-primary) !important; }
html[data-theme] .bg-light, html[data-theme] .bg-white { background-color: var(--mwm-surface-raised) !important; color: var(--mwm-text-primary); }
html[data-theme] .btn { border-radius: 6px; font-size: 14px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
html[data-theme] .btn-primary, html[data-theme] .mwm-btn--primary {
  --bs-btn-bg: var(--mwm-button); --bs-btn-border-color: var(--mwm-button);
  --bs-btn-color: var(--mwm-on-accent); --bs-btn-hover-bg: #ffb787; --bs-btn-hover-color: #101114;
  --bs-btn-active-bg: #ffb787; --bs-btn-active-color: #101114;
  background: var(--mwm-button); border-color: var(--mwm-button); color: var(--mwm-on-accent);
}
html[data-theme] .btn-outline-primary, html[data-theme] .btn-outline-warning { --bs-btn-color: var(--mwm-accent); --bs-btn-border-color: var(--mwm-border); --bs-btn-hover-bg: var(--mwm-surface-raised); --bs-btn-hover-color: var(--mwm-text-primary); }
html[data-theme] .btn-secondary, html[data-theme] .btn-outline-secondary { --bs-btn-color: var(--mwm-text-primary); --bs-btn-bg: var(--mwm-surface-raised); --bs-btn-border-color: var(--mwm-border); --bs-btn-hover-bg: var(--mwm-border); --bs-btn-hover-color: var(--mwm-text-primary); }
html[data-theme] .form-control, html[data-theme] .form-select, html[data-theme] .input-group-text {
  background-color: var(--mwm-surface); color: var(--mwm-text-primary); border-color: var(--mwm-border); border-radius: 6px; font-size: 14px;
}
html[data-theme] .form-control:focus, html[data-theme] .form-select:focus { background-color: var(--mwm-surface); color: var(--mwm-text-primary); border-color: var(--mwm-focus); }
html[data-theme] .form-control::placeholder { color: var(--mwm-text-secondary); opacity: 1; }
html[data-theme] .form-control:disabled, html[data-theme] .form-select:disabled { background-color: var(--mwm-surface-raised); color: var(--mwm-text-secondary); opacity: .65; }
html[data-theme] .form-check-input { background-color: var(--mwm-surface); border: 1px solid var(--mwm-text-secondary); }
html[data-theme] .form-check-input:checked { background-color: var(--mwm-button); border-color: var(--mwm-button); }
html[data-theme] .watched-checkbox:checked { background-color: var(--mwm-watched); border-color: var(--mwm-watched); }
html[data-theme] .bg-primary, html[data-theme] .bg-warning { background-color: var(--mwm-button) !important; color: var(--mwm-on-accent) !important; }
html[data-theme] .bg-success { background-color: var(--mwm-watched) !important; color: var(--mwm-background) !important; }
html[data-theme] .bg-secondary { background-color: var(--mwm-surface-raised) !important; color: var(--mwm-text-primary) !important; }
html[data-theme] .alert { color: var(--mwm-text-primary); background: var(--mwm-surface-raised); border-color: var(--mwm-border); }
html[data-theme] .alert-danger { border-left: 4px solid var(--mwm-danger); }
html[data-theme] .alert-success { border-left: 4px solid var(--mwm-watched); }
html[data-theme] .page-link, html[data-theme] .dropdown-item { background: var(--mwm-surface); color: var(--mwm-text-primary); border-color: var(--mwm-border); }
html[data-theme] .dropdown-item:hover, html[data-theme] .dropdown-item:focus { background: var(--mwm-surface-raised); color: var(--mwm-text-primary); }
html[data-theme] .page-item.active .page-link, html[data-theme] .dropdown-item.active { background: var(--mwm-button); color: var(--mwm-on-accent); border-color: var(--mwm-button); }
html[data-theme] .progress { background-color: var(--mwm-surface-raised); }
html[data-theme] .progress-bar { background-color: var(--mwm-watched); color: var(--mwm-background); }
html[data-theme] .footer-mwm { background: var(--mwm-surface); color: var(--mwm-text-secondary); border-top: 1px solid var(--mwm-border); padding: 20px 0; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 2000; padding: 12px; background: var(--mwm-surface); }
.skip-link:focus { top: 8px; }
.site-header { border-bottom: 1px solid var(--mwm-border); background: var(--mwm-surface); }
.site-navigation { min-height: 72px; display: flex; align-items: center; gap: 20px; }
html[data-theme] .navbar-brand { color: var(--mwm-text-primary); display: inline-flex; align-items: center; gap: 8px; font-size: 19px; margin: 0; white-space: nowrap; }
html[data-theme] .navbar-brand-logo { width: 30px; height: 30px; object-fit: contain; background: #1b1e24; border-radius: 6px; }
.brand-accent { color: var(--mwm-accent); }
.navigation-drawer { flex: 1; min-width: 0; }
.navigation-drawer .offcanvas-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0; }
.main-links { display: flex; align-items: stretch; list-style: none; padding: 0; margin: 0; gap: 16px; }
.main-links > li { display: flex; }
html[data-theme] .main-links .nav-link { padding: 25px 0 22px; border-bottom: 3px solid transparent; color: var(--mwm-text-secondary); white-space: nowrap; }
html[data-theme] .main-links .nav-link.active { color: var(--mwm-accent); border-bottom-color: var(--mwm-accent); font-weight: 600; }
html[data-theme] .account-toggle { color: var(--mwm-text-primary); gap: 8px; padding: 4px; }
.account-avatar { display: inline-grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; background: var(--mwm-surface-raised); border: 1px solid var(--mwm-border); }
.account-name { max-width: 88px; overflow: hidden; text-overflow: ellipsis; }
.menu-toggle, .drawer-statistics, .navigation-drawer .offcanvas-header { display: none !important; }
.statistics-navigation { background: var(--mwm-surface); border-bottom: 1px solid var(--mwm-border); }
.statistics-links { display: flex; gap: 24px; }
.statistics-links a { padding: 12px 0 9px; border-bottom: 3px solid transparent; color: var(--mwm-text-secondary); text-decoration: none; }
.statistics-links a[aria-current] { color: var(--mwm-accent); border-bottom-color: var(--mwm-accent); }
.statistics-select { display: none; }
html[data-theme] .table { --bs-table-bg: var(--mwm-surface); --bs-table-color: var(--mwm-text-primary); --bs-table-border-color: var(--mwm-border); --bs-table-hover-bg: var(--mwm-surface-raised); --bs-table-hover-color: var(--mwm-text-primary); --bs-table-striped-bg: var(--mwm-table-alternate); color: var(--mwm-text-primary); font-size: 13px; }
html[data-theme] .table thead, html[data-theme] .table-light { --bs-table-bg: var(--mwm-surface-raised); --bs-table-color: var(--mwm-text-secondary); --bs-table-border-color: var(--mwm-border); }
html[data-theme] .table td, html[data-theme] .table th { vertical-align: middle; padding: 8px; }
html[data-theme] .movie-table { table-layout: fixed; min-width: 660px; width: 100%; }
html[data-theme] .movie-table th { height: 38px; font-weight: 600; position: sticky; top: 0; z-index: 2; background: var(--mwm-surface-raised); }
html[data-theme] .movie-table td { height: 44px; }
html[data-theme] .movie-table tbody tr { cursor: default; }
html[data-theme] .movie-table tbody tr:nth-child(even) > * { --bs-table-bg: var(--mwm-table-alternate); }
html[data-theme] .movie-table .movie-title { width: auto; overflow-wrap: anywhere; white-space: normal; }
html[data-theme] .movie-table .movie-year { width: 64px; }
html[data-theme] .movie-table .movie-status { width: 76px; text-align: center; padding: 0; }
html[data-theme] .movie-table .movie-runtime { width: 85px; }
html[data-theme] .movie-table .movie-rating { width: 96px; }
html[data-theme] .movie-table .movie-extra { width: 96px; }
.movie-mobile-year { display: none; }
.movie-title-link { color: var(--mwm-text-primary); font-weight: 600; }
.movie-title-link:hover { color: var(--mwm-accent); text-decoration: underline !important; }
html[data-theme] .status-target { width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
html[data-theme] .status-target .form-check-input { width: 18px; height: 18px; margin: 0; float: none; cursor: pointer; }
html[data-theme] .movie-table .rating-select { width: 72px; min-height: 40px; margin: auto; padding: 4px 22px 4px 8px !important; }
html[data-theme] .movie-row[aria-busy="true"] { opacity: .65; }
.table-responsive { max-width: 100%; }
.table-scroll-hint { color: var(--mwm-text-secondary); font-size: 12px; padding: 4px 12px; margin: 0; }
.collection-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
html[data-theme] .collection-card { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; transition: border-color .15s; }
html[data-theme] .collection-card:hover { border-color: var(--mwm-accent); }
.collection-card .card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.collection-card strong { font-size: 17px; color: var(--mwm-text-primary); }
.collection-card .progress { height: 6px; margin-top: auto; }
.collection-art { display: block; width: 100%; height: auto; aspect-ratio: 3/1; object-fit: cover; object-position: center; background: var(--mwm-surface-raised); }
.collection-fallback { display: grid; place-items: center; color: var(--mwm-text-secondary); }
.collection-fallback i { font-size: 32px; }
.collection-banner { max-height: 160px; }
html #movieDetailsModal .modal-dialog { max-width: 860px; }
html #modalStandardFooter { flex-wrap: wrap; gap: 16px; }
html[data-theme] .modal-footer .form-check { min-height: 44px; display: flex; align-items: center; gap: 8px; padding-left: 0; }
html[data-theme] .modal-footer .form-check-input { float: none; margin: 0; width: 18px; height: 18px; }
html[data-theme] .modal-footer .form-check-label { padding-block: 12px; }
html[data-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
html[data-theme] .hero-section { padding: 32px 0; min-height: 0; }
html[data-theme] .hero-title { font-size: clamp(28px,4vw,44px); }
html[data-theme] .popular-movies-section { padding: 24px 0; }
html[data-theme] .popular-list-title { color: var(--mwm-text-primary); }
html[data-theme] .popular-list-meta { color: var(--mwm-text-secondary); }
html[data-theme] .popular-list-item { background: var(--mwm-surface); }
html[data-theme] .popular-list-item::before, html[data-theme] .popular-highlight-card::before { display: none; }
html[data-theme] .popular-list-item:hover { transform: none; }
html[data-theme] .mwm-cookie { background: var(--mwm-surface); color: var(--mwm-text-primary); border-color: var(--mwm-border); }
html[data-theme] .toast { background: var(--mwm-surface) !important; color: var(--mwm-text-primary) !important; border-left: 4px solid var(--mwm-accent); }
html[data-theme] .toast.bg-danger { border-left-color: var(--mwm-danger); }
@media (min-width: 901px) {
  .navigation-drawer { position: static !important; visibility: visible !important; transform: none !important; border: 0 !important; height: auto !important; background: transparent !important; width: auto !important; }
}
@media (min-width:901px) and (max-width:1200px) {
  .site-navigation { gap: 12px; }
  .main-links { gap: 10px; font-size: 13px; }
  html[data-theme] .navbar-brand { font-size: 16px; gap: 4px; }
  .account-name { display: none; }
  html[data-theme] .site-navigation { padding-inline: 24px; }
}
@media (max-width:1000px) { .collection-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width:900px) {
  html[data-theme] .container { padding-inline: 16px; }
  .site-navigation { min-height: 60px; justify-content: space-between; }
  .menu-toggle, .navigation-drawer .offcanvas-header { display: flex !important; }
  html[data-theme] .navigation-drawer { width: min(360px,100vw); border-radius: 0; }
  .navigation-drawer .offcanvas-body { display: block; padding: 16px; overflow-y: auto; }
  .main-links { display: block; }
  .main-links > li { display: block; }
  html[data-theme] .main-links .nav-link { padding: 12px; border-bottom-width: 2px; }
  .drawer-statistics { display: block !important; padding: 8px 12px; }
  .drawer-statistics summary { cursor: pointer; padding: 4px 0; }
  .drawer-statistics a { display: block; padding: 10px 12px; color: var(--mwm-text-secondary); }
  .drawer-statistics a[aria-current] { color: var(--mwm-accent); text-decoration: underline; }
  .account-menu { border-top: 1px solid var(--mwm-border); margin-top: 16px; padding-top: 12px; }
  .account-name { max-width: 180px; }
  .statistics-links { display: none; }
  .statistics-select { display: flex; align-items: center; gap: 12px; padding-block: 8px; }
  .statistics-select .form-select { width: auto; max-width: 75%; flex: 1; }
}
@media (max-width:767px) {
  html[data-theme] h1, html[data-theme] .h3 { font-size: 25px; }
  html[data-theme] .btn { min-height: 44px; }
  main .d-flex.justify-content-between { flex-wrap: wrap; gap: 12px; }
  main .card-header [style*="min-width: 250px"] { min-width: 0 !important; width: 100%; }
  .collection-grid { grid-template-columns: minmax(0,1fr); }
  html[data-theme] .movie-table { min-width: 0; width: max-content; table-layout: fixed; }
  html[data-theme] .movie-table .movie-title { width: clamp(140px,calc(100cqw - 96px),360px); min-width: clamp(140px,calc(100cqw - 96px),360px); max-width: clamp(140px,calc(100cqw - 96px),360px); position: sticky; left: 0; z-index: 1; background: var(--mwm-surface); }
  html[data-theme] .movie-table tbody tr:nth-child(even) > .movie-title { background: var(--mwm-table-alternate); }
  html[data-theme] .movie-table tbody tr:hover > .movie-title { background: var(--mwm-surface-raised); }
  html[data-theme] .movie-table th.movie-title { z-index: 3; background: var(--mwm-surface-raised); }
  html[data-theme] .movie-table .movie-year { display: none; }
  html[data-theme] .movie-table .movie-status { width: 48px; min-width: 48px; max-width: 48px; font-size: 11px; white-space: normal; }
  html[data-theme] .movie-table .movie-runtime { min-width: 85px; }
  html[data-theme] .movie-table .movie-rating, html[data-theme] .movie-table .movie-extra { min-width: 96px; }
  html[data-theme] .movie-table td { min-height: 58px; height: 58px; }
  .movie-mobile-year { display: block; color: var(--mwm-text-secondary); font-size: 12px; }
  html[data-theme] .status-target { width: 44px; min-height: 44px; }
  html[data-theme] .movie-table .rating-select { min-height: 44px; }
  html #movieDetailsModal .modal-dialog { max-width: none; margin: 0; height: 100%; width: 100%; }
  html #movieDetailsModal .modal-content { height: 100%; border-radius: 0; }
  html #movieDetailsModal .modal-body { overflow-y: auto; }
  html #movieDetailsModal .modal-body img.img-fluid { max-height: 220px; width: auto; }
  html #modalStandardFooter { gap: 4px; }
  html #modalStandardFooter > .d-flex { flex-wrap: wrap; }
  html[data-theme] .pagination { flex-wrap: wrap; }
}
@media (prefers-reduced-motion:reduce) { html *, html *::before { animation: none !important; transition: none !important; } }
/* Independent public/auth documents retain their existing forms and SEO. */
html[data-theme] body.auth-page, html[data-theme] body.auth-flow-page,
html[data-theme] body.streaming-guide-page { background-color: var(--mwm-background); background-image: none !important; }
html[data-theme] .auth-flow-card { background: var(--mwm-surface); color: var(--mwm-text-primary); border: 1px solid var(--mwm-border); border-radius: 8px; padding: 24px; box-shadow: none; }
html[data-theme] .auth-flow-container { padding: 32px 16px; min-height: auto; }
html[data-theme] .auth-flow-form-input { background: var(--mwm-surface); color: var(--mwm-text-primary); border-color: var(--mwm-border); border-radius: 6px; min-height: 44px; font-size: 14px; }
html[data-theme] .auth-flow-submit-btn, html[data-theme] .auth-flow-social-btn.email, html[data-theme] .landing-btn-primary { background: var(--mwm-button); color: var(--mwm-on-accent); border-color: var(--mwm-button); border-radius: 6px; padding: 12px 20px; font-size: 14px; }
html[data-theme] .auth-flow-alt-btn, html[data-theme] .landing-btn-secondary { background: var(--mwm-surface); color: var(--mwm-accent); border: 1px solid var(--mwm-border); border-radius: 6px; padding: 12px 20px; }
html[data-theme] .auth-flow-alt-btn:hover, html[data-theme] .landing-btn-secondary:hover { background: var(--mwm-surface-raised); color: var(--mwm-text-primary); transform: none; }
html[data-theme] .auth-flow-submit-btn:hover, html[data-theme] .auth-flow-social-btn.email:hover, html[data-theme] .landing-btn-primary:hover { background: #ffb787; color: #101114; transform: none; }
html[data-theme] .auth-flow-social-btn { font-size: 14px; min-height: 44px; }
html[data-theme] .auth-flow-form-label, html[data-theme] .auth-flow-title, html[data-theme] .headline { color: var(--mwm-text-primary); }
html[data-theme] .landing-tagline { color: var(--mwm-text-primary); text-shadow: none; font-size: 30px; margin-bottom: 16px; }
html[data-theme] .landing-description { color: var(--mwm-text-secondary); text-shadow: none; font-size: 16px; margin-bottom: 24px; }
html[data-theme] .auth-topbar { position: static; background: var(--mwm-surface); padding: 16px; border-bottom: 1px solid var(--mwm-border); }
html[data-theme] .landing-btn::before, html[data-theme] .movie-card::before { display: none; }
html[data-theme] .watchlist-overview-section, html[data-theme] .streaming-section, html[data-theme] .streaming-hero { background: var(--mwm-surface); padding: 24px 0; color: var(--mwm-text-primary); }
html[data-theme] .watchlist-overview-title, html[data-theme] .popular-movies-title, html[data-theme] .movie-card .card-title, html[data-theme] .movie-card .card-body { color: var(--mwm-text-primary); font-family: inherit; }
html[data-theme] .watchlist-overview-subtitle, html[data-theme] .watchlist-overview-description, html[data-theme] .seo-intro-text { color: var(--mwm-text-secondary); font-size: 14px; }
html[data-theme] .movie-card { background: var(--mwm-surface); border: 1px solid var(--mwm-border); }
html[data-theme] .movie-card:hover { transform: none; }
html[data-theme] .movie-card .text-muted { color: var(--mwm-text-secondary) !important; }
html[data-theme] .section-divider { background: var(--mwm-border); height: 1px; }
html[data-theme] .mwm-cookie a, html[data-theme] .mwm-cookie summary { color: var(--mwm-accent); }
html[data-theme] .mwm-btn--ghost { background: var(--mwm-surface-raised); color: var(--mwm-text-primary); border: 1px solid var(--mwm-border); }
html[data-theme] .mwm-cookie { max-height: 85dvh; overflow-y: auto; }
html[data-theme] .mwm-cookie__actions .mwm-btn { min-height: 44px; }
html[data-theme] .mwm-cookie__inner { max-width: 1320px; }
html[data-theme] .table th { white-space: normal; }
html[data-theme] .movie-save-error { white-space: normal; overflow-wrap: anywhere; padding: 4px; }
@media(max-width:767px) {
  html[data-theme] .auth-flow-card { padding: 20px 16px; }
  html[data-theme] .landing-tagline { font-size: 25px; }
  html[data-theme] .mwm-cookie__inner { flex-direction: column; }
  html[data-theme] .mwm-cookie__actions { gap: 8px; }
}

.movie-table-scroll { container-type: inline-size; }
@media (max-width:767px) {
  .movie-table-scroll { scroll-padding-inline-start: clamp(140px,calc(100cqw - 96px),360px); }
}
html[data-theme] .movie-table .status-target .form-check-input { width: 18px; height: 18px; }
html[data-theme] .movie-table .movie-title-link { color: var(--mwm-text-primary); }
html[data-theme] .navbar-brand { color: var(--mwm-text-primary); }
.modal-rating-label { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
html[data-theme] .modal-rating-label .rating-select { width: 76px; min-height: 40px; }
html[data-theme] .movie-table th { text-transform: none; }
html[data-theme] .movie-table tbody tr { line-height: 1.5; }
html[data-theme] .card { box-shadow: none; }
html[data-theme] main h1 { overflow-wrap: anywhere; }
html[data-theme] .movie-table .movie-status { letter-spacing: normal; word-break: normal; overflow-wrap: normal; }
html[data-theme] .movie-table th.movie-status { padding-inline: 0; }
html[data-theme] .movie-table th.movie-status:nth-child(4) { white-space: nowrap; }
.status-target { position: relative; }
html[data-theme] .movie-table .form-check-input { transform: none; }
html[data-theme] #loginPromptModal .modal-content { background: var(--mwm-surface); color: var(--mwm-text-primary); border-color: var(--mwm-border); }
html[data-theme] #loginPromptModal .modal-title,
html[data-theme] #loginPromptModal .modal-body,
html[data-theme] #loginPromptModal .modal-body p { color: var(--mwm-text-primary); }
html[data-theme] #loginPromptModal .modal-header,
html[data-theme] #loginPromptModal .modal-footer { background: var(--mwm-surface); border-color: var(--mwm-border); }
html[data-theme] body[data-page="stats_collection.php"] .card[style*="linear-gradient"],
html[data-theme] body[data-page="stats_collection.php"] .card-header[style*="background:"] { background: var(--mwm-surface) !important; color: var(--mwm-text-primary) !important; }
html[data-theme] body[data-page="stats_collection.php"] .card-body.text-white { color: var(--mwm-text-primary) !important; }
html[data-theme] #movieDetailsModal .modal-content,
html[data-theme] #movieDetailsModal .modal-header,
html[data-theme] #movieDetailsModal .modal-footer { background: var(--mwm-surface); color: var(--mwm-text-primary); border-color: var(--mwm-border); }
html[data-theme] #movieDetailsModal h3,
html[data-theme] #movieDetailsModal h5 { color: var(--mwm-text-primary); }
html[data-theme] #movieDetailsModal .modal-title { margin: 0; }
@media(max-width:767px) {
  html[data-theme] #movieDetailsModal .modal-dialog { height: 100dvh; min-height: 100dvh; }
  html[data-theme] #movieDetailsModal .modal-content { height: 100dvh; max-height: 100dvh; }
  html[data-theme] #movieDetailsModal .modal-body { max-height: none; }
}

html[data-theme] .movie-table th { border-bottom: 1px solid var(--mwm-border); }
html[data-theme] .auth-flow-form-input::placeholder { color: var(--mwm-text-secondary); opacity: 1; }
html[data-theme] .streaming-footer-section { padding: 24px 0; background: var(--mwm-surface); color: var(--mwm-text-primary); }
html[data-theme] .streaming-footer-card { background: var(--mwm-surface-raised); border: 1px solid var(--mwm-border); box-shadow: none; }
html[data-theme] .streaming-footer-card:hover { border-color: var(--mwm-accent); transform: none; }
html[data-theme] .streaming-footer-name { color: var(--mwm-text-primary); }
html[data-theme] #footer-section { background: var(--mwm-surface) !important; color: var(--mwm-text-primary); }
html[data-theme] #footer-section .text-white { color: var(--mwm-text-primary) !important; }
/* Original public homepage: one existing backdrop chosen per HTTP page request.
   Original cover/center crop and desktop fixed attachment remain in custom.css. */
html[data-theme] body.landing-page { background-color: var(--mwm-background); }
html[data-theme] .landing-page .landing-container { min-height: 100vh; padding: 80px 16px 32px; }
html[data-theme] .landing-page .landing-logo { width: min(400px, 100%); height: auto; aspect-ratio: 816 / 160; object-fit: contain; }
html[data-theme] .landing-page .landing-tagline { color: var(--mwm-text-primary); text-shadow: 0 2px 8px #101114; }
html[data-theme] .landing-page .landing-description { color: var(--mwm-text-primary); text-shadow: 0 1px 4px #101114; }
html[data-theme] .landing-page .landing-topbar { background: rgba(16,17,20,.65); }
html[data-theme] .landing-page .landing-btn-secondary { background: rgba(27,30,36,.92); color: var(--mwm-text-primary); }
html[data-theme] input, html[data-theme] select, html[data-theme] textarea { color-scheme: dark; }
html[data-theme] input:-webkit-autofill { -webkit-text-fill-color: var(--mwm-text-primary); box-shadow: 0 0 0 1000px var(--mwm-surface) inset; caret-color: var(--mwm-text-primary); }
html[data-theme] ::selection { background: var(--mwm-accent); color: var(--mwm-on-accent); }
html[data-theme] .btn-light, html[data-theme] .auth-flow-social-btn.google { background: var(--mwm-surface-raised); color: var(--mwm-text-primary); border-color: var(--mwm-border); }
html[data-theme] body.landing-page { background-size: cover; background-position: center; background-repeat: no-repeat; }
@media(min-width:768px) { html[data-theme] body.landing-page { background-attachment: fixed; } }
@media(max-width:767px) { html[data-theme] body.landing-page { background-attachment: scroll; background-position: center top; } }

/* Visual correction round: compact summaries and useful content above the fold. */
.summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 0 0 20px; }
.summary-card { min-width: 0; min-height: 88px; padding: 12px 16px; background: var(--mwm-surface); border: 1px solid var(--mwm-border); border-radius: 8px; }
.summary-card dt { display: flex; align-items: center; gap: 8px; color: var(--mwm-text-secondary); font-size: 12px; font-weight: 400; overflow-wrap: anywhere; }
.summary-card dt i { color: var(--mwm-accent); font-size: 15px; flex-shrink: 0; }
.summary-card.summary-watched dt i { color: var(--mwm-watched); }
.summary-card dd { color: var(--mwm-text-primary); font-size: 25px; line-height: 1.25; font-weight: 600; margin: 6px 0 0; overflow-wrap: anywhere; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-heading h1 { margin: 0; }
.dashboard-primary { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(280px,1fr); gap: 20px; margin-bottom: 20px; align-items: start; }
.dashboard-primary > *, .collection-detail-copy { min-width: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
html[data-theme] .section-heading h2 { font-size: 18px; margin: 0; }
.section-heading > a { font-size: 12px; flex-shrink: 0; }
.empty-section { padding: 16px; margin: 0; color: var(--mwm-text-secondary); }
.dashboard-collection { display: grid; grid-template-columns: 96px minmax(0,1fr); align-items: center; gap: 12px; padding: 16px; text-decoration: none; border-bottom: 1px solid var(--mwm-border); }
.dashboard-collection:last-child { border-bottom: 0; }
.dashboard-collection:hover { background: var(--mwm-surface-raised); }
.dashboard-collection .collection-art { border-radius: 4px; }
.dashboard-collection strong { display: block; font-size: 13px; color: var(--mwm-text-primary); overflow-wrap: anywhere; }
.dashboard-collection span { display: block; font-size: 12px; margin: 4px 0 6px; }
.dashboard-collection .progress { height: 5px; }
.collection-detail-header { display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 20px; align-items: center; padding: 16px; }
.collection-detail-art .collection-art { border-radius: 5px; }
html[data-theme] .collection-detail-copy h1 { font-size: 24px; line-height: 1.25; margin: 0 0 6px; }
.collection-detail-copy p { margin: 0 0 8px; color: var(--mwm-text-secondary); font-size: 13px; overflow-wrap: anywhere; }
.collection-detail-meta { display: flex; flex-wrap: wrap; gap: 4px; font-size: 12px; color: var(--mwm-text-secondary); }
.collection-detail-meta #collection-percentage { margin-left: auto; }
.collection-detail-copy .progress { height: 5px; margin-top: 8px; }
html[data-theme] body[data-page="stats_movies.php"] .progress-bar,
html[data-theme] body[data-page="stats_website.php"] .progress-bar,
html[data-theme] body[data-page="stats_collection.php"] .progress-bar:not(.bg-success) { background: var(--mwm-accent) !important; }
html[data-theme] body[data-page="stats_collection.php"] .badge[style*="background:"] { background: var(--mwm-accent) !important; color: var(--mwm-on-accent); }
html[data-theme] .public-collection { padding: 0; text-align: left; color: var(--mwm-text-primary); font: inherit; width: 100%; }
.public-collection .card-body { width: 100%; }
.homepage-collections { margin: 24px auto; max-width: 1120px; }
.homepage-collections .collection-fallback { min-height: 0; }
@media(max-width:1000px) { .dashboard-primary { grid-template-columns: minmax(0,1fr); } }
@media(max-width:767px) {
  .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
  .summary-card { min-height: 84px; padding: 10px 12px; }
  .summary-card dt { gap: 6px; font-size: 11px; line-height: 1.35; }
  .summary-card dd { font-size: 23px; }
  .page-heading { margin-bottom: 12px; }
  .dashboard-primary { gap: 16px; margin-bottom: 16px; }
  .collection-detail-header { grid-template-columns: 96px minmax(0,1fr); align-items: start; gap: 10px; padding: 12px; }
  .collection-detail-art { width: 96px; }
  html[data-theme] .collection-detail-copy h1 { font-size: 21px; }
  .collection-detail-copy p { font-size: 12px; }
  .collection-detail-meta #collection-percentage { margin-left: 8px; }
}
html[data-theme] .statistics-links a { color: var(--mwm-text-secondary); }
html[data-theme] .statistics-links a[aria-current] { color: var(--mwm-accent); font-weight: 600; }
html[data-theme] .watchlist-overview-title { font-size: 28px; margin-bottom: 8px; }

/* Local UI/UX refinement: explicit availability, compact details and quiet feedback. */
.public-footer { margin-top: 0; }
.public-footer nav { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px 24px; }
html[data-theme] .cookie-settings-link { background: none; border: 0; color: var(--mwm-accent); font: inherit; padding: 8px 0; min-height: 40px; text-decoration: underline; }
html[data-theme] #movieDetailsModal .modal-header { align-items: flex-start; gap: 16px; }
html[data-theme] #movieDetailsModal .modal-title { min-width: 0; font-size: 22px; line-height: 1.3; overflow-wrap: anywhere; }
html[data-theme] #movieDetailsModal .modal-header .btn-close { flex-shrink: 0; }
.movie-metadata-main { font-weight: 600; font-size: 16px; }
.movie-details-copy, .movie-cast-list li { overflow-wrap: anywhere; }
.movie-cast-list li { margin-bottom: 6px; }
.movie-provider-list { display: grid; gap: 10px; }
.movie-provider { display: grid; grid-template-columns: 32px minmax(0,1fr); align-items: center; gap: 8px; cursor: default; }
.movie-provider-logo, .movie-provider-placeholder { width: 32px; height: 32px; object-fit: contain; border-radius: 4px; }
.movie-provider-placeholder { display: grid; place-items: center; color: var(--mwm-text-secondary); background: var(--mwm-surface-raised); }
.movie-provider-name { font-size: 13px; overflow-wrap: anywhere; }
.availability-link { display: inline-block; margin-top: 12px; }
.amazon-search-link { display: flex; gap: 10px; align-items: center; font-size: 13px; padding: 8px; border: 1px solid var(--mwm-border); border-radius: 6px; }
.amazon-search-link .bi { font-size: 24px; }
html[data-theme] .modal-rating-label .rating-select { width: 116px; }
.modal-save-feedback { flex: 1 0 100%; font-size: 12px; color: var(--mwm-text-secondary); text-align: right; }
.modal-save-feedback:empty { display: none; }
@media(max-width:767px) {
  html[data-theme] #movieDetailsModal .modal-title { font-size: 20px; }
  html #modalStandardFooter { gap: 8px; }
}

/* Mobile reading order: poster/metadata, synopsis, availability, then people. */
.movie-media-column:empty { display: none; }
.movie-poster img { display: block; }
@media(max-width:767px) {
  .movie-intro { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; align-items: start; margin-bottom: 16px; }
  .movie-intro.has-poster { grid-template-columns: 100px minmax(0,1fr); }
  html #movieDetailsModal .movie-intro .movie-poster img { width: 100px; height: auto; max-height: none; }
  .movie-intro .movie-metadata { min-width: 0; margin-bottom: 0 !important; overflow-wrap: anywhere; }
  .movie-availability { margin-bottom: 20px; }
}
