/* ===== CSS TOKENS & DESIGN SYSTEM ===== */
:root {
  /* Colors */
  --header-bg: #0E0E12;
  --text-primary: #FFFFFF;
  --text-secondary: #B9BBC6;
  --accent: #FF0054;
  --accent-hover: #FF3366;
  
  /* Spacing Scale (8px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  
  /* Layout */
  --container-max: 1536px;
  --header-height: 92px;
}

/* ===== HEADER LAYOUT ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(180deg, #1f0e15, #510d28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color var(--transition-base);
  overflow: visible;
  border-radius: 0px 0px 18px 18px;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.main-content {
  padding-top: var(--header-height);
}

body {
  padding-top: var(--header-height);
}

/* Убираем возможные конфликтующие overflow у родителей */
body, html {
  overflow-x: hidden;
  overflow-y: auto;
}

.header.scrolled {
  /* background: linear-gradient(180deg,rgba(77,64,39,.3),rgba(78,66,40,.8)); */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.header__container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  height: var(--header-height);
  overflow: visible;
  display: flex;
  align-items: center;
}

.header__content {
  display: flex;
  align-items: center;
  height: 100%;
  gap: var(--space-6);
  min-width: 0;
  overflow: visible;
  width: 100%;
}

/* ===== LEFT BLOCK (LOGO + ICONS) ===== */
.header__left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
  min-width: 0;
}

/* ===== НАВИГАЦИЯ ===== */
.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header__nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: all var(--transition-base);
  position: relative;
}

.header__nav-link:hover {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.header__nav-link--active {
  color: var(--color-primary);
  background: rgba(255, 0, 84, 0.1);
}

.header__nav-link--active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
}

.header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
  transition: transform var(--transition-fast);
}

.header__logo:hover {
  transform: scale(1.02);
}

.header__logo:focus {
  outline: none;
}

.header__logo-image {
  height: 50px;
  width: auto;
  max-width: 250px;
  object-fit: contain;
  flex-shrink: 1;
}

.header__icons {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.header__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
}

.header__icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  position: relative;
  z-index: 1;
}

.header__icon:hover {
  color: var(--text-primary);
}

.header__icon:focus {
  outline: none;
}

.header__icon--twitch {
  background: rgb(145 70 255 / 30%);
  /* border-color: rgba(145, 70, 255, 0.3); */
  /* color: #9146ff; */
}

.header__icon--twitch:hover {
  background: rgba(145, 70, 255, 0.3);
  border-color: rgba(145, 70, 255, 0.5);
  /* color: #a855f7; */
}

.header__icon--youtube {
  background: rgb(255 0 0 / 30%);
  /* border-color: rgba(255, 0, 0, 0.3); */
  color: #ffffff;
}

.header__icon--youtube:hover {
  background: rgba(255, 0, 0, 0.3);
  border-color: rgba(255, 0, 0, 0.5);
  color: #ffffff;
}

.header__icon--telegram {
  background: rgb(0 123 255 / 30%);
  /* border-color: rgba(255, 0, 0, 0.3); */
  color: #ffffff;
}

.header__icon--telegram:hover {
  background: #0080ff4d;
  border-color: rgb(0 123 255 / 50%);
  color: #ffffff;
}

/* ===== SPACER ===== */
.header__spacer {
  flex: 1;
  min-width: var(--space-4);
}

/* ===== RIGHT BLOCK (NOTIFICATIONS + BALANCE + PROFILE) ===== */
.header__right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
  min-width: 0;
  overflow: visible;
}

/* ===== NOTIFICATIONS ===== */
.header__notifications {
  position: relative;
  overflow: visible;
  z-index: 1000;
}

.header__notification-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
}

.header__notification-btn:hover {
  background: rgba(255, 0, 84, 0.1);
  border-color: rgba(255, 0, 84, 0.2);
  color: var(--accent);
}

.header__notification-btn:focus {
  outline: none;
}

.header__notification-btn svg {
  width: 23px;
  height: 26px;
  fill: currentColor;
}

.header__notification-badge {
  position: absolute;
  width: 28px;
  height: 28px;
  background: #ff2962;
  top: 0;
  right: -8px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--header-bg);
}

/* ===== Notifications dropdown ===== */
.notif-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 360px;
  max-height: 420px;
  background: rgba(20,20,26,0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  z-index: 100000;
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.notif-title { font-weight: var(--font-weight-semibold); color: var(--text-primary); }
.notif-mark-all {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.16);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
}
.notif-mark-all:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.32); }

