/* ============================================================
   COMPONENTS — AniLore
   ============================================================ */

/* ---- HERO BANNER ---- */
.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  margin-bottom: 48px;
}
.hero__slides { height: 100%; }
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero__slide.active { opacity: 1; }
.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 8s ease;
  filter: brightness(0.45) saturate(1.3);
}
.hero__slide.active .hero__bg { transform: scale(1); }
.hero__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(10,10,15,0.95) 0%, rgba(10,10,15,0.5) 50%, transparent 100%),
              linear-gradient(to top, var(--bg-primary) 0%, transparent 40%);
}
.hero__content {
  position: absolute;
  bottom: 60px;
  left: 0;
  right: 0;
  padding: 0 48px;
  max-width: 700px;
}
.hero__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(26px, 3.8vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.hero__desc {
  font-size: 15px;
  color: rgba(240,240,250,0.8);
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.7;
  max-width: 560px;
}
.hero__actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.hero__meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: rgba(240,240,250,0.7);
  font-weight: 500;
}
.hero__dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.hero__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}
.hero__dot.active {
  width: 20px;
  border-radius: 3px;
  background: var(--accent-primary);
}

/* ---- ANIME GRID ---- */
.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.anime-grid--large { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.anime-grid--compact { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }

/* ---- ANIME CARD ---- */
.anime-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition);
}
.anime-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
}
.anime-card__poster {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
}
.anime-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  image-rendering: -webkit-optimize-contrast;
}
.anime-card:hover .anime-card__img { transform: scale(1.05); }

.anime-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.anime-card:hover .anime-card__overlay { opacity: 1; }
.anime-card__play {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.85);
  transition: transform var(--transition);
  color: #fff;
}
.anime-card:hover .anime-card__play { transform: scale(1); }

.anime-card__score {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.8);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: 3px;
}
.anime-card__ep-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(230, 57, 70, 0.35);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-primary);
}
.anime-card__body {
  padding: 10px 12px 12px;
}
.anime-card__title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.anime-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.anime-card__year {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
.anime-card__type {
  font-size: 11px;
  color: var(--text-accent);
  font-weight: 600;
}

.anime-card__list-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  opacity: 0;
  transition: all var(--transition);
  z-index: 10;
}
.anime-card:hover .anime-card__list-btn { opacity: 1; }
.anime-card__list-btn:hover { background: var(--accent-primary); }

/* ---- HORIZONTAL SCROLL ROW & CAROUSEL ---- */
.slider-container {
  position: relative;
  display: block;
}

.scroll-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 4px 16px 4px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.scroll-row:active,
.scroll-row.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
}
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-row .anime-card {
  flex-shrink: 0;
  width: 180px;
  scroll-snap-align: start;
}

/* Arrow buttons (both inline header arrows and floating on-hover side arrows) */
.slider-arrow {
  position: absolute;
  top: calc(50% - 24px);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(18, 18, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
}

.slider-container:hover .slider-arrow {
  opacity: 1;
  pointer-events: auto;
}

.slider-arrow:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  transform: scale(1.12);
  box-shadow: 0 0 20px var(--accent-glow, rgba(139, 92, 246, 0.5));
}

.slider-arrow:active {
  transform: scale(0.95);
}

.slider-arrow--prev {
  left: -20px;
}

.slider-arrow--next {
  right: -20px;
}

.slider-arrow.is-disabled {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Header control buttons */
.section-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-arrows {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.section-arrow-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.section-arrow-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .slider-arrow {
    display: none;
  }
}

/* ---- TOP ANIME LIST ---- */
.top-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.top-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}
.top-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}
.top-item__rank {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 900;
  min-width: 32px;
  text-align: center;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.top-item__img {
  width: 48px;
  height: 68px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.top-item__info { flex: 1; min-width: 0; }
.top-item__title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.top-item__meta { font-size: 12px; color: var(--text-muted); }
.top-item__score {
  font-size: 15px;
  font-weight: 800;
  color: var(--warning);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ---- ANIME DETAIL PAGE ---- */
.anime-detail {
  position: relative;
}

.anime-detail__hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 32px;
}

.anime-detail__backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  filter: blur(20px) brightness(0.28) saturate(1.4);
  transform: scale(1.08);
}

.anime-detail__backdrop-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 15, 0.4) 0%,
    rgba(10, 10, 15, 0.7) 50%,
    var(--bg-primary) 100%
  );
}

