*, *::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;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
/* Allow text selection in content areas */
.content-area, .movie-card, .movie-list, .comments-section, .auth-section {
  -webkit-user-select: text;
  user-select: text;
}
body {
  padding: 0;
  padding-top: 56px;
  padding-bottom: 70px;
}

:root {
  --sidebar-collapsed-width: 56px;
  --sidebar-expanded-width: 200px;
  --layout-gutter: clamp(10px, 1.1vw, 18px);
  --content-max-width: 1240px;
  --bottom-nav-height: 68px;
  --header-height: 56px;
  --primary-color: #8b5cf6;
  --primary-light: rgba(139, 92, 246, 0.15);
  --primary-glow: rgba(139, 92, 246, 0.4);
  --card-bg: rgba(28, 38, 52, 0.85);
  --card-border: rgba(255, 255, 255, 0.07);
  --text-primary: #f5f7f8;
  --text-secondary: #98a5b4;
  --text-muted: #6b7a8a;
}

/* ==================== 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 16px;
  background: rgba(12, 15, 18, 0.95);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  height: var(--header-height);
  transition: transform 0.3s ease;
}
.site-header.hidden {
  transform: translateY(-100%);
}
.site-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #c6d7e2;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo {
  height: 24px;
  width: auto;
  display: block;
}

/* Search button in header */
.header-search-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #c6d7e2;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.header-search-btn:hover,
.header-search-btn:active {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
  color: #a78bfa;
}
.header-search-btn svg {
  width: 20px;
  height: 20px;
}

