/* ==========================================================================
   AniFine — Apple macOS 27 Golden Gate & iOS 27 Human Interface Guidelines
   Design System: Liquid Glass (Spatial Acrylic), Inter Typography,
   Vibrant Accent, Zero Harsh Borders, 120fps Optimized Rendering.
   ========================================================================== */

/* ---------- 1. Design Tokens & Apple HIG Foundation ---------- */
:root {
  /* Typography */
  --font-system: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
  --font-mono: "SF Mono", Menlo, Monaco, Consolas, monospace;

  /* Apple Base Palette */
  --apple-bg: #000000;
  --apple-canvas: #09090b;
  --apple-surface: #141418;
  --apple-surface-elevated: #1c1c24;

  /* Apple Liquid Glass (Vibrancy Materials) */
  --glass-ultra-thin: rgba(255, 255, 255, 0.035);
  --glass-thin: rgba(255, 255, 255, 0.065);
  --glass-regular: rgba(255, 255, 255, 0.10);
  --glass-thick: rgba(24, 24, 30, 0.76);
  --glass-card: rgba(255, 255, 255, 0.055);
  --glass-card-hover: rgba(255, 255, 255, 0.095);

  /* Blur & Filters */
  --blur-subtle: blur(16px) saturate(180%);
  --blur-standard: blur(28px) saturate(190%);
  --blur-deep: blur(44px) saturate(210%);

  /* Apple Soft Separators & Specular Reflections (No Harsh 1px Borders) */
  --hairline: rgba(255, 255, 255, 0.07);
  --hairline-strong: rgba(255, 255, 255, 0.12);
  --specular: inset 0 1px 0 0 rgba(255, 255, 255, 0.13);
  --specular-pill: inset 0 1px 0 0 rgba(255, 255, 255, 0.22);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 14px 36px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.65);
  --shadow-card: 0 12px 30px rgba(0, 0, 0, 0.4);

  /* Apple Dynamic Label Colors */
  --label-primary: rgba(255, 255, 255, 0.98);
  --label-secondary: rgba(255, 255, 255, 0.68);
  --label-tertiary: rgba(255, 255, 255, 0.44);
  --label-quaternary: rgba(255, 255, 255, 0.22);

  /* Apple Accents */
  --accent: #0a84ff; /* Apple System Blue */
  --accent-hover: #2997ff;
  --accent-tint: rgba(10, 132, 255, 0.15);
  --accent-gold: #ff9f0a; /* Golden Gate Warm Amber */
  --accent-gold-tint: rgba(255, 159, 10, 0.15);
  --accent-red: #ff453a;
  --accent-green: #30d158;

  /* Apple Radii (Squircles) */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --radius-pill: 9999px;

  /* Motion */
  --spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);

  /* Layout dimensions */
  --header-h: 68px;
  --gutter: 72px;
  --mobile-gutter: 16px;
}

/* ---------- 2. Reset & Baseline Performance ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  background-color: var(--apple-bg);
  color: var(--label-primary);
  font-family: var(--font-system);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--apple-bg);
  color: var(--label-primary);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 15px;
  line-height: 1.47;
  letter-spacing: -0.01em;
}

body.has-bottom-nav {
  padding-bottom: 84px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s var(--ease), color 0.2s var(--ease);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  font-size: inherit;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

input, textarea, select {
  font-family: inherit;
  border: none;
  background: none;
  color: inherit;
  font-size: inherit;
  outline: none;
}

/* Subtle Apple Vignette Background (No Glowing Neon Blobs!) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(20, 24, 36, 0.45) 0%, transparent 75%),
              linear-gradient(180deg, #050507 0%, #000000 100%);
  pointer-events: none;
  z-index: -2;
}

/* Hide legacy glow/particles cleanly without DOM breaks */
.bottom-glow,
.ember-field,
.hero-particles,
#particles-canvas {
  display: none !important;
}

/* Global visibility & state helpers */
.hidden,
[hidden] {
  display: none !important;
}

/* On Desktop: strictly hide mobile drawer and mobile bottom nav */
@media (min-width: 769px) {
  .mobile-menu,
  .mobile-menu-toggle,
  .bottom-nav {
    display: none !important;
  }
}

/* ---------- 3. Apple Typography Hierarchy ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--label-primary);
}

.title-large {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.title-section {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.018em;
}

.text-secondary {
  color: var(--label-secondary);
}

.text-tertiary {
  color: var(--label-tertiary);
}

/* ---------- 4. Apple Liquid Glass Components (Buttons & Pills) ---------- */
.apple-btn,
.pill-btn,
.hero-play,
.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.22s var(--spring), background 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s var(--ease);
  box-shadow: var(--shadow-sm);
}

.apple-btn:active,
.pill-btn:active,
.hero-play:active,
.auth-submit:active {
  transform: scale(0.97);
}

/* Primary Action Pill (Apple Solid White with Black Icon/Text) */
.apple-btn--primary,
.hero-play,
.auth-submit {
  background: #ffffff;
  color: #000000 !important;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.25), var(--shadow-sm);
}

.apple-btn--primary:hover,
.hero-play:hover,
.auth-submit:hover {
  background: rgba(255, 255, 255, 0.92);
  transform: scale(1.02);
  box-shadow: 0 6px 22px rgba(255, 255, 255, 0.35);
}

/* Liquid Glass Action Pill */
.apple-btn--glass,
.pill-btn,
.auth-secondary {
  background: var(--glass-regular);
  color: var(--label-primary);
  backdrop-filter: var(--blur-subtle);
  -webkit-backdrop-filter: var(--blur-subtle);
  box-shadow: var(--specular), var(--shadow-sm);
}

.apple-btn--glass:hover,
.pill-btn:hover,
.auth-secondary:hover {
  background: var(--glass-card-hover);
  box-shadow: var(--specular-pill), var(--shadow-md);
  transform: scale(1.02);
}

/* Circular Liquid Glass Icon Button */
.icon-btn,
.apple-btn--icon-glass {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-thin);
  backdrop-filter: var(--blur-subtle);
  -webkit-backdrop-filter: var(--blur-subtle);
  color: var(--label-primary);
  box-shadow: var(--specular);
  transition: transform 0.22s var(--spring), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.icon-btn:hover,
.apple-btn--icon-glass:hover {
  background: var(--glass-regular);
  transform: scale(1.06);
  box-shadow: var(--specular-pill), var(--shadow-sm);
}

.icon-btn:active,
.apple-btn--icon-glass:active {
  transform: scale(0.95);
}

.icon-btn img,
.icon-btn svg {
  width: 19px;
  height: 19px;
  object-fit: contain;
  transition: transform 0.2s var(--ease);
}

/* ---------- 5. macOS 27 Floating Glass Toolbar (Header) ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 var(--gutter);
  background: rgba(10, 10, 14, 0.65);
  backdrop-filter: var(--blur-deep);
  -webkit-backdrop-filter: var(--blur-deep);
  box-shadow: inset 0 -0.5px 0 0 var(--hairline), 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: background 0.3s var(--ease), height 0.3s var(--ease);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo-link {
  display: flex;
  align-items: center;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--spring);
}

.logo-link:hover {
  opacity: 0.88;
  transform: scale(1.02);
}

.logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

/* macOS Segmented Category Dropdown Pill */
.category-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--glass-thin);
  color: var(--label-secondary);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--specular);
  transition: all 0.2s var(--spring);
}

.category-dropdown:hover {
  background: var(--glass-regular);
  color: var(--label-primary);
  transform: scale(1.02);
}

.category-dropdown svg {
  transition: transform 0.2s var(--ease);
  opacity: 0.7;
}

.category-dropdown.open svg {
  transform: rotate(180deg);
}

/* macOS 27 Glass Categories Dropdown Menu */
.genre-menu {
  display: none !important;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 380px;
  max-height: 480px;
  overflow-y: auto;
  background: rgba(22, 22, 30, 0.94);
  backdrop-filter: var(--blur-standard);
  -webkit-backdrop-filter: var(--blur-standard);
  border-radius: 18px;
  border: 1px solid var(--hairline-strong);
  box-shadow: var(--shadow-lg), var(--specular);
  padding: 12px;
  z-index: 2000;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  text-align: left;
}

