/* DBS desktop theme: Windows 98-style chrome (icons, taskbar, start menu, window frames).
   Loaded last on desktop.html so it overrides styles.css. Wallpaper and app contents are untouched. */

:root {
  --w-face: #c0c0c0; --w-hi: #fff; --w-light: #dfdfdf; --w-shadow: #808080; --w-dark: #404040;
  --w-title-a: #000080; --w-title-b: #1084d0;
  --w-font: Tahoma, "MS Sans Serif", Geneva, Verdana, sans-serif;
}
#desktop, #taskbar, #start-menu, .window { font-family: var(--w-font); }

/* ── Icons: a column down the left, shortcut arrows, selection ── */
#desktop {
  flex-direction: column; flex-wrap: wrap; align-content: flex-start;
  gap: 4px 6px; padding: 8px; position: relative;
}
.desktop-icon {
  position: relative; width: 84px; padding: 4px 2px 3px; text-align: center; color: #fff;
  border: 1px solid transparent; touch-action: manipulation;
}
.desktop-icon img { width: 40px; height: 40px; margin: 0 auto 4px; image-rendering: auto; }
.desktop-icon span {
  display: inline-block; max-width: 100%; padding: 1px 3px; font-size: 11px; line-height: 13px;
  text-shadow: 1px 1px 0 #000, 0 0 3px rgba(0,0,0,.8); overflow-wrap: anywhere;
}
.desktop-icon.shortcut::after {
  content: ''; position: absolute; left: 22px; top: 28px; width: 12px; height: 12px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 9L9 3M4.5 3H9v4.5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") center/12px no-repeat;
  border: 1px solid #000; box-sizing: border-box; pointer-events: none;
}
.desktop-icon.selected { border: 1px dotted rgba(255,255,255,.55); background: rgba(0,0,128,.18); }
.desktop-icon.selected img { filter: sepia(1) hue-rotate(185deg) saturate(3.5) brightness(.8); }
.desktop-icon.selected span { background: #000080; text-shadow: none; outline: 1px dotted #ff0; outline-offset: -1px; }
#dt-band { position: absolute; z-index: 5; border: 1px dotted #fff; background: rgba(0,0,128,.25); pointer-events: none; }

/* ── Taskbar ── */
#taskbar {
  height: 40px; padding: 3px 4px; gap: 4px; align-items: stretch;
  background: var(--w-face); border-top: 1px solid var(--w-light);
  box-shadow: inset 0 1px 0 var(--w-hi); z-index: 9000;
}
#start-btn {
  display: inline-flex; align-items: center; gap: 6px; height: auto; padding: 0 10px 0 7px;
  background: var(--w-face); color: #000; font: 700 13px var(--w-font);
  border: 0; box-shadow: inset -1px -1px var(--w-dark), inset 1px 1px var(--w-hi), inset -2px -2px var(--w-shadow), inset 2px 2px var(--w-light);
}
#start-btn::before {
  content: ''; width: 18px; height: 16px; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 16'%3E%3Cpath d='M1 3c2-1.2 4-1.2 6 0v5c-2-1.2-4-1.2-6 0z' fill='%23e8341c'/%3E%3Cpath d='M8 3.4c2 1.2 4 1.2 6 0v5c-2 1.2-4 1.2-6 0z' fill='%2349b83a'/%3E%3Cpath d='M1 9c2-1.2 4-1.2 6 0v5c-2-1.2-4-1.2-6 0z' fill='%231a6fd6'/%3E%3Cpath d='M8 9.4c2 1.2 4 1.2 6 0v5c-2 1.2-4 1.2-6 0z' fill='%23f6c21a'/%3E%3C/svg%3E");
}
#start-btn:active, #start-btn.open { box-shadow: inset 1px 1px #000, inset -1px -1px var(--w-hi), inset 2px 2px var(--w-shadow), inset -2px -2px var(--w-light); padding: 1px 9px 0 8px; }
#taskbar-windows { gap: 3px; margin-left: 3px; padding-left: 6px; position: relative; }
#taskbar-windows::before { content: ''; position: absolute; left: 0; top: 1px; bottom: 1px; width: 2px; border-left: 1px solid var(--w-shadow); border-right: 1px solid var(--w-hi); }
#taskbar-windows button {
  min-width: 90px; max-width: 170px; padding: 0 8px; overflow: hidden; text-overflow: ellipsis; text-align: left;
  font: 12px var(--w-font); color: #000; background: var(--w-face); border: 0; cursor: pointer;
  box-shadow: inset -1px -1px #000, inset 1px 1px var(--w-hi), inset -2px -2px var(--w-shadow), inset 2px 2px var(--w-light);
}
#taskbar-windows button.active {
  font-weight: 700; padding: 1px 7px 0 9px;
  background: repeating-conic-gradient(var(--w-face) 0 25%, var(--w-hi) 0 50%) 0 0 / 2px 2px;
  box-shadow: inset 1px 1px #000, inset -1px -1px var(--w-hi), inset 2px 2px var(--w-shadow), inset -2px -2px var(--w-light);
}
#aa-tray, #clock {
  align-self: center; height: 28px; display: flex; align-items: center;
  border: 0; box-shadow: inset 1px 1px var(--w-shadow), inset -1px -1px var(--w-hi);
}
#clock { margin-left: 0 !important; padding: 0 10px; font: 12px var(--w-font); color: #000; }

