/* ========================================
   COPELLA SIDEBAR - МИНИМАЛИСТИЧНАЯ ВЕРСИЯ 2.0
   Простой, быстрый, без излишеств
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@600;700;800&display=swap');

@font-face {
    font-family: 'Gilroy-SemiBold';
    src: url('https://copella.live/assets/fonts/Gilroy-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gilroy-Bold';
    src: url('https://copella.live/assets/fonts/Gilroy-Bold.woff') format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* === ПЕРЕМЕННЫЕ === */
:root {
  --cp-sb-w: 240px;
  --cp-sb-mini-w: 67px;
  --cp-sb-bg: #0f0f0f;
  --cp-sb-fg: #f8f8f8;
  --cp-sb-fg-dim: rgba(248, 248, 248, 0.6);
  --cp-sb-border: rgba(255, 255, 255, 0.08);
  --cp-sb-hover: rgba(255, 255, 255, 0.04);
  --cp-sb-active: rgba(255, 255, 255, 0.08);
  --cp-sb-accent: #00c853;
  --cp-transition: 0.2s ease;
}

/* === ОСНОВНОЙ КОНТЕЙНЕР === */
.cp-sb {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--cp-sb-mini-w);
  background: var(--cp-sb-bg);
  border-right: 1px solid var(--cp-sb-border);
  z-index: 1000;
  transition: width var(--cp-transition);
  display: flex;
  font-family: 'Gilroy-SemiBold', 'Unbounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  font-feature-settings: 'liga' 1, 'kern' 1;
}

/* Учитываем WordPress Admin Bar (стандартную) */
.admin-bar .cp-sb {
  top: 32px;
  height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
  .admin-bar .cp-sb {
    top: 46px;
    height: calc(100vh - 46px);
  }
}

/* Учитываем Copella Admin Bar */
body:has(.cp-admin-bar) .cp-sb {
  top: 32px;
  height: calc(100vh - 32px);
}

.cp-sb[data-mode="full"] {
  width: var(--cp-sb-w);
}

/* === RAIL === */
.cp-sb__rail {
  position: relative;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 12px 0;
}

/* === НАВИГАЦИЯ === */
.cp-sb__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 8px;
}

/* === ЭЛЕМЕНТЫ === */
.cp-sb__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  color: var(--cp-sb-fg);
  text-decoration: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background var(--cp-transition);
}

.cp-sb__item:hover {
  background: var(--cp-sb-hover);
  text-decoration: none;
}

.cp-sb__item:active {
  background: var(--cp-sb-active);
}

/* === ИКОНКИ === */
.cp-sb__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cp-sb__icon svg,
.cp-sb__icon img {
  width: 24px;
  height: 24px;
  display: block;
}

/* === ЛЕЙБЛЫ === */
.cp-sb__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  max-width: 0;
  transition: opacity var(--cp-transition), max-width var(--cp-transition);
}

.cp-sb[data-mode="full"] .cp-sb__label {
  opacity: 1;
  max-width: 180px;
}

/* === КНОПКА ДОНАТА === */
.cp-sb__donate {
  background: linear-gradient(135deg, var(--cp-sb-accent) 0%, #00e676 100%);
  color: #000;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 200, 83, 0.3);
}

.cp-sb__donate:hover {
  background: linear-gradient(135deg, #00d65d 0%, #27ee8a 100%);
}

.cp-sb__donate .cp-sb__icon {
  color: #000;
}

.cp-sb__donate .cp-sb__label {
  color: #000;
}

/* === ПОДПИСКИ === */
.cp-sb__followed {
  margin-top: auto;
  padding: 12px 8px;
  border-top: 1px solid var(--cp-sb-border);
}

.cp-sb__followed-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--cp-sb-fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-family: 'Gilroy-SemiBold', 'Unbounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  padding: 0 12px;
  margin-bottom: 8px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity var(--cp-transition), max-height var(--cp-transition);
}

.cp-sb[data-mode="full"] .cp-sb__followed-title {
  opacity: 1;
  max-height: 30px;
}

.cp-sb__followed-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cp-sb__followed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  color: var(--cp-sb-fg);
  text-decoration: none;
  border-radius: 10px;
  transition: background var(--cp-transition);
}

.cp-sb__followed-item:hover {
  background: var(--cp-sb-hover);
  text-decoration: none;
}

.cp-sb__followed-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  transition: width var(--cp-transition), height var(--cp-transition);
}