.notif-list {
  max-height: 320px;
  overflow: auto;
}
.notif-empty {
  color: var(--text-secondary);
  padding: var(--space-6) var(--space-4);
  text-align: center;
}
.notif-item {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.notif-item.is-read { opacity: 0.7; }
.ni-main { display:flex; align-items:center; justify-content: space-between; gap: 8px; }
.ni-title { color: var(--text-primary); font-weight: var(--font-weight-medium); }
.ni-time { color: var(--text-secondary); font-size: 12px; }
.ni-body { color: var(--text-secondary); margin-top: 6px; white-space: pre-line; }
.ni-mark {
  margin-top: 8px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.16);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
}
.ni-mark:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.32); }

.notif-footer {
  padding: var(--space-2) var(--space-4);
  background: rgba(255,255,255,0.02);
}
.notif-more { color: var(--text-secondary); text-decoration: none; }
.notif-more:hover { color: var(--text-primary); }

/* ===== SOUND CONTROL ===== */
.header__sound {
  position: relative;
  overflow: visible;
  z-index: 1000;
}

.header__sound-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
}

.header__sound-btn:hover {
  background: rgba(255, 0, 84, 0.1);
  border-color: rgba(255, 0, 84, 0.2);
  color: var(--accent);
}

.header__sound-btn:focus {
  outline: none;
}

.header__sound-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* ===== Sound dropdown ===== */
.sound-dropdown {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 8px);
  width: 50px; /* Ширина как у иконки */
  height: 140px; /* Увеличенный тултип для шкалы 100px */
  background: rgba(20,20,26,0.8);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  z-index: 100000;
}

.sound-header {
  display: none;
}

.sound-controls {
  padding: var(--space-3);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sound-slider-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  position: relative;
}

.sound-slider {
  width: 8px;
  height: 100px; /* Высота шкалы 100px */
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  outline: none !important;
  border: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  cursor: pointer;
  writing-mode: bt-lr; /* Вертикальная ориентация */
  -webkit-appearance: slider-vertical !important;
  position: relative;
  
  /* Агрессивно убираем все браузерные стили */
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: #FF0054 !important;
  accent-color: #FF0054 !important;
}

/* Убираем все браузерные стили для трека */
.sound-slider::-webkit-slider-track {
  background: transparent;
  border: none;
}

.sound-slider::-moz-range-track {
  background: transparent;
  border: none;
}

/* Заливка полоски от 0 до позиции кружочка */
.sound-slider::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--fill-height, 0%);
  background: var(--accent);
  border-radius: 4px;
  transition: height 0.1s ease;
}

.sound-slider::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 16px !important;
  height: 16px !important;
  background: #FF0054 !important; /* Принудительно розовый */
  background-color: #FF0054 !important;
  border: 0 !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  transition: all var(--transition-base);
  box-shadow: none !important;
  outline: none !important;
  margin: 0 !important;
  padding: 0 !important;
  
  /* Дополнительные стили для перекрытия браузерных */
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important;
  filter: none !important;
  -webkit-filter: none !important;
}

.sound-slider::-webkit-slider-thumb:hover {
  background: #FF3366 !important; /* Светло-розовый при наведении */
  transform: scale(1.1);
}

.sound-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #FF0054 !important; /* Принудительно розовый для Firefox */
  border-radius: 50% !important;
  border: none !important;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: none !important;
  outline: none !important;
}

.sound-slider::-moz-range-thumb:hover {
  background: #FF3366 !important; /* Светло-розовый при наведении для Firefox */
  transform: scale(1.1);
}

.sound-value {
  display: none; /* Убираем текст с процентами */
}

/* ===== BALANCE ===== */
.header__balance {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  background: rgb(255 255 255 / 4%);
  /* border: 1px solid rgba(255, 255, 255, 0.08); */
  border-radius: var(--radius-md);
  min-height: 50px;
  min-width: 120px; /* Фиксируем минимальную ширину */
  flex-shrink: 0; /* Предотвращаем сжатие */
}

.header__balance-content {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.header__balance-amount {
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  font-size: var(--font-size-base);
  min-width: 80px; /* Фиксируем минимальную ширину для текста */
  text-align: right; /* Выравниваем по правому краю */
  font-variant-numeric: tabular-nums; /* Моноширинные цифры */
  white-space: nowrap; /* Предотвращаем перенос */
}

.header__balance-coin {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* ===== TOP UP BUTTON ===== */
.header__topup {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  flex-shrink: 0;
}

.header__topup:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, #FF4D7A 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.header__topup:focus {
  outline: none;
}

.header__topup:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.header__topup svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* ===== PROFILE ===== */
.header__profile {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-1);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition-base);
  min-height: 44px;
}

