:root {
  /* Основные цвета/оттенки */
  --color-loader-bg: #111;
  --color-spinner-border: #999;
  --color-spinner-top: #fff;
  --color-white: #fff;
  --color-black: #000;

  /* Для фоновых полупрозрачных элементов */
  --color-taskbar-bg85: rgba(40, 40, 40, 0.85);
  --color-taskbar-bg90: rgba(40, 40, 40, 0.9);
  --color-hover-white20: rgba(255, 255, 255, 0.2);
  --color-white10: rgba(255,255,255,0.1);

  /* Основные тёмные фоны */
  --color-bg-main: #202020;
  --color-bg-darker: #1f1f1f;
  --color-bg-2a: #2a2a2a;
  --color-bg-3a: #3a3a3a;
  --color-bg-444: #444;
  --color-bg-555: #555;

  /* Текстовые цвета */
  --color-text-bbb: #bbb;
  --color-text-ccc: #ccc;
  --color-text-aaa: #aaa;

  /* Акцентные, фиолетовые/розовые (для плеера) */
  --color-purple: #3E0068;
  --color-pink: #FF6FF1;
  --color-pink-hover: #FF54E3;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: sans-serif;
}

/* Лоадер */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-loader-bg);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

#loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 6px solid var(--color-spinner-border);
  border-top-color: var(--color-spinner-top);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Метод бэка для хостинга */
.background-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: #000;
  overflow: hidden;
}

.background-layer #bgCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.bg-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  opacity: 0;
  transition: opacity 1s ease;
}
.bg-media.fade-in {
  opacity: 1;
}

/* Рабочий стол */
.desktop {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Кнопочки персонализации */
.pers-btn {
  flex: 1;
  padding: 10px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
}
.pers-btn:hover {
  background: rgba(255,255,255,0.2);
}
.pers-btn.active {
  background: var(--color-pink);
  border-color: var(--color-pink-hover);
}

/* Калькулятор кнопочки */
.calc-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  font-size: 1.2rem;
  padding: 15px 0;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s;
}
.calc-btn:hover {
  background: rgba(255,255,255,0.2);
}
.calc-btn.op {
  background: rgba(255,111,241,0.2);
}
.calc-btn.op:hover {
  background: rgba(255,111,241,0.4);
}
.calc-btn.eq {
  background: var(--color-pink);
}
.calc-btn.eq:hover {
  background: var(--color-pink-hover);
}

/* Контекстное меню */
.context-menu {
  position: absolute;
  z-index: 10000;
  width: 250px;
  background: rgba(30, 30, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  padding: 5px 0;
  display: none; /* скрыто по умолчанию */
  color: var(--color-white);
  font-size: 0.9rem;
}

.context-menu.show {
  display: block;
}

.context-menu-item {
  padding: 8px 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s;
}

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

.context-menu-item i {
  width: 20px;
  text-align: center;
  color: var(--color-text-ccc);
}

.context-menu-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 5px 0;
}

/* Иконка «Сменить фон» на рабочем столе */
.desktop-icon {
  position: absolute;
  top: 50px;
  left: 50px;
  width: 70px;
  text-align: center;
  cursor: pointer;
  color: var(--color-white);
  transition: background 0.2s ease;
  padding: 5px;
  border-radius: 4px;
}
.desktop-icon:hover {
  background: rgba(255, 255, 255, 0.1);
}
.desktop-icon i {
  font-size: 2rem;
  margin-bottom: 5px;
  display: block;
}
.desktop-icon span {
  font-size: 0.8rem;
  display: block;
  text-shadow: 1px 1px 3px var(--color-black);
  word-wrap: break-word;
}

/* Панель задач */
.taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: var(--color-taskbar-bg90);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

.taskbar-apps,
.taskbar-systemtray {
  display: flex;
  align-items: center;
  gap: 10px;
}

.start-button {
  width: 50px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-white);
  transition: background 0.2s;
  font-size: 1.4rem;
}
.start-button:hover {
  background: var(--color-hover-white20);
}

.taskbar-icon {
  width: 40px;
  height: 40px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}
.taskbar-icon:hover {
  background: var(--color-hover-white20);
}

/* Псевдо-Пуск === */
.start-menu {
  position: absolute;
  bottom: 50px;
  left: 20px;
  width: 820px;
  height: 550px;
  background: var(--color-bg-main);
  border-radius: 6px;
  display: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  overflow: hidden;
  z-index: 9999;

  display: flex;
  flex-direction: row;
}

.start-menu.show {
  display: flex;
  animation: fadeInMenu 0.2s ease forwards;
}
@keyframes fadeInMenu {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Левая панель */
.start-left {
  background: var(--color-bg-darker);
  flex: 2;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

/* «Pinned» */
.pinned-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--color-text-bbb);
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.pinned-apps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
}

/* Плитка */
.tile {
  background: var(--color-bg-2a);
  border-radius: 4px;
  width: 80px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-text-ccc);
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
}
.tile i {
  font-size: 1.4rem;
  margin-bottom: 5px;
}
.tile span {
  font-size: 0.7rem;
}
.tile:hover {
  background: var(--color-bg-3a);
}

.separator {
  height: 1px;
  background: var(--color-white10);
  margin: 15px 0;
}

