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

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

body {
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  font-family: 'Tahoma', 'Verdana', 'Arial', sans-serif;
  font-size: 11px;
  cursor: default;
  user-select: none;
}

#root { width: 100%; height: 100%; }

.desktop {
  width: 100vw;
  height: 100vh;
  position: relative;
  background: #008080;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(0,0,0,0.03) 1px, rgba(0,0,0,0.03) 2px),
    repeating-linear-gradient(90deg, transparent, transparent 1px, rgba(0,0,0,0.03) 1px, rgba(0,0,0,0.03) 2px);
}

.desktop.post-virus {
  background: #006666;
}

.desktop-icons {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
  padding: 4px;
  cursor: pointer;
  border: 1px solid transparent;
}

.desktop-icon:hover {
  background: rgba(0,0,128,0.3);
  border: 1px dotted white;
}

.desktop-icon-img {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  image-rendering: pixelated;
  margin-bottom: 2px;
}

.desktop-icon-label {
  color: white;
  text-align: center;
  font-size: 11px;
  text-shadow: 1px 1px 1px black;
  word-wrap: break-word;
  max-width: 68px;
}

/* Taskbar */
.taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  display: flex;
  align-items: center;
  z-index: 100;
  padding: 2px;
}

.start-button {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  height: 22px;
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  cursor: pointer;
  font-weight: bold;
  font-size: 11px;
  font-family: 'Tahoma', sans-serif;
}

.start-button:active, .start-button.active {
  border: 2px inset #808080;
}

.start-logo {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.taskbar-windows {
  display: flex;
  gap: 2px;
  flex: 1;
  margin-left: 4px;
  overflow: hidden;
}

.taskbar-window-btn {
  height: 22px;
  padding: 2px 8px;
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  cursor: pointer;
  font-size: 11px;
  font-family: 'Tahoma', sans-serif;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taskbar-window-btn.active {
  border: 2px inset #808080;
  background: #b0b0b0;
}

.system-tray {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  height: 22px;
  border: 2px inset #808080;
  font-size: 11px;
  margin-left: auto;
}

.tray-mail {
  cursor: pointer;
  font-size: 14px;
}

.tray-mail.blink {
  animation: mailBlink 0.5s infinite alternate;
}

@keyframes mailBlink {
  0% { opacity: 1; }
  100% { opacity: 0.3; }
}

/* Window */
.win95-window {
  position: absolute;
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  box-shadow: 1px 1px 0 #000;
  min-width: 200px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
}

.win95-titlebar {
  display: flex;
  align-items: center;
  padding: 2px 3px;
  background: #000080;
  color: white;
  font-weight: bold;
  font-size: 11px;
  cursor: move;
  height: 18px;
  flex-shrink: 0;
}

.win95-titlebar.inactive {
  background: #808080;
}

.win95-title {
  flex: 1;
  padding-left: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.win95-titlebar-btns {
  display: flex;
  gap: 2px;
}

.win95-btn {
  width: 16px;
  height: 14px;
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 8px;
  font-weight: bold;
  line-height: 1;
  padding: 0;
  color: #000;
}

.win95-btn:active {
  border: 2px inset #808080;
}

.win95-menubar {
  display: flex;
  background: #c0c0c0;
  border-bottom: 1px solid #808080;
  padding: 1px;
}

.win95-menubar span {
  padding: 1px 6px;
  cursor: pointer;
}

.win95-menubar span:hover {
  background: #000080;
  color: white;
}

.win95-body {
  flex: 1;
  background: white;
  border: 2px inset #808080;
  margin: 2px;
  overflow: auto;
  font-size: 11px;
}

.win95-statusbar {
  height: 18px;
  border: 2px inset #808080;
  margin: 0 2px 2px 2px;
  padding: 1px 4px;
  font-size: 11px;
  display: flex;
  align-items: center;
}

/* Start Menu */
.start-menu {
  position: absolute;
  bottom: 28px;
  left: 0;
  width: 180px;
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  z-index: 200;
}

.start-menu-sidebar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 24px;
  background: #808080;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
}

.start-menu-sidebar span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #c0c0c0;
  font-weight: bold;
  font-size: 14px;
  letter-spacing: 2px;
}

.start-menu-items {
  margin-left: 24px;
  padding: 2px 0;
}

.start-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 11px;
}

