*, *::before, *::after {
  box-sizing: border-box;
}
/* Hide Yandex Metrika debugger */
.__ymDebuggerOpener,
ym-debugger {
  display: none !important;
}
html, body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: #0c0f12;
  color: #f5f7f8;
  font-family: "IBM Plex Mono", "Courier New", monospace;
}
body {
  padding: 24px;
  padding-top: 72px;
}

:root {
  --sidebar-collapsed-width: 56px;
  --sidebar-expanded-width: 200px;
  --layout-gutter: clamp(10px, 1.1vw, 18px);
  --content-max-width: 1240px;
}

/* Site header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 24px;
  background: rgba(12, 15, 18, 0.95);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  height: 48px;
}
.site-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c6d7e2;
  text-decoration: none;
}
.site-logo {
  height: 28px;
  width: auto;
  display: block;
}

.page-shell {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
  column-gap: var(--layout-gutter);
  row-gap: 28px;
  align-items: start;
  min-width: 0;
  padding-inline: var(--layout-gutter);
  transition: grid-template-columns 0.3s ease;
}
body.sidebar-open .page-shell {
  grid-template-columns: var(--sidebar-expanded-width) minmax(0, 1fr);
}

.page-shell > :not(.sidebar) {
  grid-column: 2;
  min-width: 0;
  width: min(100%, var(--content-max-width));
  margin-inline: auto;
}

.page-shell > * {
  min-width: 0;
}
.sidebar {
  position: fixed;
  top: 48px;
  left: 0;
  width: 56px;
  height: calc(100vh - 48px);
  z-index: 1002;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  background: rgba(17, 22, 29, 0.95);
  border-right: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  transition: width 0.3s ease;
}
.sidebar.open {
  width: 200px;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  flex: 1;
  min-height: 0;
}
.sidebar-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  text-decoration: none;
  color: #9ca3af;
  background: transparent;
  border: none;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease, width 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.sidebar-tab.active,
.sidebar-tab:hover,
.sidebar-tab:focus {
  background: rgba(139,92,246,0.18);
  color: #f5f7f8;
  transform: translateY(-2px);
}
.sidebar-tab.active {
  box-shadow: 0 0 0 1px rgba(139,92,246,0.35);
  color: #fff;
}
.twitch-auth-btn {
  background: linear-gradient(135deg, rgba(145, 70, 255, 0.15), rgba(100, 50, 255, 0.15));
  border: 1px solid rgba(145, 70, 255, 0.3);
}
.twitch-auth-btn:hover,
.twitch-auth-btn:focus {
  background: linear-gradient(135deg, rgba(145, 70, 255, 0.25), rgba(100, 50, 255, 0.25));
  border-color: rgba(145, 70, 255, 0.5);
}
.sidebar.open .sidebar-tab {
  width: 184px;
  justify-content: flex-start;
  padding-left: 12px;
  gap: 14px;
}
.tab-label {
  display: none;
  font-size: 0.85rem;
}
.sidebar.open .tab-label {
  display: inline;
}
.tab-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}
.menu-top-btn {
  margin-bottom: 6px;
  background: rgba(255,255,255,0.04);
}
.menu-top-btn:hover {
  background: rgba(255,255,255,0.08);
}
.brand-small {
  display: none;
}
.content-area {
  display: grid;
  gap: 28px;
  width: 100%;
  margin-inline: 0;
  min-width: 0;
}
.hero-block, .info-panel, .section-block, .genre-block, .search-results {
  border: 2px solid #293440;
  background: linear-gradient(180deg, #11141a 0%, #14191f 100%);
  border-radius: 18px;
  padding: 28px;
  min-width: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02), 0 24px 60px rgba(0,0,0,0.24);
}
.title-block {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}
.subtitle {
  max-width: 680px;
  color: #98a5b4;
  line-height: 1.55;
}
.search-card {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: rgba(37, 49, 65, 0.85);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
}
.search-card label {
  font-size: 0.95rem;
  color: #a6b4c3;
}
.search-input-group {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}
.search-card input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0f1318;
  color: #eef2f5;
  font-size: 1rem;
}
.search-card input::placeholder {
  color: #5f7283;
}
.search-card button {
  width: fit-content;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  background: #334155;
  color: #e9f1f7;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
}
.search-card button:hover {
  background: #4b607b;
}
.search-type-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.search-type-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #9ca8b6;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.search-type-label:hover {
  background: rgba(255,255,255,0.08);
  color: #dce6ef;
}
.search-type-label input[type="radio"] {
  accent-color: #8b5cf6;
  width: 16px;
  height: 16px;
  margin: 0;
}
.search-type-label:has(input[type="radio"]:checked) {
  background: rgba(139,92,246,0.15);
  border-color: rgba(139,92,246,0.4);
  color: #c4b5fd;
}
.genre-top-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.genre-pill-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #e9f0f8;
  font-size: 0.92rem;
  cursor: pointer;
}
.genre-pill-top:hover {
  background: rgba(255,255,255,0.08);
}
.suggestions-list {
  list-style: none;
  margin: 0;
  padding: 10px 0;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(17, 22, 29, 0.98);
  max-height: 260px;
  overflow: auto;
}
.suggestion-item {
  padding: 10px 14px;
  color: #e6edf4;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.15s ease;
}
.suggestion-item:last-child {
  border-bottom: none;
}
.suggestion-item:hover,
.suggestion-item.selected {
  background: rgba(139,92,246,0.12);
}
.suggestion-poster {
  width: 40px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
}
.suggestion-poster-empty {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
}
.suggestion-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.suggestion-title {
  font-weight: 500;
  color: #eef6fb;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggestion-title mark {
  background: rgba(139,92,246,0.3);
  color: #c4b5fd;
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 600;
}
.suggestion-meta {
  font-size: 0.8rem;
  color: #8fa0b2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggestion-arrow {
  color: #6b7a8a;
  font-size: 1.1rem;
  opacity: 0;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
  margin-left: auto;
}
.suggestion-item:hover .suggestion-arrow,
.suggestion-item.selected .suggestion-arrow {
  opacity: 1;
  color: #a78bfa;
}
.flash-list {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}
.flash-message {
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(93, 108, 128, 0.2);
  color: #ebf3fb;
}
.flash-error {
  background: rgba(127, 49, 49, 0.22);
  border-color: rgba(203, 84, 84, 0.3);
}
.hint-box {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(45, 62, 82, 0.75);
  color: #9ca8b6;
}
.section-header,
.section-subtitle {
  margin: 0 0 18px;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c1d1e0;
}
.genre-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.genre-pill {
  display: inline-flex;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #e9f0f8;
  text-decoration: none;
  font-size: 0.95rem;
}
.genre-pill:hover {
  background: rgba(255,255,255,0.08);
}
.movie-grid-small {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}
.movie-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  text-decoration: none;
  background: rgba(28, 38, 52, 0.85);
  border: 1px solid rgba(255,255,255,0.07);
  color: #f2f7fb;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.movie-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.16);
}
.movie-card img {
  width: 100%;
  height: 240px;
  max-height: 260px;
  border-radius: 14px;
  object-fit: cover;
}
.movie-card-info {
  display: grid;
  gap: 6px;
}
.movie-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #eef6fb;
}
.movie-card-meta {
  font-size: 0.88rem;
  color: #98a7b8;
}
.top-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 24px;
}
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(47, 62, 80, 0.8);
  color: #dce6ef;
  text-decoration: none;
}
.tag {
  font-size: 0.9rem;
  color: #94a6b9;
  background: rgba(40, 55, 70, 0.8);
  border-radius: 12px;
  padding: 10px 16px;
}
.movie-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(220px, 1fr) 2fr;
}
.poster-block img {
  width: 100%;
  border-radius: 18px;
  border: 2px solid rgba(255,255,255,0.08);
}
.details-block h1 {
  margin: 0 0 18px;
  font-size: 2.3rem;
  letter-spacing: 0.04em;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: #97a6b5;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #d3dde8;
  font-size: 0.92rem;
}
.description {
  margin: 0 0 18px;
  line-height: 1.75;
  color: #dcdfe3;
}
.slogan {
  margin: 0;
  color: #a9b7c5;
  font-style: italic;
}
.player-controls {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.player-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(17, 22, 29, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #8fa0b2;
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.player-btn:hover {
  background: rgba(17, 22, 29, 0.9);
  border-color: rgba(255, 255, 255, 0.25);
  color: #c6d7e2;
}

.player-btn.active {
  background: rgba(76, 175, 80, 0.15);
  border-color: rgba(76, 175, 80, 0.5);
  color: #4caf50;
  font-weight: 600;
}

.player-btn.active .check {
  display: block !important;
}

.player-btn.active:hover {
  background: rgba(76, 175, 80, 0.25);
  border-color: rgba(76, 175, 80, 0.7);
}

.player-icon {
  display: inline-block;
  flex-shrink: 0;
}

.player-block {
  margin-top: 0;
  padding: 24px;
  background: rgba(17, 22, 29, 0.95);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
}

.player-label {
  margin-bottom: 18px;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: #8fa0b2;
  text-transform: uppercase;
}

.player-block iframe {
  width: 100%;
  min-height: 480px;
  border: none;
  border-radius: 16px;
  background: #000;
}
.empty-state {
  color: #b0bbc7;
}
@media (max-width: 1024px) {
  .page-shell {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 860px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  body {
    padding: 14px;
  }
  .hero-block, .info-panel, .section-block, .genre-block, .search-results {
    padding: 20px;
  }
  .brand {
    font-size: 2.4rem;
  }
  .search-input-group {
    grid-template-columns: 1fr;
  }
}

/* Movie card watchlist button */
.movie-card {
  position: relative;
}
.movie-card-link {
  display: grid;
  gap: 10px;
  text-decoration: none;
  color: #f2f7fb;
}
.watchlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.2s ease;
  z-index: 2;
}
.movie-card:hover .watchlist-btn {
  opacity: 1;
  transform: scale(1);
}
.watchlist-btn:hover {
  background: rgba(139,92,246,0.85);
  border-color: rgba(139,92,246,0.5);
}
.watchlist-btn.added {
  background: rgba(34,197,94,0.85);
  border-color: rgba(34,197,94,0.5);
  opacity: 1;
  transform: scale(1);
}
.watchlist-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Action buttons */
.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.btn-primary, .btn-secondary {
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn-primary {
  background: #334155;
  color: #e9f1f7;
}
.btn-primary:hover {
  background: #4b607b;
  transform: translateY(-1px);
}
.btn-secondary {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #d8e4ef;
  white-space: nowrap;
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-1px);
}

