@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

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

html, body, #root {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: Tahoma, "MS Sans Serif", Geneva, sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

/* ===== Desktop ===== */
.desktop {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 120%, #7cbf4f 0%, #5c9e3a 30%, transparent 60%),
    linear-gradient(180deg, #2b6fd6 0%, #4f97e8 40%, #9fd0f5 70%, #cfe9a8 71%, #86bf52 100%);
  overflow: hidden;
}

.desk-icons {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.desk-icon {
  width: 78px;
  text-align: center;
  cursor: pointer;
}
.desk-icon-img {
  font-size: 34px;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,.5));
}
.desk-icon-lbl {
  color: #fff;
  font-size: 11px;
  text-shadow: 1px 1px 1px #000, 0 0 4px #0055aa;
  margin-top: 2px;
  padding: 1px 2px;
}
.desk-icon-berrry .desk-icon-img {
  filter: drop-shadow(0 0 6px #ff5da2) drop-shadow(1px 1px 1px rgba(0,0,0,.5));
  animation: berrryPulse 2.4s ease-in-out infinite;
}
.desk-icon-berrry .desk-icon-lbl {
  color: #ffd6ec;
  text-shadow: 1px 1px 1px #000, 0 0 6px #ff2d84;
  font-weight: bold;
}
@keyframes berrryPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* ===== XP Window ===== */
.xp-window {
  position: absolute;
  width: 360px;
  max-width: 92vw;
  background: #ece9d8;
  border: 1px solid #0831d9;
  border-radius: 8px 8px 0 0;
  box-shadow: 4px 4px 12px rgba(0,0,0,.4);
  animation: popIn .12s ease-out;
}
.xp-window-mobile {
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%);
  width: 340px;
}
@keyframes popIn {
  from { transform: scale(.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.xp-window-mobile { animation: popInM .12s ease-out; }
@keyframes popInM {
  from { transform: translate(-50%,-50%) scale(.92); opacity: 0; }
  to { transform: translate(-50%,-50%) scale(1); opacity: 1; }
}

.xp-titlebar {
  height: 26px;
  background: linear-gradient(180deg, #0058ee 0%, #3a93ff 8%, #1657d6 45%, #0a49c9 90%, #0a4bd0 100%);
  border-radius: 7px 7px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 0 8px;
  cursor: move;
}
.xp-title {
  color: #fff;
  font-weight: bold;
  font-size: 13px;
  text-shadow: 1px 1px 2px rgba(0,0,0,.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xp-close {
  width: 21px;
  height: 20px;
  background: linear-gradient(180deg, #e2604f, #c72e1c);
  border: 1px solid #fff;
  border-radius: 3px;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  transition: transform .08s;
}
.xp-close:hover { background: linear-gradient(180deg, #ff8070, #e0402c); }

.xp-body {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px 6px;
}
.xp-message {
  font-size: 14px;
  color: #000;
  line-height: 1.4;
}

/* Glitchy 12 logo */
.logo12 {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #2a0a3a 0%, #120018 60%, #000 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 0 8px rgba(180,80,255,.4);
}
.logo12-tiles {
  position: absolute;
  top: 6px; left: 6px;
  display: grid;
  grid-template-columns: 10px 10px;
  grid-template-rows: 10px 10px;
  gap: 2px;
}
.logo12-tiles span {
  background: linear-gradient(135deg, #b060ff, #7020c0);
  border-radius: 1px;
  animation: flicker 2.2s infinite;
}
@keyframes flicker {
  0%,100% { opacity: 1; }
  48% { opacity: 1; }
  50% { opacity: .3; }
}
.logo12-num {
  position: relative;
  z-index: 2;
  font-family: "VT323", monospace;
  font-size: 30px;
  color: #ff6ad5;
  text-shadow: 1px 0 #6af, -1px 0 #f6a, 0 0 8px #f0f;
  margin-left: 14px;
  animation: glitch 3s infinite;
}
@keyframes glitch {
  0%,90%,100% { transform: translate(0,0); }
  92% { transform: translate(-1px, 1px); }
  94% { transform: translate(2px, -1px); }
  96% { transform: translate(-1px, 0); }
}

.xp-buttons {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 10px 12px 14px;
}
.xp-btn {
  min-width: 60px;
  padding: 4px 12px;
  font-family: Tahoma, sans-serif;
  font-size: 12px;
  color: #000;
  background: linear-gradient(180deg, #fdfdfd, #dfdbc8);
  border: 1px solid #7b7b6b;
  border-radius: 3px;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #a09e88;
  cursor: pointer;
}
.xp-btn:hover { border-color: #f0a020; box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #a09e88, 0 0 3px #ffb020; }
.xp-btn-pressed, .xp-btn:active {
  box-shadow: inset -1px -1px 0 #fff, inset 1px 1px 0 #a09e88;
  transform: translateY(1px);
}

.shake { animation: shakeAnim .4s; }
@keyframes shakeAnim {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ===== Taskbar ===== */
.taskbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 34px;
  background: linear-gradient(180deg, #3168d5 0%, #4a8bee 8%, #2d67d8 40%, #245bc9 90%, #1c4fb8 100%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px 0 0;
  z-index: 99999;
  border-top: 1px solid #6ba3ff;
}
.start-btn {
  height: 100%;
  padding: 0 18px 0 12px;
  background: linear-gradient(180deg, #56a94e, #368a2e 45%, #2c7a26 100%);
  color: #fff;
  font-weight: bold;
  font-style: italic;
  font-size: 15px;
  border: none;
  border-radius: 0 12px 12px 0;
  cursor: pointer;
  text-shadow: 1px 1px 2px #063d02;
  box-shadow: inset 0 2px 3px rgba(255,255,255,.3);
}
.start-btn-active { background: linear-gradient(180deg, #2c7a26, #368a2e); }

.task-progress {
  position: relative;
  width: 150px;
  height: 20px;
  background: #0a2f6e;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
  margin-left: 4px;
}
.task-progress-bar {
  height: 100%;
  background: repeating-linear-gradient(90deg, #7fd44f 0 8px, #5cb63a 8px 14px);
  transition: width .3s;
}
.task-progress-txt {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  text-shadow: 1px 1px 1px #000;
}

.task-items {
  flex: 1;
  display: flex;
  gap: 4px;
  overflow: hidden;
}
.task-item {
  max-width: 120px;
  height: 24px;
  padding: 0 8px;
  background: linear-gradient(180deg, #4a8bee, #2d67d8);
  color: #fff;
  font-size: 11px;
  border: 1px solid #1c4fb8;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-item:hover { background: linear-gradient(180deg, #5c9bff, #3f79e8); }

.systray {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #16b4e8, #1080d0);
  height: 100%;
  padding: 0 8px;
  border-left: 1px solid #6ba3ff;
}
.tray-mute { background: none; border: none; cursor: pointer; font-size: 14px; }
.tray-clock { color: #fff; font-size: 11px; text-shadow: 1px 1px 1px #000; }

/* ===== Start menu ===== */
.start-overlay { position: fixed; inset: 0; z-index: 99997; }
.start-menu {
  position: fixed;
  bottom: 34px;
  left: 0;
  width: 240px;
  background: #fff;
  border: 2px solid #245bc9;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  z-index: 99998;
  display: flex;
  overflow: hidden;
  box-shadow: 2px -2px 12px rgba(0,0,0,.4);
  animation: popIn .12s ease-out;
}
.start-menu-side {
  width: 32px;
  background: linear-gradient(180deg, #2c7a26, #56a94e);
  color: #fff;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-weight: bold;
  font-size: 13px;
  padding: 8px 4px;
  text-align: center;
}
.start-menu-list { flex: 1; padding: 4px 0; }
.start-menu-item {
  padding: 7px 14px;
  font-size: 13px;
  color: #003;
  cursor: pointer;
}
.start-menu-item:hover { background: #2d67d8; color: #fff; }
.start-menu-static { color: #999; font-size: 11px; font-style: italic; cursor: default; }
.start-menu-static:hover { background: none; color: #999; }

/* ===== BSOD ===== */
.bsod {
  position: fixed;
  inset: 0;
  background: #0824c7;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "VT323", "Lucida Console", monospace;
  padding: 20px;
}
.bsod-inner { max-width: 620px; font-size: 20px; line-height: 1.5; }
.bsod-inner p { margin-bottom: 16px; }
.bsod-face { font-size: 60px; margin-bottom: 20px; }
.bsod-tech { font-size: 16px; opacity: .85; }
.bsod-btn {
  margin-top: 10px;
  padding: 8px 20px;
  background: #cfd8ff;
  color: #0824c7;
  border: 2px solid #fff;
  font-family: "VT323", monospace;
  font-size: 20px;
  cursor: pointer;
}
.bsod-btn:hover { background: #fff; }
.bsod-remix { display: block; margin-top: 18px; color: #9fd0ff; font-size: 15px; }

.hidden-footer {
  position: fixed;
  bottom: 38px;
  right: 6px;
  color: rgba(255,255,255,.35);
  font-size: 9px;
  text-decoration: none;
  z-index: 5;
}
.hidden-footer:hover { color: #fff; }

@media (max-width: 700px) {
  .desk-icons { flex-direction: row; flex-wrap: wrap; }
  .desk-icon { width: 66px; }
  .task-progress { width: 90px; }
  .hidden-footer { bottom: 40px; }
}
</style>