* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  user-select: none;
}

/* Vista Aurora Wallpaper — Mourning Edition */
.vista-wallpaper {
  position: fixed;
  inset: 0;
  background: #080812;
  overflow: hidden;
}

.vista-wallpaper::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 60% at 10% 90%, rgba(20, 60, 140, 0.4) 0%, transparent 60%),
    radial-gradient(ellipse 100% 50% at 50% 80%, rgba(15, 90, 160, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse 80% 40% at 70% 70%, rgba(35, 130, 90, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse 60% 30% at 30% 75%, rgba(70, 30, 130, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse 140% 50% at 60% 85%, rgba(8, 45, 90, 0.5) 0%, transparent 50%);
  filter: saturate(0.65);
}

.vista-wallpaper::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 200% 80% at 40% 100%, rgba(15, 75, 140, 0.25) 0%, transparent 40%),
    radial-gradient(ellipse 80% 50% at 80% 60%, rgba(0, 130, 75, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 60% 80% at 20% 50%, rgba(60, 15, 110, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 30%, transparent 70%, rgba(0,8,20,0.6) 100%);
  /* Vignette */
}

.ie-ghost-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 200px;
  opacity: 0.03;
  filter: grayscale(1);
  pointer-events: none;
  animation: ghostFloat 8s ease-in-out infinite;
}

@keyframes ghostFloat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.03; }
  50% { transform: translate(-50%, -52%) scale(1.02); opacity: 0.05; }
}

/* Aero Glass Effect */
.aero-glass {
  background: rgba(30, 45, 80, 0.5);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 0 1px rgba(255,255,255,0.25) inset,
    0 4px 20px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(80, 120, 200, 0.04);
}

/* Taskbar */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(180deg, rgba(30, 45, 80, 0.7) 0%, rgba(15, 22, 45, 0.85) 100%);
  backdrop-filter: blur(30px) saturate(2);
  -webkit-backdrop-filter: blur(30px) saturate(2);
  border-top: 1px solid rgba(120, 150, 220, 0.25);
  display: flex;
  align-items: center;
  z-index: 9999;
  box-shadow: 0 -2px 20px rgba(0,0,0,0.4);
}

/* Start Button with mourning ribbon */
.start-btn {
  width: 54px;
  height: 36px;
  margin: 0 4px;
  border-radius: 0 12px 12px 0;
  background: radial-gradient(ellipse at center, rgba(60, 130, 60, 0.85) 0%, rgba(30, 80, 30, 0.9) 60%, rgba(15, 50, 15, 0.85) 100%);
  border: 1px solid rgba(120, 220, 120, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  box-shadow: 0 0 8px rgba(80, 160, 80, 0.25), 0 1px 0 rgba(255,255,255,0.15) inset;
  position: relative;
  overflow: visible;
}

.start-btn::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 20%;
  right: 20%;
  height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 100%);
  border-radius: 50%;
}

.start-btn:hover {
  background: radial-gradient(ellipse at center, rgba(80, 170, 80, 0.9) 0%, rgba(50, 120, 50, 0.9) 60%, rgba(25, 70, 25, 0.9) 100%);
  box-shadow: 0 0 16px rgba(80, 160, 80, 0.45), 0 1px 0 rgba(255,255,255,0.25) inset;
}

.start-btn:active { transform: scale(0.95); }

.mourning-ribbon-start {
  position: absolute;
  top: -4px;
  right: -2px;
  font-size: 10px;
  filter: brightness(0.3);
  pointer-events: none;
}

/* Start Menu */
.start-menu {
  position: fixed;
  bottom: 44px;
  left: 4px;
  width: 400px;
  border-radius: 8px;
  overflow: hidden;
  animation: startMenuIn 0.2s ease-out;
  z-index: 10000;
}

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

/* Window styles */
.vista-window {
  position: absolute;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255,255,255,0.18);
  min-width: 300px;
  min-height: 200px;
}

