/* ========================================
   Windows 98 Portfolio — style.css
   ======================================== */

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

:root {
  --gray:        #c0c0c0;
  --dark-gray:   #808080;
  --white:       #ffffff;
  --black:       #000000;
  --navy:        #000080;
  --title-blue:  #1084d0;
  --desktop-bg:  #008080;
  --text:        #000000;
  --highlight:   #000080;
  --highlight-text: #ffffff;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  background: var(--desktop-bg);
  color: var(--text);
  user-select: none;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M1 1L1 22L7 16L11 27L15 25L11 14L17 14Z' stroke='white' stroke-width='2' stroke-linejoin='round' fill='white'/%3E%3Cpath d='M1 1L1 22L7 16L11 27L15 25L11 14L17 14Z' fill='black'/%3E%3C/svg%3E") 1 1, default;
}

/* Cursor overrides */
a, button, .desktop-icon, .start-item, .taskbar-win-btn, .menu-bar span, .menu-item {
  cursor: pointer;
}

/* ==============================
   Desktop
   ============================== */

#desktop {
  position: fixed;
  inset: 0;
  bottom: 32px; /* taskbar height */
  background: var(--desktop-bg) url('wallpaper.jpg') center/cover no-repeat;
  overflow: hidden;
}

/* ==============================
   Desktop Icons
   ============================== */

.desktop-icon {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 72px;
  cursor: pointer;
  padding: 4px;
  border: 1px solid transparent;
  user-select: none;
}

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

.desktop-icon.selected,
.desktop-icon:focus {
  outline: none;
  border: 1px dotted var(--white);
  background: rgba(0, 0, 128, 0.35);
}

.desktop-icon .icon-img {
  width: 32px;
  height: 32px;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.desktop-icon .icon-label {
  color: var(--white);
  text-shadow:
    1px  1px 0 var(--black),
   -1px  1px 0 var(--black),
    1px -1px 0 var(--black),
   -1px -1px 0 var(--black);
  text-align: center;
  font-size: 11px;
  line-height: 1.2;
  word-break: break-word;
  max-width: 72px;
}

/* ==============================
   Rubber-Band Selection
   ============================== */

#selection-rect {
  position: absolute;
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.9);
  outline: 1px solid rgba(0, 0, 128, 0.8);
  background: rgba(0, 0, 255, 0.15);
  pointer-events: none;
  z-index: 9998;
}

/* ==============================
   Games Window
   ============================== */

.games-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.game-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-top: 1px solid var(--white);
  border-left: 1px solid var(--white);
  border-right: 1px solid var(--dark-gray);
  border-bottom: 1px solid var(--dark-gray);
  background: var(--gray);
}

.game-item:hover {
  background: rgba(0, 0, 128, 0.08);
}

.game-icon {
  font-size: 32px;
  flex-shrink: 0;
  width: 40px;
  text-align: center;
}

.game-info {
  flex: 1;
}

.game-title {
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 2px;
}

.game-desc {
  font-size: 10px;
  color: var(--dark-gray);
}

/* ==============================
   Windows (Popup panels)
   ============================== */

.window {
  position: fixed;
  min-width: 280px;
  min-height: 120px;
  background: var(--gray);
  border-top:    2px solid var(--white);
  border-left:   2px solid var(--white);
  border-right:  2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
  box-shadow: 3px 3px 0 var(--black);
  display: none;
  flex-direction: column;
  z-index: 100;
}

.window.open {
  display: flex;
}

/* Title Bar */
.title-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--title-blue) 100%);
  cursor: move;
  flex-shrink: 0;
  height: 22px;
}

.window.inactive .title-bar {
  background: var(--dark-gray);
}

.title-bar .title-icon {
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
}

