:root {
  color-scheme: dark;
  background: #05070b;
}

body {
  margin: 0;
  background: #05070b;
}

.cinema-shell-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 42px;
  padding: 0 32px;
  color: #d6dee8;
  background: rgba(5, 7, 11, .9);
  border-bottom: 1px solid rgba(200, 220, 240, .1);
  backdrop-filter: blur(18px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.cinema-shell-nav a { color: inherit; text-decoration: none; }
.cinema-shell-brand { display: flex; align-items: center; gap: 10px; }
.cinema-shell-brand strong { font-size: 16px; letter-spacing: .04em; }
.cinema-camera {
  width: 25px;
  height: 20px;
  position: relative;
  display: block;
  border: 1.5px solid #61b8ff;
  border-radius: 5px;
}
.cinema-camera::before,
.cinema-camera::after {
  content: "";
  position: absolute;
  top: -7px;
  width: 7px;
  height: 7px;
  border: 1.5px solid #61b8ff;
  border-radius: 50%;
}
.cinema-camera::before { left: 2px; }
.cinema-camera::after { right: 2px; }
.cinema-shell-links { height: 100%; display: flex; align-items: center; gap: 36px; }
.cinema-shell-links a {
  height: 100%;
  position: relative;
  display: grid;
  place-items: center;
  color: #9aa6b7;
  font-size: 14px;
}
.cinema-shell-links a:hover,
.cinema-shell-links a.active { color: #8fd3ff; }
.cinema-shell-links a.active::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: #61b8ff;
  box-shadow: 0 0 12px rgba(97, 184, 255, .8);
}
.cinema-shell-home {
  width: 36px;
  height: 36px;
  margin-left: auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(143, 211, 255, .25);
  border-radius: 50%;
  color: #8fd3ff !important;
  font-size: 11px;
  font-weight: 700;
}

.mobile-filter-title,
.mobile-list-heading { display: none; }

@media (min-width: 769px) {
  .cinema-root .hero { padding-top: 54px; padding-bottom: 42px; }
  .cinema-root .hero-title { font-size: 34px; }
  .cinema-root .container { padding-top: 28px; }
  .cinema-root .table-container { box-shadow: 0 26px 70px rgba(0, 18, 45, .24); }
}

@media (max-width: 768px) {
  :root { color-scheme: dark; }
  body { overflow-x: hidden; }

  .cinema-shell-nav {
    height: 54px;
    gap: 16px;
    padding: 0 16px;
  }
  .cinema-shell-brand strong { font-size: 14px; }
  .cinema-camera { width: 22px; height: 17px; }
  .cinema-shell-links {
    flex: 1;
    justify-content: center;
    gap: 18px;
    overflow: hidden;
  }
  .cinema-shell-links a { font-size: 12px; }
  .cinema-shell-links a:nth-child(3) { display: none; }
  .cinema-shell-home { width: 32px; height: 32px; flex: 0 0 auto; }

  .cinema-root {
    --bg-page: #060a11;
    --bg-deep: #0a1422;
    --bg-card: #0f1724;
    --bg-hover: #142032;
    --border-weak: rgba(178, 204, 235, .13);
    min-height: calc(100vh - 54px);
    background:
      radial-gradient(circle at 15% 20%, rgba(49, 123, 255, .08), transparent 30%),
      radial-gradient(circle at 85% 48%, rgba(110, 78, 255, .06), transparent 30%),
      var(--bg-page);
  }

  .cinema-root .hero {
    min-height: 126px;
    display: grid;
    place-items: center;
    padding: 24px 16px 30px;
  }
  .cinema-root .logo { margin-bottom: 7px; }
  .cinema-root .logo svg { width: 32px; height: 32px; }
  .cinema-root .hero-title { margin-bottom: 4px; font-size: 22px; }
  .cinema-root .hero-subtitle { font-size: 11px; }
  .cinema-root .horizon-glow { height: 52px; }

  .cinema-root .container { padding: 16px 14px 42px; }
  .cinema-root .search-bar { margin-bottom: 18px; }
  .cinema-root .search-input {
    height: 46px;
    border-radius: 16px;
    background: rgba(15, 23, 36, .9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  }

  .mobile-filter-title,
  .mobile-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .mobile-filter-title { margin: 0 2px 12px; }
  .mobile-filter-title strong,
  .mobile-list-heading strong {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #eaf2ff;
    font-size: 17px;
    letter-spacing: .02em;
  }
  .mobile-filter-title strong span,
  .mobile-list-heading strong span { color: #72bfff; }
  .mobile-filter-title button {
    padding: 6px 0 6px 12px;
    border: 0;
    color: #78bfff;
    background: transparent;
    font-size: 12px;
    cursor: pointer;
  }

  .cinema-root .filters {
    margin-bottom: 10px;
    padding: 14px 12px 8px;
    border: 1px solid var(--border-weak);
    border-radius: 20px;
    background: rgba(10, 18, 30, .76);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .18);
  }
  .cinema-root .filter-group {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
  }
  .cinema-root .filter-label {
    width: auto;
    padding: 0;
    color: #cbd6e5;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
  }
  .cinema-root .chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 7px;
    margin-right: -12px;
    padding-right: 16px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
    scrollbar-width: none;
  }
  .cinema-root .chips::-webkit-scrollbar { display: none; }
  .cinema-root .chip {
    min-height: 38px;
    padding: 8px 14px;
    flex: 0 0 auto;
    scroll-snap-align: start;
    border-radius: 13px;
    font-size: 13px;
    background: rgba(18, 28, 43, .92);
    box-shadow: 0 7px 18px rgba(0, 0, 0, .12);
  }
  .cinema-root .all-chip { font-weight: 600; }
  .cinema-root .all-chip.tone-red.active { color: #ff8794; border-color: rgba(255, 93, 111, .4); background: rgba(255, 72, 92, .11); }
  .cinema-root .all-chip.tone-blue.active { color: #74bfff; border-color: rgba(73, 153, 255, .42); background: rgba(49, 123, 255, .12); }
  .cinema-root .all-chip.tone-violet.active { color: #a391ff; border-color: rgba(133, 100, 255, .4); background: rgba(112, 78, 255, .12); }
  .cinema-root .all-chip.tone-green.active { color: #69d7a6; border-color: rgba(63, 199, 137, .4); background: rgba(55, 182, 124, .11); }

  .cinema-root .toolbar {
    margin: 0 0 22px;
    padding: 0 2px;
    align-items: center;
    flex-direction: row;
  }
  .cinema-root .sort-bar { gap: 7px; flex-wrap: nowrap; overflow-x: auto; }
  .cinema-root .sort-label { font-size: 12px; font-weight: 600; color: #cbd6e5; }
  .cinema-root .sort-btn {
    min-height: 38px;
    padding: 8px 14px;
    flex: 0 0 auto;
    border-radius: 13px;
  }
  .cinema-root .sort-btn.active {
    color: #ffaf52;
    border-color: rgba(255, 156, 43, .36);
    background: rgba(255, 144, 28, .1);
  }
  .cinema-root .results-info { display: none; }

  .mobile-list-heading { margin: 0 2px 14px; }
  .mobile-list-heading strong { font-size: 19px; }
  .mobile-result-count { color: #8390a4; font-size: 13px; }

  .cinema-root .card-list {
    display: block;
    counter-reset: movie-card;
  }
  .cinema-root .movie-card {
    min-height: 150px;
    position: relative;
    display: block;
    margin-bottom: 11px;
    padding: 18px 66px 17px 126px;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(17, 27, 42, .98), rgba(11, 19, 31, .98));
    box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
  }
  .cinema-root .movie-card::before {
    content: var(--rank);
    position: absolute;
    left: 12px;
    top: 18px;
    z-index: 2;
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(135deg, #ff4f73, #ff7853);
    box-shadow: 0 5px 14px rgba(255, 79, 115, .28);
    font-size: 12px;
    font-weight: 700;
  }
  .cinema-root .movie-card:nth-child(2)::before { background: linear-gradient(135deg, #ff8a24, #ffb02e); box-shadow: 0 5px 14px rgba(255, 153, 36, .25); }
  .cinema-root .movie-card:nth-child(n+3)::before { background: linear-gradient(135deg, #e5a82c, #c98717); box-shadow: 0 5px 14px rgba(213, 151, 34, .2); }

  .poster-placeholder {
    position: absolute;
    left: 49px;
    top: 16px;
    bottom: 16px;
    width: 63px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    color: rgba(255, 255, 255, .9);
    background: linear-gradient(160deg, #223650, #0c1320 68%);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .28);
  }
  .poster-placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 20%, rgba(143, 211, 255, .25), transparent 38%);
  }
  .poster-placeholder span,
  .poster-placeholder small { position: relative; z-index: 1; font-size: 5px; letter-spacing: .18em; opacity: .62; }
  .poster-placeholder b { position: relative; z-index: 1; margin: 4px 0; font-size: 26px; font-weight: 500; }
  .poster-tone-1 { background: linear-gradient(160deg, #5d2d25, #17101a 68%); }
  .poster-tone-2 { background: linear-gradient(160deg, #273e2f, #0d1715 68%); }
  .poster-tone-3 { background: linear-gradient(160deg, #40305f, #12101d 68%); }

  .cinema-root .card-header { margin: 0 0 8px; }
  .cinema-root .card-title-group { min-width: 0; }
  .cinema-root .card-name {
    display: block;
    overflow: hidden;
    color: #eef5ff;
    font-size: 15px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .cinema-root .card-year {
    display: block;
    margin-top: 5px;
    color: #8f9caf;
    font-size: 12px;
  }
  .cinema-root .card-rating {
    position: absolute;
    right: 16px;
    top: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ff9f36;
    font-size: 18px;
  }
  .cinema-root .card-rating::before { content: "★"; font-size: 14px; }
  .cinema-root .card-meta {
    margin: 0 0 4px;
    overflow: hidden;
    color: #9aa7b9;
    font-size: 12px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .cinema-root .card-meta:nth-of-type(3),
  .cinema-root .card-meta.country-text,
  .cinema-root .card-synopsis { display: none; }
  .cinema-root .card-genres {
    min-height: 22px;
    margin: 8px 0 0;
    overflow: hidden;
    white-space: nowrap;
  }
  .cinema-root .genre-tag {
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 10px;
  }
  .cinema-root .movie-card > div[style] {
    position: absolute;
    right: 14px;
    bottom: 16px;
    margin: 0 !important;
  }
  .cinema-root .status-btn {
    min-width: 48px;
    min-height: 29px;
    justify-content: center;
    padding: 5px 10px;
    border: 0;
    color: #9aa7b9;
    background: rgba(120, 137, 160, .12);
  }
  .cinema-root .status-btn::before { display: none; }
  .cinema-root .status-btn.watched {
    color: #64d4a2;
    background: rgba(61, 196, 136, .11);
  }

  .cinema-root .pagination { margin-top: 24px; gap: 5px; }
  .cinema-root .page-btn { min-width: 38px; height: 38px; border-radius: 13px; }
  .cinema-root .footer { padding: 24px 16px; }
}

@media (max-width: 390px) {
  .cinema-shell-links { gap: 12px; }
  .cinema-shell-links a:nth-child(4) { display: none; }
  .cinema-root .container { padding-left: 10px; padding-right: 10px; }
  .cinema-root .movie-card { padding-left: 118px; padding-right: 62px; }
  .poster-placeholder { left: 45px; width: 60px; }
  .cinema-root .card-name { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .cinema-shell-nav { backdrop-filter: none; }
}
