/* ============================================
   BITSUMMIT XP - Main Stylesheet
   Windows XP Desktop Experience
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  cursor: default;
}

/* ============================================
   CRT / SCREEN FILTER EFFECT
   ============================================ */
body {
  filter: brightness(1.06) contrast(1.08) saturate(1.06);
}

/* Scanline overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.03) 0px,
    rgba(0, 0, 0, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
}

/* Grain / noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 99998;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  animation: grainShift 0.5s steps(5) infinite;
}

@keyframes grainShift {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-2%, -3%); }
  40% { transform: translate(3%, 1%); }
  60% { transform: translate(-1%, 4%); }
  80% { transform: translate(2%, -2%); }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- CSS Variables --- */
:root {
  --taskbar-height: 30px;
  --xp-bg-main: #ece9d8;
  --xp-bg-accent: #0078d4;
  --xp-blue-dark: #003c8a;
  --xp-blue-medium: #587cdb;
  --xp-blue-light: #bad7f8;
  --xp-orange: #f8953d;
  --desktop-icon-size: 60px;
  --desktop-icon-cell: 100px;
  --z-boot: 10001;
  --z-login: 10000;
  --z-window: 100;
  --z-taskbar: 500;
  --z-startmenu: 600;
  --z-balloon: 550;
}

/* ============================================
   BOOT SCREEN
   ============================================ */
#boot-screen {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-boot);
  opacity: 1;
  transition: opacity 0.8s ease;
}

#boot-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  opacity: 0;
  animation: bootFadeIn 0.8s ease 0.3s forwards;
}

@keyframes bootFadeIn {
  to { opacity: 1; }
}

.boot-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.boot-flag {
  filter: drop-shadow(0 0 20px rgba(0,120,212,0.3));
}

.boot-brand {
  text-align: center;
  position: relative;
}

.boot-name {
  color: #fff;
  font-size: 42px;
  font-weight: 700;
  font-family: 'Franklin Gothic Medium', 'Trebuchet MS', Tahoma, sans-serif;
  letter-spacing: 1px;
}

.boot-xp {
  color: #f25022;
  font-size: 28px;
  font-weight: 700;
  font-family: 'Franklin Gothic Medium', 'Trebuchet MS', Tahoma, sans-serif;
  position: relative;
  top: -14px;
  margin-left: 2px;
}

.boot-subtitle {
  display: block;
  color: #ccc;
  font-size: 16px;
  font-style: italic;
  font-family: 'Franklin Gothic Medium', Tahoma, sans-serif;
  letter-spacing: 1.5px;
  margin-top: -4px;
}

/* Boot progress bar */
.boot-progress {
  display: flex;
  justify-content: center;
}

.boot-progress-track {
  border: 2px solid #b2b2b2;
  border-radius: 7px;
  width: 180px;
  height: 22px;
  padding: 2px 1px;
  overflow: hidden;
  font-size: 0;
}

.boot-progress-blocks {
  display: flex;
  gap: 2px;
  animation: bootSlide 1.8s infinite ease-in-out;
  width: fit-content;
}

.box {
  display: inline-block;
  width: 9px;
  height: 16px;
  border-radius: 1px;
  background: linear-gradient(180deg, #2838c7 0%, #5979ef 17%, #869ef3 32%, #869ef3 45%, #5979ef 59%, #2838c7 100%);
}

@keyframes bootSlide {
  0%   { transform: translateX(-35px); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateX(180px); opacity: 0; }
}

/* Boot bottom */
.boot-bottom-left {
  position: absolute;
  bottom: 48px;
  left: 100px;
  display: flex;
  flex-direction: column;
  color: #fff;
  font-size: 16px;
  line-height: 1.4;
  opacity: 0;
  animation: bootFadeIn 0.5s ease 0.5s forwards;
}

.boot-bottom-right {
  position: absolute;
  bottom: 50px;
  right: 100px;
  opacity: 0;
  animation: bootFadeIn 0.5s ease 0.5s forwards;
}

.boot-portfolio-text {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  font-style: italic;
  font-family: 'Franklin Gothic Medium', Tahoma, sans-serif;
}

.boot-portfolio-reg {
  color: #fff;
  font-size: 14px;
  position: relative;
  top: -10px;
}

/* ============================================
   LOGIN SCREEN
   ============================================ */
#login-screen {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-login);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

#login-screen.visible {
  opacity: 1;
  pointer-events: auto;
}

