/* Shovo modern layout, aligned with the native Android home screen. */
.shovo-modern {
  --modern-bg: #050a18;
  --modern-panel: rgba(10, 16, 34, 0.9);
  --modern-panel-soft: rgba(8, 15, 28, 0.9);
  --modern-border: #33475a;
  --modern-focus: #fff4cf;
  --modern-accent: #f4c052;
  min-height: 100vh;
  background: linear-gradient(180deg, #0f1b3c 0%, #081127 48%, #050a18 100%);
  font-family: Inter, Roboto, "Segoe UI", system-ui, sans-serif;
  font-size: 18px;
}

.shovo-modern::after { display: none; }

.shovo-modern main {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0 28px 36px;
  gap: 0;
}

/* Native-style header: one TV row, two responsive rows below 1100px. */
.shovo-modern .app-header {
  min-height: 62px;
  padding: 0 4px 8px;
  background: rgba(15, 27, 60, 0.97);
  border-bottom: 0;
  flex-direction: row;
  align-items: flex-end;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.shovo-modern .brand-row,
.shovo-modern .brand-top,
.shovo-modern .header-actions {
  flex-wrap: nowrap;
  align-items: flex-end;
}

.shovo-modern .logo { align-items: flex-end; gap: 9px; }
.shovo-modern .logo-play { color: #ef3340; font-size: 2rem; }
.shovo-modern .logo-text { color: #fff; font-size: 1.95rem; font-weight: 750; }
.shovo-modern .version-tag {
  color: #94a3b8;
  font-size: 0.75rem;
  align-self: flex-end;
  margin: 0 0 0 3px;
}

.shovo-modern .header-actions {
  width: auto;
  min-width: 0;
  margin-left: auto;
  justify-content: flex-end;
}
/* Room identity sits right after the brand: user on line one, list on line two. */
.shovo-modern .room-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  margin-left: 8px;
}
.shovo-modern .room-line {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
  min-width: 0;
}
.shovo-modern .room-label {
  display: inline;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.shovo-modern .user-name-pill,
.shovo-modern .room-name {
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.15;
}
.shovo-modern .user-name-pill {
  color: #c4b5fd;
}
.shovo-modern .room-name {
  color: #99f6e4;
}
.shovo-modern .room-tag {
  min-height: 0;
  padding: 0;
  align-items: baseline;
  line-height: 1.15;
  border-radius: 4px;
}
.shovo-modern .room-tag:focus-visible {
  outline: 3px solid var(--modern-focus);
  outline-offset: 2px;
}
.shovo-modern .room-picker-modal { background: #0a1022; border-color: var(--modern-border); }
.shovo-modern .room-picker-choice { min-height: 64px; border-radius: 6px; }
.shovo-modern .room-picker-choice:hover,
.shovo-modern .room-picker-choice:focus-visible,
.shovo-modern .room-picker-choice.is-current {
  border-color: var(--modern-focus);
  box-shadow: 0 0 0 2px rgba(255, 244, 207, 0.15);
}
.shovo-modern .room-visibility {
  padding: 3px 7px;
  font-size: 0.8rem;
  border-radius: 5px;
}
.shovo-modern .menu summary,
.shovo-modern .menu-direct-button { width: 38px; height: 38px; }
.shovo-modern .menu-panel {
  background: #0a1022;
  border: 1px solid var(--modern-border);
  border-radius: 8px;
  min-width: 250px;
  font-size: 1rem;
}
.shovo-modern .menu-action { min-height: 48px; font-size: 1rem; }
.shovo-modern .view-switch { color: #fde68a; font-weight: 750; }

.shovo-modern .list-panel { min-width: 0; }
.shovo-modern .list-header {
  min-height: 62px;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 7px 0;
  position: sticky;
  top: 62px;
  z-index: 15;
  background: rgba(13, 24, 51, 0.97);
  border-bottom: 0;
  overflow: visible;
}
.shovo-modern .tabs {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 0;
  overflow-x: auto;
  overflow-y: visible;
  background: transparent;
  scrollbar-width: none;
}
.shovo-modern .tabs::-webkit-scrollbar { display: none; }
.shovo-modern.shovo-tv-header .header-actions { flex: 1 1 auto; gap: 12px; }
.shovo-modern.shovo-tv-header .header-actions .tabs {
  flex: 1 1 auto;
  width: auto;
  overflow: visible;
  margin-left: 4px;
}
.shovo-modern.shovo-tv-header #shovo-search-tab { margin-left: auto; }
.shovo-modern.shovo-tv-header .list-header { display: none; }
.shovo-modern .tab,
.shovo-modern .trending-button {
  min-width: 102px;
  min-height: 38px;
  height: 38px;
  padding: 7px 14px;
  border-radius: 7px;
  border: 1px solid #33475a;
  background: #172238;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.15;
  font-weight: 700;
  box-shadow: none;
  transform: none;
}
.shovo-modern .tab.active,
.shovo-modern .tab[aria-selected="true"] {
  background: var(--modern-accent);
  border-color: var(--modern-accent);
  color: #050a18;
}
.shovo-modern .tab.active:focus-visible {
  outline: 3px solid var(--modern-focus);
  outline-offset: 2px;
}
.shovo-modern .tab:hover:not(.active),
.shovo-modern .tab:focus-visible:not(.active) {
  outline: none;
  background: #fff4cf;
  border: 2px solid #fff;
  color: #050a18;
  box-shadow: none;
}
.shovo-modern .tab-count {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #dc2638;
  border: 1px solid #fff;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.shovo-modern .tab-count#count-watched {
  background: #16a34a;
}
.shovo-modern .download-manager-count {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #2563eb;
  border: 1px solid #fff;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.shovo-modern .download-manager-button { justify-content: center; }
.shovo-modern .search-row { display: none; }
.shovo-modern .trending-button { width: auto; order: 0; }
.shovo-modern .trending-button .trending-label { display: inline; }
.shovo-modern .shovo-filter-hidden { display: none !important; }
.shovo-modern input[type="search"] {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 38px 10px 14px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(75, 94, 120, 0.58);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 1rem;
  box-shadow: none;
}
.shovo-modern input[type="search"]:focus {
  outline: 3px solid var(--modern-focus);
  outline-offset: 1px;
  border-color: transparent;
}
.shovo-modern button:not(.tab):focus-visible,
.shovo-modern a:focus-visible,
.shovo-modern select:focus-visible,
.shovo-modern summary:focus-visible {
  outline: 3px solid var(--modern-focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(244, 192, 82, 0.16);
}

/* Poster library, matching the native Android grid rather than classic rows. */
.shovo-modern .list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  align-items: start;
  gap: 10px;
  margin-top: 10px;
  padding-bottom: 24px;
}
.shovo-modern .card,
.shovo-modern.is-mobile .card {
  min-width: 0;
  display: block;
  padding: 3px;
  overflow: visible;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  transform: none;
  box-shadow: none;
  position: relative;
}
.shovo-modern .card:hover,
.shovo-modern .card:focus-visible,
.shovo-modern .card.shovo-card-focused {
  outline: none;
  border-color: #fff4cf;
  background: rgba(244, 192, 82, 0.27);
  box-shadow: 0 0 0 2px #fff4cf, 0 14px 30px rgba(0, 0, 0, 0.42);
  transform: scale(1.025);
  z-index: 2;
}
.shovo-modern .card-content,
.shovo-modern.is-mobile .card-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(8, 15, 28, 0.92);
  border-radius: 4px;
  position: relative;
}
.shovo-modern .card-ribbon {
  position: absolute;
  top: 12px;
  left: -32px;
  width: 130px;
  padding: 3px 0;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: #dc2626;
  transform: rotate(-45deg);
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.shovo-modern .card-ribbon.early {
  background: #d97706;
}
.shovo-modern .card-image,
.shovo-modern.is-mobile .card-image {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  max-height: none;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0;
  background: #0f172a;
  cursor: pointer;
}
.shovo-modern .card-body,
.shovo-modern.is-mobile .card-body {
  min-width: 0;
  min-height: 64px;
  display: block;
  padding: 9px 10px 10px;
}
.shovo-modern .card-info { min-width: 0; gap: 2px; }
.shovo-modern .card-title-row { min-width: 0; display: flex; align-items: baseline; gap: 4px; }
.shovo-modern .card-title {
  min-width: 0;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shovo-modern .card-title-link { pointer-events: none; }
.shovo-modern .card-year { color: #94a3b8; font-size: 0.78rem; flex: none; }
.shovo-modern .card-meta-row { display: block; min-width: 0; }
.shovo-modern .card-meta {
  margin-top: 3px;
  color: #aebdd0;
  font-size: 0.78rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shovo-modern .card-rating,
.shovo-modern .card-options-toggle,
.shovo-modern .card-row-actions,
.shovo-modern .card-swipe-actions {
  display: none !important;
}
/* Drag handle: only the mobile variant (in .card-image-wrap) is used in /a/ */
.shovo-modern .card-drag-handle-desktop {
  display: none !important;
}
.shovo-modern .card-image-wrap { position: relative; }
.shovo-modern .card-drag-handle-mobile {
  display: none !important;
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  z-index: 6;
  width: 15%;
  height: 10%;
  padding: 0;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  line-height: 1;
  overflow: hidden;
  text-align: center;
  cursor: grab;
  opacity: 0;
  transition: opacity 0.15s;
}
.shovo-modern .card:hover .card-drag-handle-mobile,
.shovo-modern .card:focus-visible .card-drag-handle-mobile,
.shovo-modern .card.shovo-card-focused .card-drag-handle-mobile {
  display: flex !important;
  opacity: 1;
  align-items: center;
  justify-content: center;
}
.shovo-modern .card-drag-handle-mobile:active {
  cursor: grabbing;
  background: rgba(168,85,247,0.5);
}
/* Dragging states for /a/ layout */
.shovo-modern .card.dragging {
  opacity: 0.92;
  border-color: var(--modern-focus);
  box-shadow: 0 18px 45px rgba(0,0,0,0.65), 0 0 0 3px rgba(244,192,82,0.3);
  cursor: grabbing;
  transition: none;
}
.shovo-modern .card.drag-placeholder {
  background: rgba(168,85,247,0.15);
  border: 2px dashed rgba(168,85,247,0.65);
  border-radius: var(--radius);
  box-shadow: inset 0 0 24px rgba(168,85,247,0.12);
}
.shovo-modern .card.drag-placeholder .card-image {
  opacity: 0.3;
}
.shovo-modern.is-dragging .card {
  transition: transform 0.15s, opacity 0.15s;
}
/* Suppress the hover scale while dragging so the pointer sweep doesn't
   visually grow cards (the ~2.5% scale read as a 5-10px shift on the
   bottom row). */
.shovo-modern.is-dragging .card:hover,
.shovo-modern.is-dragging .card:focus-visible,
.shovo-modern.is-dragging .card.shovo-card-focused {
  transform: none;
}

.shovo-modern .pagination { margin: 8px 0 24px; font-size: 0.88rem; }
.shovo-modern .pagination-button {
  min-height: 48px;
  padding-inline: 20px;
  font-size: 0.88rem;
  background: rgba(15, 23, 42, 0.9);
  border-color: var(--modern-border);
  color: #e2e8f0;
}

/* Search and Trending use the same in-page library surface as list tabs. */
.shovo-modern .search-popover.shovo-library-panel {
  position: static;
  inset: auto;
  display: none;
  width: 100%;
  min-height: calc(100vh - 180px);
  max-height: none;
  margin-top: 10px;
  padding: 0 0 24px;
  overflow: visible;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  transition: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  z-index: auto;
}
.shovo-modern .search-popover.shovo-library-panel.is-visible { display: block; }
.shovo-modern .shovo-library-panel-open > #list-results,
.shovo-modern .shovo-library-panel-open > .pagination { display: none; }
.shovo-modern .shovo-search-input {
  width: min(760px, 100%);
  margin: 4px auto 18px;
}
.shovo-modern .shovo-search-input input[type="search"] {
  min-height: 54px;
  font-size: 1.05rem;
}
.shovo-modern .search-popover .results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  align-items: start;
  gap: 10px;
}
.shovo-modern .desktop-search-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 3px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}
.shovo-modern .desktop-search-card:hover,
.shovo-modern .desktop-search-card:focus-visible {
  outline: none;
  border-color: var(--modern-focus);
  background: rgba(244, 192, 82, 0.08);
  transform: scale(1.02);
}
.shovo-modern .desktop-search-image {
  width: 100%;
  min-width: 0;
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 3px 3px 0 0;
  object-fit: cover;
}
.shovo-modern .desktop-search-content {
  min-height: 64px;
  padding: 9px 10px;
  background: rgba(8, 15, 28, 0.92);
}
.shovo-modern .desktop-search-title { font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shovo-modern .desktop-search-title-link { pointer-events: none; }
.shovo-modern .desktop-search-meta { font-size: 0.78rem; color: #aebdd0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shovo-modern .desktop-search-rating { display: none; }
.shovo-modern .details-only-actions {
  display: none !important;
}
.shovo-modern .desktop-search-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 8px 8px;
  background: rgba(8, 15, 28, 0.92);
}
.shovo-modern .desktop-search-actions .trailer-action,
.shovo-modern .desktop-search-actions .play-action { display: none; }
.shovo-modern .desktop-search-actions .watchlist-action,
.shovo-modern .desktop-search-actions .watched-action {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 5px 7px;
  border-radius: 6px;
}
.shovo-modern .mobile-search-result {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding: 3px;
  overflow: hidden;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 7px;
  position: relative;
}
.shovo-modern .mobile-search-result:hover,
.shovo-modern .mobile-search-result:focus-visible {
  outline: none;
  border-color: var(--modern-focus);
  background: rgba(244, 192, 82, 0.08);
}
.shovo-modern .mobile-search-image {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 3px 3px 0 0;
}
.shovo-modern .mobile-search-info {
  width: 100%;
  min-height: 60px;
  padding: 9px;
  background: rgba(8, 15, 28, 0.92);
}
.shovo-modern .mobile-search-title { font-size: 0.92rem; }
.shovo-modern .mobile-search-rating-row,
.shovo-modern .mobile-search-info .user-rating { display: none; }
.shovo-modern .mobile-search-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 8px 8px;
  background: rgba(8, 15, 28, 0.92);
}
.shovo-modern .mobile-search-play { display: none; }
.shovo-modern .mobile-search-add,
.shovo-modern .mobile-search-watched {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: auto;
  padding: 5px;
  border: 1px solid currentColor;
  border-radius: 6px;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 750;
}
.shovo-modern .mobile-search-add span,
.shovo-modern .mobile-search-watched span { display: inline; }

/* Shovo-style title details and context actions. */
.shovo-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(8px);
}
.shovo-detail-overlay[hidden] { display: none; }
.shovo-detail-dialog {
  width: min(1040px, 96vw);
  max-height: min(760px, 94vh);
  overflow: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(75, 94, 120, 0.72);
  border-radius: 10px;
  background: linear-gradient(145deg, #111b2d, #07101e 62%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.72);
}
.shovo-detail-main { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 26px; }
.shovo-detail-poster {
  width: 210px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #0f172a;
  border-radius: 5px;
}
.shovo-detail-copy { min-width: 0; }
.shovo-detail-heading { display: flex; align-items: flex-start; gap: 12px; }
.shovo-detail-title { flex: 1; margin: 0; color: #f8fafc; font-size: 1.8rem; line-height: 1.2; }
.shovo-detail-close {
  width: 44px;
  height: 44px;
  padding: 0;
  flex: none;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.32);
  color: #f8fafc;
  font-size: 1.25rem;
}
.shovo-detail-year { margin: 7px 0 0; color: #99f6e4; font-size: 0.92rem; font-weight: 750; }
.shovo-detail-meta { margin: 12px 0 0; color: #cbd5e1; font-size: 0.98rem; line-height: 1.45; }
.shovo-detail-ratings { margin-top: 14px; }
.shovo-detail-credits {
  margin: 15px 0 0;
  color: #dbe5f2;
  font-size: 0.88rem;
  line-height: 1.5;
}
.shovo-detail-credits-label { color: #94a3b8; }
.shovo-detail-credits-link {
  background: none;
  border: none;
  padding: 0;
  color: #93c5fd;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.shovo-detail-credits-link:hover { color: #bfdbfe; }
.shovo-detail-credits-sep { color: #475569; }
.shovo-detail-overview {
  max-width: 72ch;
  margin: 15px 0 0;
  color: #f1f5f9;
  font-size: 0.98rem;
  line-height: 1.6;
}
.shovo-detail-ratings .card-rating,
.shovo-detail-ratings .desktop-search-rating {
  display: flex !important;
  width: 100%;
  margin: 0;
  justify-content: flex-start;
  gap: 14px;
}
.shovo-detail-ratings .rating-badge img { width: 30px; height: 22px; }
.shovo-detail-hint { margin: 20px 0 0; color: #94a3b8; font-size: 0.84rem; line-height: 1.5; }
.shovo-detail-actions {
  position: sticky;
  bottom: -24px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
  padding: 14px 0 24px;
  border-top: 1px solid rgba(75, 94, 120, 0.38);
  background: linear-gradient(180deg, rgba(7, 16, 30, 0.96), #07101e 28%);
}
.shovo-detail-actions button,
.shovo-detail-actions select {
  min-height: 40px;
  padding: 7px 6px;
  border: 1px solid rgba(75, 94, 120, 0.72);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.15;
  font-weight: 700;
}
.shovo-detail-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.shovo-detail-actions select {
  width: 100%;
  text-align: center;
}
.shovo-detail-actions .shovo-detail-trailer { background: rgb(251, 191, 36 / 0.16); color: #fcd34d; border-color: rgb(251, 191, 36 / 0.4); }
.shovo-detail-actions .shovo-detail-play { background: rgba(15, 23, 42, 0.92); color: #e2e8f0; border-color: rgba(75, 94, 120, 0.72); }
.shovo-detail-actions .shovo-detail-play .detail-play-icon { color: #dc2626; }
.shovo-detail-actions .shovo-detail-watchlist { background: rgb(34, 197, 94 / 0.14); color: #86efac; border-color: rgb(34, 197, 94 / 0.4); }
.shovo-detail-actions .shovo-detail-watched { background: rgb(34, 197, 94 / 0.14); color: #86efac; border-color: rgb(34, 197, 94 / 0.4); }
.shovo-detail-actions .shovo-detail-top { background: rgb(96, 165, 250 / 0.14); color: #93c5fd; border-color: rgb(96, 165, 250 / 0.4); }
.shovo-detail-actions .shovo-detail-remove { background: rgb(248, 113, 113 / 0.14); color: #fecaca; border-color: rgb(248, 113, 113 / 0.55); }
.shovo-detail-actions .shovo-detail-offline:hover,
.shovo-detail-actions .shovo-detail-offline:focus-visible {
  border-color: rgba(75, 94, 120, 0.72);
  color: #e2e8f0;
}
.shovo-detail-actions button[hidden],
.shovo-detail-actions select[hidden] { display: none; }
.shovo-detail-actions [data-detail-action="true"] { display: inline-flex !important; align-items: center; }
.shovo-detail-actions [data-detail-action="true"]:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

/* Use the existing, mature player logic in an Android-like full-screen surface. */
.shovo-modern .stream-modal {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #000;
}
.shovo-modern .stream-modal .modal-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 12;
  padding: 14px 20px;
  background: linear-gradient(180deg, rgba(0,0,0,.88), transparent);
  border: 0;
}
.shovo-modern .stream-modal-content,
.shovo-modern .stream-player-wrap,
.shovo-modern #stream-video { width: 100%; height: 100%; max-height: none; }
.shovo-modern .stream-modal-content { padding: 0; }
.shovo-modern #stream-video { object-fit: contain; background: #000; }
.shovo-modern .stream-modal .modal-close { width: 44px; height: 44px; }

@media (min-width: 1600px) {
  .shovo-modern .list-grid,
  .shovo-modern .search-popover .results-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .shovo-modern main { padding-inline: 14px; }
  .shovo-modern .list-grid,
  .shovo-modern .search-popover .results-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
}

@media (max-width: 768px) {
  .shovo-modern .tab,
  .shovo-modern .trending-button {
    min-height: 44px;
    height: 44px;
  }
  .shovo-modern .shovo-detail-actions button,
  .shovo-modern .shovo-detail-actions select {
    min-height: 44px;
  }
  .shovo-modern .card-drag-handle-mobile:not([hidden]) {
    display: flex !important;
    opacity: 1;
    align-items: center;
    justify-content: center;
    touch-action: none;
  }
}

@media (max-width: 700px) {
  .shovo-modern main { padding: 0 10px 20px; }
  .shovo-modern .app-header { min-height: 52px; padding-bottom: 6px; }
  .shovo-modern .logo-play { font-size: 1.5rem; }
  .shovo-modern .logo-text { font-size: 1.45rem; }
  .shovo-modern .user-label { display: inline; font-size: 0.7rem; }
  .shovo-modern .user-name-pill { display: inline; font-size: 0.9rem; }
  .shovo-modern .room-label { display: inline; font-size: 0.7rem; }
  .shovo-modern .room-name { font-size: 0.9rem; }
  .shovo-modern .version-tag { display: inline; font-size: 0.65rem; }
  .shovo-modern .room-visibility { font-size: 0.72rem; padding: 2px 6px; }
  .shovo-modern .room-count { display: none; }
  .shovo-modern .menu summary,
  .shovo-modern .menu-direct-button { width: 34px; height: 34px; }
  .shovo-modern .list-header {
    top: 52px;
    min-height: 56px;
    padding-block: 5px;
    gap: 6px;
  }
  .shovo-modern .tabs { width: 100%; gap: 5px; }
  .shovo-modern .tab {
    min-width: 66px;
    flex: 1 0 66px;
    padding: 6px 7px;
    font-size: 0.78rem;
    min-height: 40px;
    height: 40px;
  }
  .shovo-modern .trending-button { min-width: 66px; }
  .shovo-modern .tab-count { min-width: 18px; font-size: 0.6rem; padding: 1px 4px; }
  .shovo-modern .shovo-search-input { margin-bottom: 12px; }
  .shovo-modern .list-grid,
  .shovo-modern .search-popover .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .shovo-modern .card-body,
  .shovo-modern.is-mobile .card-body { min-height: 44px; padding: 5px; }
  .shovo-modern .shovo-detail-dialog { padding: 14px; }
  .shovo-modern .shovo-detail-main { grid-template-columns: 112px minmax(0, 1fr); gap: 13px; }
  .shovo-modern .shovo-detail-poster { width: 112px; }
  .shovo-modern .shovo-detail-title { font-size: 1.05rem; }
  .shovo-modern .shovo-detail-actions {
    bottom: -14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding-bottom: 14px;
  }
  .shovo-modern .shovo-detail-actions select { width: 100%; }
}

@media (max-width: 420px) {
  .shovo-modern .logo-play { font-size: 1.3rem; }
  .shovo-modern .logo-text { font-size: 1.25rem; }
  .shovo-modern .version-tag { display: inline; font-size: 0.6rem; }
  .shovo-modern .user-label { display: inline; font-size: 0.65rem; }
  .shovo-modern .user-name-pill { font-size: 0.85rem; }
  .shovo-modern .room-label { display: inline; font-size: 0.65rem; }
  .shovo-modern .room-name { font-size: 0.85rem; }
  .shovo-modern .room-tag { padding-inline: 2px; }
  .shovo-modern .room-visibility { font-size: 0.68rem; }
  .shovo-modern .menu summary,
  .shovo-modern .menu-direct-button { width: 32px; height: 32px; }
  .shovo-modern .tab {
    min-width: 60px;
    flex: 1 0 60px;
    padding: 5px 5px;
    font-size: 0.72rem;
  }
  .shovo-modern .list-grid,
  .shovo-modern .search-popover .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shovo-detail-overlay { padding: 8px; }
  .shovo-modern .shovo-detail-main { grid-template-columns: 86px minmax(0, 1fr); }
  .shovo-modern .shovo-detail-poster { width: 86px; }
}

@media (prefers-reduced-motion: reduce) {
  .shovo-modern *,
  .shovo-modern *::before,
  .shovo-modern *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* --- Login Overlay --- */
.login-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: #0F172A;
  display: flex; align-items: center; justify-content: center;
}
.login-overlay[hidden] { display: none; }
.login-card {
  background: #1E293B; border: 1px solid #334155; border-radius: 12px;
  padding: 40px 32px; width: 320px; text-align: center;
}
.login-card h1 { color: #F8FAFC; font-size: 28px; margin: 0 0 4px; }
.login-sub { color: #94A3B8; font-size: 14px; margin: 0 0 24px; }
.login-card input {
  width: 100%; padding: 12px 14px; margin-bottom: 12px;
  background: #0F172A; border: 1px solid #334155; border-radius: 8px;
  color: #F8FAFC; font-size: 14px; outline: none;
}
.login-card input:focus { border-color: #60A5FA; }
.login-card button {
  width: 100%; padding: 12px; margin-top: 4px;
  background: #3B82F6; color: #fff; border: none; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.login-card button:hover { background: #2563EB; }
.login-error { color: #F87171; font-size: 12px; margin-top: 12px; }

/* --- Login Screen (v2 - polished) --- */
.login-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: #0F172A;
  display: flex; align-items: center; justify-content: center;
  background-image: radial-gradient(ellipse at 50% 30%, #1E293B 0%, #0F172A 70%);
}
.login-overlay[hidden] { display: none; }
.login-card {
  background: #1E293B; border: 1px solid #334155; border-radius: 16px;
  padding: 48px 36px 32px; width: 360px; text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}
.login-brand { margin-bottom: 32px; }
.login-logo { font-size: 2.2rem; font-weight: 750; color: #fff; margin: 0; }
.login-play { color: #ef3340; font-size: 2.4rem; }
// login-card h1 replaced by .login-logo
.login-sub { color: #94A3B8; font-size: 14px; margin: 0; }
.login-form { text-align: left; }
.login-field { margin-bottom: 16px; }
.login-field label {
  display: block; color: #CBD5E1; font-size: 12px; font-weight: 600;
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px;
}
.login-field input {
  width: 100%; padding: 12px 14px;
  background: #0F172A; border: 1px solid #334155; border-radius: 8px;
  color: #F8FAFC; font-size: 15px; outline: none;
  transition: border-color 0.2s;
}
.login-field input:focus { border-color: #60A5FA; box-shadow: 0 0 0 3px rgba(96,165,250,0.1); }
.login-field input::placeholder { color: #475569; }
.login-btn {
  width: 100%; padding: 13px; margin-top: 8px;
  background: #F4C052; color: #0F172A; border: none; border-radius: 8px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.login-btn:hover { background: #D4A032; }
.login-btn:active { transform: scale(0.98); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.login-error { color: #F87171; font-size: 13px; margin-top: 12px; text-align: center; }
.login-footer { color: #475569; font-size: 11px; margin-top: 24px; }

/* Provider availability badges */
.shovo-detail-avail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}
.avail-loading {
  color: #64748B;
  font-size: 12px;
  font-style: italic;
}
.avail-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}
.avail-yes {
  background: rgba(34,197,94,0.12);
  color: #4ADE80;
  border: 1px solid rgba(34,197,94,0.25);
}
.avail-no {
  background: rgba(100,116,139,0.1);
  color: #64748B;
  border: 1px solid rgba(100,116,139,0.2);
  text-decoration: line-through;
}
