/* === Общий контейнер в шапке === */
.head-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  z-index: 20;
  font-family: Arial, sans-serif;
}



/* === Обёртка меню пользователя === */
.user-menu {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
svg.icon-svg.icon-watch-later {
    width: 32px;
    height: 32px;
}



/* === Верхняя строка с именем и аватаром === */
.user-name {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: #f8f8f8;
  transition: background 0.2s ease;
}
.user-name:hover {
  background: #eee;
}

.username-pic {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.user-pic-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.member-name-prof {
  font-weight: 600;
  font-size: 14px;
  color: #333;
}
.icon-chevron-thin-down {
  width: 12px;
  height: 12px;
  fill: #555;
}

/* === Выпадающее меню === */
.drop-down-men {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 6px 0;
  display: none;
  flex-direction: column;
  animation: fadeIn 0.2s ease;
 top: 50px;
}

.user-menu:hover .drop-down-men {
  display: flex;
}

.drop-top {
  font-size: 13px;
  padding: 10px 16px;
  border-bottom: 1px solid #eee;
  color: #666;
}
.drop-top a {
  color: #0073aa;
  font-weight: 600;
  text-decoration: none;
}

/* === Пункты меню === */
.row-drop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  transition: background 0.2s ease;
}
.row-drop:hover {
  background: #f5f5f5;
}
.row-drop svg {
  width: 18px;
  height: 18px;
  fill: #666;
}
.row-drop span {
  flex-grow: 1;
}
.row-drop b {
  font-size: 12px;
  background: #eee;
  padding: 2px 6px;
  border-radius: 12px;
  color: #444;
}

/* === Кнопки входа/регистрации (для гостей) === */
.user-container {
  display: flex;
  align-items: center;
}
.header-but button {
  margin-left: 8px;
  padding: 6px 14px;
  font-size: 14px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}
.header-but button:first-child {
  background: #f0f0f0;
  color: #333;
}
.header-but button:first-child:hover {
  background: #e0e0e0;
}
.header-but button:last-child {
  background: #0073aa;
  color: #fff;
}
.header-but button:last-child:hover {
  background: #005f8d;
}

/* === Анимация === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* ===== Dark Theme Overrides ===== */
body.dark .head-row {
  color: #cfd6e4;
  font-family: Arial, sans-serif;
}

/* Иконка "watch later" — мягче в тёмном */
body.dark svg.icon-svg.icon-watch-later {
  fill: #cfd6e4;
  opacity: .9;
}

/* === Верхняя строка с именем и аватаром === */
body.dark .user-name {
  background: #161b22;
  border: 1px solid rgba(255,255,255,.06);
}
body.dark .user-name:hover {
  background: #1d2430;
}
body.dark .member-name-prof {
  color: #e6edf3;
}
body.dark .icon-chevron-thin-down {
  fill: #a7b3c2;
}

/* Аватарные рамки чуть темнее */
body.dark .username-pic {
  box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset;
}
body.dark .user-pic-img {
  background: #0b0f14;
}

/* === Выпадающее меню === */
body.dark .drop-down-men {
  background: #0f141c;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 28px rgba(0,0,0,.45);
}
body.dark .drop-top {
  color: #9fb0c3;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
body.dark .drop-top a {
  color: #7cc7ff;
}

/* === Пункты меню === */
body.dark .row-drop {
  color: #cfd6e4;
}
body.dark .row-drop:hover {
  background: rgba(255,255,255,.05);
}
body.dark .row-drop svg, body.dark .row-drop svg g {
    fill: #fff;
}
body.dark .row-drop b {
  background: rgba(255,255,255,.08);
  color: #cfd6e4;
}

/* === Кнопки входа/регистрации (для гостей) === */
body.dark .user-container { color: #cfd6e4; }

body.dark .header-but button:first-child {
  background: #1f2733;
  color: #e6edf3;
  border: 1px solid rgba(255,255,255,.08);
}
body.dark .header-but button:first-child:hover {
  background: #243040;
}

body.dark .header-but button:last-child {
  background: #0ea5e9; /* акцент */
  color: #071018;
  box-shadow: 0 2px 10px rgba(14,165,233,.35);
}
body.dark .header-but button:last-child:hover {
  background: #38bdf8;
}

/* === Общие мелочи === */
body.dark .head-row,
body.dark .user-menu,
body.dark .drop-down-men,
body.dark .row-drop {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Анимация остаётся общая */