/* Уменьшаем аватарки в мини-режиме */
.cp-sb[data-mode="mini"] .cp-sb__followed-avatar {
  width: 28px;
  height: 28px;
}

.cp-sb__followed-avatar--placeholder {
  background: var(--cp-sb-active);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  transition: font-size var(--cp-transition);
}

/* Уменьшаем шрифт в placeholder подписок в мини-режиме */
.cp-sb[data-mode="mini"] .cp-sb__followed-avatar--placeholder {
  font-size: 12px;
}

.cp-sb__followed-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  max-width: 0;
  transition: opacity var(--cp-transition), max-width var(--cp-transition);
}

.cp-sb[data-mode="full"] .cp-sb__followed-label {
  opacity: 1;
  max-width: 140px;
}

/* === DESKTOP ОТСТУПЫ === */
@media (min-width: 769px) {
  body {
    padding-left: var(--cp-sb-mini-w);
    transition: padding-left var(--cp-transition);
  }

  body.cp-sb-full {
    padding-left: var(--cp-sb-w);
  }
}

/* === КНОПКА РАСКРЫТИЯ (TOGGLE) === */
.cp-sb__toggle-btn {
  position: absolute;
  top: 12px;
  right: -20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--cp-sb-border);
  background: var(--cp-sb-bg);
  color: var(--cp-sb-fg-dim);
  cursor: pointer;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all var(--cp-transition);
  z-index: 1001;
}

.cp-sb__toggle-btn:hover {
  background: var(--cp-sb-hover);
  color: var(--cp-sb-fg);
  border-color: var(--cp-sb-fg-dim);
}

.cp-sb__toggle-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.cp-sb[data-mode="full"] .cp-sb__toggle-btn svg {
  transform: rotate(180deg);
}

/* Скрыть на мобильных */
@media (max-width: 768px) {
  .cp-sb__toggle-btn {
    display: none !important;
  }
}

/* === ПРОФИЛЬ === */
.cp-sb__profile {
  margin-top: auto;
  padding: 12px 8px;
  border-top: 1px solid var(--cp-sb-border);
}

.cp-sb__profile-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 10px;
  transition: background var(--cp-transition);
  cursor: pointer;
}

.cp-sb__profile-user:hover {
  background: var(--cp-sb-hover);
}

.cp-sb__profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  transition: width var(--cp-transition), height var(--cp-transition);
}

/* Уменьшаем аватарку профиля в мини-режиме */
.cp-sb[data-mode="mini"] .cp-sb__profile-avatar {
  width: 32px;
  height: 32px;
}

.cp-sb__profile-avatar--placeholder {
  background: var(--cp-sb-active);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--cp-sb-fg);
  transition: font-size var(--cp-transition);
}

/* Уменьшаем шрифт в placeholder в мини-режиме */
.cp-sb[data-mode="mini"] .cp-sb__profile-avatar--placeholder {
  font-size: 14px;
}

.cp-sb__profile-info {
  flex: 1;
  min-width: 0;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: opacity var(--cp-transition), max-width var(--cp-transition);
}

.cp-sb[data-mode="full"] .cp-sb__profile-info {
  opacity: 1;
  max-width: 160px;
}

.cp-sb__profile-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--cp-sb-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.cp-sb__profile-logout {
  font-size: 12px;
  font-weight: 500;
  color: var(--cp-sb-fg-dim);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color var(--cp-transition);
}

.cp-sb__profile-logout:hover {
  color: #ff3b30;
}

/* === OVERLAY ДЛЯ МОБИЛЬНОГО === */
.cp-sb__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--cp-transition), visibility var(--cp-transition);
  pointer-events: none;
}