.anime-detail__info {
  position: relative;
  z-index: 2;
  padding: 0 48px;
  display: flex;
  gap: 36px;
  align-items: flex-end;
  width: 100%;
}

.anime-detail__poster-wrap {
  flex-shrink: 0;
  width: 220px;
}

.anime-detail__poster {
  width: 220px;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 20px rgba(124, 77, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: block;
}

.anime-detail__meta-block {
  padding-bottom: 4px;
  flex: 1;
  min-width: 0;
}
.anime-detail__title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 8px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.anime-detail__original-title {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.anime-detail__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.anime-detail__stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.anime-detail__stat {
  text-align: center;
}
.anime-detail__stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  display: block;
  color: var(--text-primary);
}
.anime-detail__stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.anime-detail__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.anime-detail__body {
  padding: 48px 48px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  position: relative;
  z-index: 2;
  background: var(--bg-primary);
}
.anime-detail__description {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.anime-detail__sidebar { }
.info-table { width: 100%; }
.info-table tr td {
  padding: 8px 0;
  font-size: 13px;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.info-table tr:last-child td { border-bottom: none; }
.info-table td:first-child {
  color: var(--text-muted);
  width: 40%;
  font-weight: 500;
}
.info-table td:last-child { color: var(--text-primary); font-weight: 600; }

/* ---- EPISODES ---- */
.episodes-section { margin-top: 32px; }
.ep-grid {
  display: block;
  width: 100%;
}
.ep-container-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(18, 22, 34, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

/* Range Navigation Bar */
.ep-ranges-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.ep-ranges-scroll-container {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 0%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.ep-nav-arrow {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-muted);
  width: 24px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 14px;
  line-height: 1;
  transition: all 0.15s ease;
}
.ep-nav-arrow:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.ep-ranges-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  flex: 1 1 auto;
  min-width: 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding: 2px 0;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.ep-ranges-scroll:active,
.ep-ranges-scroll.is-dragging {
  cursor: grabbing;
}
.ep-ranges-scroll.is-dragging * {
  pointer-events: none;
}
.ep-ranges-scroll::-webkit-scrollbar {
  display: none;
}

/* Range tab buttons */
.ep-range-tab {
  padding: 5px 12px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.ep-range-tab:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}
.ep-range-tab.active {
  background: var(--accent-gradient, linear-gradient(135deg, #7c4dff, #00f2fe));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(124, 77, 255, 0.4);
  font-weight: 700;
}
.ep-range-tab.has-current:not(.active)::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #00f2fe;
  box-shadow: 0 0 6px #00f2fe;
}

/* Quick Jump Input */
.ep-jump-wrap {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  padding: 2px 4px 2px 8px;
  margin-left: 0;
  flex-shrink: 0;
  box-sizing: border-box;
}
.ep-jump-input {
  width: 52px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 11px;
  outline: none;
  font-family: inherit;
  -moz-appearance: textfield;
}
.ep-jump-input::-webkit-outer-spin-button,
.ep-jump-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.ep-jump-input::placeholder {
  color: var(--text-muted);
  font-size: 10px;
}
.ep-jump-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 5px;
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.ep-jump-btn:hover {
  background: var(--accent-primary, #7c4dff);
  color: #fff;
}

/* Buttons Grid */
.ep-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px;
  max-height: 290px;
  overflow-y: auto;
  padding: 4px 6px 6px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.03);
}
.ep-buttons-grid::-webkit-scrollbar {
  width: 5px;
}
.ep-buttons-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
}
.ep-buttons-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
}
.ep-buttons-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Organic Modern Episode Buttons */
.ep-btn {
  height: 38px;
  min-width: 44px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.ep-btn:hover {
  border-color: rgba(0, 242, 254, 0.5);
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.ep-btn.active {
  background: var(--accent-gradient, linear-gradient(135deg, #7c4dff, #00f2fe));
  color: #fff !important;
  border-color: transparent !important;
  font-weight: 700;
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(124, 77, 255, 0.55), 0 0 10px rgba(0, 242, 254, 0.35);
  z-index: 2;
}
.ep-btn.watched {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}
.ep-btn.watched:hover {
  border-color: #10b981;
  color: #fff;
}
.ep-btn.watched::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 12px;
  height: 2px;
  border-radius: 1px;
  background: #10b981;
  opacity: 0.8;
}
.ep-btn.active.watched::after {
  background: #fff;
}

/* ---- MY LIST PAGE ---- */
.mylist-section { padding: 32px 48px; }
.mylist-tabs-wrap {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.mylist-tab {
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.mylist-tab .count {
  background: var(--bg-card-hover);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
}
.mylist-tab.active, .mylist-tab:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: var(--accent-subtle);
}
.mylist-tab.active .count { background: var(--accent-primary); color: #fff; }
.mylist-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.mylist-empty .icon { font-size: 64px; margin-bottom: 16px; }
.mylist-empty h3 { font-size: 18px; margin-bottom: 8px; color: var(--text-secondary); }

/* ---- CATALOG / FILTER ---- */
.catalog-section { padding: 32px 48px; }
.filters-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-select {
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: all var(--transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239090b0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.filter-select:focus { border-color: var(--accent-primary); }
.filter-select option { background: var(--bg-card); }

.genre-filter-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* ---- CATALOG 2-COLUMN LAYOUT WITH RIGHT STATIC SIDEBAR ---- */
.catalog-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  position: relative;
}

.catalog-main {
  flex: 1;
  min-width: 0;
}

.catalog-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 90px;
  background: rgba(18, 18, 24, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg, 16px);
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Accordion category item */
.filter-category {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.filter-category:last-child {
  border-bottom: none;
}

.filter-category__header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 10px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.2s ease;
  user-select: none;
}

.filter-category__header:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.filter-category__title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-category__chevron {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-muted);
}

.filter-category.is-open .filter-category__chevron {
  transform: rotate(180deg);
  color: var(--accent-primary);
}

.filter-category__content {
  display: none;
  padding: 6px 6px 16px 6px;
}

.filter-category.is-open .filter-category__content {
  display: block;
}

/* Tag filter search bar */
.filter-search-box {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 0 8px;
  transition: all 0.2s ease;
}

.filter-search-box:focus-within {
  border-color: var(--accent-primary);
  background: rgba(139, 92, 246, 0.05);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

.filter-search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  margin-right: 6px;
}

.filter-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 0;
}

.filter-search-input::placeholder {
  color: var(--text-muted);
  font-size: 12px;
}

.filter-search-clear {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  padding: 4px;
  line-height: 1;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.filter-search-clear:hover {
  color: #fff;
}

.filter-empty-search {
  text-align: center;
  padding: 16px 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

.filter-category__chips {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Thin custom scrollbar for chips */
.filter-category__chips::-webkit-scrollbar {
  width: 4px;
}
.filter-category__chips::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.filter-category__chips .genre-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  text-align: left;
}

.filter-category__chips .genre-tag:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateX(3px);
}

.filter-category__chips .genre-tag.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent-primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.25);
}

.filter-category__chips .genre-tag.active::after {
  content: "✓";
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-primary);
  margin-left: 8px;
}

.filter-badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.filter-sidebar-reset-btn {
  width: 100%;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-sidebar-reset-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}

/* Year range filter styling */
.year-filter-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.year-filter-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.year-input-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.year-input-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.year-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
  text-align: center;
}

.year-input:focus {
  border-color: var(--accent-primary);
  background: rgba(139, 92, 246, 0.06);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

.year-input-divider {
  color: var(--text-muted);
  font-weight: 700;
  padding-top: 16px;
}

.year-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.year-quick-chip {
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.year-quick-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

.year-quick-chip.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  font-weight: 600;
}

@media (max-width: 992px) {
  .catalog-layout {
    flex-direction: column-reverse;
  }
  .catalog-sidebar {
    width: 100%;
    position: static;
  }
}

/* ---- SETTINGS PAGE ---- */
.settings-section { padding: 32px 24px; max-width: 900px; margin: 0 auto; }
.settings-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.settings-group__title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }
.settings-row__label { font-size: 14px; font-weight: 500; }
.settings-row__desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---- THEME PRESETS ---- */
.theme-presets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  width: 100%;
}
.theme-preset {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: all var(--transition);
}
.theme-preset:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.theme-preset.active { border-color: var(--accent-primary); box-shadow: var(--accent-glow); }
.theme-preset__preview {
  height: 80px;
  position: relative;
}
.theme-preset__label {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-secondary);
  text-align: center;
}

/* ---- CUSTOM THEME CARD ENHANCEMENTS ---- */
.theme-preset--custom {
  position: relative;
}
.theme-preset--custom .theme-preset__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 8px;
}
.theme-preset__name {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11.5px;
  font-weight: 600;
}
.theme-preset__badge {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--accent-subtle);
  color: var(--accent-primary);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
}
.custom-theme-cloud-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.custom-theme-delete-btn {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(220, 38, 38, 0.85);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.85);
  transition: all 0.18s ease;
  z-index: 5;
}
.theme-preset--custom:hover .custom-theme-delete-btn {
  opacity: 1;
  transform: scale(1);
}
.custom-theme-delete-btn:hover {
  background: #ef4444;
  transform: scale(1.1) !important;
}