#login-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.login-screen {
  position: fixed;
  inset: 0;
  background-color: #002d99;
  color: #fff;
  overflow: hidden;
}

.login-screen-inner {
  position: absolute;
  inset: 100px 0;
  background-color: #587cdb;
}

.login-screen-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #bad7f8, transparent, transparent);
}

.login-screen-inner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #f8953d, transparent, transparent);
}

.login-screen-center {
  display: flex;
  height: 100%;
  position: relative;
  width: 100%;
}

.login-left {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(calc(-100% - 72px), -50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.login-logo {
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

.login-brand {
  text-align: right;
  margin-top: 8px;
}

.login-name {
  font-size: 32px;
  font-weight: 700;
  font-family: 'Franklin Gothic Medium', Tahoma, sans-serif;
  letter-spacing: 0.5px;
}

.login-xp {
  color: #f25022;
  font-size: 20px;
  font-weight: 700;
  position: relative;
  top: -10px;
}

.login-subtitle {
  display: block;
  font-size: 15px;
  font-style: italic;
  color: rgba(255,255,255,0.85);
  margin-top: -2px;
}

.login-instruction {
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.25px;
  margin-top: 24px;
  text-align: right;
}

.login-divider {
  position: absolute;
  left: 50%;
  top: 20%;
  bottom: 20%;
  width: 2px;
  background: linear-gradient(180deg, rgba(186,215,248,0) 0%, #bad7f8 40%, #bad7f8 60%, rgba(186,215,248,0) 100%);
  opacity: 0.35;
  transform: translateX(-50%);
}

.login-right {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(72px, -50%);
  display: flex;
  align-items: center;
}

.login-profile {
  display: flex;
  align-items: center;
  gap: 20px;
  background: transparent;
  border: none;
  border-radius: 5px;
  padding: 12px 18px;
  cursor: pointer;
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.login-profile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #113fa6, #113fa6, #587cdb);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.login-profile:hover::before {
  opacity: 1;
}

.login-avatar {
  position: relative;
  z-index: 1;
}

.login-avatar svg,
.login-avatar img {
  border: 3px solid #fff;
  border-radius: 5px;
  transition: border-color 0.3s;
  object-fit: contain;
  background: #fff;
}

.login-profile:hover .login-avatar svg,
.login-profile:hover .login-avatar img {
  border-color: #fdbd32;
}

.login-user-info {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.login-user-name {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.25px;
  font-family: Tahoma, Arial, sans-serif;
}

.login-user-title {
  font-size: 13px;
  font-weight: 700;
  color: navy;
  margin-top: -2px;
  transition: color 0.3s;
}

.login-profile:hover .login-user-title {
  color: #fdbd32;
}

/* Login bottom */
.login-bottom-left {
  position: absolute;
  bottom: 35px;
  left: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.shutdown-icon {
  opacity: 0.8;
  transition: opacity 0.2s;
}

.login-bottom-left:hover .shutdown-icon {
  opacity: 1;
}

.shutdown-text {
  color: #eff1ed;
  font-size: 16px;
  font-weight: 500;
}

.login-bottom-right {
  position: absolute;
  bottom: 30px;
  right: 50px;
  display: flex;
  flex-direction: column;
}

.login-bottom-right span {
  font-size: 14px;
  margin-top: 1px;
}

/* Welcome message */
.welcome-message {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 3rem;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  z-index: 4000;
  transition: opacity 0.7s;
}

.welcome-message.visible {
  opacity: 1;
}

/* ============================================
   DESKTOP
   ============================================ */
.desktop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/wallpaper.png');
  background-size: cover;
  background-position: center;
  overflow: hidden;
  /* Fallback to a gradient that mimics Bliss */
  background-color: #3a6ea5;
}


.desktop-icons {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: var(--desktop-icon-cell);
  grid-auto-rows: var(--desktop-icon-cell);
  gap: 10px;
  padding: 28px 0 0 24px;
  height: calc(100% - var(--taskbar-height));
  place-content: start start;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: var(--desktop-icon-cell);
  height: var(--desktop-icon-cell);
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  transition: background-color 0.1s;
}

.desktop-icon:hover {
  background-color: rgba(49,106,197,0.22);
}

.desktop-icon.selected {
  background-color: rgba(49,106,197,0.5);
  border: 1px dotted rgba(255,255,255,0.5);
}

.desktop-icon svg {
  width: var(--desktop-icon-size);
  height: var(--desktop-icon-size);
  margin-bottom: 5px;
  filter: drop-shadow(1px 2px 3px rgba(0,0,0,0.4));
}

.desktop-icon span {
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.3px;
  line-height: 16px;
  text-align: center;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.9), 0 0 3px rgba(0,0,0,0.8);
  white-space: normal;
  max-width: 100%;
}

/* ============================================
   APP WINDOWS
   ============================================ */
.app-window {
  position: absolute;
  border: 2px solid #284ffd;
  border-radius: 8px 8px 0 0;
  border-top-width: 1.5px;
  display: flex;
  flex-direction: column;
  min-width: 420px;
  min-height: 320px;
  filter: drop-shadow(2px 3px 6px rgba(0,0,0,0.45));
  overflow: hidden;
  z-index: var(--z-window);
  transition: filter 0.1s ease;
}

.app-window:not(.active) {
  border-color: #3d7bff;
}

.app-window:not(.active) .title-bar {
  background: linear-gradient(180deg, #9ab3db 0%, #7a9cc7 8%, #607cb0 28%, #6e8bbd 48%, #8ca8d2 85%, #afc3e0 95%, #c0d4ec 100%) !important;
}

.window-inactive-mask {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 31px;
  background-color: rgba(255,255,255,0.25);
  border-radius: 8px 8px 0 0;
  pointer-events: none;
  z-index: 10;
}

.app-window:not(.active) .window-inactive-mask {
  display: block;
}

/* Title Bar */
.app-window .title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 30px;
  padding: 0 3px 1px 3px;
  margin: 0 -1px;
  width: calc(100% + 2px);
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #0997ff 0%, #0673e9 8%, #0060d0 28%, #0568d9 48%, #0883f0 85%, #0d97ff 95%, #1ba1ff 100%);
  cursor: move;
  overflow: hidden;
}

.title-bar-left {
  display: flex;
  align-items: center;
  padding-left: 3px;
}

.title-bar-icon {
  display: flex;
  align-items: center;
  margin-right: 4px;
}

.title-bar-text {
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 3px 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
}

.title-bar-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-right: 2px;
}

/* Window Body */
.app-window .window-body {
  background-color: var(--xp-bg-main);
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border: none;
  margin: 0;
  padding: 0;
}

/* Menu Bar */
.menu-bar {
  display: flex;
  align-items: center;
  background: var(--xp-bg-main);
  border-bottom: 1px solid #aca899;
  padding: 2px 4px;
  gap: 2px;
  position: relative;
}

.menu-item {
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
  border-radius: 2px;
}

.menu-item:hover:not(.disabled),
.menu-item.active {
  background: #316ac5;
  color: #fff;
}

.menu-item.disabled {
  color: #aca899;
  cursor: default;
}

.menu-item.disabled:hover {
  background: transparent;
  color: #aca899;
}

/* Dropdown Menus */
.dropdown-menu {
  position: absolute;
  top: 100%;
  background: #f2f2f2;
  border: 1px solid #d0d0d0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  width: 160px;
  z-index: 99999;
  display: none;
  padding: 2px 0;
}

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

.dropdown-menu .menu-option {
  padding: 3px 10px 3px 24px;
  cursor: default;
  white-space: nowrap;
  color: #222;
}

.dropdown-menu .menu-option:hover:not(.disabled) {
  background: #316ac5;
  color: #fff;
}

.dropdown-menu .menu-option.disabled {
  color: #bcbcbc;
}

.dropdown-menu .menu-separator {
  border-top: 1px solid #e0e0e0;
  margin: 2px 0;
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, #fafafa 0%, #ece9d8 100%);
  border-bottom: 1px solid #aca899;
  padding: 2px 6px;
  gap: 2px;
}

.toolbar-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 11px;
  font-family: Tahoma, Arial, sans-serif;
  cursor: pointer;
  color: #000;
  white-space: nowrap;
}

.toolbar-btn:hover {
  border-color: #c2c2c2;
  background: linear-gradient(180deg, #fff 0%, #eee 100%);
}

.toolbar-icon {
  font-size: 10px;
}

.toolbar-separator {
  width: 1px;
  height: 20px;
  background: #aca899;
  margin: 0 4px;
}

/* Address Bar */
.address-bar {
  display: flex;
  align-items: center;
  background: var(--xp-bg-main);
  border-bottom: 1px solid #aca899;
  padding: 3px 6px;
  gap: 6px;
}

.address-label {
  font-size: 11px;
  color: #000;
  white-space: nowrap;
}

.address-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid #7f9db9;
  padding: 2px 6px;
  font-size: 11px;
  min-height: 22px;
}

.address-go {
  padding: 2px 10px;
  font-size: 11px;
  font-family: Tahoma, Arial, sans-serif;
  background: linear-gradient(180deg, #fff 0%, #ece9d8 100%);
  border: 1px solid #aca899;
  border-radius: 3px;
  cursor: pointer;
}

.address-go:hover {
  border-color: #316ac5;
}

/* Window Content Area */
.window-content-area {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.window-content-area iframe {
  width: 100%;
  height: 100%;
  border: none;
  flex: 1;
}

/* Status Bar */
.status-bar {
  display: flex;
  align-items: center;
  background: #e9e9e9;
  height: 22px;
  padding: 1px 3px;
  flex-shrink: 0;
  margin-top: auto;
}

.status-bar-field {
  display: flex;
  align-items: center;
  padding: 0 6px;
  height: 100%;
  font-size: 11px;
  border-right: 1px inset silver;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.status-bar-field:last-child {
  border-right: none;
  flex-grow: 1;
}

/* Music Player - compact layout, no menu/status bar */
#music-window .menu-bar,
#music-window .status-bar {
  display: none;
}

/* ============================================
   TASKBAR
   ============================================ */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--taskbar-height);
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, #3168d5 0%, #4088e0 3%, #2463d4 6%, #1d5bc7 10%, #1856c3 15%, #1656c3 85%, #1457c4 90%, #1358c5 95%, #1259c7 100%);
  z-index: var(--z-taskbar);
  overflow: hidden;
}

/* Start Button */
.start-button {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  height: var(--taskbar-height);
  cursor: pointer;
  flex-shrink: 0;
  transition: filter 0.1s;
}

.start-button:hover {
  filter: brightness(1.15);
}

.start-button:active,
.start-button.active {
  filter: brightness(0.9);
}

.start-button svg {
  display: block;
  height: var(--taskbar-height);
}

/* Taskbar Programs */
.taskbar-programs {
  display: flex;
  align-items: center;
  flex-grow: 1;
  height: 100%;
  margin: 0 4px;
  overflow: hidden;
  gap: 2px;
}

.taskbar-item {
  display: flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  background: linear-gradient(180deg, #3ba0e7 0%, #3295eb 50%, #3389d4 100%);
  border: 1px solid #0e63ad;
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.2);
  transition: background 0.18s, box-shadow 0.18s;
  gap: 6px;
  flex-shrink: 1;
}

.taskbar-item:hover:not(.active) {
  background: linear-gradient(180deg, #56b6fc 0%, #52aeff 50%, #0e81ec 100%);
  border: 1px solid #2176c7;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.45), 0 1px 2px rgba(0,0,0,0.18);
}

.taskbar-item.active {
  background: linear-gradient(0deg, #1a5a99 0%, #2176c7 100%);
  border: 1px solid #174a7c;
  box-shadow: inset 1px 1px 1px rgba(0,0,0,0.4), inset -1px -1px 0 rgba(255,255,255,0.05);
  text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
}

.taskbar-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.taskbar-item span {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* System Tray */
.system-tray {
  display: flex;
  align-items: center;
  height: 100%;
  margin-left: auto;
  flex-shrink: 0;
  background: linear-gradient(180deg, #1290e9 0%, #1080d0 50%, #0e6abf 100%);
  border-left: 1px solid rgba(255,255,255,0.15);
}

.tray-content {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 12px;
  gap: 8px;
}

.tray-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tray-icon {
  width: 16px;
  height: 16px;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.tray-icon:hover {
  opacity: 1;
}

.tray-time {
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.6);
}

/* ============================================
   START MENU
   ============================================ */
.start-menu {
  position: fixed;
  bottom: var(--taskbar-height);
  left: 0;
  width: 380px;
  background: #fff;
  border: 2px solid #003c8a;
  border-radius: 8px 8px 0 0;
  box-shadow: 3px -3px 12px rgba(0,0,0,0.4);
  z-index: var(--z-startmenu);
  animation: startMenuOpen 0.15s ease-out;
}

@keyframes startMenuOpen {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Start Menu Header */
.start-menu-header {
  display: flex;
  align-items: center;
  flex: 0 0 51px;
  height: 51px;
  width: 100%;
  position: relative;
  background: linear-gradient(180deg, #1868ce 0%, #0e60cb 12%, #0e60cb 20%, #1164cf 32%, #1667cf 33%, #1b6cd3 47%, #1e70d9 54%, #2476dc 60%, #297ae0 65%, #3482e3 77%, #3786e5 79%, #428ee9 90%, #4791eb);
  border-radius: 5px 5px 0 0;
  box-shadow: inset 0 -2px 3px rgba(10, 36, 106, 0.4);
}

.start-menu-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 140, 0, 0.1) 0%, rgba(255, 165, 0, 0.9) 30%, rgba(255, 165, 0, 0.9) 70%, rgba(255, 140, 0, 0.1));
  box-shadow: 0 1px 2px hsla(0, 0%, 100%, 0.3);
}

.start-menu-avatar {
  width: 40px;
  height: 40px;
  margin: 7px 8px 8px;
  border: 2px solid hsla(0, 0%, 100%, 0.7);
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 95, 184, 0.6), inset 0 0 2px 1px hsla(0, 0%, 100%, 0.35);
  object-fit: contain;
  background: #fff;
  box-sizing: border-box;
}

.start-menu-user {
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

/* Start Menu Body */
.start-menu-body {
  display: flex;
  min-height: 280px;
}

.start-menu-left {
  flex: 1;
  background: #fff;
  padding: 6px 0;
  border-right: 1px solid #d6d2c2;
}

.start-menu-right {
  width: 160px;
  background: #d3e5fa;
  padding: 6px 0;
}

/* Start Menu Items (left) */
.start-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #000;
  transition: background 0.1s;
}

.start-menu-item:hover {
  background: #316ac5;
  color: #fff;
}

.start-menu-item:hover .start-item-desc {
  color: #cde;
}

.start-item-text {
  display: flex;
  flex-direction: column;
}

.start-item-name {
  font-weight: 700;
  font-size: 12px;
}

.start-item-desc {
  font-size: 10px;
  color: #666;
  transition: color 0.1s;
}

.start-menu-separator {
  height: 1px;
  background: #d6d2c2;
  margin: 4px 12px;
}

.start-menu-all-programs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  border-top: 1px solid #d6d2c2;
  margin-top: 4px;
}

.start-menu-all-programs:hover {
  background: #316ac5;
  color: #fff;
}

.all-programs-arrow {
  font-size: 10px;
  color: #107c10;
}

.start-menu-all-programs:hover .all-programs-arrow {
  color: #fff;
}

/* All Programs Flyout */
.start-menu-left {
  position: relative;
}

.all-programs-flyout {
  display: none;
  position: absolute;
  left: 100%;
  bottom: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #7f9db9;
  border-left: 1px solid #d6d2c2;
  box-shadow: 4px 4px 10px rgba(0,0,0,.25);
  z-index: 610;
  animation: flyoutSlideIn .15s ease-out;
}

.all-programs-flyout.visible {
  display: block;
}

@keyframes flyoutSlideIn {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}

.all-programs-list {
  padding: 4px 0;
}

.all-programs-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 12px;
  border: none;
  background: none;
  font-family: 'Tahoma', 'Segoe UI', sans-serif;
  font-size: 11px;
  cursor: pointer;
  text-align: left;
  color: #000;
}

.all-programs-item:hover {
  background: #316ac5;
  color: #fff;
}

.all-programs-separator {
  height: 1px;
  background: #d6d2c2;
  margin: 4px 12px;
}

/* Recently Used Flyout */
.recently-used-wrapper {
  position: relative;
}

.recently-used-btn {
  position: relative;
}

.recently-used-flyout {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid #7f9db9;
  border-left: 1px solid #d6d2c2;
  box-shadow: 4px 4px 10px rgba(0,0,0,.25);
  z-index: 620;
  animation: flyoutSlideIn .15s ease-out;
}

.recently-used-flyout.visible {
  display: block;
}

.recently-used-list {
  padding: 4px 0;
}

.recently-used-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  font-family: 'Tahoma', 'Segoe UI', sans-serif;
  font-size: 11px;
  color: #000;
  cursor: default;
}

.recently-used-item:hover {
  background: #316ac5;
  color: #fff;
}

/* Start Menu Items (right) */
.start-menu-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #000;
  transition: background 0.1s;
}