.title-bar .title-text {
  color: var(--white);
  font-weight: bold;
  font-size: 11px;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.title-buttons {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.title-buttons button {
  width: 16px;
  height: 15px;
  background: var(--gray);
  border-top:    2px solid var(--white);
  border-left:   2px solid var(--white);
  border-right:  2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--black);
  font-family: "MS Sans Serif", Arial, sans-serif;
}

.title-buttons button:active {
  border-top:    2px solid var(--dark-gray);
  border-left:   2px solid var(--dark-gray);
  border-right:  2px solid var(--white);
  border-bottom: 2px solid var(--white);
}

/* Menu Bar (optional) */
.menu-bar {
  display: flex;
  gap: 0;
  padding: 2px 4px;
  border-bottom: 1px solid var(--dark-gray);
  flex-shrink: 0;
}

.menu-bar span, .menu-item {
  padding: 2px 6px;
  font-size: 11px;
  cursor: default;
  position: relative;
  user-select: none;
}

.menu-bar span:hover, .menu-item:hover, .menu-item.menu-open {
  background: var(--highlight);
  color: var(--highlight-text);
}

.menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: -2px;
  background: var(--gray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
  box-shadow: 2px 2px 0 var(--black);
  z-index: 9100;
  min-width: 180px;
  padding: 2px 0;
}

.menu-item.menu-open > .menu-dropdown {
  display: block;
}

.menu-dd-item {
  padding: 3px 24px 3px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: default;
  white-space: nowrap;
  font-family: "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  color: var(--black);
}

.menu-dd-item:hover {
  background: var(--highlight);
  color: var(--highlight-text);
}

.menu-dd-item.disabled {
  color: var(--dark-gray);
  pointer-events: none;
}

.menu-dd-item:hover .menu-shortcut {
  color: #c0c0c0;
}

.menu-shortcut {
  margin-left: 20px;
  color: var(--dark-gray);
  font-size: 10px;
}

.menu-sep {
  height: 0;
  border-top: 1px solid var(--dark-gray);
  border-bottom: 1px solid var(--white);
  margin: 3px 4px;
}

/* Window Body */
.window-body {
  flex: 1;
  overflow: auto;
  padding: 10px;
  border-top: 2px solid var(--dark-gray);
  border-left: 2px solid var(--dark-gray);
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  margin: 3px;
  background: var(--gray);
}

/* ==============================
   Win98 UI Primitives
   ============================== */

.sunken {
  border-top:    2px solid var(--dark-gray);
  border-left:   2px solid var(--dark-gray);
  border-right:  2px solid var(--white);
  border-bottom: 2px solid var(--white);
  background: var(--white);
}

.raised {
  border-top:    2px solid var(--white);
  border-left:   2px solid var(--white);
  border-right:  2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
}

.win-button {
  background: var(--gray);
  border-top:    2px solid var(--white);
  border-left:   2px solid var(--white);
  border-right:  2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
  box-shadow: 1px 1px 0 var(--black);
  font-family: "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  padding: 4px 16px;
  cursor: pointer;
  color: var(--black);
  min-width: 75px;
}

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

.win-button:focus {
  outline: 1px dotted var(--black);
  outline-offset: -4px;
}

hr.win-divider {
  border: none;
  border-top: 1px solid var(--dark-gray);
  border-bottom: 1px solid var(--white);
  margin: 8px 0;
}

/* ==============================
   About Me Window Content
   ============================== */

.about-body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.about-avatar {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  background: var(--white);
  border-top:    2px solid var(--dark-gray);
  border-left:   2px solid var(--dark-gray);
  border-right:  2px solid var(--white);
  border-bottom: 2px solid var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.about-text h2 {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 4px;
}

.about-text .about-title {
  color: var(--navy);
  font-size: 11px;
  margin-bottom: 8px;
}

.about-text p {
  font-size: 11px;
  line-height: 1.5;
  margin-bottom: 6px;
}

/* ==============================
   Contact Window Content
   ============================== */

#win-contact .window-body {
  padding: 8px;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-list li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  color: var(--black);
  text-decoration: none;
  font-size: 11px;
}

.contact-list li a:hover {
  background: var(--highlight);
  color: var(--highlight-text);
}

.contact-list li a:hover .contact-icon {
  filter: brightness(10);
}

.contact-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* ==============================
   Resume Window Content
   ============================== */

#win-resume .window-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 20px;
}

#win-resume .resume-icon {
  font-size: 48px;
}

#win-resume p {
  font-size: 11px;
  line-height: 1.5;
}

/* ==============================
   Recycle Bin Easter Egg Content
   ============================== */

