:root {
  --win-bg: #C0C0C0;
  --win-dark: #808080;
  --win-darker: #404040;
  --win-light: #DFDFDF;
  --win-white: #FFFFFF;
  --win-blue: #000080;
  --win-title: linear-gradient(90deg, #000080, #1084d0);
  --win-btn-face: #C0C0C0;
}

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

body {
  background-color: #008080;
  background-image: 
    linear-gradient(45deg, #007070 25%, transparent 25%),
    linear-gradient(-45deg, #007070 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #007070 75%),
    linear-gradient(-45deg, transparent 75%, #007070 75%);
  background-size: 4px 4px;
  font-family: "VT323", "Tahoma", "Verdana", sans-serif;
  font-size: 16px;
  color: #000;
  min-height: 100vh;
}

.win-outset {
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-bottom: 2px solid var(--win-darker);
  border-right: 2px solid var(--win-darker);
}

.win-inset {
  border-top: 2px solid var(--win-darker);
  border-left: 2px solid var(--win-darker);
  border-bottom: 2px solid var(--win-white);
  border-right: 2px solid var(--win-white);
}

.win-deep-inset {
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-light);
  border-right: 2px solid var(--win-light);
  box-shadow: inset 1px 1px 0 var(--win-darker);
}

.win-window {
  background: var(--win-bg);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-darker);
  border-right: 2px solid var(--win-darker);
  box-shadow: 1px 1px 0 var(--win-darker);
}

.win-titlebar {
  background: var(--win-title);
  color: white;
  padding: 3px 4px;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.win-titlebar-btn {
  width: 16px;
  height: 14px;
  background: var(--win-bg);
  border-top: 1px solid var(--win-white);
  border-left: 1px solid var(--win-white);
  border-bottom: 1px solid var(--win-darker);
  border-right: 1px solid var(--win-darker);
  font-size: 9px;
  line-height: 12px;
  text-align: center;
  cursor: pointer;
  font-family: "Marlett", sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.win-titlebar-btn:active {
  border-top: 1px solid var(--win-darker);
  border-left: 1px solid var(--win-darker);
  border-bottom: 1px solid var(--win-white);
  border-right: 1px solid var(--win-white);
}

.win-button {
  background: var(--win-btn-face);
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-bottom: 2px solid var(--win-darker);
  border-right: 2px solid var(--win-darker);
  padding: 4px 16px;
  font-family: "VT323", "Tahoma", sans-serif;
  font-size: 16px;
  cursor: pointer;
  outline: none;
  min-width: 75px;
}

.win-button:active {
  border-top: 2px solid var(--win-darker);
  border-left: 2px solid var(--win-darker);
  border-bottom: 2px solid var(--win-white);
  border-right: 2px solid var(--win-white);
  padding: 5px 15px 3px 17px;
}

.win-button:focus {
  outline: 1px dotted #000;
  outline-offset: -4px;
}

.progress-bar {
  height: 20px;
  background: var(--win-bg);
}

.progress-bar-fill {
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    #000080 0px,
    #000080 8px,
    transparent 8px,
    transparent 10px
  );
  transition: width 0.1s ease;
}

.drop-zone {
  border: 2px dashed var(--win-dark);
  transition: all 0.2s;
}

.drop-zone.dragover {
  border-color: #000080;
  background: #D0D0FF !important;
}

.terminal-text {
  background: #000;
  color: #00FF00;
  font-family: "VT323", "Courier New", monospace;
  font-size: 14px;
  padding: 8px;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-y: auto;
  max-height: 300px;
}

canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 20px;
  background: var(--win-bg);
  border-top: 2px solid var(--win-darker);
  border-left: 2px solid var(--win-darker);
  border-bottom: 2px solid var(--win-white);
  border-right: 2px solid var(--win-white);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 22px;
  background: var(--win-bg);
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-bottom: 2px solid var(--win-darker);
  border-right: 2px solid var(--win-darker);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 22px;
  background: var(--win-bg);
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-bottom: 2px solid var(--win-darker);
  border-right: 2px solid var(--win-darker);
  cursor: pointer;
  border-radius: 0;
}

.tooltip-popup {
  position: absolute;
  background: #FFFFCC;
  border: 1px solid #000;
  padding: 2px 6px;
  font-size: 13px;
  z-index: 1000;
  pointer-events: none;
  white-space: nowrap;
}

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

.blink { animation: blink 1s infinite; }