.genre-menu.open {
  display: grid !important;
  animation: appleSheetIn 0.22s var(--spring) forwards;
}

.genre-menu-hint {
  grid-column: 1 / -1;
  padding: 14px 12px;
  font-size: 13px;
  color: var(--label-tertiary);
  text-align: center;
  margin: 0;
}

.genre-menu-hint-small {
  font-size: 11px;
  opacity: 0.7;
}

.genre-menu-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--label-secondary);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.genre-menu-item:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateX(2px);
}

/* macOS Spotlight Search Capsule */
.search-box {
  flex: 1;
  max-width: 440px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: var(--specular);
  backdrop-filter: var(--blur-subtle);
  -webkit-backdrop-filter: var(--blur-subtle);
  transition: all 0.24s var(--spring);
}

.search-box:focus-within {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--specular-pill), 0 0 0 3px rgba(10, 132, 255, 0.35);
  max-width: 490px;
}

.search-icon {
  width: 17px;
  height: 17px;
  opacity: 0.6;
  flex-shrink: 0;
  transition: opacity 0.2s var(--ease);
}

.search-box:focus-within .search-icon {
  opacity: 1;
  filter: brightness(1.2);
}

.search-box input {
  width: 100%;
  font-family: var(--font-system) !important;
  color: var(--label-primary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.search-box input::placeholder {
  font-family: var(--font-system) !important;
  color: var(--label-tertiary);
  font-weight: 400;
  opacity: 1;
}

/* Header Right Actions */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Dropdown Menu (macOS Context Menu style) */
.dropdown-wrapper {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  padding: 8px;
  border-radius: var(--radius-md);
  background: var(--glass-thick);
  backdrop-filter: var(--blur-deep);
  -webkit-backdrop-filter: var(--blur-deep);
  box-shadow: var(--specular), var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition: all 0.22s var(--spring);
  z-index: 200;
}

.dropdown-wrapper:hover .dropdown-menu,
.dropdown-wrapper.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--label-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.16s var(--ease), color 0.16s var(--ease), transform 0.16s var(--spring);
}

.dropdown-item:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateX(2px);
}

/* Avatar Circle (Apple ID style) */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--glass-thin);
  box-shadow: var(--specular);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--label-primary);
  overflow: hidden;
  position: relative;
  transition: transform 0.22s var(--spring), box-shadow 0.2s var(--ease);
}

.avatar:hover {
  transform: scale(1.08);
  box-shadow: var(--specular-pill), var(--shadow-sm);
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar--loading {
  opacity: 0;
  pointer-events: none;
}

.avatar--logged-in {
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.8), rgba(94, 92, 230, 0.8));
  color: #ffffff;
}

/* ---------- 6. Apple TV+ Billboard Hero Section ---------- */
.hero {
  position: relative;
  margin: 16px var(--gutter) 44px;
  min-height: 520px;
  max-height: 680px;
  height: 64vh;
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--shadow-lg), var(--specular);
  background: #000000;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 25%;
  transition: transform 0.8s var(--ease), filter 0.8s var(--ease), opacity 0.5s var(--ease);
  will-change: transform;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s var(--ease);
  pointer-events: none;
}

.hero-video.playing {
  opacity: 1;
}

/* Apple Cinematic Vignette Gradient */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0.85) 85%, #000000 100%),
    linear-gradient(90deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.5) 45%, transparent 75%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  padding: 48px;
  max-width: 660px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: heroFadeIn 0.6s var(--spring);
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: var(--blur-subtle);
  -webkit-backdrop-filter: var(--blur-subtle);
  box-shadow: var(--specular);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  width: fit-content;
}

.hero-title {
  font-size: clamp(34px, 4.8vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--label-secondary);
}

.hero-meta-chip {
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.hero-tagline {
  font-size: clamp(14px, 1.4vw, 17px);
  color: var(--label-secondary);
  line-height: 1.45;
  max-width: 540px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

/* Apple Capsule Slide Stepper Dots */
.hero-dots {
  position: absolute;
  right: 36px;
  bottom: 36px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s var(--spring);
  cursor: pointer;
}

.hero-dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

.hero-dot.active {
  width: 26px;
  background: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

/* ---------- 7. Apple TV+ Sections & Media Rows ---------- */
.section {
  position: relative;
  padding: 0 var(--gutter);
  margin-bottom: 48px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.018em;
  color: var(--label-primary);
}

.section-subtitle {
  font-size: 13px;
  color: var(--label-tertiary);
  margin-left: 12px;
  font-weight: 400;
}

.section-see-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.section-see-all:hover {
  opacity: 0.8;
  transform: translateX(2px);
}

/* Row Wrap & Carousel Track */
.row-wrap {
  position: relative;
  width: 100%;
}

.row {
  display: flex;
  align-items: stretch;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 4px 20px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  contain: layout style;
}

.row::-webkit-scrollbar {
  display: none;
}

/* Apple Floating Arrow Pills */
.row-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: rgba(18, 18, 24, 0.85);
  backdrop-filter: var(--blur-subtle);
  -webkit-backdrop-filter: var(--blur-subtle);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 20;
  box-shadow: var(--shadow-md), var(--specular);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--spring), background 0.2s var(--ease);
}

.row-wrap:hover .row-arrow {
  opacity: 1;
  pointer-events: auto;
}

.row-arrow.left {
  left: -20px;
}

.row-arrow.right {
  right: -20px;
}

.row-arrow:hover {
  background: rgba(36, 36, 48, 0.95);
  transform: translateY(-50%) scale(1.1);
}

.row-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

/* ---------- 8. Apple TV+ Cards (Liquid Glass Posters) ---------- */
.card {
  position: relative;
  flex: 0 0 auto;
  /* Ровно 7 карточек в видимой области ряда без необходимости горизонтального скролла */
  width: calc((100% - 6 * 18px) / 7.02);
  min-width: 196px;
  max-width: 236px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  transition: transform 0.28s var(--spring), box-shadow 0.28s var(--ease);
  will-change: transform;
}

.card:hover {
  transform: translateY(-6px) scale(1.03);
  z-index: 10;
}

/* Category & Lists Grid Layout */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 0 40px;
}

.category-grid .card {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.card-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  box-shadow: var(--shadow-card), var(--specular);
  background-color: var(--apple-surface);
  transition: box-shadow 0.28s var(--ease);
}

.card:hover .card-poster {
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.65), var(--specular-pill);
}

.card-poster.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1c1c24, #2a2a36);
  color: var(--label-tertiary);
}

/* Gentle Scrim Gradient over poster on hover */
.card-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.88) 100%);
  opacity: 0.9;
  transition: opacity 0.24s var(--ease);
}

.card:hover .card-scrim {
  opacity: 1;
}

.card-meta {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  pointer-events: none;
  z-index: 2;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  color: #ffffff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.card-meta-sub {
  font-size: 12px;
  color: var(--label-secondary);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-year {
  color: var(--label-primary);
  font-weight: 500;
}

.card-description {
  font-size: 11px;
  color: var(--label-tertiary);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.25s var(--ease), opacity 0.25s var(--ease);
}

.card:hover .card-description {
  max-height: 40px;
  opacity: 1;
}

/* Apple Star Rating Badge */
.card-rating {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(12, 12, 16, 0.78);
  backdrop-filter: var(--blur-subtle);
  -webkit-backdrop-filter: var(--blur-subtle);
  box-shadow: var(--specular);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-gold);
}

.card-rating img {
  width: 12px;
  height: 12px;
}

.card-rating-count {
  display: none;
}

/* Continue Watching Progress Bar */
.card-continue-info {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
}

.card-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow: hidden;
  z-index: 3;
}

.card-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-pill);
}