/* ==================== SEARCH OVERLAY ==================== */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: rgba(12, 15, 18, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  padding-left: 16px;
  padding-right: 16px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.search-overlay-form {
  width: 100%;
  max-width: 600px;
}

.search-overlay-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.search-overlay-header input {
  flex: 1;
  height: 48px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.search-overlay-header input:focus {
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.search-overlay-header input::placeholder {
  color: var(--text-muted);
}

.search-overlay-close {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.search-overlay-close:hover,
.search-overlay-close:active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.search-overlay-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.search-overlay-submit {
  width: 100%;
  height: 48px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-overlay-submit:hover,
.search-overlay-submit:active {
  background: #7c3aed;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* ==================== BOTTOM NAVIGATION ==================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--bottom-nav-height);
  background: rgba(12, 15, 18, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  transition: transform 0.3s ease;
}
.bottom-nav.hidden {
  transform: translateY(100%);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  text-decoration: none;
  color: var(--text-muted);
  transition: all 0.2s ease;
  border-radius: 12px;
  min-width: 60px;
  min-height: 56px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.7rem;
  position: relative;
}
.bottom-nav-item:active {
  transform: scale(0.92);
}
.bottom-nav-item.active {
  color: var(--primary-color);
}
.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--primary-glow);
}
.bottom-nav-item svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  transition: transform 0.2s ease;
}
.bottom-nav-item.active svg {
  transform: scale(1.1);
}
.bottom-nav-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ==================== PAGE LAYOUT ==================== */
.page-shell {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  min-width: 0;
}

.content-area {
  display: grid;
  gap: 20px;
  width: 100%;
  padding: 12px;
  padding-top: 8px;
  min-width: 0;
}

/* ==================== GENRE SCROLL (Horizontal Tabs) ==================== */
.genre-scroll-container {
  position: sticky;
  top: var(--header-height);
  z-index: 100;
  background: rgba(12, 15, 18, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 8px 0;
  margin: -12px -12px 0 -12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.genre-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.genre-scroll::-webkit-scrollbar {
  display: none;
}
.genre-tab {
  flex-shrink: 0;
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  scroll-snap-align: start;
  user-select: none;
}
.genre-tab:active {
  transform: scale(0.95);
}
.genre-tab:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}
.genre-tab.active {
  background: var(--primary-light);
  border-color: var(--primary-glow);
  color: var(--primary-color);
  font-weight: 600;
}

/* ==================== HERO / SEARCH BLOCK ==================== */
.hero-block {
  border: 1px solid var(--card-border);
  background: linear-gradient(180deg, rgba(17, 20, 26, 0.95) 0%, rgba(20, 25, 31, 0.95) 100%);
  border-radius: 16px;
  padding: 16px;
  min-width: 0;
}

.search-card {
  display: grid;
  gap: 12px;
}
.search-card label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.search-input-group {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.search-card input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(15, 19, 24, 0.8);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s ease;
}
.search-card input:focus {
  outline: none;
  border-color: var(--primary-glow);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.search-card input::placeholder {
  color: var(--text-muted);
}
.search-card button {
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  background: var(--primary-color);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.search-card button:hover {
  background: #7c3aed;
  transform: translateY(-1px);
}
.search-card button:active {
  transform: scale(0.97);
}

/* Genre pills in search */
.genre-top-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.genre-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  user-select: none;
}
.genre-pill:active {
  transform: scale(0.95);
}
.genre-pill:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}
.genre-pill-top {
  padding: 10px 16px;
  font-size: 0.85rem;
}

/* ==================== SUGGESTIONS ==================== */
.suggestions-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(17, 22, 29, 0.98);
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(139,92,246,0.3) transparent;
}
.suggestion-item {
  padding: 10px 12px;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.15s ease;
}
.suggestion-item:hover,
.suggestion-item.selected {
  background: var(--primary-light);
}
.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: var(--text-primary);
  font-size: 0.9rem;
  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.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggestion-arrow {
  color: var(--text-muted);
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}
.suggestion-item:hover .suggestion-arrow,
.suggestion-item.selected .suggestion-arrow {
  opacity: 1;
  color: var(--primary-color);
}

/* ==================== FLASH MESSAGES ==================== */
.flash-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.flash-message {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(93, 108, 128, 0.2);
  color: var(--text-primary);
  font-size: 0.85rem;
}
.flash-error {
  background: rgba(127, 49, 49, 0.22);
  border-color: rgba(203, 84, 84, 0.3);
}
.flash-success {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.3);
}

/* ==================== SECTION BLOCKS ==================== */
.section-block,
.genre-block,
.search-results,
.info-panel {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 16px;
  padding: 16px;
  min-width: 0;
}

.section-header,
.section-subtitle {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
}

/* ==================== MOVIE CAROUSEL (Horizontal Scroll) ==================== */
.movie-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.movie-carousel::-webkit-scrollbar {
  display: none;
}

.carousel-item {
  flex-shrink: 0;
  scroll-snap-align: start;
  width: 140px;
  position: relative;
}

.carousel-item .movie-card {
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  background: transparent;
  border: none;
  box-shadow: none;
}
.carousel-item .movie-card:hover {
  transform: none;
  border-color: transparent;
}
.carousel-item .movie-card-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
}
.carousel-item .movie-card img {
  width: 140px;
  height: 200px;
  border-radius: 12px;
  object-fit: cover;
  aspect-ratio: 2/3;
  background: rgba(255,255,255,0.05);
}
.carousel-item .movie-card-info {
  padding: 0 4px;
}
.carousel-item .movie-card-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  max-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-decoration: none !important;
}
.carousel-item .movie-card-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none !important;
}

/* Watchlist button on carousel items */
.carousel-item .watchlist-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  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.8);
  transition: all 0.2s ease;
  z-index: 2;
}
.carousel-item:hover .watchlist-btn {
  opacity: 1;
  transform: scale(1);
}
.carousel-item .watchlist-btn:hover {
  background: rgba(139,92,246,0.85);
  border-color: rgba(139,92,246,0.5);
}
.carousel-item .watchlist-btn.added {
  background: rgba(34,197,94,0.85);
  border-color: rgba(34,197,94,0.5);
  opacity: 1;
  transform: scale(1);
}
.carousel-item .watchlist-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Carousel section with "See all" link */
.genre-block {
  padding-bottom: 12px;
}
.genre-block .carousel-wrapper,
.section-block .carousel-wrapper {
  position: relative;
}