.header__profile:hover {
  background: rgba(255, 255, 255, 0.05);
}

.header__profile:focus {
  outline: none;
}

.header__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: border-color var(--transition-base);
}

.header__profile:hover .header__avatar {
  border-color: rgba(255, 255, 255, 0.2);
}

.header__profile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header__profile-name {
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  line-height: 1.2;
}

.header__profile-status {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.2;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Mobile (up to 480px) */
@media (max-width: 768px) {
  .header__container {
    padding: 0 var(--space-3);
  }
  
  .header__content {
    gap: var(--space-4);
    justify-content: space-between;
  }
  
  .header__left {
    gap: 0;
  }
  
  .header__icons {
    display: none;
  }
  
  .header__spacer {
    display: none;
  }
  
  .header__right {
    gap: var(--space-3);
  }
  
  .header__notifications {
    display: none;
  }
  
  .header__logo-image {
    height: 40px;
    max-width: 180px;
  }
  
  .header__balance {
    padding: var(--space-2) var(--space-3);
    min-height: 44px;
  }
  
  .header__balance-coin {
    width: 20px;
    height: 20px;
  }
  
  .header__topup {
    width: 40px;
    height: 40px;
  }
  
  .header__topup svg {
    width: 18px;
    height: 18px;
  }
  
  .header__avatar {
    width: 36px;
    height: 36px;
  }
  
  .header__profile-name {
    display: none;
  }
  
  .twitch-login-btn {
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-sm);
  }
  
  .twitch-login-btn .twitch-icon {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 480px) {
  .header__container {
    padding: 0 var(--space-2);
  }
  
  .header__content {
    gap: var(--space-2);
    justify-content: space-between;
  }
  
  .header__logo-image {
    height: 35px;
    max-width: 150px;
  }
  
  .header__balance {
    padding: var(--space-1) var(--space-2);
    min-height: 40px;
  }
  
  .header__balance-amount {
    font-size: var(--font-size-sm);
  }
  
  .header__balance-coin {
    width: 18px;
    height: 18px;
  }
  
  .header__topup {
    width: 36px;
    height: 36px;
  }
  
  .header__topup svg {
    width: 16px;
    height: 16px;
  }
  
  .header__avatar {
    width: 32px;
    height: 32px;
  }
  
  .twitch-login-btn {
    padding: var(--space-1) var(--space-2);
    font-size: var(--font-size-xs);
  }
  
  .twitch-login-btn .twitch-icon {
    width: 14px;
    height: 14px;
  }
}

/* Tablet (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .header__balance-text {
    display: none;
  }
  
  .header__profile-name {
    display: none;
  }
}

/* Desktop (769px and up) */
@media (min-width: 769px) {
  .header__balance-text {
    display: block;
  }
  
  .header__profile-name {
    display: block;
  }
}

/* Large Desktop (1024px and up) */
@media (min-width: 1024px) {
  .header__container {
    padding: 0 var(--space-6);
  }
  
  .header__content {
    gap: var(--space-8);
  }
  
  .header__left {
    gap: var(--space-6);
  }
  
  .header__right {
    gap: var(--space-6);
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  .header__logo,
  .header__icon,
  .header__notification-btn,
  .header__topup,
  .header__profile,
  .header__avatar {
    transition: none;
  }
}

/* ===== FOCUS MANAGEMENT ===== */
.header__logo:focus-visible,
.header__icon:focus-visible,
.header__notification-btn:focus-visible,
.header__topup:focus-visible,
.header__profile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
  .header {
    border-bottom: 2px solid var(--text-primary);
  }
  
  .header__icon,
  .header__notification-btn {
    border: 2px solid var(--text-secondary);
  }
  
  .header__balance {
    border: 2px solid var(--text-secondary);
  }
}

/* КРИТИЧЕСКИ ВАЖНО: Принудительный розовый кружочек слайдера */
#sound-slider::-webkit-slider-thumb,
.sound-slider::-webkit-slider-thumb,
input[type="range"]::-webkit-slider-thumb {
  background: #FF0054 !important;
  background-color: #FF0054 !important;
}

#sound-slider::-moz-range-thumb,
.sound-slider::-moz-range-thumb,
input[type="range"]::-moz-range-thumb {
  background: #FF0054 !important;
  background-color: #FF0054 !important;
}

/* ===== NOTIFICATION TOOLTIP STYLES ===== */

/* CSS переменные для блюра */
:root {
  --tooltip-blur: blur(20px);
  --tooltip-bg: rgba(21, 21, 36, 0.4);
}

.notification-tooltip {
  position: absolute;
  right: 0;
  top: calc(100% + 44px);
  width: 390px;
  background: #2c1e23;
  border-radius: 16px;
  overflow: hidden;
  z-index: 9998;
  display: none;
}


.notification-tooltip__content {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 22px;
  gap: 22px;
}

/* Header */
.notification-tooltip__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  background: transparent;
}