/* List Remove Action Button (on Hover) */
.list-remove-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 6;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 69, 58, 0.88);
  backdrop-filter: var(--blur-subtle);
  -webkit-backdrop-filter: var(--blur-subtle);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  box-shadow: var(--specular), var(--shadow-sm);
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.2s var(--spring);
}

.card:hover .list-remove-btn {
  opacity: 1;
  transform: scale(1);
}

.list-remove-btn:hover {
  background: #ff453a;
  transform: scale(1.05);
}

/* ---------- 8.1. Category Catalog & Grid View (category.html) ---------- */
.category-page {
  padding: 32px var(--gutter) 80px;
  max-width: 1720px;
  margin: 0 auto;
}

.category-catalog {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 24px;
}

.category-genre-row {
  padding: 8px 4px 20px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 28px 18px;
  width: 100%;
  margin-top: 24px;
}

.category-grid .card {
  width: 100%;
  max-width: none;
}

.category-intro {
  color: var(--label-secondary);
  font-size: 14px;
  margin-top: 4px;
  margin-bottom: 8px;
}

.category-back-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.category-back-link:hover {
  text-decoration: underline;
}

/* ---------- 9. Title Detail View (title.html) ---------- */
.title-page {
  padding: 32px var(--gutter) 64px;
  max-width: 1400px;
  margin: 0 auto;
}

.title-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 48px;
}

.title-poster-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.title-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-lg), var(--specular);
  background-color: var(--apple-surface);
}

.title-watch-btn {
  padding: 13px;
  border-radius: var(--radius-pill);
  background: #ffffff;
  color: #000000;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.25), var(--shadow-sm);
  transition: all 0.22s var(--spring);
}

.title-watch-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.02);
}

.title-watchtogether-btn {
  padding: 11px;
  border-radius: var(--radius-pill);
  background: var(--glass-regular);
  color: var(--label-primary);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--specular);
  transition: all 0.22s var(--spring);
}

.title-watchtogether-btn:hover {
  background: var(--glass-card-hover);
  transform: scale(1.02);
}

.title-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.title-main-name {
  font-size: clamp(32px, 3.8vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.title-en-name {
  font-size: 18px;
  color: var(--label-secondary);
  font-weight: 500;
}

.title-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--label-secondary);
}

.meta-item {
  color: var(--label-primary);
  font-weight: 500;
}

.meta-sep {
  opacity: 0.4;
}

.title-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--glass-thin);
  box-shadow: var(--specular);
  font-size: 13px;
  font-weight: 500;
  color: var(--label-secondary);
  transition: all 0.2s var(--ease);
}

.tag:hover {
  background: var(--glass-regular);
  color: var(--label-primary);
}

/* Status Segmented Buttons */
.status-buttons {
  display: flex;
  gap: 10px;
  margin: 8px 0;
  flex-wrap: wrap;
}

.status-btn {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--glass-thin);
  box-shadow: var(--specular);
  color: var(--label-secondary);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.22s var(--spring);
}

.status-btn:hover {
  background: var(--glass-regular);
  color: var(--label-primary);
}

.status-btn.active {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(10, 132, 255, 0.4), var(--specular-pill);
}

.title-description {
  font-size: 15px;
  line-height: 1.6;
  color: var(--label-secondary);
  max-width: 840px;
}

/* ---------- 10. Apple Video Player Container & Controls ---------- */
.player-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #000000;
  box-shadow: var(--shadow-lg), var(--specular);
  margin-bottom: 40px;
}

.anifine-player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  overflow: hidden;
}

.anifine-player-wrapper video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.player-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(14, 14, 18, 0.95);
  z-index: 10;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}

.player-placeholder.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-placeholder-icon {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: var(--blur-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #ffffff;
  box-shadow: var(--specular), var(--shadow-md);
}

.player-placeholder-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--label-secondary);
}

/* Прозрачная интерактивная поверхность над видео для паузы по клику */
.player-click-surface {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 68px; /* оставляет нижнюю полосу под прогресс-бар и кнопки */
  z-index: 15;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Floating Liquid Glass Controls Capsule */
.anifine-player-controls {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  background: linear-gradient(180deg, rgba(0,0,0,0.65) 0%, transparent 25%, transparent 70%, rgba(0,0,0,0.85) 100%);
  opacity: 0;
  pointer-events: none !important;
  transition: opacity 0.28s var(--ease);
  z-index: 20;
}

.anifine-player-wrapper:hover .anifine-player-controls,
.anifine-player-controls.visible,
.anifine-player-wrapper.show-controls .anifine-player-controls {
  opacity: 1 !important;
}

/* Интерактивные панели и кнопки принимают клики, а свободная область пропускает клик к .player-click-surface */
.player-top-bar,
.player-center-play,
.player-bottom-bar,
.player-settings-menu {
  pointer-events: auto !important;
}

.player-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.player-title {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.player-center-play {
  align-self: center;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: var(--blur-subtle);
  -webkit-backdrop-filter: var(--blur-subtle);
  box-shadow: var(--specular-pill), var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.22s var(--spring), background 0.2s var(--ease);
}

.player-center-play:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.24);
}

.player-bottom-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Apple Scrub Bar */
.player-progress-container {
  position: relative;
  width: 100%;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.player-progress-track {
  position: relative;
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-pill);
  overflow: visible;
  transition: height 0.15s var(--ease);
}

.player-progress-container:hover .player-progress-track {
  height: 7px;
}

.player-progress-buffered {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-pill);
}

.player-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-pill);
  position: relative;
}

.player-progress-handle {
  position: absolute;
  right: -7px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 14px;
  height: 14px;
  border-radius: var(--radius-pill);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s var(--spring);
}

.player-progress-container:hover .player-progress-handle,
.anifine-player-wrapper.seeking .player-progress-handle {
  transform: translateY(-50%) scale(1);
}

.player-progress-tooltip {
  position: absolute;
  bottom: 26px;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  background: rgba(18, 18, 22, 0.9);
  backdrop-filter: var(--blur-subtle);
  box-shadow: var(--specular);
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s var(--ease);
}

.player-progress-container:hover .player-progress-tooltip {
  opacity: 1;
}

.player-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.player-controls-left,
.player-controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: transparent;
  transition: all 0.18s var(--ease);
}

.player-icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: scale(1.06);
}

.player-volume-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-volume-slider {
  width: 64px;
  height: 4px;
  accent-color: var(--accent);
  cursor: pointer;
}

.player-time {
  font-size: 13px;
  font-weight: 500;
  color: var(--label-secondary);
  font-variant-numeric: tabular-nums;
}

.player-icon-btn svg.hidden {
  display: none !important;
}

/* Player Settings Popup Menu */
.player-settings-menu {
  position: absolute;
  border-radius: 16px;
  background: rgba(20, 20, 26, 0.94);
  backdrop-filter: var(--blur-deep);
  -webkit-backdrop-filter: var(--blur-deep);
  box-shadow: var(--specular-pill), var(--shadow-md);
  padding: 8px;
  min-width: 170px;
  z-index: 100;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: modalFadeIn 0.2s var(--ease);
}

.player-settings-menu.hidden {
  display: none !important;
}

.settings-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}

.settings-back-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: none;
  border: none;
  color: var(--label-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--label-primary);
  cursor: pointer;
  transition: background 0.15s;
}

.settings-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.settings-item.active {
  color: var(--accent);
  font-weight: 600;
}

.check-icon {
  color: var(--accent);
}

/* Episodes Grid (Segmented Pills) */
.episodes-section {
  margin-bottom: 48px;
}

.episodes-section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--label-primary);
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 10px;
}

.episode-btn {
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--glass-thin);
  box-shadow: var(--specular);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--label-primary);
  transition: all 0.2s var(--spring);
}

.episode-btn:hover {
  background: var(--glass-regular);
  transform: translateY(-2px);
}

.episode-btn.active {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(10, 132, 255, 0.4), var(--specular-pill);
}

.episode-btn.done {
  color: var(--label-tertiary);
  background: rgba(255, 255, 255, 0.025);
}