#win-recycle .window-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
}

#win-recycle .recycle-icon {
  font-size: 48px;
}

#win-ultrakill .window-body,
#win-chat .window-body {
  padding: 0;
  margin: 0;
  border: none;
  flex: 1;
  display: flex;
  overflow: hidden;
}

#win-ultrakill .window-body iframe,
#win-chat .window-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  flex: 1;
}

#win-recycle p {
  font-size: 11px;
  line-height: 1.6;
}

/* ==============================
   Taskbar
   ============================== */

#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: var(--gray);
  border-top: 2px solid var(--white);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
  z-index: 9999;
}

/* Start Button */
#start-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--gray);
  border-top:    2px solid var(--white);
  border-left:   2px solid var(--white);
  border-right:  2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
  box-shadow: 1px 1px 0 var(--black);
  padding: 2px 10px 2px 6px;
  cursor: pointer;
  font-family: "MS Sans Serif", Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  height: 26px;
  flex-shrink: 0;
}

#start-btn:active,
#start-btn.active {
  border-top:    2px solid var(--dark-gray);
  border-left:   2px solid var(--dark-gray);
  border-right:  2px solid var(--white);
  border-bottom: 2px solid var(--white);
}

#start-btn .start-logo {
  font-size: 14px;
}

/* Taskbar divider */
.taskbar-divider {
  width: 2px;
  height: 20px;
  border-left: 1px solid var(--dark-gray);
  border-right: 1px solid var(--white);
  flex-shrink: 0;
}

/* Open window buttons in taskbar */
#taskbar-windows {
  display: flex;
  gap: 2px;
  flex: 1;
  overflow: hidden;
}

.taskbar-win-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--gray);
  border-top:    2px solid var(--white);
  border-left:   2px solid var(--white);
  border-right:  2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
  padding: 2px 8px;
  cursor: pointer;
  font-family: "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  height: 26px;
  max-width: 160px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.taskbar-win-btn.active {
  border-top:    2px solid var(--dark-gray);
  border-left:   2px solid var(--dark-gray);
  border-right:  2px solid var(--white);
  border-bottom: 2px solid var(--white);
  background: var(--gray);
}

.taskbar-win-btn .bi {
  font-size: 14px;
  flex-shrink: 0;
}

/* System Tray */
#system-tray {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-top:    2px solid var(--dark-gray);
  border-left:   2px solid var(--dark-gray);
  border-right:  2px solid var(--white);
  border-bottom: 2px solid var(--white);
  height: 26px;
  flex-shrink: 0;
}

#clock {
  font-size: 11px;
  font-family: "MS Sans Serif", Arial, sans-serif;
  white-space: nowrap;
}

/* ==============================
   Start Menu
   ============================== */

#start-menu {
  display: none;
  position: fixed;
  bottom: 32px;
  left: 0;
  width: 230px;
  background: var(--gray);
  border-top:    2px solid var(--white);
  border-left:   2px solid var(--white);
  border-right:  2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
  box-shadow: 2px 2px 0 var(--black);
  z-index: 9998;
  flex-direction: row;
}

#start-menu.open {
  display: flex;
}

.start-menu-banner {
  width: 34px;
  background: linear-gradient(180deg, #1a0a5e 0%, #000080 60%, #1084d0 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  flex-shrink: 0;
}

.start-menu-banner span {
  color: var(--white);
  font-size: 14px;
  font-weight: bold;
  font-family: "MS Sans Serif", Arial, sans-serif;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 1px;
  white-space: nowrap;
}

.start-menu-items {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

.start-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}

.start-item:hover {
  background: var(--highlight);
  color: var(--highlight-text);
}

.start-item .start-item-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.start-item .start-item-label {
  font-size: 11px;
}

.start-menu-divider {
  border: none;
  border-top: 1px solid var(--dark-gray);
  border-bottom: 1px solid var(--white);
  margin: 4px 6px;
}

/* ==============================
   Scrollbar (Win98 style)
   ============================== */

::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

::-webkit-scrollbar-track {
  background: var(--gray);
}

::-webkit-scrollbar-thumb {
  background: var(--gray);
  border-top:    2px solid var(--white);
  border-left:   2px solid var(--white);
  border-right:  2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
}

::-webkit-scrollbar-button {
  background: var(--gray);
  border-top:    2px solid var(--white);
  border-left:   2px solid var(--white);
  border-right:  2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
  width: 16px;
  height: 16px;
}

/* ==============================
   File Explorer
   ============================== */

.explorer-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px;
  border-bottom: 1px solid var(--dark-gray);
  background: var(--gray);
  flex-shrink: 0;
}