.cp-sb.is-open ~ .cp-sb__overlay,
body.cp-sb-mobile-open .cp-sb__overlay {
  opacity: 1;
  visibility: visible;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

/* === MOBILE === */
@media (max-width: 768px) {
  .cp-sb {
    width: 280px;
    height: 100vh;
    height: 100svh;
    transform: translateX(-100%);
    transition: transform var(--cp-transition);
  }

  .cp-sb.is-open {
    transform: translateX(0);
  }

  .cp-sb__rail {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* Показываем лейблы на мобильных */
  .cp-sb.is-open .cp-sb__label {
    opacity: 1;
    max-width: 180px;
  }

  .cp-sb.is-open .cp-sb__followed-title {
    opacity: 1;
    max-height: 30px;
  }

  .cp-sb.is-open .cp-sb__followed-label {
    opacity: 1;
    max-width: 140px;
  }

  /* Показываем профиль на мобильных */
  .cp-sb.is-open .cp-sb__profile-info {
    opacity: 1;
    max-width: 160px;
  }

  body {
    padding-left: 0 !important;
  }
}

/* ========================================
   COPELLA HEADER - МИНИМАЛИСТИЧНАЯ ВЕРСИЯ 2.0
   ======================================== */

/* === ПЕРЕМЕННЫЕ === */
:root {
  --cp-header-h: 60px;
  --cp-header-bg: #0f0f0f;
  --cp-header-fg: #f8f8f8;
  --cp-header-fg-dim: #b8b8b8;
  --cp-header-border: rgba(255, 255, 255, 0.08);
  --cp-header-hover: rgba(255, 255, 255, 0.04);
  --cp-header-active: rgba(255, 255, 255, 0.08);
  --cp-header-transition: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Поддержка safe area для iOS/Android */
@supports (padding: max(0px)) {
  :root {
    --cp-header-safe-left: max(env(safe-area-inset-left), 12px);
    --cp-header-safe-right: max(env(safe-area-inset-right), 12px);
  }
}

@supports not (padding: max(0px)) {
  :root {
    --cp-header-safe-left: 12px;
    --cp-header-safe-right: 12px;
  }
}

/* === ОСНОВНОЙ КОНТЕЙНЕР === */
.cp-header {
  position: fixed;
  top: 0;
  left: var(--cp-sb-mini-w);
  right: 0;
  height: var(--cp-header-h);
  background: var(--cp-header-bg);
  border-bottom: 1px solid var(--cp-header-border);
  z-index: 999;
  transition: left var(--cp-transition);
  font-family: 'Gilroy-SemiBold', 'Unbounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  font-feature-settings: 'liga' 1, 'kern' 1;
}

/* Учитываем WordPress Admin Bar (стандартную) */
.admin-bar .cp-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .cp-header {
    top: 46px;
  }
}

/* Учитываем Copella Admin Bar */
body:has(.cp-admin-bar) .cp-header {
  top: 32px;
}

body.cp-sb-full .cp-header {
  left: var(--cp-sb-w);
}

.cp-header__container {
  height: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 0 clamp(20px, 4vw, 40px);
  max-width: 1920px;
  margin: 0 auto;
}

/* === LOGO === */
.cp-header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  justify-self: start;
}

.cp-header__logo img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

/* === UPLOAD BUTTON === */
.cp-header__upload-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: var(--cp-header-fg);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  transition: all var(--cp-transition);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  font-family: 'Gilroy-SemiBold', 'Unbounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
}

.cp-header__upload-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.2);
}

.cp-header__upload-btn:active {
  background: rgba(255, 255, 255, 0.08);
}

.cp-header__upload-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.cp-header__upload-label {
  display: none;
}

@media (min-width: 1024px) {
  .cp-header__upload-label {
    display: inline;
  }
}

/* === ACTIONS (RIGHT SECTION) === */
.cp-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
}

/* === BURGER (MOBILE ONLY) === */
.cp-header__burger {
  width: 40px;
  height: 40px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--cp-header-fg);
  cursor: pointer;
  padding: 0;
  transition: background var(--cp-transition);
  justify-self: start;
}

.cp-header__burger:hover {
  background: var(--cp-header-hover);
}

.cp-header__burger:active {
  background: var(--cp-header-active);
}

.cp-header__burger-line {
  width: 18px;
  height: 2px;
  background: var(--cp-header-fg);
  border-radius: 1px;
  transition: transform var(--cp-transition), opacity var(--cp-transition);
}

.cp-header__burger.is-open .cp-header__burger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.cp-header__burger.is-open .cp-header__burger-line:nth-child(2) {
  opacity: 0;
}

.cp-header__burger.is-open .cp-header__burger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* === MOBILE SEARCH TOGGLE === */
.cp-header__search-toggle {
  width: 40px;
  height: 40px;
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--cp-header-fg);
  cursor: pointer;
  transition: background var(--cp-transition);
}

.cp-header__search-toggle:hover {
  background: var(--cp-header-hover);
}

.cp-header__search-toggle:active {
  background: var(--cp-header-active);
}

/* === ПОИСК (DESKTOP) === */
.cp-header__search {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  font-family: 'Gilroy-SemiBold', 'Unbounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  justify-self: center;
  width: 100%;
  max-width: 600px;
}