/* OAuth button styles */
.oauth-section {
  margin-bottom: 18px;
}
.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(55, 65, 81, 0.5);
  color: #e9f1f7;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-oauth:hover {
  background: rgba(75, 96, 123, 0.7);
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.2);
}
.btn-twitch {
  background: linear-gradient(135deg, rgba(145, 70, 255, 0.3), rgba(100, 50, 255, 0.3));
  border-color: rgba(145, 70, 255, 0.4);
}
.btn-twitch:hover {
  background: linear-gradient(135deg, rgba(145, 70, 255, 0.5), rgba(100, 50, 255, 0.5));
  border-color: rgba(145, 70, 255, 0.6);
}
.oauth-divider {
  text-align: center;
  padding: 14px 0;
  color: #788a99;
  font-size: 0.9rem;
  font-weight: 500;
}
.oauth-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(1.2);
}

/* Genre actions */
.genre-actions {
  margin-top: 18px;
  text-align: center;
}

/* Random film styles */
.random-controls {
  margin-bottom: 20px;
}
.random-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #c6d7e2;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.random-checkbox-label:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(139,92,246,0.3);
}
.random-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #8b5cf6;
  cursor: pointer;
  margin: 0;
}
.random-checkbox-text {
  color: #dce6ef;
}
.random-film {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: center;
}
.random-poster img {
  width: 100%;
  border-radius: 18px;
  border: 2px solid rgba(255,255,255,0.08);
}
.random-details h2 {
  margin: 0 0 12px;
  font-size: 1.8rem;
  letter-spacing: 0.04em;
}
.random-meta {
  margin-bottom: 18px;
  color: #97a6b5;
}
.random-actions {
  display: flex;
  gap: 12px;
}