.explorer-btn {
  background: var(--gray);
  border-top:    2px solid var(--white);
  border-left:   2px solid var(--white);
  border-right:  2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
  font-size: 10px;
  width: 22px;
  height: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "MS Sans Serif", Arial, sans-serif;
  flex-shrink: 0;
}

.explorer-btn:active {
  border-top:    2px solid var(--dark-gray);
  border-left:   2px solid var(--dark-gray);
  border-right:  2px solid var(--white);
  border-bottom: 2px solid var(--white);
}

.explorer-btn:disabled {
  color: var(--dark-gray);
  cursor: default;
}

.explorer-address-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.explorer-addr-label {
  font-size: 11px;
  white-space: nowrap;
}

.explorer-address {
  flex: 1;
  font-family: "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  background: var(--white);
  border-top:    2px solid var(--dark-gray);
  border-left:   2px solid var(--dark-gray);
  border-right:  2px solid var(--white);
  border-bottom: 2px solid var(--white);
  padding: 1px 4px;
  height: 20px;
}

.explorer-body {
  flex: 1;
  overflow: hidden;
  padding: 0 !important;
  border: none !important;
  margin: 0 !important;
  background: var(--white) !important;
}

.explorer-grid {
  width: 100%;
  height: 100%;
  overflow: auto;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px;
  padding: 8px;
  background: var(--white);
  border-top:    2px solid var(--dark-gray);
  border-left:   2px solid var(--dark-gray);
  border-right:  2px solid var(--white);
  border-bottom: 2px solid var(--white);
  margin: 3px;
  box-sizing: border-box;
}

.fs-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 72px;
  padding: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
}

.fs-icon:hover {
  border: 1px dotted var(--dark-gray);
  background: rgba(0, 0, 128, 0.08);
}

.fs-icon.selected {
  border: 1px dotted var(--dark-gray);
  background: rgba(0, 0, 128, 0.15);
}

.fs-icon .fs-icon-img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.fs-icon .fs-icon-img svg {
  width: 32px;
  height: 32px;
  display: block;
}

.fs-icon .fs-icon-label {
  font-size: 10px;
  line-height: 1.2;
  color: var(--black);
  word-break: break-all;
  max-width: 68px;
}

.explorer-statusbar {
  height: 20px;
  border-top: 1px solid var(--dark-gray);
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 11px;
  flex-shrink: 0;
  background: var(--gray);
}

/* ==============================
   Notepad
   ============================== */

.notepad-textarea {
  width: 100%;
  height: 100%;
  min-height: 220px;
  font-family: "Courier New", monospace;
  font-size: 12px;
  background: var(--white);
  color: var(--black);
  border: none;
  resize: none;
  padding: 4px;
  outline: none;
  line-height: 1.5;
  display: block;
}

/* ==============================
   Display Properties (Settings)
   ============================== */

.settings-tabs {
  display: flex;
  gap: 2px;
  padding: 6px 6px 0;
  background: var(--gray);
  border-bottom: 2px solid var(--dark-gray);
}

.settings-tab {
  background: var(--gray);
  border-top:    2px solid var(--white);
  border-left:   2px solid var(--white);
  border-right:  2px solid var(--dark-gray);
  border-bottom: none;
  padding: 3px 10px 5px;
  font-family: "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  cursor: pointer;
  position: relative;
  bottom: -2px;
  z-index: 1;
}

.settings-tab.active {
  border-bottom: 2px solid var(--gray);
  z-index: 2;
  padding-top: 4px;
}

.settings-tab-body {
  padding: 10px;
  min-height: 200px;
  background: var(--gray);
}

.settings-panel {
  display: none;
}