@media (min-width: 769px) {
  .cp-header__search {
    display: flex;
  }
}

.cp-header__search-label {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cp-header-fg);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  display: none;
}

.cp-header__search-input {
  flex: 1;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(16, 16, 16, 0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--cp-header-fg);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 0 18px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.cp-header__search-input:focus {
  border-color: rgba(255, 101, 58, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 101, 58, 0.15);
  background: rgba(18, 18, 18, 0.75);
}

.cp-header__search-input::placeholder {
  color: rgba(248, 248, 248, 0.4);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.cp-header__search-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff7a45 0%, #ff653a 100%);
  color: #0f0f0f;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 12px 24px rgba(255, 101, 58, 0.28);
}

.cp-header__search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(255, 101, 58, 0.32);
  filter: brightness(1.02);
}

.cp-header__search-btn:active {
  transform: translateY(0);
  box-shadow: 0 10px 20px rgba(255, 101, 58, 0.28);
  filter: brightness(0.96);
}

.cp-header__search-btn svg {
  width: 20px;
  height: 20px;
  color: inherit;
}

/* === BELL === */
.cp-header__bell {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--cp-header-fg);
  cursor: pointer;
  position: relative;
  transition: background var(--cp-transition);
}

.cp-header__bell:hover {
  background: var(--cp-header-hover);
}

.cp-header__bell:active {
  background: var(--cp-header-active);
}

.cp-header__bell-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ff3b30;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 9px;
  border: 2px solid var(--cp-header-bg);
  line-height: 1;
}

/* === BELL PANEL === */
.cp-bell-panel {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.3s;
}

.cp-bell-panel.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 769px) {
  .cp-bell-panel {
    position: fixed;
    top: calc(var(--cp-header-h) + 16px);
    right: 24px;
    left: auto;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: auto;
    max-height: 680px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.8);
    inset: auto 24px auto auto;
    transform-origin: top right;
    transform: scale(0.96) translateY(-8px);
    background: rgba(18, 18, 18, 0.85);
  }

  .cp-bell-panel.is-open {
    transform: scale(1) translateY(0);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
}

.cp-bell-panel__header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.01);
}

.cp-bell-panel__title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  color: #fff;
  margin: 0;
  font-family: 'Unbounded', 'Gilroy-Bold', sans-serif;
}

.cp-bell-panel__close-btn {
  display: none;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  border-radius: 50%;
  transition: all var(--cp-transition);
  flex-shrink: 0;
}

.cp-bell-panel__close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.cp-bell-panel__close-btn svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 768px) {
  .cp-bell-panel__close-btn {
    display: flex;
  }
}

.cp-bell-panel__list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cp-bell-panel__loading,
.cp-bell-panel__empty {
  padding: 100px 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Gilroy-SemiBold', sans-serif;
}

/* === NOTIFICATION ITEM === */
.cp-notification {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  position: relative;
  margin-bottom: 2px;
  opacity: 0.7; /* По умолчанию немного прозрачные */
}

.cp-notification:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
  transform: translateX(4px);
  opacity: 1;
}

.cp-notification:active {
  transform: translateX(2px) scale(0.99);
  background: rgba(255, 255, 255, 0.06);
}

/* Непрочитанные уведомления просто ярче, без точек и цветов */
.cp-notification--unread {
  opacity: 1;
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.04);
}

.cp-notification--unread:before {
  display: none; /* Убираем оранжевую точку */
}

.cp-notification--unread:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cp-notification__avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
}

.cp-notification__avatar--placeholder {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cp-notification__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  padding-right: 12px;
}

.cp-notification__author {
  font-size: 14px;
  font-weight: 700;
  text-transform: none;
  color: #fff;
  font-family: 'Unbounded', 'Gilroy-Bold', sans-serif;
  margin-bottom: 2px;
}

.cp-notification__message {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: 'Gilroy-SemiBold', sans-serif;
}

.cp-notification__time {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 600;
  margin-top: 4px;
  font-family: 'Gilroy-SemiBold', sans-serif;
}

.cp-notification__badge {
  display: none;
}

.cp-notification:hover .cp-notification__author {
  color: #fff; /* Убираем цвет при ховере */
  transition: color 0.2s ease;
}

/* === SCROLLBAR === */
.cp-bell-panel__list::-webkit-scrollbar {
  width: 4px;
}

.cp-bell-panel__list::-webkit-scrollbar-track {
  background: transparent;
}