.theme-presets-empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}
.theme-presets-empty svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.builder-count-pill {
  font-size: 11px;
  font-weight: 700;
  background: var(--accent-subtle);
  color: var(--accent-primary);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

/* ---- THEME CONSTRUCTOR STYLES ---- */
.theme-builder-group {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.theme-builder-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: -10px 0 20px 0;
  max-width: 720px;
}
.builder-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-subtle);
  color: var(--accent-primary);
  border: 1px solid var(--border-hover);
}

/* Starter chips */
.builder-starters-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.builder-starters-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.builder-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.builder-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
}
.builder-chip:hover {
  border-color: var(--accent-primary);
  transform: translateY(-1px);
  background: var(--bg-card-hover);
}
.builder-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* 2-column grid */
.theme-builder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 768px) {
  .theme-builder-grid {
    grid-template-columns: 1fr;
  }
}

/* Controls column */
.builder-controls-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.builder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color 0.15s ease;
}
.builder-row:hover {
  border-color: rgba(255, 255, 255, 0.16);
}
.builder-row__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.builder-row__label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.builder-row__var {
  font-size: 11px;
  font-family: monospace;
  color: var(--text-muted);
}
.builder-color-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.builder-color-picker {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  outline: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.builder-color-picker:hover {
  transform: scale(1.05);
  border-color: var(--accent-primary);
}
.builder-color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}
.builder-color-picker::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}
.builder-hex-input {
  width: 82px;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: 'Space Grotesk', monospace, sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.15s ease;
}
.builder-hex-input:focus {
  border-color: var(--accent-primary);
}