.start-menu-item-right:hover {
  background: #316ac5;
  color: #fff;
}

.start-menu-separator-right {
  height: 1px;
  background: #a8c3e8;
  margin: 4px 8px;
}

/* Start Menu Footer */
.start-menu-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 6px 12px;
  background: linear-gradient(180deg, #3a7bdb 0%, #2d6dd0 100%);
  border-top: 1px solid #0d3a80;
}

.start-footer-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: transparent;
  border: none;
  color: #fff;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.1s;
}

.start-footer-btn:hover {
  background: rgba(255,255,255,0.15);
}

/* Start Menu Overlay */
.start-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-startmenu) - 1);
}

/* ============================================
   BALLOON NOTIFICATION
   ============================================ */
#balloon-root {
  position: fixed;
  bottom: calc(var(--taskbar-height) + 8px);
  right: 16px;
  z-index: var(--z-balloon);
}

.balloon {
  background-color: #ffffe1;
  border: 1px solid #000;
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 11.5px;
  filter: drop-shadow(2px 2px 1px rgba(0,0,0,0.4));
  animation: balloonIn 0.5s ease forwards;
  position: relative;
  max-width: 300px;
}

@keyframes balloonIn {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.balloon::before {
  content: '';
  position: absolute;
  bottom: -19px;
  right: 14px;
  border-style: solid;
  border-width: 0 19px 19px 0;
  border-color: transparent #000 transparent transparent;
}

.balloon::after {
  content: '';
  position: absolute;
  bottom: -17px;
  right: 15px;
  border-style: solid;
  border-width: 0 18px 18px 0;
  border-color: transparent #ffffe1 transparent transparent;
}

.balloon-close {
  position: absolute;
  top: 4px;
  right: 6px;
  background: transparent;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 3px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #787878;
  padding: 0;
}

.balloon-close:hover {
  background: #e81123;
  color: #fff;
  border-color: rgba(0,0,0,0.3);
}

.balloon-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 12.5px;
  margin-bottom: 5px;
}