.cp-bell-panel__list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.cp-bell-panel__list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* === LOGIN BUTTON === */
.cp-header__login {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--cp-header-fg);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--cp-transition);
}

.cp-header__login:hover {
  background: var(--cp-header-hover);
  text-decoration: none;
}

.cp-header__login:active {
  background: var(--cp-header-active);
}

/* === MOBILE SEARCH MODAL === */
.cp-search-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.4s;
  background: #0a0a0a;
}

@media (max-width: 768px) {
  .cp-search-modal {
    top: var(--cp-header-h);
    left: 0;
    right: 0;
    height: var(--cp-header-h);
    bottom: auto;
  }
}

.cp-search-modal.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cp-search-modal__header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: transparent;
  padding: max(env(safe-area-inset-top), 12px) 16px 12px 16px;
}

.cp-search-modal__form {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.cp-search-modal__input {
  flex: 1;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: rgba(15, 15, 15, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #f8f8f8;
  font-size: 17px;
  font-weight: 600;
  padding: 0 18px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.2s ease, background 0.2s ease;
  font-family: 'Gilroy-SemiBold', 'Unbounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
}

.cp-search-modal__input:focus {
  background: rgba(16, 16, 16, 0.8);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.cp-search-modal__input::placeholder {
  color: rgba(248, 248, 248, 0.35);
  font-weight: 600;
}

.cp-search-modal__close {
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: rgba(15, 15, 15, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #f8f8f8;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cp-search-modal__close:active {
  background: rgba(20, 20, 20, 0.8);
  transform: scale(0.95);
}

.cp-search-modal__close svg {
  width: 20px;
  height: 20px;
}

.cp-search-modal__content {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 0 max(env(safe-area-inset-bottom), 88px) 0;
  position: relative;
  scroll-behavior: smooth;
}

@media (max-width: 768px) {
  .cp-search-modal__content {
    display: none;
  }
}

.cp-search-modal__section-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.62);
  text-transform: uppercase;
  letter-spacing: 1.05px;
  margin: 0 0 16px 0;
  padding: 0 16px;
  font-family: 'Gilroy-SemiBold', 'Unbounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
}

.cp-search-modal__videos {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 220px;
  grid-template-rows: repeat(3, auto);
  gap: 18px 14px;
  padding: 0;
  width: max-content;
  min-height: min-content;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.cp-search-modal__videos.is-loaded {
  opacity: 1;
  transform: translateY(0);
}

.cp-search-modal__videos-wrapper {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 16px 4px 16px;
  margin-bottom: 24px;
  scrollbar-width: none;
}

.cp-search-modal__videos-wrapper::-webkit-scrollbar {
  display: none;
}

.cp-video-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  animation: videoFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transition: transform 0.2s ease;
  width: 220px;
  min-height: 210px;
  flex-shrink: 0;
}

.cp-video-card:hover {
  transform: translateY(-4px);
}

.cp-video-card:active {
  transform: translateY(-2px);
}

@keyframes videoFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.cp-video-card:nth-child(1) { animation-delay: 0.05s; }
.cp-video-card:nth-child(2) { animation-delay: 0.1s; }
.cp-video-card:nth-child(3) { animation-delay: 0.15s; }
.cp-video-card:nth-child(4) { animation-delay: 0.2s; }
.cp-video-card:nth-child(5) { animation-delay: 0.25s; }
.cp-video-card:nth-child(6) { animation-delay: 0.3s; }
.cp-video-card:nth-child(n+7) { animation-delay: 0.35s; }

.cp-video-card__thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cp-video-card__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.cp-video-card:hover .cp-video-card__thumbnail img {
  transform: scale(1.04);
}

.cp-video-card__thumbnail-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cp-video-card__info {
  padding: 0;
}

.cp-video-card__title {
  font-size: 14px;
  font-weight: 500;
  font-family: 'Gilroy-SemiBold', 'Unbounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.45;
  margin: 0 0 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cp-video-card:hover .cp-video-card__title {
  color: #fff;
}

.cp-video-card__author {
  font-size: 13px;
  font-weight: 500;
  font-family: 'Gilroy-SemiBold', 'Unbounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.4;
  margin: 0 0 4px 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-video-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  font-family: 'Gilroy-SemiBold', 'Unbounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
}

.cp-video-card__views {
  color: rgba(255, 255, 255, 0.5);
}

.cp-video-card__separator {
  color: rgba(255, 255, 255, 0.35);
  font-size: 10px;
}

.cp-video-card__date {
  color: rgba(255, 255, 255, 0.5);
}

.cp-search-modal__loading,
.cp-search-modal__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: rgba(248, 248, 248, 0.5);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  font-family: 'Gilroy-SemiBold', 'Unbounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
}

.cp-search-modal__loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.cp-search-modal__videos-wrapper::-webkit-scrollbar {
  display: none;
}

.cp-search-modal__content::-webkit-scrollbar {
  width: 4px;
}

.cp-search-modal__content::-webkit-scrollbar-track {
  background: transparent;
}

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

.cp-search-modal__content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.cp-search-modal__videos-wrapper {
  scrollbar-width: none;
}

.cp-search-modal__scroll-hint {
  position: absolute;
  top: -6px;
  right: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(14, 14, 14, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  animation: hintAppear 0.5s ease-out 0.6s forwards;
}

.cp-search-modal__scroll-hint.is-hidden {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cp-search-modal__scroll-hint-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.cp-search-modal__scroll-hint-icon svg {
  width: 18px;
  height: 18px;
  animation: hintSlideRight 1.5s ease-in-out infinite;
}

.cp-search-modal__scroll-hint-text {
  display: block;
  white-space: nowrap;
}

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

@keyframes hintSlideRight {
  0% {
    transform: translateX(-6px);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  60% {
    transform: translateX(6px);
    opacity: 1;
  }
  100% {
    transform: translateX(10px);
    opacity: 0;
  }
}

@media (min-width: 769px) {
  .cp-search-modal {
    display: none !important;
  }
}

@media (max-width: 360px) {
  .cp-search-modal__videos {
    grid-auto-columns: 180px;
    grid-template-rows: repeat(4, auto);
    gap: 16px 12px;
  }

  .cp-video-card {
    width: 180px;
  }

  .cp-video-card__title {
    font-size: 13px;
  }

  .cp-video-card__author {
    font-size: 12px;
  }

  .cp-video-card__meta {
    font-size: 11px;
  }
}

/* === MOBILE === */
@media (max-width: 768px) {
  .cp-header {
    left: 0;
    /* Учитываем динамическую высоту viewport в Chrome */
    position: fixed;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  body.cp-sb-full .cp-header {
    left: 0;
  }

  body {
    padding-top: var(--cp-header-h);
    /* Используем dvh для поддержки динамической высоты в Chrome */
    min-height: 100vh;
    min-height: 100svh; /* Small viewport height - с учетом панели Chrome */
  }

  .cp-header__container {
    grid-template-columns: auto auto 1fr auto;
    gap: 8px;
    padding: 0 var(--cp-header-safe-right, 16px) 0 var(--cp-header-safe-left, 12px);
  }

  /* Логотип слева после бургера */
  .cp-header__logo {
    position: relative;
    left: 0;
    transform: none;
    z-index: 1;
    pointer-events: auto;
  }

  .cp-header__logo img {
    height: 28px;
  }

  /* Скрываем desktopный поиск на мобильных */
  .cp-header__search {
    display: none !important;
  }

  /* Показываем бургер на мобильных */
  .cp-header__burger {
    display: flex;
    justify-self: start;
    z-index: 2;
  }

  /* Показываем кнопку поиска на мобильных */
  .cp-header__search-toggle {
    display: flex;
  }

  /* Actions справа - прижаты к правому краю */
  .cp-header__actions {
    gap: 4px;
    z-index: 2;
    justify-self: end;
    margin-left: auto;
  }

  /* Скрываем текст "Войти" на мобильных */
  .cp-header__login svg + * {
    display: none;
  }

  .cp-header__login {
    width: 40px;
    height: 40px;
    padding: 8px;
    justify-content: center;
  }

  /* Bell меньше на мобильных */
  .cp-header__bell {
    width: 40px;
    height: 40px;
  }
}

/* === BODY PADDING === */
body {
  padding-top: var(--cp-header-h);
}

/* Дополнительный отступ для WordPress Admin Bar (стандартной) */
.admin-bar body {
  padding-top: calc(var(--cp-header-h) + 32px);
}

@media screen and (max-width: 782px) {
  .admin-bar body {
    padding-top: calc(var(--cp-header-h) + 46px);
  }
}

/* Дополнительный отступ для Copella Admin Bar */
body:has(.cp-admin-bar) {
  padding-top: calc(var(--cp-header-h) + 32px) !important;
}

/* === ACCESSIBILITY === */
*:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