/* Carousel Navigation Buttons */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(12, 15, 18, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.carousel-nav-btn:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: var(--primary-glow);
  color: #fff;
  transform: translateY(-50%) scale(1.1);
}

.carousel-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-nav-left {
  left: -20px;
}

.carousel-nav-right {
  right: -20px;
}

.carousel-nav-btn svg {
  width: 20px;
  height: 20px;
}

/* Show carousel nav buttons on desktop */
@media (min-width: 768px) {
  .carousel-nav-btn {
    display: flex;
  }
}

.genre-block .carousel-fade-right {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to right, transparent, var(--card-bg));
  pointer-events: none;
  z-index: 1;
}
.genre-actions {
  margin-top: 14px;
  text-align: center;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}
.btn-secondary:active {
  transform: scale(0.97);
}

/* ==================== MOVIE GRID (for popular/search) ==================== */
.movie-grid-small {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.movie-card {
  display: grid;
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
  text-decoration: none;
  background: rgba(28, 38, 52, 0.6);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
}
.movie-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.16);
}
.movie-card:active {
  transform: scale(0.98);
}
.movie-card img {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  object-fit: cover;
  aspect-ratio: 2/3;
  background: rgba(255,255,255,0.05);
  loading: lazy;
}
.movie-card-info {
  display: grid;
  gap: 4px;
}
.movie-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none !important;
}
.movie-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Watchlist button */
.movie-card .watchlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  -webkit-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);
}
.movie-card .watchlist-btn:hover {
  background: rgba(139,92,246,0.85);
  border-color: rgba(139,92,246,0.5);
}
.movie-card .watchlist-btn.added {
  background: rgba(34,197,94,0.85);
  border-color: rgba(34,197,94,0.5);
  opacity: 1;
  transform: scale(1);
}
.movie-card .watchlist-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ==================== MOVIE LIST (search results) ==================== */
.movie-list {
  display: grid;
  gap: 10px;
}
.movie-list-item {
  position: relative;
  display: block;
  padding: 12px;
  border-radius: 14px;
  background: rgba(28, 38, 52, 0.6);
  border: 1px solid var(--card-border);
  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: 70px 1fr;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  align-items: center;
  min-width: 0;
}
.movie-list-link img {
  width: 70px;
  height: 100px;
  border-radius: 10px;
  object-fit: cover;
  aspect-ratio: 2/3;
  background: rgba(255,255,255,0.05);
}
.movie-list-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.movie-list-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none !important;
}
.movie-list-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Remove button */
.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: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.remove-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-secondary);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.page-link {
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}
.page-link:hover {
  background: rgba(139,92,246,0.15);
  border-color: var(--primary-glow);
  color: var(--primary-color);
}

/* Empty state */
.empty-state {
  color: var(--text-muted);
  text-align: center;
  padding: 32px 16px;
  font-size: 0.9rem;
}

/* ==================== MOVIE DETAIL PAGE ==================== */
.movie-page .info-panel {
  padding: 16px;
}
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(47, 62, 80, 0.8);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}
.nav-back:hover {
  background: rgba(47, 62, 80, 1);
  color: var(--text-primary);
}
.tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(40, 55, 70, 0.8);
  border-radius: 8px;
  padding: 6px 12px;
}

