/* ===== ДОСТИЖЕНИЯ ===== */
.achievement-toast {
  position: fixed;
  top: 20px; right: -400px;
  width: 320px;
  background: #c0c0c0;
  border: 2px solid; border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 3px 3px 0 #000;
  padding: 10px;
  display: flex; gap: 12px; align-items: center;
  z-index: 99999;
  transition: right 0.4s ease-out;
}
.achievement-toast.show { right: 20px; }
.achievement-toast .ach-icon {
  font-size: 32px;
  width: 50px; height: 50px;
  display: flex; align-items: center; justify-content: center;
  background: #000080; color: #ffd700;
  border: 2px solid; border-color: #ffffff #808080 #808080 #ffffff;
}
.achievement-toast .ach-info { flex: 1; min-width: 0; }
.achievement-toast .ach-title {
  font-size: 10px; color: #ffd700; font-weight: bold; letter-spacing: 1px;
}
.achievement-toast .ach-name {
  font-size: 14px; color: #000080; font-weight: bold; margin: 2px 0;
}
.achievement-toast .ach-desc { font-size: 11px; color: #333; }

.ach-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; margin-bottom: 4px;
  border: 1px solid #a0a0a0;
  background: #f0f0f0;
}
.ach-row.unlocked { background: #ffffcc; border-color: #808000; }
.ach-row.locked { opacity: 0.55; }
.ach-row-icon {
  font-size: 22px; width: 34px; height: 34px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid; border-color: #fff #808080 #808080 #fff;
  background: #c0c0c0;
}
.ach-row-name { font-weight: bold; color: #000080; font-size: 13px; }
.ach-row-desc { font-size: 11px; color: #555; }

/* ===== BSOD ===== */
.bsod-screen {
  display: none;
  position: fixed; inset: 0;
  background: #0000aa;
  color: #fff;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 14px;
  z-index: 999999;
  padding: 60px 80px;
  cursor: pointer;
}
.bsod-screen.show { display: block; }
.bsod-screen .bsod-title {
  background: #aaa; color: #0000aa;
  display: inline-block;
  padding: 0 6px;
  font-weight: bold;
  margin-bottom: 20px;
}
.bsod-screen p { margin: 12px 0; line-height: 1.6; }

/* ===== СКРИНСЕЙВЕР ===== */
.screensaver {
  display: none;
  position: fixed; inset: 0;
  background: #000;
  z-index: 99998;
  cursor: none;
}
.screensaver.show { display: block; }
.ss-window {
  position: absolute;
  padding: 4px 12px;
  background: #c0c0c0;
  border: 2px solid; border-color: #fff #808080 #808080 #fff;
  font-family: "MS Sans Serif", sans-serif;
  font-size: 12px; font-weight: bold;
  color: #000;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.5);
  white-space: nowrap;
}

/* ===== КОНТЕКСТНОЕ МЕНЮ ===== */
.context-menu {
  display: none;
  position: fixed;
  min-width: 180px;
  background: #c0c0c0;
  border: 2px solid; border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 3px 3px 0 #000;
  padding: 3px;
  z-index: 99997;
  user-select: none;
}
.context-menu.show { display: block; }
.ctx-item {
  padding: 5px 12px;
  font-size: 13px;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
}
.ctx-item:hover:not(.disabled) {
  background: #000080; color: #fff;
}
.ctx-item.disabled { opacity: 0.5; cursor: default; }
.ctx-icon { width: 18px; text-align: center; }
.ctx-divider {
  height: 1px;
  border-top: 1px solid #808080;
  border-bottom: 1px solid #fff;
  margin: 4px 2px;
}

/* ===== WELCOME SCREEN ===== */
.welcome-screen {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #000080 0%, #1084d0 100%);
  color: #fff;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "MS Sans Serif", Tahoma, sans-serif;
  transition: opacity 0.6s;
}
.welcome-screen.hide { opacity: 0; pointer-events: none; }
.welcome-logo {
  font-size: 56px;
  font-weight: bold;
  letter-spacing: 4px;
  margin-bottom: 10px;
  text-shadow: 4px 4px 0 rgba(0,0,0,0.4);
  animation: wsPulse 2s ease-in-out infinite;
}
@keyframes wsPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.welcome-sub {
  font-size: 18px;
  color: #c0c0c0;
  margin-bottom: 50px;
  letter-spacing: 2px;
}
.welcome-btn {
  background: #c0c0c0;
  border: 3px solid; border-color: #ffffff #808080 #808080 #ffffff;
  padding: 12px 40px;
  font-family: inherit;
  font-size: 16px;
  font-weight: bold;
  color: #000;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.4);
}
.welcome-btn:active { border-color: #808080 #ffffff #ffffff #808080; transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(0,0,0,0.4); }
.welcome-hint {
  position: absolute;
  bottom: 30px;
  font-size: 12px;
  color: #a0a0a0;
}

/* ===== АНИМИРОВАННЫЙ BOOT ЛОГОТИП ===== */
.boot-logo-animated {
  font-size: 42px;
  font-weight: bold;
  letter-spacing: 3px;
  margin-bottom: 20px;
  font-family: "Courier New", monospace;
  display: flex;
  gap: 2px;
}
.boot-logo-animated span {
  color: #ffffff;
  text-shadow: 2px 2px #000080;
  display: inline-block;
  animation: bootBounce 1.2s ease-in-out infinite;
  opacity: 0;
  animation-fill-mode: forwards;
}
@keyframes bootBounce {
  0% { opacity: 0; transform: translateY(-20px); }
  50% { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ===== ТЁМНАЯ ТЕМА ===== */
body.theme-dark {
  filter: brightness(0.75) contrast(1.1) hue-rotate(180deg);
}
body.theme-dark .main-window,
body.theme-dark .app-window,
body.theme-dark .notepad-window {
  filter: brightness(1.15) contrast(1.1) hue-rotate(180deg);
}

/* ===== КУРСОР ЗАГРУЗКИ ===== */
body.loading {
  cursor: wait !important;
}
body.loading * { cursor: wait !important; }

/* ===== ИНВЕНТАРЬ ===== */
.mc-inventory {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
  padding: 6px;
  background: #8B6F47;
  border: 3px solid; border-color: #5A3A1A #A0703E #A0703E #5A3A1A;
  max-width: 100%;
}
.mc-inv-slot {
  aspect-ratio: 1;
  background: rgba(0,0,0,0.2);
  border: 2px solid; border-color: #5A3A1A #A0703E #A0703E #5A3A1A;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; position: relative;
  cursor: pointer; user-select: none;
}
.mc-inv-slot:hover { background: rgba(255,255,255,0.15); }
.mc-inv-count {
  position: absolute;
  bottom: 1px; right: 2px;
  font-size: 9px; color: #fff; font-weight: bold;
  text-shadow: 1px 1px 0 #000;
}

/* ===== БОСС ===== */
.boss-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.boss-overlay.show { display: flex; }
.boss-creeper {
  font-size: 120px;
  cursor: pointer;
  user-select: none;
  animation: creeperShake 0.3s infinite;
  transition: transform 0.1s;
}
.boss-creeper:active { transform: scale(0.9); }
@keyframes creeperShake {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  25% { transform: translate(-5px, -3px) rotate(-3deg); }
  75% { transform: translate(5px, 3px) rotate(3deg); }
}
.boss-title {
  color: #fff; font-size: 24px; font-weight: bold;
  margin-bottom: 20px;
  text-shadow: 2px 2px #000;
  font-family: "MS Sans Serif", sans-serif;
}
.boss-hp-bar {
  width: 300px; height: 20px;
  background: #333;
  border: 2px solid #fff;
  margin-bottom: 20px;
}
.boss-hp-fill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, #ff0000, #ff6666);
  transition: width 0.15s;
}
.boss-timer {
  color: #ff0000; font-size: 18px; font-weight: bold;
  font-family: "Courier New", monospace;
}

/* ===== ПРЕСТИЖ ===== */
.prestige-panel {
  padding: 10px;
  background: #1a1a2e;
  color: #ffd700;
  border: 2px solid #ffd700;
  margin-top: 10px;
  font-family: "MS Sans Serif", sans-serif;
}
.prestige-btn {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  border: 2px solid;
  border-color: #fff8dc #8b4513 #8b4513 #fff8dc;
  padding: 8px 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: bold;
  color: #4a2c00;
  cursor: pointer;
  width: 100%;
  margin-top: 6px;
}
.prestige-btn:active { border-color: #8b4513 #fff8dc #fff8dc #8b4513; transform: translate(1px, 1px); }
.prestige-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== КРАФТ ===== */
.craft-recipe {
  display: flex; gap: 8px; align-items: center;
  padding: 6px; margin-bottom: 4px;
  background: #f0f0f0;
  border: 1px solid #a0a0a0;
  cursor: pointer;
  font-size: 11px;
}
.craft-recipe:hover { background: #d0d0ff; border-color: #000080; }
.craft-recipe.disabled { opacity: 0.5; cursor: default; }
.craft-recipe:not(.disabled):active { background: #a0a0ff; }

/* ===== КАРТОЧКИ ПРОЕКТОВ ===== */
.project-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  margin-bottom: 12px;
  background: #f0f0f0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  transition: transform 0.1s, box-shadow 0.1s;
}
.project-card:hover {
  background: #e8e8f8;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}
.project-card-icon {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  border: 3px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
.project-card-info {
  flex: 1;
  min-width: 0;
}
.project-card-title {
  font-size: 17px;
  font-weight: bold;
  color: #000080;
  margin-bottom: 4px;
}
.project-card-desc {
  font-size: 13px;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.5;
}
.project-card-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.project-card-links a {
  display: inline-block;
  padding: 5px 12px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  font-size: 12px;
  font-weight: bold;
  color: #000080;
  text-decoration: none;
  transition: background 0.1s;
}
.project-card-links a:hover {
  background: #000080;
  color: #fff;
}
.project-card-links a:active {
  border-color: #808080 #ffffff #ffffff #808080;
}

/* ===== ИНФО-БЛОКИ ===== */
.info-block {
  background: #f0f0f0;
  border: 1px solid #808080;
  padding: 14px 16px;
  margin-top: 16px;
  box-shadow: inset 1px 1px 0 #fff;
}
.info-block h3 {
  color: #000080;
  font-size: 15px;
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #c0c0c0;
}
.info-block p {
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.6;
}

/* ===== АРТЫ ===== */
.art-warning {
  text-align: center;
  padding: 24px 20px;
  background: #f8f8f8;
  border: 2px dashed #808080;
}
.art-warning-icon {
  font-size: 64px;
  margin-bottom: 12px;
}
.art-warning h3 {
  color: #000080;
  font-size: 20px;
  margin: 0 0 12px;
}
.art-warning p {
  font-size: 14px;
  line-height: 1.7;
  margin: 8px 0;
}
.tg-big-btn {
  display: inline-block;
  padding: 10px 24px;
  background: linear-gradient(135deg, #2ea6da, #0088cc);
  border: 2px solid;
  border-color: #7fc8e8 #005f8f #005f8f #7fc8e8;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
  transition: transform 0.05s;
}
.tg-big-btn:hover {
  background: linear-gradient(135deg, #3eb6ea, #0090d8);
}
.tg-big-btn:active {
  border-color: #005f8f #7fc8e8 #7fc8e8 #005f8f;
  transform: translate(1px, 1px);
}
/* ==================== ОБНОВЛЕНИЯ (changelog) ==================== */

.update-item {
  background: #f8f8f8;
  border: 1px solid #c0c0c0;
  border-left: 4px solid #000080;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.06);
}

.update-item.update-future {
  border-left-color: #808080;
  background: #f0f0f0;
  opacity: 0.85;
}

.update-version {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.update-num {
  font-size: 18px;
  font-weight: bold;
  color: #000080;
  font-family: "Courier New", monospace;
}

.update-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  border-radius: 2px;
  text-transform: uppercase;
}
.update-tag.new {
  background: #008000;
  color: #fff;
  animation: pulseNew 1.6s ease-in-out infinite;
}
.update-tag.future {
  background: #808080;
  color: #fff;
}
@keyframes pulseNew {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,128,0,0.5); }
  50% { box-shadow: 0 0 0 6px rgba(0,128,0,0); }
}

.update-date {
  font-size: 11px;
  color: #808080;
  margin-bottom: 8px;
  font-style: italic;
}

.update-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.7;
}
.update-list li { margin-bottom: 2px; }