.settings-panel.active {
  display: block;
}

.settings-monitor-preview {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.monitor-outer {
  width: 160px;
  background: var(--gray);
  border-top:    3px solid var(--white);
  border-left:   3px solid var(--white);
  border-right:  3px solid var(--dark-gray);
  border-bottom: 3px solid var(--dark-gray);
  padding: 6px;
}

.monitor-screen {
  width: 100%;
  height: 90px;
  background: var(--desktop-bg) url('wallpaper.jpg') center/cover no-repeat;
  border-top:    2px solid var(--dark-gray);
  border-left:   2px solid var(--dark-gray);
  border-right:  2px solid var(--white);
  border-bottom: 2px solid var(--white);
}

.wallpaper-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wp-card {
  width: 90px;
  height: 60px;
  background-size: cover;
  background-position: center;
  border-top:    2px solid var(--white);
  border-left:   2px solid var(--white);
  border-right:  2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.wp-card:hover {
  outline: 2px solid var(--navy);
}

.wp-card.selected {
  border: 3px solid var(--navy);
  outline: 1px solid var(--white);
}

.wp-card span {
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 9px;
  padding: 1px 4px;
  width: 100%;
  text-align: center;
  font-family: "MS Sans Serif", Arial, sans-serif;
}

.settings-footer {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 6px 10px 8px;
  border-top: 1px solid var(--dark-gray);
  background: var(--gray);
}

.appearance-swatch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  padding: 3px 6px;
  cursor: pointer;
}

.appearance-swatch-row:hover {
  background: rgba(0,0,128,0.1);
}

.appearance-swatch-row.selected {
  background: var(--highlight);
  color: var(--highlight-text);
}

.theme-check {
  margin-left: auto;
  visibility: hidden;
  font-size: 11px;
}

.appearance-swatch-row.selected .theme-check {
  visibility: visible;
}

.appearance-swatch {
  width: 40px;
  height: 16px;
  border-top:    1px solid var(--white);
  border-left:   1px solid var(--white);
  border-right:  1px solid var(--dark-gray);
  border-bottom: 1px solid var(--dark-gray);
  flex-shrink: 0;
}

/* ── Notepad Status Bar ── */
#notepad-statusbar {
  height: 18px;
  border-top: 1px solid var(--dark-gray);
  padding: 1px 8px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--black);
  flex-shrink: 0;
  gap: 16px;
}

/* ── Win98 Modal Dialogs ── */
.np-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: none;
  align-items: center;
  justify-content: center;
}

.np-dialog-overlay.open {
  display: flex;
}

.np-dialog {
  background: var(--gray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
  box-shadow: 2px 2px 4px rgba(0,0,0,0.4);
  font-family: "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  min-width: 280px;
}

.np-dialog-title {
  background: linear-gradient(90deg, var(--navy), var(--title-blue));
  color: var(--white);
  padding: 3px 4px;
  font-weight: bold;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.np-dialog-title-x {
  background: var(--gray);
  border-top: 1px solid var(--white);
  border-left: 1px solid var(--white);
  border-right: 1px solid var(--dark-gray);
  border-bottom: 1px solid var(--dark-gray);
  font-size: 10px;
  line-height: 1;
  padding: 1px 4px;
  cursor: pointer;
  color: var(--black);
}

.np-dialog-body {
  padding: 12px 14px 10px;
}

.np-dialog-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.np-dialog-label {
  flex-shrink: 0;
  width: 90px;
  text-align: right;
}

.np-dialog-input, .np-dialog-select {
  flex: 1;
  padding: 2px 4px;
  font-family: "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  border-top: 2px solid var(--dark-gray);
  border-left: 2px solid var(--dark-gray);
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  background: var(--white);
  outline: none;
  color: var(--black);
  cursor: text;
}

.np-dialog-listbox {
  width: 100%;
  height: 140px;
  border-top: 2px solid var(--dark-gray);
  border-left: 2px solid var(--dark-gray);
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  background: var(--white);
  overflow-y: auto;
  margin-bottom: 8px;
}

.np-listbox-item {
  padding: 2px 6px;
  cursor: default;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  white-space: nowrap;
  color: var(--black);
}

.np-listbox-item:hover, .np-listbox-item.selected {
  background: var(--highlight);
  color: var(--highlight-text);
}

.np-dialog-btn-row {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--dark-gray);
}

.np-dialog-sep {
  border: none;
  border-top: 1px solid var(--dark-gray);
  border-bottom: 1px solid var(--white);
  margin: 8px 0;
}

/* ── Desktop Context Menu ── */
#desktop-ctx {
  position: fixed;
  display: none;
  background: #c0c0c0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  min-width: 160px;
  z-index: 9000;
  padding: 2px 0;
  font-family: "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  user-select: none;
  box-shadow: 2px 2px 0 #000;
}