/* Movie list styles */
.movie-list {
  display: grid;
  gap: 12px;
}
.movie-list-item {
  position: relative;
  display: block;
  padding: 16px;
  border-radius: 14px;
  background: rgba(28, 38, 52, 0.85);
  border: 1px solid rgba(255,255,255,0.07);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.movie-list-item:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.16);
}
.movie-list-link {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  text-decoration: none;
  color: #f2f7fb;
  align-items: center;
  min-width: 0;
}
.movie-list-link img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  aspect-ratio: 2/3;
}
.movie-list-info {
  display: grid;
  gap: 4px;
  padding-right: 32px;
  min-width: 0;
  overflow: hidden;
}
.movie-list-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #eef6fb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.movie-list-meta {
  font-size: 0.88rem;
  color: #98a7b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.remove-form {
  position: absolute;
  top: 8px;
  right: 8px;
}
.remove-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #6b7a8a;
  cursor: pointer;
  transition: all 0.2s ease;
}
.remove-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #a6b4c3;
}

/* Mobile styles for menu */
@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    top: 48px;
    left: 0;
    width: 200px;
    height: calc(100vh - 48px);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    padding: 12px 8px;
    align-items: flex-start;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-nav {
    align-items: flex-start;
    gap: 6px;
  }
  .sidebar-tab {
    width: 184px;
    height: 40px;
    justify-content: flex-start;
    padding-left: 12px;
    gap: 14px;
    flex-direction: row;
  }
  .tab-label {
    display: inline;
    font-size: 0.85rem;
  }

  .menu-top-btn {
    width: 184px;
    justify-content: flex-start;
    padding-left: 12px;
  }
  .menu-top-btn .tab-label {
    display: inline;
  }
}

