/* ============================================
   WIN98.CSS — Jackson's Computer Base System
   ============================================ */

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

body {
  background: #000;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

@font-face {
  font-family: 'W95FA';
  src: url('fonts/W95FA.woff2') format('woff2'),
       url('fonts/W95FA.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  font-family: 'W95FA', Arial, sans-serif;
  font-size: clamp(10px, 1.2vw, 14px);
}

*, input, textarea, button, pre, code, select {
  font-family: 'W95FA', Arial, sans-serif !important;
}

#crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 99999;
  background-image: url('assets/crt-dots.png');
  background-repeat: repeat;
  background-size: 4px 4px;
  opacity: 0.25;
}

/* GLOW EFFECTS */
.desktop-icon span {
  display: block;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.5), 0 0 12px rgba(255, 255, 255, 0.25);
  color: white;
}

/* DESKTOP */
#desktop {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: #008080;
  position: relative;
  overflow: hidden;
}

#desktop-filter {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 99997;
  filter: brightness(0.98) contrast(1.03) saturate(0.94) hue-rotate(1deg);
}

/* DESKTOP ICONS */
#desktop-icons {
  position: absolute;
  top: 2vh;
  left: 1vw;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: clamp(12px, 2vh, 28px);
  max-height: calc(100vh - 7vh);
  z-index: 1;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: clamp(60px, 6vw, 90px);
  cursor: pointer;
  color: white;
  text-align: center;
  gap: 1.2vh;
}

.desktop-icon img {
  width: clamp(32px, 4vw, 64px);
  height: clamp(32px, 4vw, 64px);
  image-rendering: pixelated;
}

.desktop-icon span {
  font-size: clamp(10px, 1.1vw, 14px);
  text-shadow: 1px 1px 1px #000040;
  line-height: 1.2;
  white-space: nowrap;
}

.desktop-icon:hover span {
  background: #000080;
  outline: 1px dotted white;
}

/* RIGHT COLUMN ICONS */
#desktop-icons-right {
  position: absolute;
  top: 2vh;
  right: 1vw;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vh, 28px);
  z-index: 1;
  justify-content: flex-end;
  height: calc(100vh - 12vh);
}

/* WINDOWS 98 LOGO */
#win98-logo {
  position: absolute;
  top: 0;
  right: 0;
  width: 55%;
  pointer-events: none;
  z-index: 0;
}

#win98-logo img {
  width: 55%;
  height: auto;
  display: block;
  margin-left: auto;
  padding-top: 3vh;
}

/* WINDOWS CONTAINER */
#windows-container {
  position: absolute;
  inset: 0;
  bottom: 5vh;
  pointer-events: none;
}

#windows-container .window,
#windows-container .dialog {
  pointer-events: all;
}

/* ============================================
   WIN98 WINDOW CHROME
   ============================================ */

.window {
  position: absolute;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #dfdfdf, 2px 2px 0 #000000;
  display: none;
  flex-direction: column;
  min-width: 40vw;
  min-height: 30vh;
  z-index: 10;
}

.window.active {
  display: flex;
  z-index: 100;
}

/* TITLE BAR */
.window-titlebar {
  background: linear-gradient(to right, #000080, #1084d0);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.3vw;
  padding-left: 1vw;
  height: clamp(26px, 3.4vh, 36px);
  flex-shrink: 0;
  cursor: default;
  user-select: none;
}

.window-title {
  display: flex;
  align-items: center;
  gap: 0.4vw;
  font-weight: bold;
  font-size: clamp(10px, 1.1vw, 14px);
  flex: 1;
}

/* WINDOW CONTROL BUTTONS */
.window-controls {
  display: flex;
  gap: 2px;
  align-items: center;
}

.win-btn {
  width: clamp(18px, 2.4vh, 26px);
  height: clamp(18px, 2.4vh, 26px);
  background: #c0c0c0;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #404040;
  border-bottom: 1px solid #404040;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  flex-shrink: 0;
}

.win-btn img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  image-rendering: pixelated;
  display: block;
}

