/* Mobile-only Film-World app shell. Desktop keeps the existing layout. */
.mobile-search-sheet {
  display: none;
}

.mobile-bottom-nav {
  display: none;
}

.mobile-catalog-switch {
  display: none;
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  :root {
    --mobile-bottom-nav-h: 88px;
    --mobile-bottom-nav-gap: 15px;
    --mobile-side-pad: 14px;
  }

  body.mobile-app-shell {
    padding-top: calc(52px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(var(--mobile-bottom-nav-h) + var(--mobile-bottom-nav-gap) + env(safe-area-inset-bottom, 0px));
    -webkit-tap-highlight-color: transparent;
  }

  body.mobile-app-shell .topbar {
    display: none !important;
  }

  body.mobile-app-shell .cinematic-hero {
    min-height: 58vh;
    padding: 24px 5vw 34px;
    align-items: flex-end;
  }

  body.mobile-app-shell .main-content {
    padding: 0 5vw calc(var(--mobile-bottom-nav-h) + 44px + env(safe-area-inset-bottom, 0px));
  }

  body.mobile-app-shell .movie-page-main,
  body.mobile-app-shell .category-page-main {
    padding-top: calc(env(safe-area-inset-top, 0px) + 18px);
    padding-bottom: calc(var(--mobile-bottom-nav-h) + 44px + env(safe-area-inset-bottom, 0px));
  }

  body.mobile-app-shell.settings-page .settings-main {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
    padding-bottom: calc(var(--mobile-bottom-nav-h) + 42px + env(safe-area-inset-bottom, 0px));
  }

  body.mobile-app-shell.search-page .search-page-main {
    padding: 12px 5vw calc(var(--mobile-bottom-nav-h) + 44px + env(safe-area-inset-bottom, 0px));
  }

  body.mobile-app-shell.search-page .search-page-hero {
    border-radius: 20px;
    padding: 24px 16px 18px;
    margin-bottom: 14px;
    background:
      radial-gradient(circle at 0 0, rgba(229, 9, 20, .16), transparent 34%),
      linear-gradient(145deg, rgba(18, 18, 18, .98), rgba(5, 5, 5, .96));
    box-shadow: 0 18px 44px -34px rgba(0, 0, 0, .95);
  }

  body.mobile-app-shell.search-page .search-page-eyebrow {
    margin-bottom: 6px;
    font-size: .68rem;
    letter-spacing: .11em;
  }

  body.mobile-app-shell.search-page .search-page-command,
  body.mobile-app-shell.search-page .search-page-command.is-open {
    display: flex;
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    margin-top: 16px;
  }

  body.mobile-app-shell.search-page .search-page-command .search-command-inner,
  body.mobile-app-shell.search-page .search-page-command.is-open .search-command-inner {
    position: static;
    inset: auto;
    min-height: 48px;
    min-width: 0;
    border-radius: 14px;
    padding: 10px 12px;
    box-shadow: none;
  }

  body.mobile-app-shell.search-page .search-zone {
    margin-top: 12px;
    padding: 14px;
    border-radius: 20px;
  }

  body.mobile-app-shell.search-page .search-page-title {
    font-size: clamp(1.9rem, 8vw, 2.45rem);
    line-height: 1.08;
    letter-spacing: 0;
    max-width: 100%;
  }

  body.mobile-app-shell.search-page .search-page-subtitle {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: .9rem;
    line-height: 1.5;
  }

  body.mobile-app-shell.search-page .search-zone-head {
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  body.mobile-app-shell.search-page .search-zone-head > .btn {
    display: none;
  }

  .mobile-catalog-switch {
    position: fixed;
    top: calc(8px + env(safe-area-inset-top, 0px));
    left: 50%;
    z-index: 2147482990;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    max-width: min(90vw, 360px);
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(18, 18, 18, .72);
    color: #fff;
    text-decoration: none;
    font-size: .74rem;
    font-weight: 800;
    box-shadow: 0 16px 36px -24px rgba(0, 0, 0, .92);
    backdrop-filter: blur(15px) saturate(1.25);
    -webkit-backdrop-filter: blur(15px) saturate(1.25);
    transform: translate3d(-50%, 0, 0);
  }

  body.mobile-app-shell .apk-floating-btn {
    display: none !important;
    left: 12px;
    bottom: calc(var(--mobile-bottom-nav-h) + 26px + env(safe-area-inset-bottom, 0px));
    z-index: 140;
  }

  body.mobile-app-shell .dev-signature {
    display: none;
  }

  body.mobile-app-shell .watch-player-shell.show {
    margin-bottom: calc(var(--mobile-bottom-nav-h) + 14px);
  }

  body.mobile-app-shell .home-resume-player.show,
  body.native-app-runtime .home-resume-player.mode-video.show {
    margin-bottom: 0;
  }

  .mobile-bottom-nav {
    position: fixed !important;
    inset: auto auto calc(var(--mobile-bottom-nav-gap) + env(safe-area-inset-bottom, 0px)) 50% !important;
    top: auto !important;
    right: auto !important;
    bottom: calc(var(--mobile-bottom-nav-gap) + env(safe-area-inset-bottom, 0px));
    z-index: 2147483000;
    width: min(92vw, 430px);
    min-height: var(--mobile-bottom-nav-h);
    display: block;
    margin: 0 !important;
    padding: 8px 9px 7px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04)),
      rgba(20, 20, 20, .66);
    box-shadow:
      0 20px 54px -28px rgba(0, 0, 0, .95),
      inset 0 1px 0 rgba(255, 255, 255, .12);
    backdrop-filter: blur(15px) saturate(1.35);
    -webkit-backdrop-filter: blur(15px) saturate(1.35);
    transform: translate3d(-50%, 0, 0);
    transition: opacity .24s ease, transform .24s ease;
    will-change: opacity;
  }

  .mobile-nav-actions {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    gap: 4px;
  }

  body.mobile-search-open .mobile-bottom-nav {
    opacity: 0;
    pointer-events: none;
    transform: translate3d(-50%, 110%, 0);
  }

  .mobile-search-sheet {
    position: fixed;
    inset: 0;
    z-index: 205;
    display: none;
  }

  .mobile-search-sheet.is-open {
    display: block;
  }

  .mobile-search-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 5, 8, .72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .mobile-search-sheet-panel {
    position: absolute;
    inset: calc(env(safe-area-inset-top, 0px) + 12px) 12px auto;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(11, 13, 16, .96);
    box-shadow: 0 24px 52px -26px rgba(0, 0, 0, .98);
    padding: 14px;
  }

  .mobile-search-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
  }

  .mobile-search-sheet-title {
    font-size: .98rem;
    font-weight: 800;
    letter-spacing: 0;
  }

  .mobile-search-sheet-close {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .mobile-search-sheet-close svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.25;
  }

  .mobile-search-sheet-host .search-command {
    display: flex;
    width: 100%;
    margin-left: 0;
    overflow: visible;
  }

  .mobile-search-sheet-host .search-command.is-open {
    flex: 1 1 auto;
    width: 100%;
    gap: 0;
  }

  .mobile-search-sheet-host .search-toggle-btn {
    display: none;
  }

  .mobile-search-sheet-host .search-command-inner,
  .mobile-search-sheet-host .search-command.is-open .search-command-inner {
    display: flex;
    position: static;
    width: 100%;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    min-height: 50px;
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(7, 8, 10, .96);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: none;
  }

  .mobile-search-sheet-host #searchInput {
    font-size: .96rem;
  }

  .mobile-search-sheet-host .btn.clear-btn {
    min-height: 32px;
    padding: 6px 10px;
  }

  .mobile-nav-item {
    min-width: 0;
    min-height: 54px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, .72);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    font: inherit;
    font-size: .65rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: transform .22s ease, background .22s ease, color .22s ease;
    touch-action: manipulation;
    user-select: none;
  }

  .mobile-nav-item svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.25;
  }

  .mobile-nav-icon {
    width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    font-size: .76rem;
    font-weight: 900;
    line-height: 1;
  }

  .mobile-nav-item:hover,
  .mobile-nav-item:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, .09);
    outline: 0;
  }

  .mobile-nav-item:active {
    transform: scale(.93);
  }

  .mobile-nav-item.is-active {
    color: #fff;
    background: rgba(229, 9, 20, .88);
    box-shadow: 0 14px 28px -18px rgba(229, 9, 20, .9);
  }

  .mobile-nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }

  .mobile-nav-credit {
    display: block;
    margin-top: 1px;
    text-align: center;
    color: rgba(255, 255, 255, .48);
    font-size: .58rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .02em;
    pointer-events: none;
    user-select: none;
  }

  body[data-theme="light"] .mobile-catalog-switch {
    border-color: rgba(0, 0, 0, .12);
    background: rgba(255, 255, 255, .82);
    color: #171717;
    box-shadow: 0 16px 34px -26px rgba(64, 45, 32, .55);
  }

  body[data-theme="light"] .mobile-bottom-nav {
    border-color: rgba(0, 0, 0, .1);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .72)),
      rgba(255, 255, 255, .86);
    box-shadow:
      0 20px 54px -34px rgba(64, 45, 32, .55),
      inset 0 1px 0 rgba(255, 255, 255, .9);
  }

  body[data-theme="light"] .mobile-nav-item {
    color: rgba(23, 23, 23, .68);
  }

  body[data-theme="light"] .mobile-nav-item:hover,
  body[data-theme="light"] .mobile-nav-item:focus-visible {
    color: #111;
    background: rgba(0, 0, 0, .06);
  }

  body[data-theme="light"] .mobile-nav-item.is-active {
    color: #fff;
    background: rgba(229, 9, 20, .9);
  }

  body[data-theme="light"] .mobile-nav-credit {
    color: rgba(23, 23, 23, .48);
  }

  body[data-theme="light"] .mobile-search-sheet-backdrop {
    background: rgba(246, 241, 234, .72);
  }

  body[data-theme="light"] .mobile-search-sheet-panel {
    border-color: rgba(0, 0, 0, .12);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 24px 52px -32px rgba(64, 45, 32, .58);
  }

  body[data-theme="light"] .mobile-search-sheet-title {
    color: #171717;
  }

  body[data-theme="light"] .mobile-search-sheet-close {
    border-color: rgba(0, 0, 0, .12);
    background: rgba(0, 0, 0, .05);
    color: #171717;
  }

  body[data-theme="light"] .mobile-search-sheet-host .search-command-inner,
  body[data-theme="light"] .mobile-search-sheet-host .search-command.is-open .search-command-inner {
    background: rgba(255, 255, 255, .96);
    border-color: rgba(0, 0, 0, .12);
  }
}

@media (max-width: 370px) {
  .mobile-nav-item {
    font-size: .58rem;
    gap: 3px;
  }

  .mobile-nav-item svg {
    width: 18px;
    height: 18px;
  }

  .mobile-nav-icon {
    width: 18px;
    height: 18px;
    font-size: .68rem;
  }

  .mobile-nav-credit {
    font-size: .54rem;
  }
}