@media (max-width: 620px) {
  .random-film {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .random-actions {
    justify-content: center;
  }
}



/* Sidebar auth section */
.sidebar-divider {
  width: 24px;
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin-top: auto;
  margin-bottom: 8px;
  transition: width 0.3s ease;
}
.sidebar.open .sidebar-divider {
  width: 160px;
}
.sidebar-user {
  color: #c6d7e2;
  cursor: default;
}
.sidebar-user:hover {
  background: transparent;
  transform: none;
}

/* Auth forms */
.auth-section {
  max-width: 420px;
}
.auth-form {
  display: grid;
  gap: 14px;
}
.auth-form label {
  font-size: 0.9rem;
  color: #a6b4c3;
}
.auth-form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0f1318;
  color: #eef2f5;
  font-size: 1rem;
}
.auth-form input:focus {
  outline: none;
  border-color: rgba(139,92,246,0.5);
}
.auth-hint {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: #8fa0b2;
}
.auth-hint a {
  color: #a78bfa;
  text-decoration: none;
}
.auth-hint a:hover {
  text-decoration: underline;
}

/* Modal styles */
.modal-overlay[hidden] {
  display: none;
}
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.75);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-container {
  position: relative;
  background: #14191f;
  border: 2px solid #293440;
  border-radius: 18px;
  padding: 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #c6d7e2;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.modal-close:hover {
  background: rgba(255,255,255,0.1);
}
.modal-title {
  margin: 0 0 24px;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: #c1d1e0;
}
.modal-messages {
  margin-bottom: 16px;
}
.modal-form {
  display: grid;
  gap: 14px;
}
.modal-form label {
  font-size: 0.9rem;
  color: #a6b4c3;
}
.modal-form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0f1318;
  color: #eef2f5;
  font-size: 1rem;
}
.modal-form input:focus {
  outline: none;
  border-color: rgba(139,92,246,0.5);
}
.btn-full {
  width: 100%;
}
.modal-hint {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: #8fa0b2;
  text-align: center;
}
.modal-hint a {
  color: #a78bfa;
  text-decoration: none;
}
.modal-hint a:hover {
  text-decoration: underline;
}