/* Preview Column */
.builder-preview-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.builder-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.builder-preview-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #10b981;
}
.builder-preview-indicator::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  animation: pulseDot 2s infinite ease-in-out;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Live Mockup Box */
.builder-preview-box {
  background: var(--prev-bg, #0c0e14);
  border: 1px solid var(--prev-border, rgba(255,255,255,0.08));
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

/* Mini preview elements */
.prev-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--prev-border, rgba(255,255,255,0.08));
}
.prev-logo {
  display: flex;
  align-items: center;
  gap: 6px;
}
.prev-logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--prev-a1, #e63946);
}
.prev-logo-text {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--prev-text, #ffffff);
}
.prev-nav {
  display: flex;
  gap: 12px;
  font-size: 11px;
}
.prev-nav-item {
  color: var(--prev-text, #ffffff);
  opacity: 0.6;
}
.prev-nav-item.active {
  opacity: 1;
  font-weight: 700;
  color: var(--prev-a1, #e63946);
}
.prev-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--prev-subtle, rgba(230,57,70,0.15));
  color: var(--prev-a1, #e63946);
  border: 1px solid var(--prev-border, rgba(255,255,255,0.1));
}

.prev-card {
  background: var(--prev-card, #151a27);
  border: 1px solid var(--prev-border, rgba(255,255,255,0.08));
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  gap: 12px;
  padding: 10px;
  transition: all 0.2s ease;
}
.prev-card:hover {
  background: var(--prev-card-hover, #1c2334);
}
.prev-card-poster {
  width: 72px;
  height: 96px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--prev-a1, #e63946), var(--prev-a2, #ff4d6d));
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 5px;
}
.prev-card-rating {
  font-size: 9.5px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.7);
  color: #fbbf24;
  padding: 1px 5px;
  border-radius: 3px;
}
.prev-card-tag {
  position: absolute;
  bottom: 5px;
  left: 5px;
  font-size: 8.5px;
  font-weight: 800;
  background: #ffffff;
  color: #0c0e14;
  padding: 1px 4px;
  border-radius: 2px;
}
.prev-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}
.prev-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--prev-text, #ffffff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prev-card-meta {
  font-size: 11px;
  color: var(--prev-text, #ffffff);
  opacity: 0.6;
}
.prev-card-tags {
  display: flex;
  gap: 5px;
  margin-top: 4px;
}
.prev-mini-tag {
  font-size: 9.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--prev-subtle, rgba(230,57,70,0.15));
  color: var(--prev-a1, #e63946);
  font-weight: 600;
}

.prev-actions {
  display: flex;
  gap: 10px;
}
.prev-btn-primary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  background: linear-gradient(135deg, var(--prev-a1, #e63946) 0%, var(--prev-a2, #ff4d6d) 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: default;
}
.prev-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--prev-border, rgba(255,255,255,0.15));
  background: transparent;
  color: var(--prev-text, #ffffff);
  font-size: 12px;
  font-weight: 600;
  cursor: default;
}

/* Builder Toolbar */
.builder-toolbar {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.builder-input-wrap {
  flex: 1;
  min-width: 220px;
}
.builder-name-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.18s ease;
}
.builder-name-input:focus {
  border-color: var(--accent-primary);
}
.builder-buttons-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Sync banner */
.builder-sync-banner {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.5;
}
.builder-sync-banner--active {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
}
.builder-sync-banner--guest {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}

/* ---- TOGGLE SWITCH ---- */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle__slider {
  position: absolute;
  inset: 0;
  background: var(--bg-card-hover);
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border);
}
.toggle__slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all var(--transition);
}
.toggle input:checked + .toggle__slider { background: var(--accent-primary); border-color: var(--accent-primary); }
.toggle input:checked + .toggle__slider::before { left: calc(100% - 19px); background: white; }