.notification-tooltip__title {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  color: var(--text-primary);
}

.notification-tooltip__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: #ffffff17;
  border: none;
  border-radius: 31px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.notification-tooltip__close:hover {
  background: #ff195d26;
  color: var(--text-primary);
}

/* Body */
.notification-tooltip__body {
  flex: 1;
  overflow-y: auto;
  max-height: 350px;
  padding: 0;
}

.notification-tooltip__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.notification-tooltip__error {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-error);
  font-size: 14px;
}

/* Empty State */
.notification-tooltip__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.notification-tooltip__empty-icon {
  font-size: 32px;
  /* margin-bottom: 12px; */
  opacity: 0.5;
}

.notification-tooltip__empty p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

/* Notification Items */
.notification-tooltip__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  /* Убираем обводку */
  cursor: pointer;
  transition: all 0.2s ease;
}

.notification-tooltip__item--unread {
  background: rgba(255, 0, 127, 0.1);
  /* Убираем левую обводку */
}

.notification-tooltip__item--unread:hover {
  background: rgba(255, 0, 127, 0.1);
}

.notification-tooltip__item--read {
  opacity: 0.7;
}

.notification-tooltip__item--read:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
}

/* Icon */
.notification-tooltip__item-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.notification-tooltip__icon-bg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 0, 127, 0.1);
  border-radius: 8px;
  color: var(--accent-primary);
}