/* Recommended */
.recommended-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--color-text-bbb);
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.recommended-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.recommended-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 5px 0;
  border-radius: 4px;
  transition: background 0.2s;
}
.recommended-item:hover {
  background: var(--color-white10);
  padding-left: 5px;
}
.item-icon {
  width: 32px;
  height: 32px;
  border-radius: 3px;
  background: var(--color-bg-2a);
  display: flex;
  align-items: center;
  justify-content: center;
}
.item-icon i {
  font-size: 1rem;
}
.item-info {
  display: flex;
  flex-direction: column;
}
.item-title {
  font-size: 0.85rem;
  color: var(--color-white);
}
.item-desc {
  font-size: 0.7rem;
  color: var(--color-text-aaa);
}

/* Кнопка «All apps» */
.bottom-bar {
  margin-top: auto;
  padding: 10px 0 0 0;
  border-top: 1px solid var(--color-white10);
  font-size: 0.85rem;
  color: var(--color-text-ccc);
  cursor: pointer;
}
.bottom-bar span:hover {
  color: var(--color-white);
}

/* Правая панель */
.start-right {
  flex: 1;
  background: #2c2c2c;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

/* Профиль */
.profile-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}
.profile-pic {
  width: 48px;
  height: 48px;
  background: var(--color-bg-444);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-pic i {
  font-size: 1.5rem;
}
.profile-info {
  display: flex;
  flex-direction: column;
}
.profile-name {
  font-size: 0.9rem;
  font-weight: bold;
}
.profile-status {
  font-size: 0.75rem;
  color: var(--color-text-aaa);
}

/* Пункты справа */
.start-right-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.right-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--color-text-ccc);
  border-radius: 4px;
  transition: background 0.2s;
}
.right-item i {
  font-size: 1rem;
}
.right-item:hover {
  background: var(--color-white10);
  padding-left: 5px;
}

/* Поиск */
.search-bar {
  display: flex;
  align-items: center;
  background: var(--color-bg-3a);
  border-radius: 4px;
  padding: 6px 8px;
  gap: 8px;
}
.search-bar i {
  font-size: 1rem;
}
.search-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-white);
  font-size: 0.9rem;
  flex: 1;
}
.search-bar input::placeholder {
  color: var(--color-text-ccc);
}

/* Центральные иконки */
.center-icons {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex: 1;
}
.icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, background-color 0.3s ease;
}
.icon:hover {
  background-color: var(--color-hover-white20);
  transform: scale(1.1);
}

.taskbar-app-icon.active-app::after {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  width: 15px;
  height: 3px;
  background-color: var(--color-pink);
  border-radius: 2px;
}

/* Системный трей */
.tray-icons {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-right: 10px;
}

/* Дублирующиеся стили start-menu (для других элементов) */
.start-menu {
  position: absolute;
  bottom: 60px;
  left: 10px;
  width: 820px;
  height: 550px;
  background-color: rgba(30, 30, 30, 0.95);
  border-radius: 8px;
  color: var(--color-white);
  padding: 20px;
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.start-menu.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
.start-menu h2 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  font-weight: normal;
}
.start-menu p {
  font-size: 0.9rem;
  line-height: 1.4rem;
}

/* Окна Glassmorphism */
.glass-window {
  position: absolute;
  z-index: 100;
  background: rgba(40, 40, 40, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--color-white);
  min-width: 300px;
}

.window-header {
  height: 30px;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.window-title {
  padding-left: 10px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.window-controls {
  display: flex;
  height: 100%;
}

.win-btn {
  width: 45px;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.8rem;
}

.win-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.win-btn.close-btn:hover {
  background: #e81123; /* Красный цвет закрытия Windows 10 */
}

.window-content {
  flex: 1;
  padding: 0;
  overflow: auto;
}

/* Карточка плеера */
.player-card {
  width: 340px;
  background: transparent; /* Убрал фиолетовый для соответствия glassmorphism */
  padding: 15px 20px;
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: "Arial", sans-serif;
}

/* Верхняя часть: обложка, название, артист, иконки */
.player-content {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}
.album-cover img {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  object-fit: cover;
}
.track-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.track-title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2rem;
}
.track-artist {
  font-weight: 300;
  font-size: 0.8rem;
  opacity: 0.8;
}
/* Лайк, меню (три точки) */
.like-btn, .more-btn {
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.8;
}
.like-btn:hover, .more-btn:hover {
  opacity: 1;
}

/* Контролы (shuffle, prev, play/pause, next, repeat) */
.controls-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-size: 1.2rem;
}
.controls-row i {
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.controls-row i:hover {
  opacity: 1;
}
/* Центральная кнопка play/pause в кружке */
.play-btn {
  width: 36px;
  height: 36px;
  background-color: var(--color-pink);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}
.play-btn:hover {
  background-color: var(--color-pink-hover);
}

/* Прогресс трека */
.progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
}
.current-time, .total-time {
  width: 30px;
  text-align: center;
  opacity: 0.8;
}
.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--color-white10);
  border-radius: 3px;
  position: relative;
}
.progress-filled {
  position: absolute;
  left: 0;
  top: 0;
  height: 6px;
  background: var(--color-pink);
  border-radius: 3px;
  width: 0%; /* по умолчанию */
}

/* Громкость */
.volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  opacity: 0.8;
}
.volume-row i {
  cursor: pointer;
}
.volume-row i:hover {
  opacity: 1;
}
.volume-bar {
  flex: 1;
  height: 6px;
  background: var(--color-white10);
  border-radius: 3px;
  position: relative;
}
.volume-filled {
  position: absolute;
  left: 0;
  top: 0;
  height: 6px;
  background: var(--color-pink);
  border-radius: 3px;
  width: 50%; /* стартовое значение */
}