/* ---------- Related Seasons (Аниме продолжения / Другие сезоны) ---------- */
.related-seasons-section {
  margin: 40px 0;
}

.related-seasons-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--label-primary);
  margin-bottom: 18px;
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.related-seasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.related-season-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: var(--glass-card);
  backdrop-filter: var(--blur-subtle);
  -webkit-backdrop-filter: var(--blur-subtle);
  box-shadow: var(--specular), var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: all 0.22s var(--spring);
}

.related-season-card:hover {
  background: var(--glass-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--specular-pill), var(--shadow-card);
}

.related-season-card.current {
  background: rgba(10, 132, 255, 0.12);
  box-shadow: inset 0 0 0 1.5px var(--accent), var(--shadow-sm);
}

.related-poster {
  width: 54px;
  height: 74px;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  background-color: var(--apple-surface);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.related-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.related-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--label-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.related-year,
.related-eps {
  font-size: 12px;
  color: var(--label-secondary);
}

.related-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(10, 132, 255, 0.4);
}

/* ---------- 11. Spotlight Search Overlay (macOS 27 style) ---------- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 60px 20px 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: var(--blur-standard);
  -webkit-backdrop-filter: var(--blur-standard);
  box-sizing: border-box;
}

.search-overlay.open {
  display: flex !important;
  animation: modalFadeIn 0.2s var(--ease);
}

.search-overlay-bar {
  width: 100%;
  max-width: 900px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  border-radius: 20px 20px 0 0;
  background: rgba(26, 26, 36, 0.94);
  backdrop-filter: var(--blur-deep);
  -webkit-backdrop-filter: var(--blur-deep);
  border: 1px solid var(--hairline-strong);
  border-bottom: 1px solid var(--hairline);
  box-shadow: var(--specular), var(--shadow-lg);
  box-sizing: border-box;
}

.search-overlay-icon {
  font-size: 20px;
  opacity: 0.7;
}

.search-overlay-bar input {
  flex: 1 1 auto;
  min-width: 0 !important;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
  font-family: var(--font-system) !important;
}

.search-overlay-bar input::placeholder {
  font-family: var(--font-system) !important;
  color: var(--label-tertiary);
  font-weight: 400;
}

.search-overlay-close {
  flex-shrink: 0 !important;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--glass-regular);
  color: var(--label-secondary);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: var(--specular);
  transition: all 0.15s ease;
}

.search-overlay-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  transform: scale(1.08);
}

.search-overlay-main {
  width: 100%;
  max-width: 900px;
  height: min(540px, calc(100vh - 160px));
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 16px 20px 20px;
  border-radius: 0 0 20px 20px;
  background: rgba(22, 22, 30, 0.94);
  backdrop-filter: var(--blur-deep);
  -webkit-backdrop-filter: var(--blur-deep);
  border: 1px solid var(--hairline-strong);
  border-top: none;
  box-shadow: var(--shadow-lg);
  box-sizing: border-box;
  overflow: hidden;
}

.search-overlay-results {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  padding-right: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-overlay-hint {
  padding: 40px 20px;
  text-align: center;
  color: var(--label-tertiary);
  font-size: 14px;
}

.search-result-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--glass-ultra-thin);
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
  transition: all 0.18s var(--spring);
}

.search-result-row:hover {
  background: var(--glass-card-hover);
  border-color: var(--hairline);
  transform: translateX(4px);
}

.search-result-thumb {
  flex-shrink: 0;
  width: 48px;
  height: 68px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-color: var(--apple-surface-elevated);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.search-result-thumb.no-image::after {
  content: "▶";
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.3);
}

.search-result-info {
  min-width: 0;
  flex: 1;
}

.search-result-title {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--label-secondary);
}

/* Sidebar filter pane */
.search-overlay-filters {
  flex-shrink: 0;
  width: 230px;
  height: 100%;
  overflow-y: auto;
  border-left: 1px solid var(--hairline);
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}

.filters-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--label-primary);
}

.filters-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filters-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--label-tertiary);
}

.filters-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--label-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-checkbox:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.filter-checkbox input[type="checkbox"] {
  accent-color: var(--accent);
  cursor: pointer;
}

.filters-reset {
  margin-top: auto;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: var(--glass-thin);
  border: none;
  color: var(--label-tertiary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filters-reset:hover {
  background: var(--glass-regular);
  color: var(--label-primary);
}

/* ---------- 12. Apple Sheet Modal (Shazam & WatchTogether) ---------- */
.shazam-modal-overlay,
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: var(--blur-deep);
  -webkit-backdrop-filter: var(--blur-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  z-index: 600;
  animation: modalFadeIn 0.22s var(--ease);
}

.modal-overlay.hidden,
.modal-overlay[hidden],
.modal-overlay[style*="display: none"],
.shazam-modal-overlay[style*="display: none"] {
  display: none !important;
}

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

.shazam-modal,
.modal-content,
.modal.glass {
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-xl);
  background: rgba(22, 22, 28, 0.94);
  backdrop-filter: var(--blur-deep);
  -webkit-backdrop-filter: var(--blur-deep);
  box-shadow: var(--specular-pill), var(--shadow-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: modalPopIn 0.26s var(--spring);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@keyframes modalPopIn {
  from {
    transform: scale(0.93) translateY(14px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.shazam-modal-header,
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.shazam-modal-header h3,
.modal-header h2,
.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.015em;
}

.shazam-modal-close,
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-thin);
  color: var(--label-secondary);
  font-size: 18px;
  box-shadow: var(--specular);
  border: none;
  cursor: pointer;
  transition: all 0.2s var(--spring);
}

.shazam-modal-close:hover,
.modal-close:hover {
  background: var(--glass-regular);
  color: var(--label-primary);
  transform: scale(1.08);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* WatchTogether Modal (title.html) */
.wt-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  padding: 18px 20px;
  border-radius: 18px;
  box-shadow: var(--specular);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.wt-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.wt-section p {
  font-size: 13.5px;
  color: var(--label-secondary);
  line-height: 1.45;
}

.wt-divider {
  height: 1px;
  background: var(--hairline);
  margin: 4px 0;
}

.wt-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.wt-input-group input {
  flex: 1;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 14px;
  font-family: var(--font-mono);
  outline: none;
  transition: all 0.2s;
}

.wt-input-group input:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.35);
  transition: all 0.2s var(--spring);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: scale(1.02);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--glass-regular);
  color: var(--label-primary);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s var(--spring);
  white-space: nowrap;
}

.btn-secondary:hover {
  background: var(--glass-card-hover);
  transform: scale(1.02);
}

.wt-success-box {
  background: rgba(48, 209, 88, 0.08);
  border: 1px solid rgba(48, 209, 88, 0.24);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.wt-success-box h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--accent-green);
}

.wt-success-box p {
  font-size: 13.5px;
  color: var(--label-secondary);
}

.wt-share-link {
  display: flex;
  gap: 10px;
  align-items: center;
}

.wt-share-link input {
  flex: 1;
  height: 40px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 12px;
  color: var(--label-secondary);
  font-size: 13px;
  font-family: var(--font-mono);
  outline: none;
}

.btn-copy {
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-copy:hover {
  transform: scale(1.04);
}

.wt-hint {
  font-size: 13px;
  color: var(--label-tertiary);
}

#wt-room-id-display {
  font-family: var(--font-mono);
  color: #ffffff;
  letter-spacing: 0.05em;
  font-size: 14px;
}

#wt-not-authed {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 24px 16px;
  background: var(--glass-thin);
  border-radius: 18px;
  box-shadow: var(--specular);
}

#wt-not-authed p {
  font-size: 14px;
  color: var(--label-secondary);
  line-height: 1.5;
}

#wt-not-authed .btn-primary {
  width: auto;
  padding: 10px 24px;
}

/* Shazam Modal */
.shazam-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 36px 20px;
  border-radius: var(--radius-lg);
  background: var(--glass-thin);
  box-shadow: var(--specular);
  transition: all 0.2s var(--ease);
}