.balloon-text {
  line-height: 1.4;
  margin: 0;
}

.balloon-links {
  margin-top: 8px;
}

.balloon-links a {
  color: #0066cc;
  text-decoration: underline;
  cursor: pointer;
}

.balloon-links a:hover {
  color: #003399;
}

/* ============================================
   WINDOW ANIMATIONS
   ============================================ */
@keyframes windowOpen {
  0% { opacity: 0; transform: scale(0.9) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.window-opening {
  animation: windowOpen 0.2s ease-out;
}

@keyframes windowClose {
  0% { opacity: 1; }
  100% { opacity: 0; transform: scale(0.95); }
}

.window-closing {
  animation: windowClose 0.15s ease-in forwards;
}

@keyframes windowMinimize {
  0% { opacity: 1; transform: none; }
  100% { opacity: 0.5; transform: scale(0.55) translateY(50vh); }
}

.window-minimizing {
  animation: windowMinimize 0.15s ease-in forwards;
}

/* ============================================
   MAXIMIZED WINDOW
   ============================================ */
.app-window.maximized {
  left: 0 !important;
  top: 0 !important;
  width: 100vw !important;
  height: calc(100vh - var(--taskbar-height)) !important;
  max-width: 100vw !important;
  max-height: calc(100vh - var(--taskbar-height)) !important;
  border-radius: 0 !important;
  border-width: 0 !important;
}

.app-window.maximized .title-bar {
  border-radius: 0;
}

/* ============================================
   DRAGGING STATE
   ============================================ */
.dragging-window {
  cursor: move !important;
}

.dragging-window iframe {
  pointer-events: none !important;
  opacity: 0.92 !important;
}

.dragging-window * {
  cursor: move !important;
}

/* ============================================
   RESPONSIVE / MOBILE
   ============================================ */
@media (max-width: 768px) {
  :root {
    --desktop-icon-size: 48px;
    --desktop-icon-cell: 85px;
  }

  .boot-bottom-left { display: none; }
  .boot-bottom-right { bottom: 30px; left: 50%; right: auto; transform: translateX(-50%); }

  .login-left { display: none; }
  .login-divider { display: none; }
  .login-right {
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .app-window {
    left: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    height: calc(100vh - var(--taskbar-height)) !important;
    min-width: 0 !important;
    border: none !important;
    border-radius: 0 !important;
  }

  .start-menu {
    width: 100vw;
    border-radius: 0;
  }
}

/* ============================================
   RIGHT-CLICK CONTEXT MENUS
   ============================================ */
.xp-context-menu {
  position: fixed;
  background: #f2f2f2;
  border: 1px solid #868686;
  box-shadow: 2px 2px 3px rgba(0,0,0,0.25);
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  min-width: 160px;
  padding: 2px 0;
  z-index: 100000;
}

.ctx-option {
  padding: 4px 12px 4px 24px;
  cursor: default;
  white-space: nowrap;
  color: #000;
}

.ctx-option:hover:not(.disabled) {
  background: #316ac5;
  color: #fff;
}

.ctx-option.disabled {
  color: #aca899;
}

.ctx-separator {
  border-top: 1px solid #d6d2c2;
  margin: 3px 2px;
}

/* ============================================
   RUBBER BAND SELECTION
   ============================================ */
.rubber-band {
  position: fixed;
  border: 1px dashed rgba(49,106,197,0.8);
  background: rgba(49,106,197,0.15);
  z-index: 50;
  pointer-events: none;
}

/* ============================================
   ICON DRAGGING
   ============================================ */
.desktop-icon.dragging-icon {
  opacity: 0.7;
  cursor: move !important;
  transition: none;
}

.desktop-icon img {
  pointer-events: none;
}

/* ============================================
   SCREENSAVER
   ============================================ */
.screensaver-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 100001;
  cursor: none;
  overflow: hidden;
}

.screensaver-overlay.screensaver-fadein {
  animation: screensaverFadeIn 0.8s ease forwards;
}

@keyframes screensaverFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.screensaver-logo {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
  filter: drop-shadow(0 0 12px rgba(255,255,255,0.3));
}