/* ---- CUSTOM CSS EDITOR ---- */
.code-editor {
  width: 100%;
  min-height: 200px;
  background: #0d0d16;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  color: #a78bfa;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  outline: none;
  resize: vertical;
  transition: border-color var(--transition);
}
.code-editor:focus { border-color: var(--accent-primary); }

/* ---- FRANCHISE RELATIONS SECTION ---- */
.relations-section {
  position: relative;
}

.relations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.relation-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.relation-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 15px rgba(139, 92, 246, 0.2);
}

.relation-card__poster-wrap {
  position: relative;
  width: 58px;
  height: 82px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.relation-card__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.relation-card:hover .relation-card__poster {
  transform: scale(1.06);
}

.relation-card__badge-row {
  display: flex;
  align-items: center;
  margin-bottom: 2px;
}

.relation-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 4px;
  color: var(--accent-secondary);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.2px;
}

.relation-card:hover .relation-card__badge {
  background: rgba(139, 92, 246, 0.25);
  border-color: var(--accent-primary);
  color: #fff;
}

.relation-card__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.relation-card__title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.18s ease;
}

.relation-card:hover .relation-card__title {
  color: var(--accent-secondary);
}

.relation-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
}

.relation-card__score {
  font-weight: 600;
  color: var(--warning);
}