/* Voting styles */
.voting-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}
.voting-bar form {
  display: inline;
}
.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #9ca3af;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
}
.vote-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #c6d7e2;
}
.vote-btn.active-like {
  background: rgba(34,197,94,0.15);
  border-color: rgba(34,197,94,0.4);
  color: #4ade80;
}
.vote-btn.active-dislike {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.4);
  color: #f87171;
}
.vote-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Comments section */
.comments-section {
  margin-top: 24px;
  padding: 18px;
  background: rgba(17, 22, 29, 0.95);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
}
.comments-title {
  margin: 0 0 14px;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: #c1d1e0;
  text-transform: uppercase;
}
.comment-form {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}
.comment-form textarea {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0f1318;
  color: #eef2f5;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}
.comment-form textarea:focus {
  outline: none;
  border-color: rgba(139,92,246,0.5);
}
.spoiler-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8fa0b2;
  font-size: 0.85rem;
}
.spoiler-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: #8b5cf6;
}
.comments-list {
  display: grid;
  gap: 10px;
}
.comment-item {
  padding: 12px;
  background: rgba(28, 38, 52, 0.85);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
}
.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.comment-author {
  font-weight: 700;
  color: #a78bfa;
  font-size: 0.9rem;
}
.comment-date {
  font-size: 0.75rem;
  color: #6b7a8a;
}
.comment-text {
  color: #dcdfe3;
  line-height: 1.5;
  font-size: 0.9rem;
}
.comment-text.spoiler {
  filter: blur(6px);
  user-select: none;
  transition: filter 0.3s ease;
  cursor: pointer;
}
.comment-text.spoiler.revealed {
  filter: blur(0);
  user-select: text;
  cursor: text;
}
.spoiler-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 5px 10px;
  background: rgba(139,92,246,0.15);
  border: 1px solid rgba(139,92,246,0.35);
  border-radius: 8px;
  color: #a78bfa;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.spoiler-toggle:hover {
  background: rgba(139,92,246,0.25);
}
.no-comments {
  color: #8fa0b2;
  font-style: italic;
  text-align: center;
  padding: 14px;
  font-size: 0.9rem;
}

/* Admin styles */
.ban-badge {
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 400;
}
.comment-admin-actions {
  margin-top: 8px;
}
.admin-menu-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(139,92,246,0.4);
  background: rgba(139,92,246,0.15);
  color: #a78bfa;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.admin-menu-btn:hover {
  background: rgba(139,92,246,0.3);
}
.admin-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding: 10px;
  background: rgba(17, 22, 29, 0.95);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 10px;
}
.admin-menu.hidden {
  display: none;
}
.admin-menu-item {
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,0.05);
  color: #dcdfe3;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}
.admin-menu-item:hover {
  background: rgba(239,68,68,0.2);
  color: #f87171;
}
.admin-vote-panel {
  margin-top: 16px;
  padding: 14px;
  background: rgba(139,92,246,0.08);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 12px;
}
.admin-panel-title {
  font-size: 0.85rem;
  color: #a78bfa;
  margin-bottom: 10px;
  font-weight: 700;
}
.admin-vote-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.admin-vote-form label {
  font-size: 0.85rem;
  color: #9ca3af;
}
.admin-vote-form input {
  width: 60px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0f1318;
  color: #eef2f5;
  font-size: 0.9rem;
}