.notification-tooltip__item--read .notification-tooltip__icon-bg {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

/* Content */
.notification-tooltip__item-content {
  flex: 1;
  min-width: 0;
}

.notification-tooltip__item-title {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.notification-tooltip__item--read .notification-tooltip__item-title {
  color: var(--text-secondary);
}

.notification-tooltip__item-text {
  margin: 0 0 6px 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.3s ease;
}

.notification-tooltip__item:hover .notification-tooltip__item-text {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  display: block;
  overflow: visible;
  white-space: normal;
}

.notification-tooltip__item-time {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Footer */
.notification-tooltip__footer {
  padding: 0;
  background: transparent;
}

.notification-tooltip__archive-btn {
  width: 100%;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: none; /* Убираем обводку */
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.notification-tooltip__archive-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Scrollbar */
.notification-tooltip__body::-webkit-scrollbar {
  width: 4px;
}

.notification-tooltip__body::-webkit-scrollbar-track {
  background: transparent;
}

.notification-tooltip__body::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 2px;
}

.notification-tooltip__body::-webkit-scrollbar-thumb:hover {
  background: var(--border-strong);
}

/* Responsive */
@media (max-width: 480px) {
  .notification-tooltip {
    width: 320px;
    right: -10px;
  }
  
  .notification-tooltip__header,
  .notification-tooltip__item,
  .notification-tooltip__footer {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Animation for new notifications */
@keyframes notificationSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.notification-tooltip__item {
  animation: notificationSlideIn 0.3s ease-out;
}

/* ===== NEW HEADER STYLES FROM REFERENCE ===== */

/* Animations */
@-webkit-keyframes header_blinking__pFARc {
    50% {
        opacity: .2
    }
}

@keyframes header_blinking__pFARc {
    50% {
        opacity: .2
    }
}

@-webkit-keyframes header_blowing__4EHzN {
    50% {
        opacity: 0;
        -webkit-transform: scale(1.2);
        transform: scale(1.2)
    }
}

@keyframes header_blowing__4EHzN {
    50% {
        opacity: 0;
        -webkit-transform: scale(1.2);
        transform: scale(1.2)
    }
}

/* Header Component */
.header_component {
    grid-gap: 34px;
    align-items: center;
    background: transparent;
    display: grid;
    gap: 34px;
    grid-template-columns: auto 1fr auto;
    height: 100%;
    padding: 0 26px;
    width: 100%;
    max-width: 100%;
    align-content: center
}

@media(max-width: 1500px) {
    .header_component {
        padding:0 16px
    }
}

@media(max-width: 1300px) {
    .header_component {
        grid-template-columns:auto 1fr
    }
}

@media(max-width: 900px) {
    .header_component {
        gap:18px;
        padding: 0 12px
    }
}

/* Header Left */
.header_left {
    grid-gap: 20px;
    align-items: center;
    display: grid;
    gap: 20px;
    grid-auto-flow: column;
    justify-content: left
}

@media(max-width: 1800px) {
    .header_left {
        gap:14px
    }
}

@media(max-width: 900px) {
    .header_left {
        gap:12px
    }
}

/* Header Logo */
.header_logo {
    background-repeat: no-repeat;
    background-size: 100%;
    height: 108px;
    width: 240px;
    display: flex;
    align-items: center;
    justify-content: center
}

.header_logo img {
    height: 108px;
    width: auto;
    max-width: 240px;
    object-fit: contain
}

@media(max-width: 1800px) {
    .header_logo {
        height: 94.5px;
        width: 210px
    }
    .header_logo img {
        height: 94.5px;
        max-width: 210px
    }
}

@media(max-width: 1500px) {
    .header_logo {
        height: 81px;
        width: 180px
    }
    .header_logo img {
        height: 81px;
        max-width: 180px
    }
}

@media(max-width: 900px) {
    .header_logo {
        height: 61.5px;
        width: 138px
    }
    .header_logo img {
        height: 61.5px;
        max-width: 138px
    }
}

/* Header Menu */
.header_menu {
    display: block
}

@media(max-width: 1300px) {
    .header_menu {
        display:none
    }
}

/* Menu Component */
.menu_component {
    grid-gap: 18px;
    align-items: center;
    display: grid;
    gap: 18px;
    grid-auto-flow: column;
    justify-content: left
}

@media(max-width: 1500px) {
    .menu_component {
        gap:12px
    }
}

.menu_item {
    display: grid
}

.menu_item.menu_active {
    pointer-events: none
}

.menu_iconRow {
    height: 24px;
    position: relative;
    width: 24px
}

@media(max-width: 1500px) {
    .menu_iconRow {
        height:20px;
        width: 20px
    }
}

.menu_icon {
    height: 24px;
    left: 0;
    position: absolute;
    top: 0;
    transition: opacity .3s;
    width: 24px
}

@media(max-width: 1500px) {
    .menu_icon {
        height:20px;
        width: 20px
    }
}

.menu_icon path {
    transition: fill .3s
}

.menu_icon.menu_activeIcon {
    opacity: 0;
    z-index: 2
}

.menu_active .menu_icon.menu_activeIcon {
    opacity: 1
}

.menu_icon.menu_defaultIcon path {
    fill: #ac9b85
}

.menu_link:hover .menu_icon.menu_defaultIcon path {
    fill: #f3ece2
}

.menu_active .menu_icon.menu_defaultIcon {
    opacity: 0
}

.menu_link {
    grid-gap: 8px;
    align-items: center;
    color: #ac9b85;
    display: grid;
    font-size: 14px;
    gap: 8px;
    grid-auto-flow: column;
    justify-content: left;
    transition: color .3s;
    text-decoration: none
}

@media(max-width: 1500px) {
    .menu_link {
        font-size:13px;
        gap: 6px
    }
}

.menu_active .menu_link,.menu_link:hover {
    color: #f3ece2
}

/* Header Side */
.header_side {
    grid-gap: 22px;
    align-items: center;
    display: grid;
    gap: 22px;
    grid-auto-flow: column;
    justify-content: right
}

@media(max-width: 900px) {
    .header_side {
        gap:12px
    }

    .header_socials {
        display: none
    }
}

/* Header Socials */
.header_socials {
    display: block
}

/* Socials Component */
.socials_component {
    grid-gap: 8px;
    display: grid;
    gap: 8px;
    grid-auto-flow: column;
    justify-content: left
}

.socialItem_component {
    display: grid
}

.socialItem_link {
    align-items: center;
    background: hsla(0,0%,100%,.06);
    border-radius: 18px;
    display: grid;
    height: 50px;
    justify-content: center;
    transition: background-color .3s;
    width: 50px;
    text-decoration: none
}

.socialItem_link:hover {
    background: hsla(0,0%,100%,.063)
}

.socialItem_icon {
    height: 21px;
    width: 21px;
}

.socialItem_icon {
    color: hsla(0,0%,100%,.44);
    transition: color .3s, fill .3s
}

.socialItem_icon path {
    fill: currentColor;
    transition: fill .3s
}

/* Twitch hover - фиолетовый плашка и иконка */
.socialItem_link[href*="twitch"]:hover {
    background: rgba(145, 70, 255, 0.2)
}

.socialItem_link[href*="twitch"]:hover .socialItem_icon {
    color: #9146FF
}

.socialItem_link[href*="twitch"]:hover .socialItem_icon path {
    fill: #9146FF
}

/* YouTube hover - красный плашка и иконка */
.socialItem_link[href*="youtube"]:hover {
    background: rgba(255, 0, 0, 0.2)
}

.socialItem_link[href*="youtube"]:hover .socialItem_icon {
    color: #FF0000
}

.socialItem_link[href*="youtube"]:hover .socialItem_icon path {
    fill: #FF0000
}

/* Telegram hover - голубой плашка и иконка */
.socialItem_link[href*="t.me"]:hover {
    background: rgba(0, 136, 204, 0.2)
}

.socialItem_link[href*="t.me"]:hover .socialItem_icon {
    color: #0088CC
}

.socialItem_link[href*="t.me"]:hover .socialItem_icon path {
    fill: #0088CC
}

/* Header Buttons */
.header_buttons {
    grid-gap: 16px;
    align-items: center;
    display: grid;
    gap: 16px;
    grid-auto-flow: column
}

@media(max-width: 900px) {
    .header_buttons {
        gap:12px
    }
}

.header_notificationsRow {
    position: relative
}

.header_notificationsRow:before {
    background: rgba(23,21,18,.9);
    content: "";
    height: 100%;
    left: 0;
    opacity: 0;
    position: fixed;
    top: 0;
    transition: visibility .3s,opacity .3s;
    visibility: hidden;
    width: 100%;
    z-index: 9997
}

@media(max-width: 900px) {
    .header_notificationsRow:before {
        display:none
    }
}

.header_notificationsRow.header_faded:before {
    opacity: 1;
    visibility: visible
}

.header_button {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center
}

@media(hover: hover) {
    .header_button:hover path {
        fill: #ffffff;
    }
}

.header_button.header_active path,.header_button:active path {
    fill: #d0bea6
}

.header_button:before {
    background: #ff0055;
    /* border: 3px solid #2e171d; */
    border-radius: 12px;
    content: "";
    height: 9px;
    opacity: 0;
    position: absolute;
    right: -4px;
    top: -4px;
    transition: opacity .3s;
    width: 9px;
}

.header_button.header_unread:before {
    opacity: 1
}

.header_buttonIcon {
    height: 22px;
    width: 22px
}

.header_buttonIcon path {
    transition: fill .3s;
    fill: #ffffff70;
}

/* User Component */
.user_component {
    grid-gap: 22px;
    align-items: center;
    display: grid;
    gap: 22px;
    grid-auto-flow: column
}

.user_component:before {
    background: rgba(23,21,18,.9);
    content: "";
    height: 100%;
    left: 0;
    opacity: 0;
    position: fixed;
    top: 0;
    transition: visibility .3s,opacity .3s;
    visibility: hidden;
    width: 100%;
    z-index: 9997
}

@media(max-width: 900px) {
    .user_component:before {
        display:none
    }
}

.user_component.user_faded:before {
    opacity: 1;
    visibility: visible
}

/* User Balance */
.user_balance {
    grid-gap: 10px;
    align-content: center;
    align-items: center;
    background: linear-gradient(307deg, #b9134d 3.2%, #E91E63 99.71%);
    border-radius: 14px;
    display: grid;
    gap: 10px;
    grid-auto-flow: column;
    overflow: hidden;
    padding: 0 14px 0 22px;
    position: relative;
    text-decoration: none
}

@media(max-width: 1500px) {
    .user_balance {
        border-radius:10px;
        gap: 7px;
        padding: 0 8px 0 16px
    }
}

@media(max-width: 900px) {
    .user_balance {
        display:none
    }
}

.user_balance.user_disabled {
    pointer-events: none
}

.user_balance:hover:before {
    opacity: 1
}

.user_balance:before {
    background: linear-gradient(307deg, #d2285c 3.2%, #E91E63 99.71%);
    content: "";
    height: 100%;
    left: 0;
    opacity: 0;
    position: absolute;
    top: 0;
    transition: opacity .3s;
    width: 100%
}

.user_balance>span {
    align-items: center;
    border-right: 1px solid rgba(40,35,29,.27);
    color: hsla(0,0%,100%,.9);
    display: flex;
    font-size: 16px;
    font-weight: 800;
    height: 50px;
    padding-right: 16px;
    position: relative;
    text-shadow: 0 2px 1px rgba(137,65,14,.34);
    z-index: 2;
    gap: 4px
}

@media(max-width: 1500px) {
    .user_balance>span {
        font-size:15px;
        height: 46px
    }
}

.user_plusIcon {
    height: 24px;
    position: relative;
    transition: -webkit-transform .3s;
    transition: transform .3s;
    transition: transform .3s,-webkit-transform .3s;
    width: 24px;
    z-index: 2
}

.user_plusIcon path {
    fill: #fff
}

.user_balance:hover .user_plusIcon:not(.user_loginIcon) {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg)
}

/* User User Row */
.user_userRow {
    position: relative
}

.user_user {
    cursor: pointer;
    height: 50px;
    position: relative;
    width: 50px;
    z-index: 9998
}

@media(max-width: 900px) {
    .user_user {
        height:36px;
        width: 36px;
        z-index: 2
    }
}

.user_avatarRow {
    overflow: hidden;
    position: relative;
    width: 100%
}

.user_avatar {
    border-radius: 50px;
    width: 100%
}

.user_avatarLink {
    display: none;
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%
}

@media(max-width: 900px) {
    .user_avatarLink {
        display:block
    }
}

.user_icon {
    background: #7f2839;
    border: 3px solid #58031e;
    border-radius: 26px;
    bottom: -13px;
    height: 26px;
    left: 0;
    margin: auto;
    position: absolute;
    right: 0;
    transition: background-color .3s;
    width: 26px;
    z-index: 2
}

@media(max-width: 900px) {
    .user_icon {
        display:none
    }
}

.user_user:hover .user_icon {
    background-color: #53031c
}

.user_arrowIcon {
    height: 20px;
    transition: -webkit-transform .3s;
    transition: transform .3s;
    transition: transform .3s,-webkit-transform .3s;
    width: 20px
}

.user_user:hover .user_arrowIcon {
    -webkit-transform: translateY(2px);
    transform: translateY(2px)
}

.user_faded .user_arrowIcon {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg)
}

.user_faded .user_user:hover .user_arrowIcon {
    -webkit-transform: rotate(180deg) translateY(2px);
    transform: rotate(180deg) translateY(2px)
}

.user_arrowIcon path {
    transition: fill .3s;
    fill: #ffffff9e;
}

.user_user:hover .user_arrowIcon path {
    fill: #fff
}

/* User Logout */
.user_logout {
    height: 24px;
    width: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center
}

@media(max-width: 900px) {
    .user_logout {
        display:none
    }
}

.user_logout {
    color: #D5D5D5;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.user_logout:hover {
    color: #d5d5d5;
    opacity: 0.9;
}

.user_logout.user_loading {
    pointer-events: none
}

@keyframes user_loading {
    50% {
        color: #fff;
    }
}

.user_logout.user_loading {
    animation: user_loading 1s ease-in-out infinite;
}

.user_logoutIcon {
    height: 24px;
    width: 24px;
    color: inherit;
    transition: transform .3s, color .3s;
}

.user_logout:hover .user_logoutIcon {
    transform: translateX(3px);
}

/* Auth Component */
/* Auth component теперь использует стили user_balance */

/* User Dropdown */
@-webkit-keyframes userDropdown_smashing {
    33% {
        -webkit-transform: scale(.92);
        transform: scale(.92)
    }

    66% {
        -webkit-transform: scale(1);
        transform: scale(1)
    }

    to {
        -webkit-transform: scale(.94);
        transform: scale(.94)
    }
}

@keyframes userDropdown_smashing {
    33% {
        -webkit-transform: scale(.92);
        transform: scale(.92)
    }

    66% {
        -webkit-transform: scale(1);
        transform: scale(1)
    }

    to {
        -webkit-transform: scale(.94);
        transform: scale(.94)
    }
}

.userDropdown_component {
    grid-gap: 22px;
    background: rgb(12 28 35);
    /* backdrop-filter: blur(52px); */
    border-radius: 16px;
    display: grid;
    gap: 22px;
    padding: 22px;
    position: absolute;
    right: 0;
    top: calc(100% + 30px);
    width: 390px;
    z-index: 9998
}

.userDropdown_component > .userDropdown_top {
    margin-bottom: 0
}

.userDropdown_component > .userDropdown_volume {
    margin-top: 0
}

.userDropdown_component > a.userDropdown_top + .userDropdown_volume {
    margin-top: 30px
}

.userDropdown_top {
    grid-gap: 10px;
    align-items: center;
    background: #1d2c33;
    border-radius: 16px;
    /* box-shadow: inset 0 2px 6px 0 rgb(55 48 51 / 90%); */
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr auto;
    justify-content: left;
    padding: 12px;
    position: relative;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background-color .3s
}

.userDropdown_top:hover {
    background: #15252c;
}

.userDropdown_link {
    align-items: center;
    display: flex;
    height: 100%;
    left: 0;
    padding-left: 12px;
    position: absolute;
    top: 0;
    width: 100%;
    text-decoration: none;
    z-index: 1;
    pointer-events: none
}

.userDropdown_avatar {
    border-radius: 20px;
    height: 40px;
    width: 40px
}

.userDropdown_topSide {
    grid-gap: 4px;
    display: grid;
    gap: 4px;
    justify-content: left;
    justify-items: left;
    overflow: hidden;
    padding: 0 50px;
    position: relative;
    z-index: 2
}

.userDropdown_userName {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.userDropdown_id {
    grid-gap: 4px;
    align-items: center;
    background: hsl(0deg 0% 100% / 12%);
    border-radius: 20px;
    color: #ffffff82;
    display: grid;
    font-size: 12px;
    font-weight: 500;
    gap: 4px;
    grid-auto-flow: column;
    height: 20px;
    justify-content: left;
    line-height: 16px;
    padding: 0 6px 0 8px;
    position: relative;
    transition: color .3s,background-color .3s;
    z-index: 3;
    cursor: pointer;
    border: none;
    background-color: hsla(0,0%,100%,.12)
}

.userDropdown_id:hover {
    background: hsla(0,0%,100%,.2);
    color: #ffffff
}

.userDropdown_id:hover path {
    fill: #fff8da
}

.userDropdown_id.userDropdown_smashing {
    -webkit-animation: userDropdown_smashing .2s 1 backwards;
    animation: userDropdown_smashing .2s 1 backwards
}

.userDropdown_copyIcon {
    height: 14px;
    width: 14px
}

.userDropdown_copyIcon path {
    fill: #ffffff82;
    transition: fill .3s
}

.userDropdown_goButton {
    align-items: center;
    background: #314046;
    border-radius: 12px;
    bottom: 0;
    display: grid;
    height: 40px;
    justify-content: center;
    margin: auto;
    position: absolute;
    right: 12px;
    top: 0;
    transition: background-color .3s;
    width: 40px
}

.userDropdown_link:hover .userDropdown_goButton {
    background-color: #ff0054
}

.userDropdown_goIcon {
    height: 16px;
    -webkit-transform: rotate(-90deg);
    transform: rotate(-90deg);
    transition: -webkit-transform .3s;
    transition: transform .3s;
    transition: transform .3s,-webkit-transform .3s;
    width: 16px
}

.userDropdown_link:hover .userDropdown_goIcon {
    -webkit-transform: rotate(-90deg) translateY(3px);
    transform: rotate(-90deg) translateY(3px)
}

.userDropdown_goIcon path {
    fill: #fff
}

/* User Dropdown Volume Control */
.userDropdown_volume {
    grid-gap: 6px;
    color: #fff;
    display: grid;
    font-size: 14px;
    font-weight: 500;
    gap: 6px;
    line-height: 20px
}

.userDropdown_volumeRow {
    grid-gap: 8px;
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 22px 1fr
}

.userDropdown_volumeButton {
    align-items: center;
    display: grid;
    height: 22px;
    justify-content: center;
    width: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0
}

.userDropdown_volumeButton:hover path {
    fill: #fff
}

.userDropdown_volumeButton.userDropdown_muted path {
    opacity: .4
}

.userDropdown_volumeIcon {
    height: 22px;
    width: 22px
}

.userDropdown_volumeIcon path {
    fill: #c6b6bc;
    transition: fill .3s
}

.userDropdown_volumeRange {
    background-color: #362a2a;
    border-radius: 4px;
    cursor: pointer;
    flex: 1 1;
    height: 8px;
    position: relative;
    --fill-width: 67%
}

.userDropdown_volumeTrack {
    background-color: #36312a;
    border-radius: 4px;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0
}

.userDropdown_volumeTrack:first-child {
    background: #ff0054;
    width: var(--fill-width, 67%);
    left: 0;
    right: auto
}

.userDropdown_volumeTrack:nth-child(2) {
    display: none
}

.userDropdown_volumeThumb {
    background: #ff0054;
    border-radius: 50%;
    height: 14px;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    cursor: grab;
    touch-action: none;
    z-index: 1
}

.userDropdown_volumeThumb:active {
    cursor: grabbing
}

.userDropdown_volumeThumb:focus {
    outline: 2px solid #ffc23d;
    outline-offset: 2px
}

.userDropdown_links {
    display: grid;
    gap: 12px;
}

.userDropdown_linkTile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    text-decoration: none;
    transition: background-color .2s ease, transform .2s ease;
}

.userDropdown_linkTileText span {
    font-weight: 600;
    display: block;
}

.userDropdown_linkTileText small {
    color: rgba(255,255,255,0.65);
    font-size: 12px;
}

.userDropdown_linkTile svg {
    opacity: 0.6;
}

.userDropdown_linkTile:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-1px);
}