/* ---- RESPONSIVE PAGE ---- */
@media (max-width: 900px) {
  .anime-detail__info { padding: 0 20px; flex-direction: column; align-items: flex-start; gap: 16px; }
  .anime-detail__poster-wrap { width: 140px; }
  .anime-detail__poster { width: 140px; }
  .anime-detail__body { grid-template-columns: 1fr; padding: 80px 20px 40px; }
  .hero__content { padding: 0 20px; }
  .catalog-section, .mylist-section, .settings-section { padding: 24px 20px; }
}
@media (max-width: 600px) {
  .anime-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
  .hero { height: 420px; }
  .hero__title { font-size: 22px; }
}

/* ============================================================
   USER NAV & DROPDOWN (Header - Left Aligned)
   ============================================================ */
.user-nav {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.user-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 4px 10px 4px 5px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
}

.user-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.user-btn--logged-in {
  background: var(--accent-subtle);
  border-color: rgba(230, 57, 70, 0.35);
}

.user-btn--logged-in:hover {
  border-color: var(--accent-primary);
}

.user-btn__name {
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12.5px;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  width: 190px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 1000;
  animation: dropIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-dropdown.active {
  display: flex !important;
}

.user-dropdown__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  width: 100%;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
}

.user-dropdown__item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-primary);
}

.user-dropdown__item--danger {
  color: var(--danger);
}

.user-dropdown__item--danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.user-dropdown__divider {
  height: 1px;
  background: var(--border);
  margin: 4px 6px;
}

/* ============================================================
   AUTH MODAL & FORMS (Telegram + Discord)
   ============================================================ */
.av-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 10, 0.82);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.2s ease;
  padding: 20px;
}

.av-modal-backdrop.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.av-modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  transform: translateY(10px) scale(0.98);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.av-modal-backdrop.active .av-modal-card {
  transform: translateY(0) scale(1);
}

.av-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.av-modal-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border-color: var(--danger);
}

.av-auth-header {
  text-align: center;
  margin-bottom: 20px;
}

.av-auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.av-auth-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.av-auth-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.av-auth-tabs {
  display: flex;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 3px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
}

.av-auth-tab-btn {
  flex: 1;
  padding: 7px 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.av-auth-tab-btn.active {
  background: var(--accent-subtle);
  color: var(--accent-primary);
  border: 1px solid rgba(230, 57, 70, 0.25);
}

.av-auth-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 12.5px;
  margin-bottom: 14px;
  text-align: center;
}

.av-form-group {
  margin-bottom: 14px;
}

.av-form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.av-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.av-input-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.av-auth-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px 9px 34px;
  color: var(--text-primary);
  font-size: 13.5px;
  transition: all var(--transition);
}

.av-auth-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-primary);
}

.av-avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
  padding: 6px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.av-avatar-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
}

.av-avatar-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.av-avatar-option.selected {
  border-color: var(--accent-primary);
  background: var(--accent-subtle);
}

.av-avatar-option__name {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 65px;
  text-align: center;
}

.av-auth-submit-btn {
  width: 100%;
  padding: 10px 14px;
  background: var(--accent-primary);
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 6px;
}

.av-auth-submit-btn:hover {
  background: var(--accent-secondary);
}

.av-auth-oauth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.av-auth-oauth-divider::before,
.av-auth-oauth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.av-auth-oauth-divider span {
  padding: 0 10px;
}

.av-auth-oauth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.av-oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.av-oauth-btn:hover {
  border-color: var(--border-hover);
}

.av-oauth-btn--tg:hover {
  background: #229ed9;
  border-color: #229ed9;
  color: #fff;
}

.av-oauth-btn--discord:hover {
  background: #5865f2;
  border-color: #5865f2;
  color: #fff;
}