.win-btn:active {
  border-top: 1px solid #404040;
  border-left: 1px solid #404040;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
}

/* MENU BAR */
.window-menubar {
  display: flex;
  align-items: center;
  padding: 0 0.4vw;
  background: #c0c0c0;
  flex-shrink: 0;
  border-bottom: 1px solid #808080;
  height: clamp(20px, 2.4vh, 28px);
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
}

.window-menubar::-webkit-scrollbar {
  display: none;
}

.window-menubar span {
  padding: 0 0.6vw;
  cursor: pointer;
  font-size: clamp(10px, 1.1vw, 14px);
  white-space: nowrap;
}

.window-menubar span:hover {
  background: transparent;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.menubar-logo {
  margin-left: auto;
  height: 100%;
  display: flex;
  align-items: center;
}

.menubar-logo img {
  height: clamp(16px, 2.2vh, 26px);
  width: auto;
  image-rendering: pixelated;
}

/* TOOLBAR */
.window-toolbar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.3vh 0.4vw;
  background: #c0c0c0;
  flex-shrink: 0;
  border-bottom: 1px solid #808080;
  height: clamp(52px, 7vh, 80px);
}

.toolbar-btn {
  padding: 0.2vh 0.8vw;
  background: #c0c0c0;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #404040;
  border-bottom: 1px solid #404040;
  font-size: clamp(10px, 1vw, 13px);
  cursor: pointer;
  white-space: nowrap;
}

.toolbar-btn:active {
  border-top: 1px solid #404040;
  border-left: 1px solid #404040;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
}

.toolbar-btn.icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2vh;
  padding: 0.4vh 0.6vw;
  border: 1px solid transparent;
  background: transparent;
  font-size: clamp(10px, 1vw, 13px);
  height: auto;
  min-width: 4vw;
}

.toolbar-btn.icon-btn:hover {
  border: 1px solid #808080;
  background: #c0c0c0;
}

.toolbar-btn.icon-btn:active {
  border: 1px solid #404040;
  box-shadow: inset 1px 1px 0 #404040, inset -1px -1px 0 #ffffff;
}

.toolbar-divider {
  width: 2px;
  height: clamp(28px, 3.5vh, 42px);
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  flex-shrink: 0;
  margin: 0 0.3vw;
}

.toolbar-end-img {
  margin-left: auto;
  height: 100%;
  display: flex;
  align-items: stretch;
}

.toolbar-end-img img {
  height: 100%;
  width: auto;
  image-rendering: pixelated;
  display: block;
}

/* ADDRESS BAR */
.window-addressbar {
  display: flex;
  align-items: center;
  gap: 0.4vw;
  padding: 0.2vh 0.4vw;
  background: #c0c0c0;
  border-bottom: 1px solid #808080;
  flex-shrink: 0;
  height: clamp(22px, 2.8vh, 32px);
}

.address-label {
  font-size: clamp(10px, 1vw, 13px);
  white-space: nowrap;
}

.address-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: white;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  height: clamp(18px, 2.4vh, 28px);
  max-height: 100%;
  overflow: hidden;
  align-self: center;
}

.address-nav-img {
  height: clamp(12px, 1.6vh, 18px);
  width: auto;
  image-rendering: pixelated;
  flex-shrink: 0;
  padding: 0 3px;
}

.address-text {
  flex: 1;
  font-size: clamp(10px, 1vw, 13px);
  padding: 0 0.3vw;
  white-space: nowrap;
  overflow: hidden;
}