.shazam-drop-zone.dragover {
  background: rgba(10, 132, 255, 0.12);
  box-shadow: 0 0 0 2px var(--accent), var(--specular);
}

.shazam-select-btn {
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.35);
  transition: transform 0.2s var(--spring);
}

.shazam-select-btn:hover {
  transform: scale(1.03);
}

/* ---------- 13. Apple ID / System Settings Profile (profile.html) ---------- */
.profile-page-new {
  max-width: 1080px;
  margin: 32px auto 64px;
  padding: 0 var(--gutter);
}

.profile-banner {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-xl);
  background-size: cover;
  background-position: center;
  background-color: var(--apple-surface-elevated);
  box-shadow: var(--shadow-md), var(--specular);
  position: relative;
  overflow: hidden;
}

.banner-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.75) 100%);
}

.profile-info-section {
  position: relative;
  margin-top: -60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 24px;
  z-index: 10;
}

.profile-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.profile-avatar-block {
  position: relative;
}

.avatar-circle {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-pill);
  background: var(--apple-surface);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), var(--specular-pill);
  overflow: hidden;
  border: 3px solid #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder-icon {
  color: var(--label-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.online-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-green);
  border: 2.5px solid #000000;
}

.avatar-change-btn {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--spring);
}

.avatar-change-btn:hover {
  transform: scale(1.1);
}

.profile-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.friend-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--spring);
  border: none;
  outline: none;
  font-family: inherit;
}

.friend-action-btn.add {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.friend-action-btn.add:hover {
  transform: scale(1.03);
  filter: brightness(1.1);
}

.friend-action-btn.pending {
  background: var(--glass-regular);
  color: var(--label-secondary);
  backdrop-filter: var(--blur-subtle);
  box-shadow: var(--specular);
  cursor: default;
}

.friend-action-btn.accepted {
  background: rgba(48, 209, 88, 0.16);
  color: var(--accent-green);
  box-shadow: 0 0 12px rgba(48, 209, 88, 0.15);
}

.friend-action-btn.accepted:hover {
  background: rgba(255, 69, 58, 0.2);
  color: var(--accent-red);
}

.btn-view-public {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  background: var(--glass-regular);
  backdrop-filter: var(--blur-subtle);
  box-shadow: var(--specular);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s var(--spring);
}

.btn-view-public:hover {
  background: var(--glass-card-hover);
  transform: scale(1.02);
  color: #ffffff;
}

.btn-edit-profile,
.btn-settings {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  background: var(--glass-regular);
  backdrop-filter: var(--blur-subtle);
  box-shadow: var(--specular);
  font-size: 14px;
  font-weight: 600;
  color: var(--label-primary);
  border: none;
  cursor: pointer;
  transition: all 0.2s var(--spring);
}

.btn-edit-profile:hover,
.btn-settings:hover {
  background: var(--glass-card-hover);
  transform: scale(1.02);
}

.btn-logout {
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  background: rgba(255, 69, 58, 0.15);
  color: var(--accent-red);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.btn-logout:hover {
  background: rgba(255, 69, 58, 0.28);
}

.profile-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-name {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.profile-handle {
  font-size: 14px;
  color: var(--label-tertiary);
}

.profile-joined-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--label-tertiary);
  margin-top: 4px;
}

.profile-bio-text {
  font-size: 15px;
  color: var(--label-secondary);
  line-height: 1.5;
  margin-top: 8px;
  max-width: 600px;
}

/* Stats Cards (Apple Health / Settings style) */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.stats-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--glass-card);
  backdrop-filter: var(--blur-subtle);
  -webkit-backdrop-filter: var(--blur-subtle);
  box-shadow: var(--specular), var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.24s var(--spring);
}

.stats-card:hover {
  transform: translateY(-3px);
  background: var(--glass-card-hover);
}

.stats-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.stats-card-icon.watched {
  background: linear-gradient(135deg, #0a84ff, #5e5ce6);
}

.stats-card-icon.watching {
  background: linear-gradient(135deg, #ff9f0a, #ff375f);
}

.stats-card-icon.planned {
  background: linear-gradient(135deg, #30d158, #00c7be);
}

.stats-card-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.stats-card-label {
  font-size: 13px;
  color: var(--label-tertiary);
}

/* Connected Accounts Card */
.connections-card {
  margin-top: 28px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--glass-card);
  backdrop-filter: var(--blur-subtle);
  box-shadow: var(--specular), var(--shadow-sm);
}

.connections-heading h2 {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.connections-heading p {
  font-size: 13px;
  color: var(--label-tertiary);
  margin-top: 4px;
}

.connections-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.connection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--specular);
  transition: background 0.2s var(--ease);
}

.connection-row:hover {
  background: rgba(255, 255, 255, 0.07);
}

.connection-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.connection-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--specular);
}

.connection-icon-wrap.google {
  background: rgba(234, 67, 53, 0.12);
  color: #ea4335;
}

.connection-icon-wrap.discord {
  background: rgba(88, 101, 242, 0.15);
  color: #5865f2;
}

.connection-icon-wrap.telegram {
  background: rgba(42, 171, 238, 0.15);
  color: #2aabee;
}

.connection-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.connection-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.connection-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--label-primary);
}

.connection-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.connection-badge.linked {
  background: rgba(48, 209, 88, 0.15);
  color: var(--accent-green);
}

.connection-badge.configured {
  background: rgba(10, 132, 255, 0.15);
  color: var(--accent-blue);
}

.connection-badge.unconfigured {
  background: rgba(255, 159, 10, 0.15);
  color: var(--accent-gold);
}

.connection-desc {
  font-size: 12px;
  color: var(--label-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.connection-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.connection-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s var(--spring);
}

.connection-btn.link {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.connection-btn.link:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.02);
}

.connection-btn.config {
  background: var(--glass-thin);
  color: var(--label-secondary);
  box-shadow: var(--specular);
}

.connection-btn.config:hover {
  background: var(--glass-regular);
  color: var(--label-primary);
}

.connection-btn.unlink {
  background: rgba(255, 69, 58, 0.12);
  color: var(--accent-red);
}

.connection-btn.unlink:hover {
  background: rgba(255, 69, 58, 0.22);
}

.connection-btn.dev {
  background: rgba(175, 82, 222, 0.15);
  color: #bf5af2;
}

.connection-btn.dev:hover {
  background: rgba(175, 82, 222, 0.25);
}

/* OAuth Config Modal */
.oauth-modal-content {
  max-width: 520px;
}

.oauth-field {
  margin-bottom: 14px;
}

.oauth-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--label-secondary);
  margin-bottom: 6px;
}

.oauth-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-family: var(--font-system) !important;
  font-size: 14px;
  transition: border-color 0.2s var(--ease);
}

.oauth-input:focus {
  border-color: var(--accent-blue);
  background: rgba(255, 255, 255, 0.1);
}

.oauth-callback-box {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  font-size: 12px;
  color: var(--label-secondary);
  font-family: monospace;
  word-break: break-all;
  user-select: all;
  margin-top: 4px;
}

.oauth-hint {
  font-size: 12px;
  color: var(--label-tertiary);
  margin-top: 6px;
  line-height: 1.4;
}

/* Total Watch Time Card */
.total-watch-time {
  margin-top: 20px;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  background: var(--glass-card);
  backdrop-filter: var(--blur-subtle);
  box-shadow: var(--specular), var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 18px;
}

.time-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #0a84ff, #5e5ce6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.time-value {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.time-label {
  font-size: 13px;
  color: var(--label-tertiary);
  margin-top: 2px;
}

/* Recent Anime Section */
.recent-anime-section {
  margin-top: 28px;
}

.recent-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  letter-spacing: -0.015em;
}

.recent-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.recent-empty {
  padding: 36px 20px;
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--glass-thin);
  color: var(--label-tertiary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  grid-column: 1 / -1;
}