.av-verify-code-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 8px;
  color: var(--text-primary);
  font-size: 24px;
  letter-spacing: 10px;
  font-family: 'Space Grotesk', monospace;
  font-weight: 700;
  text-align: center;
  transition: all var(--transition);
}

.av-verify-code-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-subtle);
  background: var(--bg-primary);
}


.av-auth-footer-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
}

.av-auth-footer-note a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
}

/* ============================================================
   PROFILE PAGE STYLES (Clean Anime Editorial)
   ============================================================ */
.profile-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.profile-guest-card {
  max-width: 480px;
  margin: 60px auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.profile-guest-icon {
  color: var(--accent-primary);
  margin-bottom: 14px;
  display: flex;
  justify-content: center;
}

.profile-guest-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.profile-guest-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 22px;
}

.profile-guest-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* PROFILE HERO CARD */
.profile-hero-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}

.profile-hero-bg {
  height: 70px;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(230, 57, 70, 0.15) 100%);
  border-bottom: 1px solid var(--border);
}

.profile-hero-content {
  display: flex;
  align-items: flex-end;
  padding: 0 24px 20px;
  margin-top: -38px;
  gap: 20px;
  flex-wrap: wrap;
}

.profile-avatar-wrap {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.profile-avatar-badge-edit {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: var(--accent-primary);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bg-card);
}

.profile-info {
  flex: 1;
  min-width: 240px;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.profile-username {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.profile-role-badge {
  background: var(--accent-subtle);
  border: 1px solid rgba(230, 57, 70, 0.3);
  color: var(--accent-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.profile-bio {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 6px;
}

.profile-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.profile-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.profile-actions {
  display: flex;
  gap: 8px;
  align-self: center;
}

.profile-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.profile-action-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.profile-action-btn--logout {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
}

.profile-action-btn--logout:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: var(--danger);
}

/* STATS GRID */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.profile-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  transition: border-color var(--transition);
}

.profile-stat-card:hover {
  border-color: var(--border-hover);
}

.profile-stat-icon {
  color: var(--accent-primary);
  margin-bottom: 6px;
  display: flex;
  justify-content: center;
}

.profile-stat-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.profile-stat-lbl {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* PROFILE TABS */
.profile-nav-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.profile-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.profile-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.profile-tab-btn.active {
  background: var(--accent-subtle);
  color: var(--accent-primary);
  border-color: rgba(230, 57, 70, 0.3);
}

/* HISTORY GRID */
.profile-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.profile-history-card {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}

.profile-history-card:hover {
  border-color: var(--accent-primary);
}

.profile-history-card__poster {
  width: 90px;
  background-size: cover;
  background-position: center;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.profile-history-card__ep-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  background: rgba(0, 0, 0, 0.85);
  color: var(--accent-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 2px;
}

.profile-history-card__play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transition: opacity var(--transition);
}

.profile-history-card__poster:hover .profile-history-card__play-overlay {
  opacity: 1;
}

.profile-history-card__info {
  flex: 1;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-history-card__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.profile-history-card__title:hover {
  color: var(--accent-primary);
}

.profile-history-card__meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.profile-history-card__progress-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
}

.profile-history-card__progress-fill {
  height: 100%;
  background: var(--accent-primary);
}

.profile-history-card__resume-btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--accent-subtle);
  border: 1px solid rgba(230, 57, 70, 0.3);
  color: var(--accent-primary);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  width: 100%;
}

.profile-history-card__resume-btn:hover {
  background: var(--accent-primary);
  color: #fff;
}

/* LIST IN PROFILE */
.profile-list-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.profile-list-filter-btn {
  padding: 5px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.profile-list-filter-btn.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

.profile-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.profile-list-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition);
}

.profile-list-card:hover {
  border-color: var(--accent-primary);
}

.profile-list-card__poster {
  aspect-ratio: 2/3;
  background-size: cover;
  background-position: center;
  position: relative;
}

.profile-list-card__status-tag {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.85);
}

.profile-list-card__status-tag--watching { color: var(--success); }
.profile-list-card__status-tag--completed { color: var(--accent-primary); }
.profile-list-card__status-tag--planned { color: var(--warning); }
.profile-list-card__status-tag--dropped { color: var(--danger); }