/* Admin users table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.admin-table th {
  color: #a6b4c3;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.admin-table td {
  color: #dcdfe3;
}
.admin-table tr:hover td {
  background: rgba(255,255,255,0.02);
}
.status-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.status-badge.admin {
  background: rgba(139,92,246,0.2);
  color: #a78bfa;
}
.status-badge.user {
  background: rgba(255,255,255,0.05);
  color: #9ca3af;
}
.status-badge.banned {
  background: rgba(239,68,68,0.2);
  color: #f87171;
}
.admin-action-btn {
  padding: 5px 12px;
  border-radius: 6px;
  border: none;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.admin-action-btn.ban {
  background: rgba(239,68,68,0.15);
  color: #f87171;
}
.admin-action-btn.ban:hover {
  background: rgba(239,68,68,0.3);
}
.admin-action-btn.unban {
  background: rgba(34,197,94,0.15);
  color: #4ade80;
}
.admin-action-btn.unban:hover {
  background: rgba(34,197,94,0.3);
}

/* Responsive tuning: phone / tablet / desktop / 2K+ */
.hero-block, .info-panel, .section-block, .genre-block, .search-results {
  padding: clamp(18px, 2vw, 30px);
}

.movie-grid {
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
}

.movie-grid-small {
  grid-template-columns: repeat(auto-fit, minmax(clamp(160px, 18vw, 220px), 1fr));
}

.movie-card img {
  height: clamp(200px, 24vw, 320px);
  max-height: none;
}

.player-block iframe {
  min-height: 0;
  height: auto;
  aspect-ratio: 16 / 9;
}

@media (min-width: 1600px) {
  :root {
    --content-max-width: 1360px;
  }
}

@media (min-width: 1920px) {
  :root {
    --content-max-width: 1520px;
  }

  body {
    padding: 28px;
    padding-top: 80px;
    font-size: 17px;
  }

  .site-header {
    height: 54px;
    padding: 10px 28px;
  }

  .sidebar {
    top: 54px;
    height: calc(100vh - 54px);
  }

  .content-area {
    gap: 34px;
  }

  .site-title {
    font-size: 1.3rem;
  }

  .movie-grid {
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
    gap: 32px;
  }

  .details-block h1 {
    font-size: clamp(2.2rem, 2.4vw, 3rem);
  }

  .player-block iframe {
    max-height: 78vh;
  }
}

@media (min-width: 2560px) {
  :root {
    --content-max-width: 1860px;
  }

  .movie-grid-small {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

@media (max-width: 1280px) {
  :root {
    --content-max-width: 1080px;
  }

  .movie-grid {
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  }
}

@media (max-width: 1024px) {
  .page-shell {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: var(--layout-gutter);
  }

  body.sidebar-open .page-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-shell > :not(.sidebar) {
    grid-column: 1;
    width: 100%;
    max-width: 100%;
  }

  .content-area {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 860px) {
  body {
    padding: 14px;
    padding-top: 66px;
  }

  .site-header {
    padding: 8px 14px;
  }

  .content-area {
    gap: 18px;
  }

  .hero-block, .info-panel, .section-block, .genre-block, .search-results {
    border-radius: 14px;
  }

  .movie-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .details-block h1 {
    font-size: 1.6rem;
    line-height: 1.2;
  }

  .movie-list-link {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
  }

  .movie-list-title {
    font-size: 1rem;
  }

  .player-controls {
    margin-top: 20px;
  }

  .player-btn {
    width: 100%;
    justify-content: center;
  }

  .player-block {
    padding: 12px;
    border-radius: 12px;
  }
}

@media (max-width: 620px) {
  .search-input-group {
    grid-template-columns: 1fr;
  }

  .search-card button {
    width: 100%;
  }

  .movie-grid-small {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .movie-card {
    padding: 10px;
    border-radius: 12px;
  }

  .movie-card-title {
    font-size: 0.9rem;
  }

  .movie-card-meta {
    font-size: 0.78rem;
  }

  .movie-card img {
    height: clamp(170px, 52vw, 240px);
  }

  .random-film {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
    gap: 14px;
  }

  .random-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .modal-container {
    max-width: 100%;
    padding: 22px;
    border-radius: 14px;
  }
}

@media (max-width: 420px) {
  body {
    padding: 10px;
    padding-top: 62px;
  }

  .site-title {
    font-size: 0.95rem;
    letter-spacing: 0.08em;
  }

  .site-logo {
    height: 22px;
  }

  .movie-grid-small {
    grid-template-columns: 1fr;
  }

  .actions-row,
  .random-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}