.address-dropdown-btn {
  width: clamp(16px, 1.8vw, 22px);
  height: 100%;
  background: #c0c0c0;
  border-left: 1px solid #808080;
  border-top: none;
  border-right: none;
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.address-dropdown-btn:active {
  border-top: 1px solid #404040;
  border-left: 1px solid #404040;
}

/* WINDOW BODY — EXPLORER LAYOUT */
.window-body.explorer {
  display: flex;
  flex: 1;
  overflow: hidden;
  background: white;
}

/* EXPLORER TREE */
.explorer-tree {
  width: 14vw;
  min-width: 140px;
  border-right: 2px solid #808080;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.6vh 0;
  background: white;
  flex-shrink: 0;
  position: relative;
  scrollbar-width: none;
}

.explorer-tree::-webkit-scrollbar {
  display: none;
}

.tree-item {
  padding: 0.15vh 0.4vw 0.15vh 0.6vw;
  cursor: pointer;
  font-size: clamp(10px, 1vw, 13px);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.3vw;
  position: relative;
  line-height: 1.6;
}


.tree-item .tree-label {
  padding: 0 3px;
}

.tree-item.active {
  background: transparent;
  color: inherit;
}

.tree-item.active .tree-label {
  background: #000080;
  color: #ffffff;
  outline: 1px dotted #ffff00;
  outline-offset: 1px;
  padding: 0 3px;
  display: inline;
}

.tree-item .folder-icon {
  width: clamp(14px, 1.4vw, 18px);
  height: clamp(14px, 1.4vw, 18px);
  image-rendering: pixelated;
  flex-shrink: 0;
}

.tree-item.sub {
  padding-left: 2.2vw;
}

.tree-item.sub2 {
  padding-left: 3.8vw;
}

/* Dotted tree connector lines */
.tree-item.sub::before {
  content: '';
  position: absolute;
  left: 1.1vw;
  top: 50%;
  width: 0.8vw;
  height: 0;
  border-top: 1px dotted #808080;
}

.tree-item.sub::after {
  content: '';
  position: absolute;
  left: 1.1vw;
  top: 0;
  width: 0;
  height: 96%;
  border-left: 1px dotted #808080;
}

.tree-item.sub:last-child::after {
  height: 50%;
}

.tree-item.sub2::before {
  content: '';
  position: absolute;
  left: 2.6vw;
  top: 50%;
  width: 0.8vw;
  height: 0;
  border-top: 1px dotted #808080;
}

.tree-item.sub2::after {
  content: '';
  position: absolute;
  left: 2.6vw;
  top: 0;
  width: 0;
  height: 100%;
  border-left: 1px dotted #808080;
}

.tree-item.sub2:last-child::after {
  height: 50%;
}

/* EXPLORER CONTENT */
.explorer-content {
  flex: 1;
  overflow-y: scroll;
  padding: 1vh 0.5vw 1vh 0.8vw;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  align-content: flex-start;
  gap: 0.8vw;
  background: white;
}

.explorer-content.photo-detail-active {
  display: flex;
  padding: 0;
  overflow: hidden;
}

.explorer-content.photo-detail-active,
.explorer-content.photo-detail-active * {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.file-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  cursor: pointer;
  gap: 0.4vh;
  text-align: center;
}

.file-item:hover .file-thumb {
  outline: 1px dotted #000080;
}

.file-thumb {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  border: 2px solid #808080;
  border-top-color: #404040;
  border-left-color: #404040;
  border-bottom-color: #ffffff;
  border-right-color: #ffffff;
  overflow: hidden;
  position: relative;
  background: #c0c0c0;
}

.file-thumb img.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.file-thumb .thumb-type-icon {
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: clamp(18px, 2.1vw, 27px);
  height: clamp(18px, 2.1vw, 27px);
  image-rendering: pixelated;
}

.file-item span {
  font-size: clamp(9px, 0.9vw, 12px);
  word-break: break-word;
}

.previous-copy-block {
  grid-column: 1 / span 2;
  padding: 12px;
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  align-self: start;
}

/* STATUS BAR */
.window-statusbar {
  display: flex;
  align-items: stretch;
  padding: 0.3vh 0.4vw;
  background: #c0c0c0;
  border-top: 1px solid #ffffff;
  flex-shrink: 0;
  gap: 0.3vw;
  height: clamp(24px, 4.5vh, 44px);
  margin-top: auto;
}

.statusbar-section {
  display: flex;
  align-items: center;
  padding: 0 0.6vw;
  font-size: clamp(9px, 0.9vw, 12px);
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  white-space: nowrap;
  gap: 0.3vw;
}

.statusbar-section img {
  height: clamp(12px, 1.4vh, 16px);
  width: auto;
  image-rendering: pixelated;
}

.statusbar-section.grow {
  flex: 1;
}

/* ============================================
   CUSTOM RADIO BUTTONS
   ============================================ */

input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background-image: url('assets/bubble-unselected.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  flex-shrink: 0;
}

input[type="radio"]:checked {
  background-image: url('assets/bubble-selected.png');
}

input[type="radio"] {
  cursor: pointer;
}

/* ============================================
   CUSTOM SCROLLBAR — Win98 Style
   ============================================ */

.explorer-tree {
  overflow-y: auto;
  overflow-x: hidden;
}

.explorer-content::-webkit-scrollbar,
.window-body::-webkit-scrollbar {
  width: clamp(16px, 1.8vw, 22px);
}

.explorer-content::-webkit-scrollbar-track,
.window-body::-webkit-scrollbar-track {
  background-image:
    linear-gradient(45deg, #c0c0c0 25%, transparent 25%),
    linear-gradient(-45deg, #c0c0c0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #c0c0c0 75%),
    linear-gradient(-45deg, transparent 75%, #c0c0c0 75%);
  background-size: 4px 4px;
  background-position: 0 0, 0 2px, 2px -2px, -2px 0px;
  background-color: #ffffff;
}

.explorer-content::-webkit-scrollbar-thumb,
.window-body::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #404040;
  border-bottom: 1px solid #404040;
  min-height: 20px;
}

.explorer-content.no-scroll::-webkit-scrollbar-track {
  background: #c0c0c0;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #404040;
  border-bottom: 1px solid #404040;
}

.explorer-content.no-scroll::-webkit-scrollbar-thumb {
  min-height: 100%;
  background: #c0c0c0;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #404040;
  border-bottom: 1px solid #404040;
}

.explorer-content::-webkit-scrollbar-button,
.window-body::-webkit-scrollbar-button {
  background: #c0c0c0;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #404040;
  border-bottom: 1px solid #404040;
  width: clamp(14px, 1.6vw, 20px);
  height: clamp(14px, 1.6vw, 20px);
  display: block;
}

.explorer-content::-webkit-scrollbar-button:vertical:decrement,
.window-body::-webkit-scrollbar-button:vertical:decrement {
  background-image: url('assets/up-arrow.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 60%;
}

.explorer-content::-webkit-scrollbar-button:vertical:increment,
.window-body::-webkit-scrollbar-button:vertical:increment {
  background-image: url('assets/down-arrow.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 60%;
}

.explorer-content::-webkit-scrollbar-button:vertical:decrement:increment,
.explorer-content::-webkit-scrollbar-button:vertical:increment:decrement,
.window-body::-webkit-scrollbar-button:vertical:decrement:increment,
.window-body::-webkit-scrollbar-button:vertical:increment:decrement {
  display: none;
}

.explorer-content::-webkit-scrollbar-button:vertical:start:increment,
.explorer-content::-webkit-scrollbar-button:vertical:end:decrement {
  display: none;
}

/* ============================================
   TASKBAR
   ============================================ */

/* Media player maximized layout */
#win-mediaplayer.mp-maximized #mp-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6vw;
}
#win-mediaplayer.mp-maximized .mp-controls-left {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 4vw;
  margin-left: -5vw;
}
#win-mediaplayer.mp-maximized .mp-controls-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 4vw;
  margin-right: -5vw;
}

#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 5vh;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  display: flex;
  align-items: center;
  padding: 0 0.4vw;
  gap: 0.2vw;
  z-index: 9999;
  box-shadow: 0 0 7px 2px rgba(180, 180, 255, 0.33), 0 0 18px 4px rgba(180, 180, 255, 0.23);
}

#start-btn {
  display: flex;
  align-items: center;
  padding: 0;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  cursor: pointer;
  height: 4vh;
  box-shadow: 0 0 3px 1px rgba(255, 255, 255, 0.22);
  width: clamp(80px, 8vw, 130px);
  overflow: hidden;
}