.start-menu-item:hover {
  background: #000080;
  color: white;
}

.start-menu-divider {
  height: 1px;
  background: #808080;
  margin: 2px 4px;
  border-bottom: 1px solid white;
}

/* Context Menu */
.context-menu {
  position: absolute;
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  z-index: 300;
  min-width: 160px;
}

.context-menu-item {
  padding: 3px 20px;
  cursor: pointer;
  font-size: 11px;
}

.context-menu-item:hover {
  background: #000080;
  color: white;
}

.context-menu-divider {
  height: 1px;
  background: #808080;
  margin: 1px 2px;
  border-bottom: 1px solid white;
}

/* File Explorer */
.file-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  cursor: pointer;
}

.file-item:hover {
  background: #000080;
  color: white;
}

.file-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

/* Minesweeper */
.minesweeper-grid {
  display: inline-grid;
  gap: 0;
  border: 3px inset #808080;
}

.mine-cell {
  width: 20px;
  height: 20px;
  border: 2px outset #dfdfdf;
  background: #c0c0c0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  font-weight: bold;
  font-family: 'Tahoma', sans-serif;
}

.mine-cell.revealed {
  border: 1px solid #808080;
  background: #c0c0c0;
  cursor: default;
}

.mine-cell.mine-exploded {
  background: red;
}

.mine-cell .n1 { color: blue; }
.mine-cell .n2 { color: green; }
.mine-cell .n3 { color: red; }
.mine-cell .n4 { color: darkblue; }
.mine-cell .n5 { color: darkred; }
.mine-cell .n6 { color: teal; }
.mine-cell .n7 { color: black; }
.mine-cell .n8 { color: gray; }

.minesweeper-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px;
  border: 3px inset #808080;
  margin-bottom: 4px;
  background: #c0c0c0;
}

.mine-counter {
  background: black;
  color: red;
  font-family: 'VT323', monospace;
  font-size: 20px;
  padding: 2px 4px;
  min-width: 40px;
  text-align: center;
}

.mine-face {
  width: 26px;
  height: 26px;
  border: 2px outset #dfdfdf;
  background: #c0c0c0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
}

/* Notepad */
.notepad-textarea {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  resize: none;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  padding: 2px;
  background: white;
}

/* Mail */
.mail-list {
  width: 100%;
  border-collapse: collapse;
}

.mail-list th {
  background: #c0c0c0;
  border: 1px solid #808080;
  padding: 2px 6px;
  text-align: left;
  font-size: 11px;
}

.mail-list td {
  border-bottom: 1px solid #dfdfdf;
  padding: 3px 6px;
  font-size: 11px;
  cursor: pointer;
}

.mail-list tr:hover td {
  background: #000080;
  color: white;
}

.mail-new {
  font-weight: bold;
}

/* Browser */
.browser-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  background: #c0c0c0;
  border-bottom: 1px solid #808080;
}

.browser-address {
  flex: 1;
  border: 2px inset #808080;
  padding: 1px 4px;
  font-size: 11px;
  background: white;
  font-family: 'Tahoma', sans-serif;
}

.browser-content {
  background: white;
  padding: 10px;
  font-family: 'Times New Roman', serif;
}

/* Dialogs */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dialog-box {
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  padding: 0;
  min-width: 300px;
}

.dialog-body {
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.dialog-icon {
  font-size: 32px;
}

.dialog-text {
  font-size: 11px;
  line-height: 1.4;
}

.dialog-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px 12px;
}

.dialog-btn {
  padding: 2px 20px;
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  cursor: pointer;
  font-size: 11px;
  font-family: 'Tahoma', sans-serif;
  min-width: 75px;
}

.dialog-btn:active {
  border: 2px inset #808080;
}