/* Movie detail grid */
.movie-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
.poster-block img {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  display: block;
}
.details-block h1 {
  margin: 0 0 12px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.actions-row form {
  display: inline;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  background: var(--primary-color);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-primary:hover {
  background: #7c3aed;
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: scale(0.97);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}
.btn-secondary:active {
  transform: scale(0.97);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
  font-size: 0.8rem;
}
.description {
  margin: 0 0 14px;
  line-height: 1.65;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.slogan {
  margin: 0;
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.85rem;
}

/* Player controls */
.player-controls {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.player-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(17, 22, 29, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 0;
}
.player-btn:hover {
  background: rgba(17, 22, 29, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-secondary);
}
.player-btn.active {
  background: rgba(76, 175, 80, 0.15);
  border-color: rgba(76, 175, 80, 0.5);
  color: #4ade80;
  font-weight: 600;
}
.player-btn.active:hover {
  background: rgba(76, 175, 80, 0.25);
  border-color: rgba(76, 175, 80, 0.7);
}
.player-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.player-block {
  margin-top: 0;
  padding: 12px;
  background: rgba(17, 22, 29, 0.95);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
}
.player-label {
  margin-bottom: 12px;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}
.player-block iframe {
  width: 100%;
  border: none;
  border-radius: 12px;
  background: #000;
  aspect-ratio: 16/9;
  min-height: 200px;
}

/* Voting */
.voting-bar {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.voting-bar form {
  flex: 1;
}
.vote-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  font-family: inherit;
}
.vote-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-secondary);
}
.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 */
.comments-section {
  margin-top: 20px;
  padding: 16px;
  background: rgba(17, 22, 29, 0.95);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
}
.comments-title {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.comment-form {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.comment-form textarea {
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(15, 19, 24, 0.8);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
}
.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary-glow);
}
.spoiler-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.spoiler-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
}
.comments-list {
  display: grid;
  gap: 8px;
}
.comment-item {
  padding: 10px;
  background: rgba(28, 38, 52, 0.6);
  border: 1px solid var(--card-border);
  border-radius: 10px;
}
.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.comment-author {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.85rem;
}
.comment-date {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.comment-text {
  color: var(--text-secondary);
  line-height: 1.5;
  font-size: 0.85rem;
}
.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: 6px;
  padding: 4px 10px;
  background: var(--primary-light);
  border: 1px solid var(--primary-glow);
  border-radius: 8px;
  color: var(--primary-color);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.spoiler-toggle:hover {
  background: rgba(139,92,246,0.25);
}
.no-comments {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 16px;
  font-size: 0.85rem;
}

/* Admin styles */
.ban-badge {
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 400;
}
.comment-admin-actions {
  margin-top: 6px;
}
.admin-menu-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--primary-glow);
  background: var(--primary-light);
  color: var(--primary-color);
  font-size: 0.75rem;
  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: 8px;
  background: rgba(17, 22, 29, 0.95);
  border: 1px solid var(--primary-glow);
  border-radius: 8px;
}
.admin-menu.hidden {
  display: none;
}
.admin-menu-item {
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  font-family: inherit;
}
.admin-menu-item:hover {
  background: rgba(239,68,68,0.2);
  color: #f87171;
}
.admin-vote-panel {
  margin-top: 16px;
  padding: 12px;
  background: var(--primary-light);
  border: 1px solid var(--primary-glow);
  border-radius: 12px;
}
.admin-panel-title {
  font-size: 0.8rem;
  color: var(--primary-color);
  margin-bottom: 8px;
  font-weight: 600;
}
.admin-vote-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.admin-vote-form label {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.admin-vote-form input {
  width: 60px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(15, 19, 24, 0.8);
  color: var(--text-primary);
  font-size: 0.85rem;
}

/* ==================== AUTH / MODALS ==================== */
.auth-section {
  max-width: 100%;
}
.auth-form {
  display: grid;
  gap: 12px;
}
.auth-form label {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.auth-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(15, 19, 24, 0.8);
  color: var(--text-primary);
  font-size: 1rem;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--primary-glow);
}
.auth-hint {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.auth-hint a {
  color: var(--primary-color);
  text-decoration: none;
}
.auth-hint a:hover {
  text-decoration: underline;
}

/* Modal */
.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: flex-end;
  justify-content: center;
  padding: 0;
}
.modal-container {
  position: relative;
  background: #14191f;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px 20px 0 0;
  padding: 24px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 -20px 60px rgba(0,0,0,0.4);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
  font-size: 1.6rem;
  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 20px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}