.recent-item {
  display: flex;
  gap: 14px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--glass-card);
  box-shadow: var(--specular);
  transition: all 0.2s var(--spring);
  text-decoration: none;
  color: inherit;
}

.recent-item:hover {
  transform: translateY(-2px);
  background: var(--glass-card-hover);
}

.recent-poster {
  width: 54px;
  height: 76px;
  border-radius: 8px;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-color: var(--apple-surface);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.recent-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recent-poster.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--label-tertiary);
}

.recent-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
}

.recent-name {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-ep {
  font-size: 12px;
  color: var(--label-tertiary);
}

/* Bio Modal */
#bio-modal textarea {
  width: 100%;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 14px;
  color: #ffffff;
  font-size: 14px;
  font-family: var(--font-system);
  resize: vertical;
  min-height: 100px;
  outline: none;
  transition: all 0.2s;
}

#bio-modal textarea:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25);
}

.char-count {
  text-align: right;
  font-size: 12px;
  color: var(--label-tertiary);
  margin-top: 6px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

/* Profile Settings Modal */
#settings-modal .settings-modal {
  max-width: 620px;
  max-height: 88vh;
}

.settings-body {
  max-height: calc(88vh - 150px);
  overflow-y: auto;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-body::-webkit-scrollbar {
  width: 6px;
}

.settings-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(255, 255, 255, 0.035);
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.settings-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.banner-preview {
  width: 100%;
  height: 120px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px dashed rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  position: relative;
}

.banner-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--label-tertiary);
  font-size: 13px;
}

.settings-buttons-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-upload:hover {
  background: var(--accent-hover);
  transform: scale(1.02);
}

.btn-delete {
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  background: rgba(255, 69, 58, 0.15);
  color: var(--accent-red);
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-delete:hover {
  background: rgba(255, 69, 58, 0.25);
}

.custom-color-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.custom-color-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--label-secondary);
}

.color-swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-block;
}

.custom-color-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.color-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.color-preview-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.color-hex-display {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #ffffff;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(28px, 1fr));
  gap: 6px;
  max-height: 140px;
  overflow-y: auto;
  padding: 6px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.color-grid::-webkit-scrollbar {
  width: 4px;
}

.color-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.color-grid-item {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.16s var(--spring);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.color-grid-item:hover {
  transform: scale(1.15);
  z-index: 2;
}

.color-grid-item.active {
  transform: scale(1.18);
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--accent);
  z-index: 3;
}

.theme-preview {
  border-radius: 14px;
  overflow: hidden;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 6px;
}

.preview-banner {
  height: 56px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
}

.preview-content {
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(22, 22, 28, 0.94);
  margin: -20px 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.preview-text-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.preview-line {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  width: 85%;
}

.preview-line.short {
  width: 45%;
  background: rgba(255, 255, 255, 0.45);
}

.preview-line.medium {
  width: 65%;
}

/* ---------- 14. Apple ID Auth Page (auth.html) ---------- */
.auth-page {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-xl);
  background: rgba(22, 22, 28, 0.92);
  backdrop-filter: var(--blur-deep);
  -webkit-backdrop-filter: var(--blur-deep);
  box-shadow: var(--specular-pill), var(--shadow-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-align: center;
  color: #ffffff;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--label-tertiary);
  text-align: center;
  line-height: 1.45;
}

/* Apple Segmented Tabs */
.auth-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px;
  border-radius: var(--radius-pill);
  position: relative;
}

.auth-tab {
  flex: 1;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--label-secondary);
  text-align: center;
  border: none;
  background: none;
  cursor: pointer;
  transition: all 0.2s var(--spring);
}

.auth-tab.active {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 6px;
}

.auth-form.hidden,
.auth-form[hidden] {
  display: none !important;
}

.auth-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--label-secondary);
}

.auth-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--specular);
  color: #ffffff;
  font-size: 15px;
  outline: none;
  transition: all 0.2s var(--ease);
}

.auth-input:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--accent);
  box-shadow: var(--specular-pill), 0 0 0 3px rgba(10, 132, 255, 0.35);
}

.auth-hint {
  font-size: 12px;
  color: var(--label-tertiary);
  font-weight: 400;
}

.auth-submit {
  width: 100%;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.35);
  transition: all 0.2s var(--spring);
  margin-top: 6px;
  text-decoration: none;
}

.auth-submit:hover {
  background: var(--accent-hover);
  transform: scale(1.02);
}

.auth-secondary {
  width: 100%;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--glass-thin);
  box-shadow: var(--specular);
  color: var(--label-primary);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 0.2s var(--spring);
}

.auth-secondary:hover {
  background: var(--glass-regular);
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.auth-error {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 69, 58, 0.15);
  color: var(--accent-red);
  font-size: 13px;
  font-weight: 500;
}

.auth-error[hidden] {
  display: none !important;
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--label-quaternary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 6px 0;
}

.auth-or::before, .auth-or::after {
  content: "";
  height: 0.5px;
  flex: 1;
  background: var(--hairline);
}

.social-auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
}

.social-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--glass-thin);
  box-shadow: var(--specular);
  font-size: 14px;
  font-weight: 600;
  color: var(--label-primary);
  text-decoration: none;
  transition: all 0.2s var(--spring);
}

.social-auth-btn:hover {
  background: var(--glass-regular);
  transform: scale(1.03);
}

/* ---------- 15. WatchTogether SharePlay Theater (watchtogether.html) ---------- */
.wt-cinema-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  padding: 24px var(--gutter);
  max-width: 1600px;
  margin: 0 auto;
}

.wt-theater-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wt-sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: calc(100vh - var(--header-h) - 48px);
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 20px;
  border-radius: var(--radius-xl);
  background: var(--glass-card);
  backdrop-filter: var(--blur-deep);
  box-shadow: var(--specular), var(--shadow-md);
}

.wt-chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wt-chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.wt-message {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  line-height: 1.4;
}

.wt-message-user {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}

.wt-chat-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.wt-chat-input {
  flex: 1;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: var(--specular);
  font-size: 13px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  outline: none;
}

/* ---------- 16. Reviews Section (Apple App Store style) ---------- */
.reviews-section {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 0.5px solid var(--hairline);
}

.reviews-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.reviews-section-header h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

/* Big Rating Score Badge */
.reviews-rating-block {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 16px 0 24px;
  padding: 18px 24px;
  border-radius: var(--radius-lg);
  background: var(--glass-card);
  backdrop-filter: var(--blur-subtle);
  box-shadow: var(--specular), var(--shadow-sm);
  width: fit-content;
}

.reviews-rating-score {
  font-size: 44px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1;
}

.reviews-rating-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reviews-stars-row {
  display: flex;
  align-items: center;
  gap: 3px;
}

.reviews-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  transition: transform 0.15s;
}

.reviews-star img {
  filter: grayscale(1) brightness(0.7) opacity(0.35);
  transition: all 0.2s var(--ease);
}

.reviews-star.filled img {
  filter: none;
  opacity: 1;
}

.reviews-star.half img {
  filter: none;
  opacity: 0.65;
}

.reviews-rating-count {
  font-size: 13px;
  color: var(--label-tertiary);
  font-weight: 500;
}

.reviews-empty-rating {
  font-size: 14px;
  color: var(--label-tertiary);
  padding: 8px 0;
}

/* Need Auth Banner */
.reviews-need-auth {
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  background: var(--glass-thin);
  box-shadow: var(--specular);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0;
}

.reviews-need-auth p {
  font-size: 15px;
  font-weight: 600;
  color: var(--label-primary);
}

.reviews-need-auth .btn-primary {
  width: auto;
  padding: 9px 24px;
}

/* Review Form Wrap */
.reviews-form-wrap {
  margin: 24px 0;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--glass-card);
  backdrop-filter: var(--blur-subtle);
  box-shadow: var(--specular), var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.reviews-form-wrap h3 {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.reviews-form-rating {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reviews-form-rating .reviews-star {
  cursor: pointer;
}

.reviews-form-rating .reviews-star:hover {
  transform: scale(1.2);
}

.reviews-form-hint {
  font-size: 13.5px;
  color: var(--label-tertiary);
  font-weight: 500;
}

.reviews-form-title-input {
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.reviews-form-title-input:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25);
}

.reviews-form-text {
  min-height: 110px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 14px;
  font-family: var(--font-system);
  outline: none;
  resize: vertical;
  line-height: 1.5;
  transition: all 0.2s;
}

.reviews-form-text:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25);
}

