/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; }

/* ===== BOOT SCREEN ===== */
#boot-screen {
  position: fixed; inset: 0; background: #0a0a0a;
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; transition: opacity 0.8s;
}
.boot-content { text-align: center; color: #e0e0e0; }
.boot-logo { font-size: 64px; color: #4fc3f7; margin-bottom: 24px; animation: pulse 1.5s infinite; }
.boot-text { font-size: 14px; letter-spacing: 3px; margin-bottom: 20px; color: #aaa; }
.boot-bar { width: 240px; height: 3px; background: #222; margin: 0 auto 16px; border-radius: 2px; }
.boot-bar-fill { height: 100%; width: 0; background: #4fc3f7; border-radius: 2px; transition: width 2.5s ease; }
.boot-sub { font-size: 11px; color: #555; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ===== DESKTOP ===== */
#desktop {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  overflow: hidden;
}

/* Desktop sticky note */
.desktop-note {
  position: absolute; top: 20px; right: 20px;
  background: #fef08a; padding: 12px 16px; border-radius: 4px;
  box-shadow: 3px 3px 8px rgba(0,0,0,0.4);
  font-size: 12px; color: #333; max-width: 180px;
  transform: rotate(2deg); z-index: 5;
  cursor: default;
}
.desktop-note .note-pin { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); font-size: 16px; }

/* ===== DESKTOP ICONS ===== */
.desktop-icons {
  position: absolute; top: 20px; left: 20px;
  display: flex; flex-direction: column; gap: 8px;
  flex-wrap: wrap; max-height: calc(100vh - 60px);
}
.desktop-icon {
  display: flex; flex-direction: column; align-items: center;
  width: 72px; padding: 8px 4px; border-radius: 6px;
  cursor: pointer; position: relative; user-select: none;
  transition: background 0.15s;
}
.desktop-icon:hover { background: rgba(255,255,255,0.12); }
.desktop-icon.selected { background: rgba(79,195,247,0.25); }
.icon-img { font-size: 32px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }
.icon-label { font-size: 11px; color: #fff; text-align: center; margin-top: 4px; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); word-break: keep-all; line-height: 1.3; }
.icon-locked-badge { position: absolute; bottom: 20px; right: 8px; font-size: 12px; }
.desktop-icon.locked { cursor: not-allowed; }

/* ===== TASKBAR ===== */
.taskbar {
  position: absolute; bottom: 0; left: 0; right: 0; height: 40px;
  background: rgba(10,10,20,0.92); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; z-index: 100;
}
.taskbar-start {
  width: 48px; height: 40px; display: flex; align-items: center; justify-content: center;
  color: #4fc3f7; font-size: 18px; cursor: pointer;
  transition: background 0.15s;
}
.taskbar-start:hover { background: rgba(79,195,247,0.15); }
.taskbar-apps { flex: 1; display: flex; align-items: center; gap: 4px; padding: 0 4px; overflow: hidden; }
.taskbar-btn {
  height: 32px; padding: 0 12px; border-radius: 4px;
  background: rgba(255,255,255,0.08); color: #ddd; font-size: 12px;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  border: 1px solid transparent; transition: all 0.15s; white-space: nowrap;
  font-family: inherit;
}
.taskbar-btn:hover { background: rgba(255,255,255,0.16); }
.taskbar-btn.active { background: rgba(79,195,247,0.2); border-color: rgba(79,195,247,0.4); color: #4fc3f7; }
.taskbar-tray { display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.tray-item { font-size: 12px; color: #aaa; cursor: default; }
#tray-clock { font-size: 12px; color: #ccc; min-width: 70px; text-align: right; }

/* ===== START MENU ===== */
.start-menu {
  position: absolute; bottom: 40px; left: 0; width: 200px;
  background: rgba(15,15,30,0.96); backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 8px 8px 0 0;
  z-index: 200; overflow: hidden;
}
.start-menu-header { padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.start-user { font-size: 14px; color: #fff; }
.start-user-sub { font-size: 11px; color: #666; margin-top: 2px; }
.start-menu-items { padding: 8px 0; }
.start-item { padding: 8px 16px; font-size: 13px; color: #ccc; cursor: pointer; transition: background 0.15s; }
.start-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.start-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 4px 0; }

/* ===== WINDOW SYSTEM ===== */
.app-window {
  position: absolute; background: #1a1a2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  min-width: 320px; min-height: 200px;
  display: flex; flex-direction: column;
  z-index: 10;
}
.app-window.focused { border-color: rgba(79,195,247,0.3); z-index: 20; }
.window-titlebar {
  height: 36px; display: flex; align-items: center;
  background: rgba(0,0,0,0.3); padding: 0 12px;
  cursor: move; user-select: none; flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.window-title { flex: 1; font-size: 13px; color: #ccc; }
.window-controls { display: flex; gap: 6px; }
.win-btn {
  width: 12px; height: 12px; border-radius: 50%; cursor: pointer;
  border: none; transition: opacity 0.15s;
}
.win-btn:hover { opacity: 0.8; }
.win-btn.close { background: #ff5f57; }
.win-btn.min { background: #febc2e; }
.win-btn.max { background: #28c840; }
.window-body { flex: 1; overflow: hidden; position: relative; }

/* ===== IMAGE OVERLAY ===== */
.img-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.9);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 9000; cursor: zoom-out;
}
.img-overlay img { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: 4px; }
.img-overlay-hint { color: #666; font-size: 12px; margin-top: 16px; letter-spacing: 1px; }

/* ===== REGISTER OVERLAY ===== */
.register-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8);
  display: flex; align-items: center; justify-content: center; z-index: 8000;
}
.register-modal {
  background: #1a1a2e; border: 1px solid rgba(79,195,247,0.3);
  border-radius: 12px; padding: 32px; width: 320px; text-align: center;
}
.register-modal h2 { color: #4fc3f7; margin-bottom: 8px; }
.register-modal p { color: #666; font-size: 13px; margin-bottom: 20px; }
.register-input {
  width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; padding: 10px 12px; color: #fff; font-size: 14px;
  margin-bottom: 10px; outline: none; font-family: inherit;
}
.register-input:focus { border-color: rgba(79,195,247,0.5); }
.register-btn {
  width: 100%; padding: 12px; background: #4fc3f7; color: #000;
  border: none; border-radius: 6px; font-size: 14px; font-weight: bold;
  cursor: pointer; margin-bottom: 12px; font-family: inherit;
}
.register-skip { color: #555; font-size: 12px; cursor: pointer; }
.register-skip:hover { color: #888; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

/* ===== NOTIFICATION ===== */
.notification-container {
  position: fixed; top: 12px; left: 12px;
  display: flex; flex-direction: column; gap: 6px;
  z-index: 9500; pointer-events: none;
}
.game-notification {
  background: rgba(10, 10, 20, 0.72);
  backdrop-filter: blur(8px);
  border-left: 2px solid rgba(79,195,247,0.6);
  border-radius: 0 4px 4px 0;
  padding: 6px 14px 6px 10px;
  font-size: 12px; color: rgba(200,220,255,0.85);
  letter-spacing: 0.3px;
  max-width: 260px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateX(-16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.game-notification.show {
  opacity: 1; transform: translateX(0);
}