.modal-messages {
  margin-bottom: 16px;
}
.modal-form {
  display: grid;
  gap: 12px;
}
.modal-form label {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.modal-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(15, 19, 24, 0.8);
  color: var(--text-primary);
  font-size: 1rem;
}
.modal-form input:focus {
  outline: none;
  border-color: var(--primary-glow);
}
.btn-full {
  width: 100%;
}
.modal-hint {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}
.modal-hint a {
  color: var(--primary-color);
  text-decoration: none;
}
.modal-hint a:hover {
  text-decoration: underline;
}

/* OAuth buttons */
.oauth-section {
  margin-bottom: 16px;
}
.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: 12px;
  background: rgba(55, 65, 81, 0.5);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
}
.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.2), rgba(100, 50, 255, 0.2));
  border-color: rgba(145, 70, 255, 0.3);
}
.btn-twitch:hover {
  background: linear-gradient(135deg, rgba(145, 70, 255, 0.35), rgba(100, 50, 255, 0.35));
  border-color: rgba(145, 70, 255, 0.5);
}
.oauth-divider {
  text-align: center;
  padding: 12px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}
.oauth-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(1.2);
}

/* ==================== RANDOM FILM ==================== */
.random-controls {
  margin-bottom: 16px;
}
.section-description {
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}
.section-description p {
  margin: 0;
}
.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: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.random-checkbox-label:hover {
  background: rgba(255,255,255,0.07);
  border-color: var(--primary-glow);
}
.random-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
  cursor: pointer;
  margin: 0;
}
.random-checkbox-text {
  color: var(--text-secondary);
}
.random-film {
  display: grid;
  gap: 16px;
  align-items: center;
}
.random-poster img {
  width: 100%;
  max-width: 240px;
  margin: 0 auto;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  display: block;
}
.poster-link {
  display: block;
  transition: transform 0.2s ease;
}
.poster-link:hover {
  transform: scale(1.02);
}
.random-details h2 {
  margin: 0 0 10px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
.title-link:hover {
  color: var(--primary-color);
}
.random-meta {
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.random-description {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.random-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==================== ADMIN TABLE ==================== */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table th,
.admin-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.admin-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.admin-table td {
  color: var(--text-secondary);
}
.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.75rem;
  font-weight: 600;
}
.status-badge.admin {
  background: var(--primary-light);
  color: var(--primary-color);
}
.status-badge.user {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
}
.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.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.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);
}

/* ==================== SIDEBAR (for tablets/desktop) ==================== */
.sidebar {
  display: none;
}

/* ==================== RESPONSIVE BREAKPOINTS ==================== */