.reviews-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.reviews-form-actions .btn-primary {
  width: auto;
  padding: 10px 24px;
}

.reviews-form-counter {
  font-size: 12.5px;
  color: var(--label-tertiary);
  font-family: var(--font-mono);
}

/* Reviews List & Cards */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.reviews-review-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--glass-card);
  backdrop-filter: var(--blur-subtle);
  box-shadow: var(--specular), var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.2s var(--spring);
}

.reviews-review-card:hover {
  transform: translateY(-2px);
  background: var(--glass-card-hover);
}

.reviews-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.reviews-review-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reviews-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  object-fit: cover;
}

.reviews-avatar-placeholder {
  background: linear-gradient(135deg, var(--accent), #5e5ce6);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reviews-username {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
}

.reviews-review-date {
  font-size: 12px;
  color: var(--label-tertiary);
}

.reviews-review-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.reviews-review-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--label-secondary);
  white-space: pre-wrap;
}

.reviews-rejected-note {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 69, 58, 0.15);
  color: var(--accent-red);
  font-size: 13px;
  font-weight: 600;
}

.reviews-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--label-tertiary);
  font-size: 14.5px;
  border-radius: var(--radius-lg);
  background: var(--glass-thin);
}

/* ---------- 17. iOS 27 Floating Glass Tab Bar (Mobile) ---------- */
.bottom-nav {
  display: none;
}

/* Hide mobile-specific navigation elements on desktop screens */
@media (min-width: 769px) {
  .mobile-menu,
  .mobile-menu-toggle,
  .bottom-nav {
    display: none !important;
  }
}

/* ---------- 18. Footer ---------- */
.footer {
  margin-top: 64px;
  padding: 36px var(--gutter);
  border-top: 0.5px solid var(--hairline);
  color: var(--label-tertiary);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ---------- 19. Responsive Design & Mobile Adaptations ---------- */
@media (max-width: 1024px) {
  :root {
    --gutter: 24px;
  }

  .title-hero {
    grid-template-columns: 240px 1fr;
    gap: 28px;
  }

  .wt-cinema-layout {
    grid-template-columns: 1fr;
  }

  .wt-sidebar-panel {
    position: static;
    height: 480px;
  }
}

@media (max-width: 768px) {
  :root {
    --gutter: 16px;
    --header-h: 58px;
  }

  body.has-bottom-nav {
    padding-bottom: 96px;
  }

  /* Header adjustments */
  .header {
    padding: 0 16px;
  }

  .category-dropdown,
  .search-box {
    display: none !important;
  }

  /* Hamburger toggle in mobile header */
  .mobile-menu-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-pill);
    background: var(--glass-thin);
    border: none;
    cursor: pointer;
    margin-left: 6px;
    box-shadow: var(--specular);
  }

  .mobile-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--label-primary);
    border-radius: 2px;
    transition: all 0.25s var(--spring);
  }

  /* Mobile Slide-in Drawer Sheet */
  .mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 1500;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0.3s;
  }

  .mobile-menu.open {
    pointer-events: auto;
    visibility: visible;
  }

  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: var(--blur-deep);
    -webkit-backdrop-filter: var(--blur-deep);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
  }

  .mobile-menu.open .mobile-menu-backdrop {
    opacity: 1;
  }

  .mobile-menu-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 86vw);
    background: rgba(20, 20, 26, 0.96);
    backdrop-filter: var(--blur-deep);
    -webkit-backdrop-filter: var(--blur-deep);
    box-shadow: var(--specular-pill), -10px 0 40px rgba(0, 0, 0, 0.7);
    padding: 24px 20px calc(80px + env(safe-area-inset-bottom, 16px));
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transform: translateX(100%);
    transition: transform 0.32s var(--spring);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mobile-menu.open .mobile-menu-panel {
    transform: translateX(0);
  }

  .mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
  }

  .mobile-menu-logo {
    height: 32px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
  }

  .mobile-menu-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-pill);
    background: var(--glass-thin);
    color: var(--label-secondary);
    border: none;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .mobile-menu-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-pill);
    background: var(--glass-thin);
    box-shadow: var(--specular);
    color: var(--label-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
  }

  .mobile-menu-search img {
    width: 18px;
    height: 18px;
    object-fit: contain;
  }

  .mobile-menu-chevron {
    margin-left: auto;
    color: var(--label-tertiary);
  }

  .mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .mobile-menu-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: var(--label-primary);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
  }

  .mobile-menu-links a:hover,
  .mobile-menu-links a:active {
    background: var(--glass-thin);
  }

  .mobile-menu-links a img {
    width: 20px;
    height: 20px;
    object-fit: contain;
  }

  .mobile-menu-symbol {
    width: 20px;
    text-align: center;
    font-size: 16px;
    color: var(--accent);
  }

  .mobile-menu-divider {
    height: 1px;
    background: var(--hairline);
    margin: 4px 0;
  }

  .mobile-menu-camera {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-pill);
    background: var(--glass-thin);
    color: var(--label-primary);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
  }

  .mobile-menu-camera img {
    width: 20px;
    height: 20px;
    object-fit: contain;
  }

  .mobile-menu-genres {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
  }

  .mobile-menu-genres h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--label-tertiary);
  }

  .mobile-menu-genre-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 4px;
  }

  .mobile-menu-genre-list a,
  .mobile-menu-genre-item {
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    background: var(--glass-thin);
    color: var(--label-secondary);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
  }

  .mobile-menu-auth {
    margin-top: auto;
    padding: 14px;
    border-radius: var(--radius-pill);
    background: var(--accent);
    color: #ffffff;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(10, 132, 255, 0.35);
  }

  /* Floating iOS 27 Tab Bar */
  .bottom-nav {
    display: block !important;
    position: fixed !important;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 32px) !important;
    max-width: 440px !important;
    height: 60px !important;
    border-radius: 36px !important;
    background: rgba(22, 22, 28, 0.90) !important;
    backdrop-filter: var(--blur-deep) !important;
    -webkit-backdrop-filter: var(--blur-deep) !important;
    box-shadow: var(--specular-pill), 0 16px 40px rgba(0, 0, 0, 0.75) !important;
    z-index: 1000 !important;
    padding: 0 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .bottom-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--label-tertiary);
    font-size: 10.5px;
    font-weight: 600;
    transition: all 0.2s var(--spring);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .bottom-nav-item svg,
  .bottom-nav-item img {
    width: 22px;
    height: 22px;
    transition: transform 0.2s var(--spring);
  }

  .bottom-nav-item.active,
  .bottom-nav-item:hover {
    color: #ffffff;
  }

  .bottom-nav-item.active svg,
  .bottom-nav-item.active img {
    transform: scale(1.12);
    color: var(--accent);
  }

  /* Hero & Title adjustments on mobile */
  .hero {
    margin: 10px var(--gutter) 28px;
    min-height: 440px;
    height: 52vh;
    border-radius: var(--radius-lg);
  }

  .hero-content {
    padding: 24px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-tagline {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  .hero-dots {
    right: 20px;
    bottom: 20px;
  }

  .title-hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .title-poster-wrap {
    max-width: 180px;
    margin: 0 auto;
  }

  .title-main-name {
    font-size: 26px;
    text-align: center;
  }

  .title-en-name,
  .title-meta-line,
  .title-genres {
    justify-content: center;
  }

  .status-buttons {
    justify-content: center;
  }

  .card {
    width: 140px;
  }

  .card-meta {
    padding: 10px;
  }

  .card-title {
    font-size: 12px;
  }

  .search-overlay {
    padding: 10px !important;
  }

  .search-overlay-bar {
    height: 52px !important;
    padding: 0 12px !important;
    gap: 10px !important;
    border-radius: 16px 16px 0 0 !important;
  }

  .search-overlay-bar input {
    font-size: 16px !important;
    min-width: 0 !important;
  }

  .search-overlay-close {
    width: 32px !important;
    height: 32px !important;
    font-size: 14px !important;
    flex-shrink: 0 !important;
  }

  .search-overlay-main {
    padding: 12px !important;
    border-radius: 0 0 16px 16px !important;
    height: calc(100vh - 120px) !important;
    max-height: calc(100vh - 120px) !important;
  }

  .search-overlay-body {
    grid-template-columns: 1fr;
  }

  .search-overlay-filters {
    display: none;
  }

  /* Mobile Player UI adjustments */
  .anifine-player-controls {
    padding: 12px 14px !important;
  }

  .player-click-surface {
    bottom: 56px !important;
  }

  .player-volume-slider,
  #volume-slider,
  #btn-pip {
    display: none !important;
  }

  .player-controls-left,
  .player-controls-right {
    gap: 6px !important;
  }

  .player-icon-btn {
    width: 32px !important;
    height: 32px !important;
  }

  .player-time {
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  .player-center-play {
    width: 54px !important;
    height: 54px !important;
  }

  /* Category Grid: 2-3 cards per row on mobile */
  .category-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 8px 0 32px !important;
  }

  .category-grid .card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  @media (max-width: 480px) {
    .category-grid {
      grid-template-columns: repeat(2, 1fr) !important;
      gap: 10px !important;
    }
    .category-grid .card .card-meta {
      padding: 8px !important;
    }
    .category-grid .card .card-title {
      font-size: 12px !important;
      line-height: 1.25 !important;
    }
    .category-grid .card .card-meta-sub {
      font-size: 10px !important;
    }
    .search-overlay-bar input {
      font-size: 15px !important;
    }
  }

  .profile-banner {
    height: 140px;
  }

  .avatar-circle {
    width: 84px;
    height: 84px;
  }

  .profile-info-section {
    margin-top: -42px;
    padding: 0 12px;
  }

  .footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    margin-bottom: 20px;
  }

  /* Защита кнопок от сжатия и исчезновения на мобильных */
  .icon-btn,
  .notif-btn,
  .avatar,
  .boosty-pill-btn,
  .status-btn,
  .title-watch-btn,
  .title-watchtogether-btn {
    flex-shrink: 0 !important;
  }

  .header .nav-right {
    gap: 8px;
  }

  @media (max-width: 600px) {
    .header .dropdown-wrapper,
    .header #btn-shazam {
      display: none !important;
    }
    .boosty-pill-btn .boosty-text {
      display: none;
    }
    .boosty-pill-btn {
      padding: 6px 10px;
    }
  }

  .status-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    justify-content: center;
  }

  .status-btn {
    flex: 1 1 calc(50% - 8px);
    min-width: 130px;
    white-space: nowrap;
    text-align: center;
    justify-content: center;
  }
}

