/* ============================================
   ТЕМЫ И ОБОИ + КРАСИВОЕ МЕНЮ ПУСК
   ============================================ */

/* ===== ОКНО СМЕНЫ ОБОЕВ ===== */
.themes-window { width: 560px; max-width: 94vw; }
.themes-preview-wrap { position: relative; padding: 4px; }
.theme-preview {
  width: 100%;
  height: 240px;
  border: 3px solid;
  border-color: #808080 #fff #fff #808080;
  background-size: cover;
  background-position: center;
  position: relative;
  cursor: grab;
  transition: filter 0.2s;
  user-select: none;
  touch-action: pan-y;
}
.theme-preview:active { cursor: grabbing; }
.theme-preview::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 70%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
}
.theme-preview-label {
  position: absolute;
  bottom: 10px; left: 14px; right: 14px;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.9);
  z-index: 2;
  pointer-events: none;
}
.theme-preview-label small {
  display: block;
  font-size: 11px;
  font-weight: normal;
  color: #e0e0e0;
  margin-top: 2px;
}

.theme-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  padding: 8px;
}
.theme-arrow {
  width: 40px; height: 40px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  flex-shrink: 0;
  color: #000;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-arrow:hover { background: #d0d0ff; }
.theme-arrow:active { border-color: #808080 #ffffff #ffffff #808080; transform: translate(1px, 1px); }

.theme-counter {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: bold;
  color: #000080;
  font-family: "Courier New", monospace;
}

.theme-hint {
  text-align: center;
  font-size: 11px;
  color: #808080;
  margin-top: 6px;
  font-style: italic;
}

.theme-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 8px;
  flex-wrap: wrap;
  max-height: 40px;
  overflow-y: auto;
  padding: 4px;
}
.theme-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #a0a0a0;
  border: 2px solid #808080;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.theme-dot:hover { background: #d0d0ff; transform: scale(1.2); }
.theme-dot.active {
  background: #000080;
  border-color: #000080;
  box-shadow: 0 0 6px rgba(0,0,128,0.6);
  transform: scale(1.3);
}

.theme-apply {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  font-weight: bold;
  font-family: inherit;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  color: #000;
  cursor: pointer;
  margin-top: 10px;
}
.theme-apply:hover:not(:disabled) { background: #d0d0ff; }
.theme-apply:active:not(:disabled) { border-color: #808080 #ffffff #ffffff #808080; }
.theme-apply:disabled { cursor: default; }

/* ===== НОВОЕ МЕНЮ ПУСК (Win7-style) ===== */
.start-menu {
  display: none;
  position: fixed;
  bottom: 40px;
  left: 2px;
  width: 420px;
  max-width: 95vw;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 4px 4px 12px rgba(0,0,0,0.5);
  z-index: 1001;
  overflow: hidden;
  animation: startMenuOpen 0.2s ease-out;
  transform-origin: bottom left;
}
.start-menu.show { display: block; }

@keyframes startMenuOpen {
  0% { opacity: 0; transform: translateY(15px) scaleY(0.9); }
  100% { opacity: 1; transform: translateY(0) scaleY(1); }
}

/* Шапка с аватаром */
.sm-header {
  background: linear-gradient(180deg, #1e5f9e 0%, #0a3d6e 100%);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid #000080;
  position: relative;
}
.sm-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.3), transparent 60%);
  pointer-events: none;
}
.sm-avatar {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  border: 3px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  box-shadow: 0 0 12px rgba(255,215,0,0.6);
  flex-shrink: 0;
}
.sm-user-info { flex: 1; min-width: 0; }
.sm-username {
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}
.sm-user-role {
  color: #c0e0ff;
  font-size: 11px;
}

/* Основное тело меню — 2 колонки */
.sm-body {
  display: flex;
  gap: 0;
  min-height: 320px;
  background: #c0c0c0;
}
.sm-left {
  flex: 1;
  background: #ffffff;
  border-right: 2px solid #808080;
  padding: 8px;
  overflow-y: auto;
  max-height: 360px;
}
.sm-right {
  width: 170px;
  padding: 8px;
  background: #d4d4d4;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sm-section-title {
  font-size: 11px;
  font-weight: bold;
  color: #000080;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 8px 4px;
  border-bottom: 1px solid #c0c0c0;
  margin-bottom: 4px;
}

/* Большие элементы (программы) */
.sm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.1s;
}
.sm-item:hover {
  background: linear-gradient(90deg, #d0e0ff 0%, #ffffff 100%);
  border-color: #a0c0ff;
}
.sm-item:active { background: #a0c0ff; }

.sm-item-icon {
  width: 32px; height: 32px;
  image-rendering: pixelated;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.sm-item-info { flex: 1; min-width: 0; }
.sm-item-name {
  font-size: 13px;
  font-weight: bold;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sm-item-desc {
  font-size: 10px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Малые элементы (правый столбец) */
.sm-item-sm {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 12px;
  color: #000;
  cursor: pointer;
  border: 1px solid transparent;
  font-weight: bold;
}
.sm-item-sm:hover {
  background: #ffffff;
  border-color: #808080;
}
.sm-item-sm:active {
  background: #a0c0ff;
  border-color: #808080;
}
.sm-item-sm-icon {
  width: 20px; height: 20px;
  image-rendering: pixelated;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sm-divider-sm {
  height: 1px;
  border-top: 1px solid #808080;
  border-bottom: 1px solid #ffffff;
  margin: 6px 4px;
}

/* Футер с кнопками */
.sm-footer {
  background: linear-gradient(180deg, #d4d4d4 0%, #c0c0c0 100%);
  border-top: 2px solid #fff;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.sm-footer-btn {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: bold;
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sm-footer-btn:hover { background: #d0d0ff; }
.sm-footer-btn:active { border-color: #808080 #ffffff #ffffff #808080; transform: translate(1px, 1px); }
.sm-footer-btn.power {
  background: linear-gradient(180deg, #d04040, #a02020);
  color: #fff;
  border-color: #ff8080 #600000 #600000 #ff8080;
}
.sm-footer-btn.power:hover { background: linear-gradient(180deg, #e05050, #b03030); }

/* Скрываем старое вертикальное "RandomOS" */
.start-menu-sidebar { display: none; }
.start-menu-inner { display: block; }
.start-menu-content { padding: 0; }

/* Мобильные правки */
@media (max-width: 640px) {
  .start-menu { width: 96vw; left: 2vw; }
  .sm-body { flex-direction: column; min-height: auto; }
  .sm-left { border-right: none; border-bottom: 2px solid #808080; max-height: 240px; }
  .sm-right { width: 100%; }
}