/* Notification toast */
.toast-notification {
  position: absolute;
  bottom: 32px;
  right: 8px;
  background: #ffffcc;
  border: 1px solid #000;
  padding: 6px 10px;
  font-size: 11px;
  z-index: 150;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  animation: toastIn 0.3s ease-out;
}

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

/* Virus overlay */
.virus-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: black;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.virus-titlebar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 22px;
  background: #800000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  z-index: 10002;
}

.virus-titlebar span {
  color: white;
  font-size: 11px;
  font-weight: bold;
}

.virus-close-btn {
  width: 16px;
  height: 14px;
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 9px;
  font-weight: bold;
  color: #000;
}

.virus-text {
  font-family: 'VT323', monospace;
  font-size: 36px;
  color: #ccffcc;
  text-align: center;
  z-index: 10001;
  position: relative;
  text-shadow: 0 0 10px rgba(0,255,0,0.5), 0 0 20px rgba(0,255,0,0.2);
  letter-spacing: 3px;
}

.virus-text.warning {
  color: white;
  font-size: 28px;
  animation: glitchWarning 0.1s infinite;
}

@keyframes glitchWarning {
  0% { transform: translate(0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(2px, -1px); }
  75% { transform: translate(-1px, -2px); }
  100% { transform: translate(1px, 2px); }
}

.virus-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.15) 2px,
    rgba(0,0,0,0.15) 4px
  );
  pointer-events: none;
  z-index: 10001;
}

.eye-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  opacity: 0;
  animation: eyeFadeIn 2s ease-in forwards;
  filter: drop-shadow(0 0 30px rgba(200, 0, 0, 0.6)) drop-shadow(0 0 60px rgba(150, 0, 0, 0.3));
}

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

.eye-svg {
  width: 480px;
  height: 290px;
  animation: eyePulse 3s ease-in-out infinite;
}

@keyframes eyePulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.4)); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 35px rgba(255, 0, 0, 0.7)); }
}

.choice-buttons {
  display: flex;
  gap: 40px;
  z-index: 10002;
  position: relative;
  margin-top: 20px;
}

.choice-btn {
  font-family: 'VT323', monospace;
  font-size: 28px;
  padding: 12px 40px;
  background: transparent;
  color: #cc0000;
  border: 2px solid #cc0000;
  cursor: pointer;
  letter-spacing: 4px;
  transition: all 0.2s;
}

.choice-btn:hover {
  background: rgba(200,0,0,0.2);
  box-shadow: 0 0 20px rgba(200,0,0,0.5);
}

.choice-btn.die-btn:hover {
  background: rgba(200,0,0,0.4);
  animation: screenFlicker 0.1s;
}

@keyframes screenFlicker {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* BSOD */
.bsod {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000080;
  color: white;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 40px;
}

.bsod-content {
  max-width: 700px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.bsod-cursor {
  animation: bsodBlink 1s infinite;
}

@keyframes bsodBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Hourglass cursor */
.hourglass-cursor, .hourglass-cursor * {
  cursor: wait !important;
}

/* Shutdown dialog */
.shutdown-dialog {
  text-align: center;
}

/* Remix footer */
.remix-footer {
  position: absolute;
  bottom: 30px;
  right: 4px;
  z-index: 99;
}

.remix-footer a {
  color: #808080;
  font-size: 9px;
  text-decoration: none;
  font-family: 'Tahoma', sans-serif;
}

.remix-footer a:hover {
  text-decoration: underline;
}

/* Attachment button */
.attachment-btn {
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 11px;
  font-family: 'Tahoma', sans-serif;
  margin: 8px;
}

.attachment-btn:active {
  border: 2px inset #808080;
}

/* Pulse animation for mail icon */
.desktop-icon.pulse .desktop-icon-img {
  animation: iconPulse 1s infinite;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.screen-shake {
  animation: screenShake 0.05s infinite;
}

@keyframes screenShake {
  0% { transform: translate(0,0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(2px, -1px); }
  75% { transform: translate(-1px, 2px); }
  100% { transform: translate(1px, -2px); }
}