.window-titlebar {
  height: 30px;
  background: linear-gradient(180deg, rgba(60, 100, 170, 0.55) 0%, rgba(30, 55, 110, 0.5) 50%, rgba(20, 40, 80, 0.55) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  padding: 0 8px;
  cursor: move;
}

.window-titlebar .title {
  color: white;
  font-size: 12px;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  flex: 1;
  padding-left: 4px;
}

.window-btn {
  width: 24px;
  height: 18px;
  border-radius: 3px;
  border: none;
  margin-left: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: white;
  transition: all 0.1s;
}

.window-btn-minimize {
  background: linear-gradient(180deg, rgba(80, 110, 170, 0.6), rgba(50, 80, 130, 0.6));
  border: 1px solid rgba(255,255,255,0.15);
}

.window-btn-maximize {
  background: linear-gradient(180deg, rgba(80, 110, 170, 0.6), rgba(50, 80, 130, 0.6));
  border: 1px solid rgba(255,255,255,0.15);
}

.window-btn-close {
  background: linear-gradient(180deg, rgba(180, 60, 45, 0.8), rgba(140, 30, 20, 0.8));
  border: 1px solid rgba(255,80,60,0.25);
}

.window-btn-close:hover {
  background: linear-gradient(180deg, rgba(220, 80, 60, 0.9), rgba(180, 50, 30, 0.9));
  box-shadow: 0 0 8px rgba(255,60,40,0.35);
}

.window-body {
  background: rgba(240, 240, 245, 0.95);
  color: #222;
}

/* Desktop Icons */
.desktop-icon {
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.1s;
}

.desktop-icon:hover { background: rgba(80, 120, 220, 0.2); }
.desktop-icon.selected { background: rgba(80, 120, 220, 0.3); outline: 1px solid rgba(80, 120, 220, 0.45); }

.desktop-icon .icon-img {
  font-size: 32px;
  margin-bottom: 4px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

.desktop-icon .icon-img.icon-dead {
  filter: grayscale(0.8) drop-shadow(0 1px 2px rgba(0,0,0,0.5));
  opacity: 0.6;
}

.death-overlay {
  position: absolute;
  top: -4px;
  right: -6px;
  font-size: 14px;
  filter: drop-shadow(0 0 4px rgba(0,0,0,0.8));
}

.black-ribbon {
  position: absolute;
  top: -4px;
  right: -6px;
  font-size: 10px;
  filter: brightness(0.3);
}

.desktop-icon .icon-label {
  color: white;
  font-size: 10px;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 0 5px rgba(0,0,0,0.5);
  line-height: 1.3;
  word-wrap: break-word;
  max-width: 76px;
}

.dead-icon .icon-label {
  color: rgba(255,255,255,0.6);
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 165px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 6px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.widget {
  border-radius: 6px;
  background: rgba(15, 25, 50, 0.6);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45), 0 0 1px rgba(255,255,255,0.1) inset;
  overflow: hidden;
  color: white;
}

.widget-title {
  font-size: 9px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  padding: 5px 8px 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* IE Memorial Widget */
.ie-memorial-widget {
  border: 1px solid rgba(0, 0, 0, 0.6);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 180, 50, 0.05);
}

.memorial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px 6px;
}

.memorial-candle-left, .memorial-candle-right {
  font-size: 16px;
  animation: candleFlicker 2s ease-in-out infinite alternate;
}

.memorial-candle-right { animation-delay: 0.5s; }

@keyframes candleFlicker {
  0% { opacity: 0.7; transform: scale(1); }
  25% { opacity: 1; transform: scale(1.05); }
  50% { opacity: 0.8; transform: scale(0.98); }
  75% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 0.75; transform: scale(1); }
}

.memorial-eulogy {
  padding: 6px 10px 10px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eulogy-text {
  font-size: 9px;
  color: rgba(255,255,255,0.55);
  text-align: center;
  line-height: 1.4;
  font-style: italic;
  animation: fadeInEulogy 1s ease-in;
}

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

/* Clock */
.clock-face {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(60, 80, 120, 0.4), rgba(15, 25, 50, 0.6));
  border: 2px solid rgba(255,255,255,0.15);
  margin: 8px auto;
}

.clock-hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform-origin: bottom center;
  border-radius: 2px;
}

.clock-hour { width: 3px; height: 28px; background: white; margin-left: -1.5px; }
.clock-minute { width: 2px; height: 38px; background: rgba(200,220,255,0.9); margin-left: -1px; }
.clock-second { width: 1px; height: 42px; background: rgba(255,80,80,0.8); margin-left: -0.5px; }

.clock-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
  transform: translate(-50%, -50%);
}