/* Tablets and larger phones */
@media (min-width: 600px) {
  body {
    padding-top: 60px;
    padding-bottom: 0;
  }
  
  .bottom-nav {
    display: none;
  }
  
  .content-area {
    padding: 16px;
    gap: 24px;
  }
  
  .movie-grid-small {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
  
  .carousel-item {
    width: 160px;
  }
  .carousel-item .movie-card img {
    width: 160px;
    height: 230px;
  }
  
  .movie-grid {
    grid-template-columns: 200px 1fr;
    gap: 24px;
  }
  
  .details-block h1 {
    font-size: 1.8rem;
  }
  
  .random-film {
    grid-template-columns: 200px 1fr;
  }
}

/* Tablets */
@media (min-width: 768px) {
  :root {
    --header-height: 60px;
  }
  
  .site-header {
    padding: 10px 24px;
  }
  
  .site-title {
    font-size: 1.1rem;
  }
  .site-logo {
    height: 28px;
  }
  
  .content-area {
    padding: 20px;
    gap: 28px;
  }
  
  .hero-block,
  .section-block,
  .genre-block,
  .search-results,
  .info-panel {
    padding: 20px;
    border-radius: 18px;
  }
  
  .movie-grid-small {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
  }
  
  .carousel-item {
    width: 180px;
  }
  .carousel-item .movie-card img {
    width: 180px;
    height: 260px;
  }
  
  .movie-grid {
    grid-template-columns: 240px 1fr;
  }
  
  .details-block h1 {
    font-size: 2rem;
  }
}

/* Desktop - show sidebar */
@media (min-width: 1024px) {
  body {
    padding-top: 64px;
  }
  
  .page-shell {
    grid-template-columns: var(--sidebar-collapsed-width) 1fr;
    column-gap: var(--layout-gutter);
    padding-inline: var(--layout-gutter);
    transition: grid-template-columns 0.3s ease;
  }
  body.sidebar-open .page-shell {
    grid-template-columns: var(--sidebar-expanded-width) 1fr;
  }
  
  .page-shell > :not(.sidebar) {
    grid-column: 2;
    width: min(100%, var(--content-max-width));
    margin-inline: auto;
  }
  
  .sidebar {
    display: flex;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-collapsed-width);
    height: calc(100vh - var(--header-height));
    z-index: 1002;
    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: var(--sidebar-expanded-width);
  }
  
  .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: var(--text-muted);
    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: var(--primary-light);
    color: var(--text-primary);
    transform: translateY(-2px);
  }
  .sidebar-tab.active {
    box-shadow: 0 0 0 1px var(--primary-glow);
    color: #fff;
  }
  .sidebar.open .sidebar-tab {
    width: calc(var(--sidebar-expanded-width) - 24px);
    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);
  }
  
  .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: var(--text-secondary);
    cursor: default;
  }
  .sidebar-user:hover {
    background: transparent;
    transform: none;
  }
  
  .content-area {
    padding: 24px;
    gap: 32px;
  }
  
  .movie-grid-small {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
  }
  
  .carousel-item {
    width: 200px;
  }
  .carousel-item .movie-card img {
    width: 200px;
    height: 290px;
  }
  
  .movie-grid {
    grid-template-columns: 280px 1fr;
    gap: 28px;
  }
  
  .details-block h1 {
    font-size: 2.2rem;
  }
  
  /* Hide bottom nav on desktop */
  .bottom-nav {
    display: none !important;
  }
}

/* Large desktop */
@media (min-width: 1600px) {
  :root {
    --content-max-width: 1360px;
  }
}

@media (min-width: 1920px) {
  :root {
    --content-max-width: 1520px;
  }
  
  body {
    padding-top: 72px;
    font-size: 17px;
  }
  
  .site-header {
    height: 64px;
    padding: 12px 32px;
  }
  
  .sidebar {
    top: 64px;
    height: calc(100vh - 64px);
  }
  
  .site-title {
    font-size: 1.2rem;
  }
  
  .details-block h1 {
    font-size: clamp(2.2rem, 2.4vw, 3rem);
  }
}

/* Small phones */
@media (max-width: 380px) {
  .carousel-item {
    width: 120px;
  }
  .carousel-item .movie-card img {
    width: 120px;
    height: 170px;
  }
  .carousel-item .movie-card-title {
    font-size: 0.75rem;
  }
  
  .movie-grid-small {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .site-title {
    font-size: 0.9rem;
    letter-spacing: 0.1em;
  }
  .site-logo {
    height: 20px;
  }
}

/* Hint box */
.hint-box {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(45, 62, 82, 0.75);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Genre actions */
.genre-actions {
  margin-top: 16px;
  text-align: center;
}

/* Responsive tuning */
.hero-block, .info-panel, .section-block, .genre-block, .search-results {
  padding: clamp(16px, 2vw, 24px);
}

.movie-card img {
  height: clamp(180px, 40vw, 260px);
  max-height: none;
}

.player-block iframe {
  min-height: 0;
  height: auto;
  aspect-ratio: 16 / 9;
}