.profile-list-card__body {
  padding: 8px 10px;
}

.profile-list-card__title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.profile-list-card__meta {
  font-size: 11px;
  color: var(--text-muted);
}

.profile-empty-state {
  text-align: center;
  padding: 50px 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.profile-empty-icon {
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
}

.profile-settings-card {
  max-width: 580px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

@media (max-width: 900px) {
  .profile-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .profile-hero-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: -30px;
  }
  .profile-name-row, .profile-meta, .profile-actions {
    justify-content: center;
  }
  .profile-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   FOOTER & LEGAL STYLES
   ============================================================ */
.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
  padding: 40px 24px 32px;
  color: var(--text-muted);
  font-size: 12.5px;
}

.site-footer__inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.site-footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-footer__age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--accent-primary);
  color: var(--accent-primary);
  font-family: 'Space Grotesk', monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.site-footer__links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer__link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  transition: color var(--transition);
}

.site-footer__link:hover {
  color: var(--accent-primary);
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.site-footer__disclaimer {
  max-width: 780px;
}

/* ---- COOKIE BANNER ---- */
.av-cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  padding: 14px 18px;
  z-index: 9999;
  animation: slideUpCookie 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.av-cookie-banner.fade-out {
  opacity: 0;
  transform: translateY(12px);
}

@keyframes slideUpCookie {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.av-cookie-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.av-cookie-banner__text {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  flex: 1;
  min-width: 240px;
}

.av-cookie-banner__text a {
  color: var(--accent-primary);
  text-decoration: underline;
}

/* ---- LEGAL PAGES STYLES ---- */
.legal-page-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.legal-page-header {
  margin-bottom: 24px;
}

.legal-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  text-decoration: none;
  transition: color var(--transition);
}

.legal-back-link:hover {
  color: var(--accent-primary);
}

.legal-page-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.legal-page-updated {
  font-size: 12px;
  color: var(--text-muted);
}

.legal-page-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 36px;
  box-shadow: var(--shadow-card);
  line-height: 1.7;
  color: var(--text-secondary);
  font-size: 14px;
}

.legal-section {
  margin-bottom: 28px;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  font-family: 'Space Grotesk', sans-serif;
}

.legal-section p {
  margin-bottom: 10px;
}

.legal-section ul {
  padding-left: 20px;
  margin-bottom: 10px;
}

.legal-section li {
  margin-bottom: 6px;
}

.legal-alert-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: rgba(230, 57, 70, 0.08);
  border: 1px solid rgba(230, 57, 70, 0.25);
  border-radius: var(--radius);
  margin-bottom: 24px;
  color: var(--text-primary);
  font-size: 13.5px;
}

.legal-email-placeholder {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px dashed var(--border-hover);
  color: var(--accent-primary);
  font-family: monospace;
}

/* ---- SITEMAP STYLES ---- */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.sitemap-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  font-family: 'Space Grotesk', sans-serif;
}

.sitemap-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sitemap-list a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  transition: color var(--transition);
}

.sitemap-list a:hover {
  color: var(--accent-primary);
}

.sitemap-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sitemap-tag {
  display: inline-block;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  text-decoration: none;
  transition: all var(--transition);
}

.sitemap-tag:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--accent-subtle);
}

/* Reg disclaimer note */
.av-auth-reg-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
  line-height: 1.45;
}

.av-auth-reg-disclaimer a {
  color: var(--text-secondary);
  text-decoration: underline;
}

.av-auth-reg-disclaimer a:hover {
  color: var(--accent-primary);
}
/* Custom Avatar Upload Dropzone */
.avatar-upload-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-secondary);
  transition: all var(--transition);
  margin-bottom: 8px;
}

.avatar-upload-dropzone:hover {
  border-color: var(--accent-primary);
  background: var(--accent-subtle);
}

.avatar-upload-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  color: var(--accent-primary);
  transition: transform var(--transition);
}

.avatar-upload-dropzone:hover .avatar-upload-icon {
  transform: scale(1.08);
}