.clock-marker {
  position: absolute;
  width: 2px;
  height: 8px;
  background: rgba(255,255,255,0.3);
  top: 4px;
  left: 50%;
  margin-left: -1px;
  transform-origin: center 51px;
}

/* Startup */
.startup-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeOutStartup 1.5s ease-in-out 2.2s forwards;
}

@keyframes fadeOutStartup {
  from { opacity: 1; }
  to { opacity: 0; pointer-events: none; }
}

.startup-content {
  text-align: center;
}

.startup-logo {
  color: white;
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 6px;
  animation: logoIn 0.8s ease-out;
  text-shadow: 0 0 30px rgba(80, 120, 200, 0.4);
  margin-bottom: 8px;
}

.startup-subtitle {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  font-style: italic;
  letter-spacing: 2px;
  transition: opacity 0.8s;
}

.startup-loading {
  color: rgba(255,255,255,0.3);
  font-size: 11px;
  margin-top: 24px;
  transition: opacity 0.6s;
}

@keyframes logoIn {
  from { opacity: 0; transform: scale(1.1); }
  to { opacity: 1; transform: scale(1); }
}

/* Sticky Note */
.sticky-note-textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 10px;
  color: #444;
  padding: 6px 8px;
  line-height: 1.4;
}

/* Calculator */
.calc-btn {
  background: linear-gradient(180deg, #f5f5f5, #e0e0e0);
  border: 1px solid #aaa;
  border-radius: 3px;
  padding: 8px 0;
  cursor: pointer;
  font-size: 14px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  transition: all 0.1s;
}

.calc-btn:hover { background: linear-gradient(180deg, #fff, #eee); }
.calc-btn:active { background: linear-gradient(180deg, #ddd, #ccc); transform: scale(0.97); }
.calc-btn-op { background: linear-gradient(180deg, #f0e8d8, #ddd0b8); border-color: #b0a080; }
.calc-btn-eq { background: linear-gradient(180deg, #c8d8f0, #a0b8d8); border-color: #8098b8; }

/* Notification Toast */
.notification-toast {
  background: rgba(20, 35, 70, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 10px 14px;
  color: white;
  max-width: 320px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  animation: toastIn 0.3s ease-out;
  cursor: pointer;
}

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

/* Shake animation for IE dialog */
.shake-animation {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-8px); }
  30% { transform: translateX(8px); }
  45% { transform: translateX(-6px); }
  60% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
  90% { transform: translateX(3px); }
}

/* Pour one out animation */
.pour-animation {
  position: relative;
}

.ie-pour-logo {
  font-size: 40px;
  animation: pourTilt 2s ease-in-out forwards;
  display: inline-block;
}

@keyframes pourTilt {
  0% { transform: rotate(0deg); }
  30% { transform: rotate(-45deg); }
  100% { transform: rotate(-120deg); }
}

.pour-liquid {
  position: absolute;
  top: 40px;
  left: 30px;
  width: 4px;
  height: 0;
  background: linear-gradient(180deg, #0078D4, #00bcf2);
  border-radius: 2px;
  animation: pourLiquid 2s ease-in 0.5s forwards;
}

@keyframes pourLiquid {
  0% { height: 0; opacity: 0; }
  20% { height: 30px; opacity: 1; }
  80% { height: 40px; opacity: 1; }
  100% { height: 50px; opacity: 0.3; }
}

.tears-container {
  position: absolute;
  inset: -20px;
  pointer-events: none;
  overflow: visible;
}

.tear {
  position: absolute;
  top: -10px;
  font-size: 10px;
  animation: tearFall 1s ease-in forwards;
}

@keyframes tearFall {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(100px); opacity: 0; }
}

/* Blink animation for CPU spike */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Footer */
.vista-footer a {
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  font-size: 10px;
}
.vista-footer a:hover { color: rgba(255,255,255,0.6); }

/* Responsive */
@media (max-width: 900px) {
  .sidebar { width: 140px; }
  .clock-face { width: 90px; height: 90px; }
  .clock-marker { transform-origin: center 41px !important; }
  .clock-hour { height: 22px; }
  .clock-minute { height: 30px; }
  .clock-second { height: 34px; }
}

@media (max-width: 640px) {
  .sidebar { display: none; }
  .start-menu { width: 320px; }
}