/* ==========================================================================
   Header Notification Bell & Liquid Glass Dropdown
   ========================================================================== */
.notif-dropdown-wrapper {
  position: relative;
  display: inline-flex;
}

.notif-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--glass-thin);
  box-shadow: var(--specular);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--label-secondary);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s var(--spring);
}

.notif-btn:hover {
  background: var(--glass-regular);
  color: var(--label-primary);
  transform: scale(1.05);
}

.notif-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: #ff453a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(255, 69, 58, 0.5);
  transition: transform 0.2s var(--spring);
}

.notif-badge.hidden {
  display: none !important;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: 480px;
  border-radius: var(--radius-lg);
  background: rgba(22, 22, 28, 0.94);
  backdrop-filter: var(--blur-deep);
  -webkit-backdrop-filter: var(--blur-deep);
  box-shadow: var(--specular-pill), var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition: all 0.24s var(--spring);
  z-index: 500;
  overflow: hidden;
}

.notif-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.02);
}

.notif-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--label-primary);
}

.notif-read-all-btn {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  transition: opacity 0.2s;
}

.notif-read-all-btn:hover {
  opacity: 0.8;
}

.notif-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 380px;
}

.notif-empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--label-tertiary);
  font-size: 13px;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--hairline);
  transition: background 0.16s ease;
  position: relative;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.notif-item.unread {
  background: rgba(10, 132, 255, 0.09);
}

.notif-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--glass-regular);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
}

.notif-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notif-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notif-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--label-primary);
}

.notif-item-msg {
  font-size: 12px;
  color: var(--label-secondary);
  line-height: 1.35;
}

.notif-item-time {
  font-size: 11px;
  color: var(--label-tertiary);
  margin-top: 2px;
}

.notif-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.notif-action-btn {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.notif-action-btn.primary {
  background: var(--accent);
  color: #ffffff;
}

.notif-action-btn.primary:hover {
  background: var(--accent-hover);
  transform: scale(1.04);
}

.notif-action-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--label-secondary);
}

.notif-action-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* ==========================================================================
   Boosty Pill Button (Поддержать проект)
   ========================================================================== */
.boosty-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(255, 159, 10, 0.22), rgba(255, 69, 58, 0.22));
  border: none !important;
  outline: none !important;
  box-shadow: var(--specular);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  flex-shrink: 0;
  transition: all 0.2s var(--spring);
}

.boosty-pill-btn:hover {
  background: linear-gradient(135deg, rgba(255, 159, 10, 0.38), rgba(255, 69, 58, 0.38));
  border: none !important;
  outline: none !important;
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(255, 159, 10, 0.35);
}

.boosty-heart {
  font-size: 13px;
}

/* ==========================================================================
   Friends UI & Profile Actions
   ========================================================================== */
.friend-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s var(--spring);
}

.friend-action-btn.add {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.35);
}

.friend-action-btn.add:hover {
  background: var(--accent-hover);
  transform: scale(1.03);
}

.friend-action-btn.pending {
  background: var(--glass-regular);
  color: var(--label-secondary);
  border: 1px solid var(--hairline-strong);
}

.friend-action-btn.accepted {
  background: rgba(48, 209, 88, 0.18);
  color: #30d158;
  border: 1px solid rgba(48, 209, 88, 0.35);
}

.friend-action-btn.accepted:hover {
  background: rgba(255, 69, 58, 0.2);
  color: #ff453a;
  border-color: rgba(255, 69, 58, 0.4);
}

/* Ongoing Subscription Button */
.ongoing-sub-btn {
  background: var(--glass-thin);
  border: 1px solid var(--hairline);
  color: var(--label-secondary);
  transition: all 0.2s var(--spring);
}

.ongoing-sub-btn:hover {
  background: var(--glass-regular);
  color: var(--label-primary);
}

.ongoing-sub-btn.subscribed {
  background: rgba(10, 132, 255, 0.22);
  border-color: rgba(10, 132, 255, 0.45);
  color: var(--accent);
}

/* WatchTogether Friends Invite List */
.wt-friends-invite-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}

.wt-friends-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--label-secondary);
  margin-bottom: 10px;
}

.wt-friends-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
}

.wt-friend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
}

.wt-friend-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wt-friend-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
}

.wt-friend-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wt-friend-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--label-primary);
}

.wt-friend-invite-btn {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  background: var(--accent);
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wt-friend-invite-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.04);
}

.wt-friend-invite-btn.invited {
  background: rgba(48, 209, 88, 0.2);
  color: #30d158;
  cursor: default;
}

/* User search in spotlight overlay */
.search-users-section {
  padding: 14px 18px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.02);
}

.search-section-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--label-tertiary);
  margin-bottom: 8px;
}

.search-users-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  transition: all 0.16s ease;
}

.search-user-row:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(3px);
}

.search-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}

.search-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-user-info {
  display: flex;
  flex-direction: column;
}

.search-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--label-primary);
}

.search-user-handle {
  font-size: 11px;
  color: var(--label-tertiary);
}