#start-btn img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  display: block;
}

#start-btn:active {
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}

.taskbar-divider {
  width: 4px;
  height: 3vh;
  border-left: 2px solid #808080;
  border-right: 2px solid #ffffff;
  flex-shrink: 0;
  margin: 0 0.2vw;
}

#taskbar-items {
  flex: 1;
  display: flex;
  gap: 0.4vw;
  align-items: center;
}

.taskbar-item {
  height: 3.5vh;
  padding: 0;
  background: none;
  border: none;
  font-size: clamp(10px, 1vw, 13px);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4vw;
  max-width: 15vw;
  overflow: hidden;
  white-space: nowrap;
}

#taskbar-tray {
  display: flex;
  align-items: center;
  gap: 0.6vw;
  padding: 0 0.8vw;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  height: 3.5vh;
}

#taskbar-tray img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  image-rendering: pixelated;
}

#taskbar-clock {
  font-size: clamp(10px, 1.1vw, 14px);
  white-space: nowrap;
}



/* ============================================
   DIALOGS
   ============================================ */

.dialog {
  position: fixed;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: 2px 2px 0 #000000;
  display: none;
  flex-direction: column;
  z-index: 600;
  min-width: 30vw;
}

.dialog.active {
  display: flex;
}

.dialog-titlebar {
  background: linear-gradient(to right, #000080, #1084d0);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.3vw;
  padding-left: 1vw;
  height: clamp(26px, 4.4vh, 36px);
  flex-shrink: 0;
}

.dialog-body {
  padding: 1.5vh 1.5vw;
  display: flex;
  flex-direction: column;
  gap: 1vh;
}

.dialog-field label {
  display: block;
  font-size: clamp(10px, 1vw, 13px);
  margin-bottom: 0.3vh;
}

.dialog-field input,
.dialog-field textarea {
  width: 100%;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  padding: 0.3vh 0.4vw;
  font-size: clamp(10px, 1vw, 13px);
  font-family: inherit;
  background: white;
  resize: none;
}

.dialog-field textarea {
  height: 14vh;
}

.dialog-buttons {
  display: flex;
  gap: 0.8vw;
  justify-content: flex-end;
}

.dialog-btn {
  padding: 0.4vh 1.6vw;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  font-size: clamp(10px, 1vw, 13px);
  cursor: pointer;
  min-width: 6vw;
}

.dialog-btn:active {
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}


/* ============================================
   TOOLS GRID
   ============================================ */

.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6vh;
  cursor: pointer;
  text-align: center;
}