/* ── Start menu ── */
#start-menu {
  left: 3px; bottom: 40px; width: 230px; padding: 3px 3px 3px 33px; z-index: 9001;
  background: var(--w-face); border: 0;
  box-shadow: inset -1px -1px #000, inset 1px 1px var(--w-light), inset -2px -2px var(--w-shadow), inset 2px 2px var(--w-hi), 3px -2px 12px rgba(0,0,0,.4);
}
#start-menu::before {
  content: 'DBS'; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 26px;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; box-sizing: border-box;
  background: linear-gradient(0deg, #000080, #1084d0); color: #fff; font: 700 17px/1 var(--w-font); letter-spacing: 1px;
  writing-mode: vertical-rl; transform: rotate(180deg); text-shadow: 1px 1px 0 rgba(0,0,0,.5);
}
#start-menu .menu-item { display: flex; align-items: center; gap: 10px; padding: 8px 8px; font-size: 13px; }
#start-menu .menu-item .mi-ico { width: 22px; text-align: center; font-size: 17px; line-height: 1; flex-shrink: 0; }
#start-menu .menu-item.mi-sep { margin-top: 6px; position: relative; }
#start-menu .menu-item.mi-sep::before { content: ''; position: absolute; left: 4px; right: 4px; top: -4px; height: 2px; border-top: 1px solid var(--w-shadow); border-bottom: 1px solid var(--w-hi); }

/* ── Windows ── */
.window {
  padding: 3px; background: var(--w-face); border: 0; color: #000;
  box-shadow: inset -1px -1px #000, inset 1px 1px var(--w-light), inset -2px -2px var(--w-shadow), inset 2px 2px var(--w-hi), 5px 7px 18px rgba(0,0,0,.45);
}
.window:not(.dbs-player) .window-header {
  background: linear-gradient(90deg, #808080, #b5b5b5); color: #d8d8d8;
}
.window:not(.dbs-player).focused .window-header { background: linear-gradient(90deg, var(--w-title-a), var(--w-title-b)); color: #fff; }
.window-header { padding: 3px 3px 3px 6px; font: 700 12px var(--w-font); min-height: 24px; }
.window-header > div { gap: 2px !important; }
.window-header .btn-min, .window-header .btn-max, .window-header .window-close {
  width: 20px; height: 18px; padding: 0; font-size: 0; color: transparent; cursor: pointer;
  background: var(--w-face) no-repeat center; border: 0;
  box-shadow: inset -1px -1px #000, inset 1px 1px var(--w-hi), inset -2px -2px var(--w-shadow), inset 2px 2px var(--w-light);
}
.window-header .btn-min:active, .window-header .btn-max:active, .window-header .window-close:active {
  box-shadow: inset 1px 1px #000, inset -1px -1px var(--w-hi), inset 2px 2px var(--w-shadow), inset -2px -2px var(--w-light);
}
.window-header .btn-min   { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18'%3E%3Cpath d='M6 12h7v2H6z'/%3E%3C/svg%3E"); }
.window-header .btn-max   { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18'%3E%3Cpath d='M5 4h10v9H5zM6 6v6h8V6z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.window-header .window-close { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18'%3E%3Cpath d='M6 4l8 9M14 4l-8 9' stroke='%23000' stroke-width='1.8' fill='none'/%3E%3C/svg%3E"); margin-left: 2px; }
.window-content {
  border: 2px solid; border-color: var(--w-shadow) var(--w-hi) var(--w-hi) var(--w-shadow); margin-top: 3px;
}
.window.maximized { box-shadow: inset -1px -1px #000, inset 1px 1px var(--w-light), inset -2px -2px var(--w-shadow), inset 2px 2px var(--w-hi); }

/* ── Phones: icons stay in columns, roomier targets ── */
@media (max-width: 600px) {
  #desktop { padding-top: 40px; }
  .desktop-icon { width: 78px; }
  .desktop-icon img { width: 44px; height: 44px; }
  #taskbar-windows button { min-width: 64px; }
  #start-menu { width: min(250px, calc(100vw - 8px)); }
  #start-menu .menu-item { padding: 11px 8px; }
  .window-header .btn-min, .window-header .btn-max, .window-header .window-close { width: 30px; height: 26px; background-size: 24px; }
  .window-header { padding: 4px 4px 4px 8px; }
}
@media (prefers-reduced-motion: no-preference) {
  #start-menu:not(.hidden) { animation: dt-menu .12s ease-out; }
  @keyframes dt-menu { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