.ctx-item {
  padding: 3px 24px 3px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: #000;
}

.ctx-item:hover {
  background: #000080;
  color: #fff;
}

.ctx-sep {
  height: 0;
  border-top: 1px solid #808080;
  border-bottom: 1px solid #fff;
  margin: 3px 4px;
}

/* ==============================
   Tor Browser
   ============================== */

#win-tor .window-body {
  padding: 0;
  margin: 0;
  border: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

#tor-warning-overlay {
  position: absolute;
  inset: 0;
  background: #c0c0c0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

#tor-warning-overlay.hidden {
  display: none;
}

#tor-warning-dialog {
  background: #c0c0c0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  width: 320px;
}

#tor-warning-titlebar {
  background: linear-gradient(90deg, #808000, #c0a000);
  color: #fff;
  font-weight: bold;
  font-size: 11px;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  user-select: none;
}

#tor-warning-body {
  display: flex;
  gap: 10px;
  padding: 14px 12px 10px;
  align-items: flex-start;
}

#tor-warning-icon {
  font-size: 32px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

#tor-warning-text {
  font-family: "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  color: #000;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#tor-warning-text ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#tor-network-btns {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

#tor-network-btns .win98-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  text-align: left;
  cursor: pointer;
}

.net-btn-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
}

.net-btn-label {
  font-family: "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  line-height: 1.4;
}

.net-btn-label span {
  color: #444;
  font-weight: normal;
}

#tor-warning-btns {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 4px 12px 12px;
}

#tor-nav-bar {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  background: #3a3a4a;
  border-bottom: 1px solid #111;
  flex-shrink: 0;
}

.tor-nav-btn {
  background: #c0c0c0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  font-family: "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  padding: 2px 7px;
  cursor: pointer;
  color: #000;
  flex-shrink: 0;
}

.tor-nav-btn:active {
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
}

.tor-nav-btn:disabled {
  color: #808080;
}

#tor-address-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: #fff;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  padding: 1px 4px;
  gap: 4px;
}

#tor-onion-icon {
  font-size: 12px;
  flex-shrink: 0;
  line-height: 1;
}

#tor-address-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  background: transparent;
  color: #000;
  user-select: text;
  cursor: text;
}

#tor-frame-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#tor-frame {
  flex: 1;
  width: 100%;
  border: none;
  display: block;
  background: #fff;
}

#tor-loading {
  position: absolute;
  inset: 0;
  background: #c0c0c0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}

#tor-loading.visible {
  opacity: 1;
  pointer-events: all;
}

#tor-loading-dialog {
  background: #c0c0c0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  width: 280px;
}

#tor-loading-titlebar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-weight: bold;
  font-size: 11px;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

#tor-loading-body {
  padding: 16px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#tor-loading-text {
  color: #000;
}

#tor-loading-bar-wrap {
  height: 16px;
  background: #fff;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  padding: 2px;
  overflow: hidden;
}

#tor-loading-bar {
  height: 100%;
  display: flex;
  gap: 2px;
  animation: tor-marquee 0.6s steps(1) infinite;
}

.tor-bar-block {
  width: 14px;
  flex-shrink: 0;
  background: #000080;
}

.tor-bar-block:nth-child(even) {
  background: transparent;
}

@keyframes tor-marquee {
  0%  { transform: translateX(0); }
  50% { transform: translateX(-16px); }
}