.tool-icon {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  outline: 1px solid #808080;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-bottom: 1px solid #000000;
  border-right: 1px solid #000000;
}

.tool-item span {
  font-size: 13px;
  word-break: break-word;
  max-width: 120px;
}

.tool-item:hover .tool-icon {
  border-top-color: #000000;
  border-left-color: #000000;
  border-bottom-color: #ffffff;
  border-right-color: #ffffff;
}

/* ============================================
   INQUIRY WIZARD
   ============================================ */

.inquiry-body {
  flex-direction: row;
  gap: 16px;
}

.inquiry-left {
  width: 140px;
  flex-shrink: 0;
}

.inquiry-left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.inquiry-right {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.inquiry-heading {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 12px;
}

.inquiry-step {
  display: none;
}

.inquiry-step.active {
  display: block;
}

.inquiry-step .dialog-field {
  margin-bottom: 6px;
}

.inquiry-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.inquiry-buttons .dialog-btn[disabled] {
  color: #808080;
  cursor: default;
}

.inquiry-mobile-send {
  display: none;
}

/* ============================================
   MOBILE
   ============================================ */

@media (max-width: 768px) {

  #desktop {
    height: 100dvh;
  }

  .explorer-tree.tree-hidden {
    display: none;
  }

  .explorer-tree.tree-hidden + .explorer-content {
    width: 100%;
  }

  .menubar-hide-mobile {
    display: none;
  }

  .window-menubar {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    white-space: nowrap;
    touch-action: pan-x;
    scrollbar-width: none;
  }

  .window-menubar::-webkit-scrollbar {
    display: none;
  }

  .window-menubar span {
    font-size: clamp(10px, 2.5vw, 13px);
  }

  .window.active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100dvh - 6.75vh - env(safe-area-inset-bottom)) !important;
    z-index: 100;
  }

  #desktop-icons {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 3vh 12vw;
    top: 2vh;
    left: 3vw;
    transform: none;
    width: auto;
    max-height: calc(100dvh - 9vh - env(safe-area-inset-bottom) - 4vh);
  }

  .desktop-icon img {
    width: clamp(40px, 12vw, 64px);
    height: clamp(40px, 12vw, 64px);
  }

  .desktop-icon span {
    font-size: clamp(10px, 3vw, 14px);
  }

  #desktop-icons-right {
    position: absolute;
    right: 3vw;
    bottom: 15vh;
    top: auto;
    height: auto;
    justify-content: flex-end;
  }

  #win98-logo {
    width: 40%;
    top: 1vh;
    right: 0;
  }

  #win98-logo img {
    content: url('assets/win98-logo-mobile.png');
    width: 100%;
    padding-top: 2vh;
  }

  .explorer-tree {
    display: block;
    width: 38vw;
    min-width: 110px;
    font-size: clamp(10px, 2.5vw, 13px);
  }

  .window-toolbar {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 0.5vh 2vw;
    gap: 1vw;
  }

  .dialog {
    width: 90vw !important;
    min-width: 0 !important;
    max-width: 90vw !important;
    height: auto !important;
    max-height: 85vh !important;
    left: 5vw !important;
    right: 5vw !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    overflow-y: auto;
  }

  #dialog-inquiry.active,
  #dialog-email-me.active,
  #dialog-tell-a-secret.active {
    width: 100vw !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    transform: none !important;
    height: calc(100dvh - 9vh - env(safe-area-inset-bottom)) !important;
    max-height: none !important;
  }

  #dialog-inquiry.active,
  #dialog-email-me.active {
    height: calc(100dvh - 6.75vh - env(safe-area-inset-bottom)) !important;
    top: 0 !important;
    transform: none !important;
  }

  #dialog-email-me textarea {
    height: 240px !important;
  }

  .inquiry-body {
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }

  .inquiry-left {
    display: none;
  }

  .inquiry-img {
    content: url('assets/inquiry-image-mobile.png');
    width: 100%;
    height: auto;
    border: 2px solid #000000;
    box-shadow: none;
  }

  .inquiry-heading {
    font-size: 20px;
  }

  .inquiry-step {
    display: block !important;
  }

  #inquiry-step-2 hr {
    display: none;
  }

  #inquiry-step-2 > div:first-child {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  #inquiry-step-2 > div:first-child label {
    font-size: 16px !important;
  }

  #dialog-inquiry input[type="radio"] {
    width: 18px;
    height: 18px;
  }

  #inquiry-step-2 {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .inquiry-right .dialog-field label {
    font-size: 16px;
    margin-bottom: 6px;
  }

  .inquiry-right .dialog-field {
    margin-bottom: 12px;
  }

  #dialog-inquiry .dialog-field:has(textarea) {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  #dialog-inquiry textarea {
    flex: 1;
    min-height: 120px;
    height: auto !important;
  }

  #inquiry-btn-back,
  #inquiry-btn-next {
    display: none;
  }

  .inquiry-mobile-send {
    display: inline-block;
  }

  .inquiry-buttons {
    justify-content: flex-end;
    margin-top: 4px;
    flex-shrink: 0;
  }

  #taskbar {
    height: calc(6.75vh + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
  }

  #start-btn {
    width: clamp(75px, 22vw, 135px);
    height: 5.25vh;
    padding: 0 2vw;
  }

  #taskbar-items {
    display: flex;
    flex: 1;
  }

  .taskbar-tray-divider {
    display: none;
  }

  #taskbar-tray {
    height: 5.25vh;
    gap: 2vw;
    padding: 0 2vw;
    margin-left: auto;
  }

  #taskbar-tray img[title="Webflow"],
  #taskbar-tray img[title="Unreal"],
  #taskbar-tray img[title="Notion"] {
    display: none;
  }

  #taskbar-tray img {
    width: clamp(18px, 4vh, 28px) !important;
    height: clamp(18px, 4vh, 28px) !important;
  }

  #taskbar-clock {
    font-size: clamp(15px, 4.5vw, 22px);
  }

  .taskbar-item {
    height: 7vh;
    font-size: clamp(12px, 3vw, 16px);
    padding: 0 2vw;
  }

  .taskbar-divider {
    margin-left: 2vw;
  }

  .window-titlebar {
    height: 5vh;
    padding: 0.5vh 2vw;
  }

  .window-title {
    font-size: clamp(12px, 3.5vw, 18px);
  }

  .win-btn {
    width: clamp(22px, 4vh, 30px);
    height: clamp(22px, 4vh, 30px);
  }

  #dialog-inquiry .dialog-btn,
  #dialog-email-me .dialog-btn {
    padding: 8px 28px;
    font-size: 14px;
  }

  button {
    -webkit-appearance: none;
    color: #000 !important;
  }

  .window-menubar span {
    font-size: clamp(11px, 3vw, 16px);
    padding: 0.5vh 2vw;
  }

  .address-input-wrap {
    height: 4vh;
    font-size: clamp(11px, 3vw, 14px);
  }

  .address-label {
    font-size: clamp(11px, 3vw, 14px);
  }

  .window-statusbar {
    font-size: clamp(10px, 2.5vw, 13px);
    padding: 0.5vh 2vw;
  }

  .dialog-field input,
  .dialog-field textarea {
    font-size: 16px !important;
  }

  .tree-item {
    font-size: clamp(11.5px, 2.9vw, 15px);
    padding: 0.4vh 2vw 0.4vh 0vw;
  }

  .file-item span {
    font-size: clamp(10px, 2.5vw, 13px);
  }

  .file-item {
    width: 100%;
  }

  .file-thumb {
    width: 100%;
    aspect-ratio: 1;
    height: auto;
  }

  .explorer-content {
    padding: 1vh 1vw;
    gap: 1.5vh;
    flex-direction: row;
  }

  .toolbar-divider {
    height: 5vh;
  }

  .toolbar-end-img {
    height: 5vh;
  }

  /* Media player mobile */
  .mp-desktop-only {
    display: none !important;
  }
  #mp-controls-row button img {
    height: 20px !important;
  }
  #mp-controls-row > img {
    height: 24px !important;
  }
  #mp-controls-row {
    justify-content: space-evenly !important;
    gap: 0 !important;
  }
  #mp-controls-row .toolbar-divider {
    height: 20px;
  }
  .tool-icon {
    width: 140px;
    height: 140px;
  }
  .tool-item span {
    max-width: 140px;
  }
  .tools-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .previous-copy-block {
    grid-column: auto;
    height: auto;
  }
}