#tor-statusbar {
  padding: 2px 6px;
  font-size: 10px;
  color: #aaa;
  background: #2b2b3b;
  border-top: 1px solid #111;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==============================
   Terminal
   ============================== */

.term-body {
  display: flex;
  flex-direction: column;
  padding: 0;
  background: #000;
  overflow: hidden;
}

#term-out {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px 2px;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  color: #00cc00;
  line-height: 1.45;
  word-break: break-word;
}

#term-out::-webkit-scrollbar { width: 12px; }
#term-out::-webkit-scrollbar-track { background: #111; }
#term-out::-webkit-scrollbar-thumb { background: #2a2a2a; border: 1px solid #444; }

.term-line {
  white-space: pre-wrap;
  min-height: 1em;
}

#term-in-row {
  display: flex;
  align-items: center;
  padding: 2px 8px 5px;
  background: #000;
  flex-shrink: 0;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  color: #00cc00;
  border-top: 1px solid #111;
}

#term-prompt {
  white-space: nowrap;
  flex-shrink: 0;
  color: inherit;
  padding-right: 4px;
  user-select: none;
}

#term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #00cc00;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  caret-color: #00cc00;
  user-select: text;
}


/* ==============================
   Media Player
   ============================== */

.mp-window-body {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.mp-video-area {
  background: #000;
  flex: 1;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

#mp-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

.mp-no-media {
  color: #ccc;
  font-size: 11px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 20px;
  width: 100%;
  pointer-events: auto;
  user-select: none;
}

.mp-home-logo {
  font-size: 36px;
  color: #7d4cdb;
  line-height: 1;
  margin-bottom: 2px;
}

.mp-home-title {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  letter-spacing: 0.5px;
}

.mp-home-sub {
  font-size: 10px;
  color: #555;
}

.mp-home-divider {
  width: 100%;
  border-top: 1px solid #2a2a4a;
  margin: 4px 0;
}

.mp-home-section {
  font-size: 9px;
  color: #555;
  letter-spacing: 1px;
  text-transform: uppercase;
  align-self: flex-start;
}

.mp-home-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #16213e;
  border: 1px solid #2a2a4a;
  border-radius: 3px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
}

.mp-home-card:hover {
  border-color: #7d4cdb;
  background: #1e2a50;
}

.mp-home-card-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.mp-home-card-info {
  flex: 1;
  min-width: 0;
}

.mp-home-card-name {
  font-size: 11px;
  font-weight: bold;
  color: #ddd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-home-card-meta {
  font-size: 9px;
  color: #555;
  margin-top: 2px;
}

.mp-home-card-arrow {
  font-size: 11px;
  color: #7d4cdb;
  flex-shrink: 0;
}

.mp-home-btn {
  font-family: "MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  padding: 4px 14px;
  background: var(--gray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
  cursor: pointer;
  margin-top: 2px;
}

.mp-home-btn:active {
  border-top: 2px solid var(--dark-gray);
  border-left: 2px solid var(--dark-gray);
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
}

.mp-controls {
  background: var(--gray);
  border-top: 2px solid var(--dark-gray);
  padding: 4px 6px 5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.mp-seek-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mp-seek {
  flex: 1;
  height: 16px;
  -webkit-appearance: none;
  appearance: none;
  background: #fff;
  border-top: 2px solid var(--dark-gray);
  border-left: 2px solid var(--dark-gray);
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  cursor: pointer;
  padding: 0;
}

.mp-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 14px;
  background: var(--gray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
  cursor: pointer;
}

.mp-time {
  font-size: 10px;
  font-family: "MS Sans Serif", Arial, sans-serif;
  white-space: nowrap;
  min-width: 78px;
  text-align: right;
  color: #000;
}

.mp-btn-row {
  display: flex;
  align-items: center;
  gap: 3px;
}

.mp-btn {
  font-family: "MS Sans Serif", Arial, sans-serif;
  font-size: 13px;
  padding: 2px 7px;
  background: var(--gray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
  cursor: pointer;
  min-width: 30px;
  text-align: center;
  line-height: 1;
}

.mp-btn:active {
  border-top: 2px solid var(--dark-gray);
  border-left: 2px solid var(--dark-gray);
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
}

.mp-vol-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.mp-vol-icon {
  font-size: 11px;
}

.mp-vol {
  width: 64px;
  height: 16px;
  -webkit-appearance: none;
  appearance: none;
  background: #fff;
  border-top: 2px solid var(--dark-gray);
  border-left: 2px solid var(--dark-gray);
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  cursor: pointer;
  padding: 0;
}

.mp-vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 14px;
  background: var(--gray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
  cursor: pointer;
}

.mp-statusbar {
  background: var(--gray);
  border-top: 1px solid var(--dark-gray);
  padding: 2px 6px;
  font-size: 10px;
  color: #444;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

#tor-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7d4cdb;
  display: inline-block;
  flex-shrink: 0;
}

/* ==============================
   BitTorrent Client
   ============================== */
#win-torrent .window-body.bt-body {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.bt-toolbar {
  display: flex;
  gap: 4px;
  padding: 4px 6px;
  border-bottom: 1px solid var(--dark-gray);
  background: var(--gray);
  flex-shrink: 0;
}
#bt-magnet-input {
  flex: 1;
  font-family: 'MS Sans Serif', Arial, sans-serif;
  font-size: 11px;
  padding: 2px 4px;
  border-top: 2px solid var(--dark-gray);
  border-left: 2px solid var(--dark-gray);
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: #fff;
  outline: none;
}
.bt-list-header {
  display: flex;
  align-items: center;
  padding: 2px 6px;
  background: var(--gray);
  border-bottom: 1px solid var(--dark-gray);
  font-size: 11px;
  font-weight: bold;
  flex-shrink: 0;
}
.bt-col-name  { flex: 1; min-width: 0; }
.bt-col-size  { width: 72px; text-align: right; padding-right: 4px; }
.bt-col-speed { width: 80px; text-align: right; padding-right: 4px; }
.bt-col-peers { width: 46px; text-align: right; padding-right: 4px; }
.bt-col-eta   { width: 62px; text-align: right; }
.bt-list {
  flex: 1;
  overflow-y: auto;
  background: #fff;
  border-top: 2px solid var(--dark-gray);
  border-left: 2px solid var(--dark-gray);
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  margin: 2px 4px;
}
.bt-empty {
  padding: 24px 12px;
  color: var(--dark-gray);
  font-size: 11px;
  text-align: center;
}
.bt-row {
  border-bottom: 1px solid #e8e8e8;
  padding: 4px 6px;
  background: #fff;
}
.bt-row:last-child { border-bottom: none; }
.bt-row-header {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 3px;
}
.bt-row-name {
  flex: 1;
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  margin-right: 4px;
}
.bt-row-size  { width: 72px; text-align: right; font-size: 10px; color: #555; padding-right: 4px; }
.bt-row-speed { width: 80px; text-align: right; font-size: 10px; color: #006600; padding-right: 4px; }
.bt-row-peers { width: 46px; text-align: right; font-size: 10px; color: #555; padding-right: 4px; }
.bt-row-eta   { width: 62px; text-align: right; font-size: 10px; color: #555; }
.bt-row-btns  { display: flex; gap: 3px; margin-left: 6px; }
.bt-row-btn {
  font-family: 'MS Sans Serif', Arial, sans-serif;
  font-size: 10px;
  padding: 1px 6px;
  background: var(--gray);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid var(--dark-gray);
  border-bottom: 2px solid var(--dark-gray);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.4;
}
.bt-row-btn:active {
  border-top: 2px solid var(--dark-gray);
  border-left: 2px solid var(--dark-gray);
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
}
.bt-progress-wrap {
  position: relative;
  height: 14px;
  background: #e0e0e0;
  border-top: 1px solid var(--dark-gray);
  border-left: 1px solid var(--dark-gray);
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
}
.bt-progress-bar {
  height: 100%;
  background: #000080;
  max-width: 100%;
}
.bt-progress-pct {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  font-weight: bold;
}
.bt-row-status {
  font-size: 10px;
  color: #666;
  margin-top: 3px;
}
.bt-statusbar {
  padding: 2px 6px;
  border-top: 1px solid var(--dark-gray);
  font-size: 11px;
  background: var(--gray);
  color: #000;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
