/* MediMemes – Windows XP Luna look */

:root {
  --xp-blue: #0054e3;
  --xp-blue-dark: #003c9e;
  --xp-blue-light: #3a6ea5;
  --xp-title: #0054e3;
  --xp-title-gradient-end: #2370c6;
  --xp-bg: #ece9d8;
  --xp-surface: #ffffff;
  --xp-border: #0054e3;
  --xp-border-light: #a6c8e4;
  --xp-text: #000000;
  --xp-green: #3a6e0a;
  --xp-green-start: #22b14c;
  --xp-green-end: #0d5c1f;
  --xp-taskbar: #2362dd;
  --xp-taskbar-bottom: #0a246a;
  --xp-shadow: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  overflow: hidden;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  height: 100%;
  background: #0a3d85 url("/wallpaper.jpg") center center / cover no-repeat fixed;
  color: var(--xp-text);
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 11px;
  min-height: 100vh;
  padding-bottom: 30px;
}

.desktop {
  min-height: 100vh;
  padding: 0;
  padding-bottom: 30px;
  position: relative;
  overflow: hidden;
}

/* Centreren van het memes-venster (horizontaal + verticaal) */
.desktop-center {
  position: fixed;
  top: 28px;
  left: 0;
  right: 0;
  bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 2;
  pointer-events: none;
}

.desktop-center > .window {
  pointer-events: auto;
  margin: 0;
  max-width: 640px;
  width: 100%;
  flex-shrink: 0;
}

/* Desktop icons – links op de achtergrond */
.desktop-icons {
  position: fixed;
  top: 36px;
  left: 12px;
  width: 80px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.desktop-icons-right {
  left: auto;
  right: 12px;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  padding: 4px 6px 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 11px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  transition: background 0.1s, border-color 0.1s;
}

.desktop-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.desktop-icon:active,
.desktop-icon.selected {
  background: rgba(0, 82, 227, 0.8);
  border-color: #0054e3;
}

.desktop-icon-img {
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.icon-medimemes {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect fill='%2322b14c' width='32' height='32' rx='4'/%3E%3Ctext x='16' y='22' font-size='16' fill='%23fff' text-anchor='middle' font-family='sans-serif'%3E📋%3C/text%3E%3C/svg%3E");
}

.icon-computer {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect fill='%23d4d0c8' x='2' y='4' width='28' height='18' rx='1'/%3E%3Crect fill='%23000' x='4' y='6' width='24' height='12'/%3E%3Crect fill='%2322b14c' x='6' y='8' width='8' height='2'/%3E%3Crect fill='%23d4d0c8' x='4' y='22' width='24' height='6' rx='1'/%3E%3Crect fill='%23808080' x='12' y='24' width='8' height='2'/%3E%3C/svg%3E");
}

.icon-docs {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect fill='%23ffd700' x='4' y='2' width='20' height='26' rx='1' stroke='%23b8860b' stroke-width='1'/%3E%3Cpath fill='%23fff' d='M8 8h12v1H8zm0 4h12v1H8zm0 4h8v1H8z'/%3E%3C/svg%3E");
}

.icon-ie {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle fill='%230054e3' cx='16' cy='16' r='14'/%3E%3Cpath fill='%23fff' d='M10 12h4l-2 8h3l2-8h4l-3 12h-3l2-8h-2l-2 8H9l3-12zm14 4c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6 6 2.7 6 6z'/%3E%3C/svg%3E");
}

.icon-recycle {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23d4d0c8' d='M8 4h4l2 4h10v2H6L8 4zm0 6h20v18H8V10zm4 4v10h2V14h-2zm6 0v10h2V14h-2z'/%3E%3C/svg%3E");
}

.icon-network {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle fill='%23d4d0c8' cx='16' cy='10' r='4'/%3E%3Cpath fill='%23d4d0c8' d='M6 24l4-8h4l-4 8H6zm16 0l-4-8h4l4 8h-4zm-8-4l4-8h4l-4 12h-4z'/%3E%3C/svg%3E");
}

.icon-notepad {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect fill='%23fff' x='6' y='2' width='20' height='28' rx='1' stroke='%23808080' stroke-width='1'/%3E%3Cpath fill='%23333' d='M9 8h14v1H9zm0 4h14v1H9zm0 4h10v1H9z'/%3E%3C/svg%3E");
}

.icon-paint {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23ff6b35' d='M8 4h16l4 8-12 12H8L4 16 8 4z'/%3E%3Cpath fill='%23fff' d='M10 8v4h2l6-6h-2L10 8z'/%3E%3Ccircle fill='%23fff' cx='22' cy='14' r='2'/%3E%3C/svg%3E");
}

.icon-solitaire {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect fill='%2322b14c' width='32' height='32' rx='2'/%3E%3Cpath fill='%23fff' d='M8 8h4v4H8zm10 0h4v4h-4zm5 10h4v4h-4z'/%3E%3Cpath fill='%23c00' d='M14 14h4v4h-4z'/%3E%3C/svg%3E");
}

.icon-minesweeper {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect fill='%23d4d0c8' width='32' height='32' rx='1' stroke='%23808080' stroke-width='1'/%3E%3Crect fill='%23c0c0c0' x='4' y='4' width='6' height='6'/%3E%3Crect fill='%23c0c0c0' x='12' y='4' width='6' height='6'/%3E%3Crect fill='%23c0c0c0' x='20' y='4' width='6' height='6'/%3E%3Crect fill='%23c0c0c0' x='4' y='12' width='6' height='6'/%3E%3Crect fill='%23800' x='12' y='12' width='6' height='6'/%3E%3Crect fill='%23c0c0c0' x='20' y='12' width='6' height='6'/%3E%3C/svg%3E");
}

.icon-note {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect fill='%23ffff99' x='4' y='2' width='24' height='28' rx='2' stroke='%23e0e070' stroke-width='1'/%3E%3Cpath fill='%23333' d='M8 10h16v1H8zm0 5h16v1H8zm0 5h12v1H8z'/%3E%3C/svg%3E");
}

.icon-calc {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect fill='%23d4d0c8' x='2' y='2' width='28' height='28' rx='2' stroke='%23808080' stroke-width='1'/%3E%3Crect fill='%23fff' x='6' y='6' width='20' height='8' rx='1'/%3E%3Crect fill='%23c0c0c0' x='8' y='16' width='4' height='4'/%3E%3Crect fill='%23c0c0c0' x='14' y='16' width='4' height='4'/%3E%3Crect fill='%23c0c0c0' x='20' y='16' width='4' height='4'/%3E%3Crect fill='%23c0c0c0' x='8' y='22' width='4' height='4'/%3E%3Crect fill='%23c0c0c0' x='14' y='22' width='4' height='4'/%3E%3Crect fill='%23c0c0c0' x='20' y='22' width='4' height='4'/%3E%3C/svg%3E");
}

.desktop-icon-label {
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
  max-width: 100%;
}

/* Popupbericht voor desktop-icoontjes */
.desktop-message {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 20px;
}

.desktop-message.is-open {
  display: flex !important;
}

.desktop-message .message-window {
  max-width: 320px;
}

.desktop-message .message-body {
  margin: 0 0 12px;
  font-size: 11px;
  line-height: 1.4;
  white-space: pre-line;
}

/* Top bar with add button (left) */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: linear-gradient(180deg, #0a246a 0%, #2362dd 6px, #2362dd 100%);
  border-bottom: 1px solid #5a9bd5;
  z-index: 100;
  display: flex;
  align-items: center;
  padding-left: 6px;
}

.btn-start {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 10px;
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 11px;
  color: #fff;
  background: linear-gradient(180deg, #2e7c3e 0%, #1a5c26 50%, #0d3d1a 100%);
  border: 1px solid #0d3d1a;
  border-radius: 3px;
  cursor: pointer;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.3), 0 1px 2px rgba(0,0,0,0.2);
}

.btn-start:hover {
  background: linear-gradient(180deg, #3a9348 0%, #227a32 50%, #145824 100%);
}

.btn-start:active {
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}

.start-icon {
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M8 2l6 6-6 6-1.5-1.5L11 8 6.5 3.5 8 2z'/%3E%3Cpath fill='%23fff' d='M3 2l6 6-6 6-1.5-1.5L6.5 8 2 3.5 3 2z' opacity='0.8'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Main window – XP style */
.window {
  background: var(--xp-surface);
  border: 1px solid var(--xp-border-light);
  border-radius: 8px 8px 0 0;
  box-shadow: 2px 2px 8px var(--xp-shadow);
  overflow: hidden;
}

.window-title {
  height: 30px;
  padding: 0 0 0 6px;
  background: linear-gradient(180deg, var(--xp-title) 0%, var(--xp-title-gradient-end) 3px, #0a4a9e 100%);
  color: #fff;
  font-weight: bold;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #0a246a;
}

.window-title-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window-buttons {
  display: flex;
  flex-shrink: 0;
  height: 100%;
}

.win-btn {
  width: 46px;
  height: 30px;
  padding: 0;
  border: none;
  border-left: 1px solid #0a246a;
  cursor: pointer;
  background: transparent;
  background-repeat: no-repeat;
  background-position: center;
  transition: background-color 0.1s;
}

.win-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.win-btn:active {
  background-color: rgba(0, 0, 0, 0.2);
}

.win-min {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='1' viewBox='0 0 9 1'%3E%3Cpath fill='%23fff' d='M0 0h9v1H0z'/%3E%3C/svg%3E");
}

.win-max {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' viewBox='0 0 9 9'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='1' d='M0 0v9h9V0H0zm1 1h7v7H1V1z'/%3E%3C/svg%3E");
}

.win-close {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='1.2' d='M1 1l6 6M7 1L1 7'/%3E%3C/svg%3E");
}

.win-close:hover {
  background-color: #e51400;
}

.window-icon {
  font-size: 14px;
}

.window-body {
  padding: 12px;
  background: var(--xp-bg);
  border: 1px solid #b5b09a;
  border-top: none;
  min-height: 200px;
}

/* Scoreboard */
.scoreboard-header {
  display: grid;
  grid-template-columns: 32px 1fr 64px 44px;
  gap: 8px;
  padding: 6px 8px;
  background: linear-gradient(180deg, #fff 0%, #e8e4d4 100%);
  border: 1px solid #b5b09a;
  border-bottom: none;
  font-weight: bold;
  color: var(--xp-text);
}

.scoreboard-row {
  display: grid;
  grid-template-columns: 32px 1fr 64px 44px;
  gap: 8px;
  padding: 8px;
  align-items: center;
  background: var(--xp-surface);
  border: 1px solid #b5b09a;
  border-top: none;
}

.scoreboard-row:nth-child(even) {
  background: #f5f3e8;
}

.col-rank {
  font-weight: bold;
  color: #555;
}

.col-gezegde {
  word-break: break-word;
  line-height: 1.35;
}

.col-votes {
  text-align: right;
  font-weight: bold;
}

.col-action {
  display: flex;
  justify-content: flex-end;
}

.btn-upvote {
  width: 28px;
  height: 24px;
  padding: 0;
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 14px;
  font-weight: bold;
  color: var(--xp-text);
  background: linear-gradient(180deg, #f0f0f0 0%, #d4d0c8 50%, #c0b8a8 100%);
  border: 1px solid #808080;
  border-radius: 3px;
  cursor: pointer;
  box-shadow: inset 1px 1px 0 #fff, 0 1px 1px rgba(0,0,0,0.2);
}

.btn-upvote:hover:not(:disabled) {
  background: linear-gradient(180deg, #fff 0%, #e8e4d8 50%, #d8d0c0 100%);
}

.btn-upvote:disabled {
  opacity: 0.7;
  cursor: default;
}

.footer-hint {
  margin: 12px 0 0;
  padding-top: 8px;
  border-top: 1px solid #b5b09a;
  font-size: 10px;
  color: #555;
}

.footer-hint code {
  background: #e8e4d4;
  padding: 1px 4px;
  border: 1px solid #b5b09a;
}

/* Dialog (add meme form) – hidden by default, only visible when .is-open */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.dialog-overlay.is-open {
  display: flex !important;
}

.dialog-overlay .dialog {
  margin: 0;
  max-width: 400px;
  width: 100%;
}

.dialog-overlay .window-body {
  min-height: auto;
}

.dialog-overlay label {
  display: block;
  margin-bottom: 4px;
  font-weight: bold;
}

.dialog-overlay input[type="text"] {
  width: 100%;
  padding: 4px 6px;
  margin-bottom: 12px;
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 11px;
  border: 1px solid #7f9db9;
  border-radius: 3px;
  background: #fff;
}

.dialog-overlay input:focus {
  outline: 1px solid var(--xp-blue);
  outline-offset: -1px;
}

.form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn-xp {
  min-width: 75px;
  height: 23px;
  padding: 0 12px;
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 11px;
  color: var(--xp-text);
  background: linear-gradient(180deg, #f0f0f0 0%, #d4d0c8 50%, #c0b8a8 100%);
  border: 1px solid #808080;
  border-radius: 3px;
  cursor: pointer;
  box-shadow: inset 1px 1px 0 #fff, 0 1px 1px rgba(0,0,0,0.2);
}

.btn-xp:hover {
  background: linear-gradient(180deg, #fff 0%, #e8e4d8 50%, #d8d0c0 100%);
}

.btn-ok {
  background: linear-gradient(180deg, #0a246a 0%, #2362dd 50%, #0d4a9e 100%);
  color: #fff;
  border-color: #0a246a;
}

.btn-ok:hover {
  background: linear-gradient(180deg, #1a3a8a 0%, #2e6ee8 50%, #1552b0 100%);
}

/* Taskbar at bottom – XP-stijl */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(180deg, #2d7ee7 0%, #1e5bb8 4px, #0a246a 50%, #061d52 100%);
  border-top: 1px solid #5a9bd5;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
  display: flex;
  align-items: stretch;
  padding: 0;
  z-index: 100;
  font-family: Tahoma, Verdana, sans-serif;
}

/* Start-knop */
.start-button-full {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  min-width: 82px;
  padding: 0 14px 0 10px;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  background: linear-gradient(180deg, #4a9b3a 0%, #22b14c 6px, #1a8c3a 40%, #0d5c1f 100%);
  border: none;
  border-right: 1px solid #0a3d12;
  cursor: pointer;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.4), 1px 0 0 rgba(0,0,0,0.15);
}

.start-button-full:hover {
  background: linear-gradient(180deg, #5ab048 0%, #2ed158 6px, #22b14c 40%, #1a8c3a 100%);
}

.start-button-full:active {
  box-shadow: inset 1px 2px 4px rgba(0,0,0,0.4);
  background: linear-gradient(180deg, #0d5c1f 0%, #1a8c3a 100%);
}

/* Windows logo: 4-kleurige vlag (blauw, groen, rood, geel) */
.start-flag {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect fill='%23003399' x='1' y='1' width='11' height='11' rx='1.5'/%3E%3Crect fill='%2300A651' x='12' y='1' width='11' height='11' rx='1.5'/%3E%3Crect fill='%23E31B23' x='1' y='12' width='11' height='11' rx='1.5'/%3E%3Crect fill='%23FFB900' x='12' y='12' width='11' height='11' rx='1.5'/%3E%3C/svg%3E") center/contain no-repeat;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.35));
}

/* Quick Launch */
.quick-launch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  border-right: 1px solid rgba(0,0,0,0.25);
  background: linear-gradient(90deg, rgba(255,255,255,0.08) 0%, transparent 100%);
}

.ql-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ql-btn:hover {
  background: rgba(255,255,255,0.2);
}

.ql-btn:active {
  background: rgba(0,0,0,0.2);
}

.ql-icon {
  width: 20px;
  height: 20px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.ql-ie {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect fill='%23003399' x='0.5' y='0.5' width='7' height='7' rx='1'/%3E%3Crect fill='%2300A651' x='8.5' y='0.5' width='7' height='7' rx='1'/%3E%3Crect fill='%23E31B23' x='0.5' y='8.5' width='7' height='7' rx='1'/%3E%3Crect fill='%23FFB900' x='8.5' y='8.5' width='7' height='7' rx='1'/%3E%3C/svg%3E");
}

.ql-folder {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23ffd700' d='M1 4h5l2 2h7v8H1z'/%3E%3Cpath fill='%23ffec8b' d='M1 4h14v2H3z'/%3E%3C/svg%3E");
}

.ql-desktop {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect fill='%23d4d0c8' x='2' y='2' width='12' height='10' rx='1'/%3E%3Crect fill='%23808080' x='5' y='12' width='6' height='2'/%3E%3Crect fill='%23d4d0c8' x='6' y='13' width='4' height='1'/%3E%3C/svg%3E");
}

.ql-calc {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect fill='%23d4d0c8' x='1' y='1' width='14' height='14' rx='1'/%3E%3Crect fill='%23fff' x='3' y='3' width='10' height='4'/%3E%3Crect fill='%23c0c0c0' x='4' y='8' width='2' height='2'/%3E%3Crect fill='%23c0c0c0' x='7' y='8' width='2' height='2'/%3E%3Crect fill='%23c0c0c0' x='10' y='8' width='2' height='2'/%3E%3Crect fill='%23c0c0c0' x='4' y='11' width='2' height='2'/%3E%3Crect fill='%23c0c0c0' x='7' y='11' width='2' height='2'/%3E%3Crect fill='%23c0c0c0' x='10' y='11' width='2' height='2'/%3E%3C/svg%3E");
}

/* Taskband (vensterknoppen) */
.taskband {
  flex: 1;
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 3px 4px 2px;
  min-width: 0;
}

.task-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 180px;
  height: 22px;
  padding: 0 8px;
  font-size: 11px;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,0.5);
  background: linear-gradient(180deg, #4a7ac4 0%, #2d5aa0 4px, #1e3d6e 100%);
  border: 1px solid #0a246a;
  border-radius: 3px;
  cursor: pointer;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.25), 0 1px 2px rgba(0,0,0,0.2);
}

.task-btn:hover {
  background: linear-gradient(180deg, #5a8ad4 0%, #3d6ab0 4px, #2e4d7e 100%);
}

.task-btn-active {
  background: linear-gradient(180deg, #6a9ae0 0%, #4a7ac4 4px, #2d5aa0 100%);
  border-color: #1e5bb8;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.35), 0 0 0 1px rgba(255,255,255,0.1);
}

.task-btn-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.task-btn-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Systeemvak (rechts) */
.tray-area {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 4px 0 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.15) 100%);
  border-left: 1px solid rgba(0,0,0,0.2);
}

.tray-divider {
  width: 1px;
  height: 20px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.2), transparent);
  margin-right: 6px;
}

.tray-icon {
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1px;
}

.tray-icon:hover {
  background: rgba(255,255,255,0.15);
}

.tray-icon-speaker {
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M8 2v12l-4-4H2V6h2l4-4zm4 4c0 1.5-.8 2.8-2 3.5V4c1.2.7 2 2 2 3.5zm0-3.5v1.5c.6.4 1 1.2 1 2s-.4 1.6-1 2v1.5c1.3-.8 2.2-2.2 2.2-3.5S13.3 6.3 12 5.5z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.tray-icon-network {
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M2 6h2v4H2zm5-3h2v10H7zm5 3h2v4h-2z'/%3E%3Cpath fill='%23fff' opacity='0.8' d='M4 8h8v1H4z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.tray-chevron {
  width: 18px;
  margin-right: 4px;
}

.tray-chevron-icon {
  width: 8px;
  height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 6'%3E%3Cpath fill='%23fff' d='M0 0l4 4 4-4z'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: 0.9;
}

.tray-clock-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 0 8px 0 6px;
  height: 22px;
  background: linear-gradient(180deg, #3d6ab0 0%, #2d5aa0 50%, #1e3d6e 100%);
  border: 1px solid #0a246a;
  border-radius: 2px;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.2);
  min-width: 72px;
}

.tray-time {
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  line-height: 1.1;
  text-shadow: 0 1px 1px rgba(0,0,0,0.4);
}

.tray-date {
  font-size: 9px;
  color: rgba(255,255,255,0.85);
  line-height: 1.1;
}

/* Dynamische XP-vensters (verplaatsbaar, taakbalk) */
.xp-window {
  position: fixed;
  z-index: 50;
  min-width: 200px;
  min-height: 150px;
  background: var(--xp-surface);
  border: 1px solid #a6c8e4;
  border-radius: 8px 8px 0 0;
  box-shadow: 2px 2px 8px var(--xp-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.xp-window.minimized {
  display: none;
}
.xp-window.maximized {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 30px !important;
  width: 100% !important;
  height: auto !important;
  border-radius: 0;
}
.xp-window .window-title {
  cursor: move;
  user-select: none;
}
.xp-window .window-body {
  flex: 1;
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Alleen de .window-body-inner of .xp-scroll mag scrollen, niet de hele body */
.xp-window .window-body.xp-body-scroll {
  overflow-y: auto;
  display: block;
}

.xp-window .window-body .xp-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Startmenu */
.start-menu {
  position: fixed;
  bottom: 30px;
  left: 0;
  z-index: 150;
  font-family: Tahoma, Verdana, sans-serif;
}
.start-menu[hidden] {
  display: none !important;
}
.start-menu-inner {
  background: linear-gradient(180deg, #2d7ee7 0%, #1e5bb8 4px, #0a246a 100%);
  border: 1px solid #5a9bd5;
  border-radius: 0 8px 8px 0;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.35);
  overflow: hidden;
  min-width: 220px;
}
.start-menu-header {
  height: 48px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, #0a246a 0%, #1e5bb8 100%);
  border-bottom: 1px solid #5a9bd5;
}
.start-menu-user {
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,0.5);
}
.start-menu-body {
  padding: 4px 0 8px;
}
.start-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 20px 6px 12px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}
.start-menu-item:hover {
  background: rgba(255,255,255,0.2);
}
.start-menu-icon {
  font-size: 18px;
}
.start-menu-hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.2);
  margin: 4px 8px;
}

/* Explorer-stijl vensters (Mijn documenten, Prullenbak) */
.xp-window .window-body.explorer-body {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.xp-explorer {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: var(--xp-bg);
}
.xp-explorer-toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: linear-gradient(180deg, #fff 0%, #e8e4d4 100%);
  border-bottom: 1px solid #b5b09a;
  font-size: 11px;
}
.xp-explorer-toolbar .btn-xp {
  min-width: auto;
  height: 22px;
  padding: 0 8px;
}
.xp-explorer-address {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #fff;
  border-bottom: 1px solid #b5b09a;
  font-size: 11px;
}
.xp-explorer-address label {
  margin: 0;
  font-weight: bold;
  color: var(--xp-text);
}
.xp-explorer-address .address-text {
  flex: 1;
  padding: 2px 6px;
  border: 1px solid #7f9db9;
  border-radius: 2px;
  background: #fff;
  font: 11px Tahoma, Verdana, sans-serif;
}
.xp-explorer-list-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  border: 1px solid #b5b09a;
  border-top: none;
  margin: 0 8px 8px;
}
.xp-explorer-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  font-family: Tahoma, Verdana, sans-serif;
}
.xp-explorer-list th {
  text-align: left;
  padding: 4px 8px;
  background: linear-gradient(180deg, #0a246a 0%, #1e5bb8 100%);
  color: #fff;
  font-weight: bold;
  border: 1px solid #5a9bd5;
  border-bottom: none;
}
.xp-explorer-list th:first-child { border-left: none; }
.xp-explorer-list td {
  padding: 4px 8px;
  border-bottom: 1px solid #e0dcc8;
  vertical-align: middle;
}
.xp-explorer-list tr:hover td {
  background: #e8f4fc;
}
.xp-explorer-list tr.selected td {
  background: #316ac5;
  color: #fff;
}
.xp-explorer-actions {
  flex-shrink: 0;
  padding: 8px;
  border-top: 1px solid #b5b09a;
  background: linear-gradient(180deg, #fff 0%, #e8e4d4 100%);
}
.xp-explorer-empty {
  padding: 24px;
  text-align: center;
  color: #555;
  font-size: 11px;
}

/* Vensters met alleen scrollbaar lijstgebied (geen dubbel scroll) */
.xp-window .window-body.medimemes-body {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.medimemes-body .scoreboard-header { flex-shrink: 0; margin: 0 12px; }
.medimemes-body .scoreboard { margin: 0 12px; }
.medimemes-body #medimemes-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.medimemes-body .footer-hint,
.medimemes-body .btn-xp,
.medimemes-body #medimemes-form {
  flex-shrink: 0;
  margin: 8px 12px;
}

/* Notepad: menubalk + textarea vult venster */
.xp-window .window-body.notepad-body {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.notepad-body .xp-menubar { flex-shrink: 0; }
.notepad-body #notepad-text {
  flex: 1;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 8px;
  border: none;
  resize: none;
  font: 11px Tahoma, Verdana, sans-serif;
  display: block;
}

/* IE: iframe vult venster */
.xp-window .window-body.ie-body {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ie-body #ie-url { flex-shrink: 0; }
.ie-body #ie-frame {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: none;
}

/* Paint – gereedschappen en kleuren */
.xp-window .window-body.paint-body {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.paint-toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 8px;
  background: linear-gradient(180deg, #fff 0%, #e8e4d4 100%);
  border-bottom: 1px solid #b5b09a;
}
.paint-tool {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #808080;
  border-radius: 2px;
  background: linear-gradient(180deg, #f0f0f0 0%, #d4d0c8 100%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.paint-tool:hover { background: linear-gradient(180deg, #fff 0%, #e8e4d8 100%); }
.paint-tool.active {
  background: linear-gradient(180deg, #c0c8d0 0%, #a0a8b0 100%);
  border-color: #0a246a;
  box-shadow: inset 1px 1px 2px rgba(0,0,0,0.2);
}
.paint-tool-sep { width: 1px; height: 24px; background: #b5b09a; margin: 0 2px; }
.paint-size { display: flex; align-items: center; gap: 2px; }
.paint-size label { font-size: 10px; margin-right: 2px; }
.paint-size select { padding: 2px 4px; font: 11px Tahoma; border: 1px solid #7f9db9; }
.paint-colors {
  display: flex;
  align-items: center;
  gap: 4px;
}
.paint-color-swatch {
  width: 20px;
  height: 20px;
  border: 2px solid #333;
  border-radius: 2px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
}
.paint-color-swatch.fg { border-color: #000; box-shadow: 0 0 0 1px #fff, 0 0 0 2px #000; }
.paint-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  max-width: 180px;
}
.paint-palette .pixel {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(0,0,0,0.2);
  cursor: pointer;
}
.paint-canvas-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px;
  background: #808080;
}
.paint-canvas-wrap canvas {
  display: block;
  cursor: crosshair;
  background: #fff;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
}

/* Bureaubladnotities (sticky notes) */
#desktop-notes {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 30px;
  pointer-events: none;
  z-index: 10;
}
#desktop-notes > .sticky-note {
  pointer-events: auto;
  position: absolute;
  min-width: 180px;
  min-height: 140px;
  max-width: 320px;
  max-height: 400px;
  border-radius: 0 0 4px 4px;
  box-shadow: 3px 3px 12px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 50;
}
.sticky-note .sticky-title {
  height: 24px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: bold;
  cursor: move;
  flex-shrink: 0;
}
.sticky-note .sticky-close {
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  opacity: 0.8;
}
.sticky-note .sticky-close:hover { opacity: 1; }
.sticky-note .sticky-body {
  flex: 1;
  padding: 6px;
  overflow: auto;
  font: 11px Tahoma, Verdana, sans-serif;
  resize: none;
  border: none;
  outline: none;
  min-height: 0;
}
.sticky-note.yellow .sticky-title { background: #f5f5a0; color: #333; border-bottom: 1px solid #e0e070; }
.sticky-note.yellow .sticky-body { background: #ffff99; color: #000; }
.sticky-note.blue .sticky-title { background: #a0c8f0; color: #333; border-bottom: 1px solid #70a0d0; }
.sticky-note.blue .sticky-body { background: #c8e0ff; color: #000; }
.sticky-note.green .sticky-title { background: #a0e0a0; color: #333; border-bottom: 1px solid #70c070; }
.sticky-note.green .sticky-body { background: #c8ffc8; color: #000; }
.sticky-note.pink .sticky-title { background: #f0b0c0; color: #333; border-bottom: 1px solid #e090a0; }
.sticky-note.pink .sticky-body { background: #ffd0e0; color: #000; }

/* Uitvoeren-dialoog */
.xp-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 250;
}
.xp-dialog-overlay[hidden] { display: none !important; }
.xp-dialog { min-width: 380px; max-width: 90vw; }
.xp-dialog .window-body label { display: block; margin-bottom: 4px; font-weight: bold; }
.xp-dialog .window-body .xp-input {
  width: 100%;
  padding: 6px 8px;
  margin-bottom: 8px;
  font: 11px Tahoma;
  border: 1px solid #7f9db9;
  border-radius: 2px;
}
.run-hint { font-size: 10px; color: #555; margin: 0 0 12px; }

/* Contextmenu bureaublad */
.xp-context-menu {
  position: fixed;
  z-index: 200;
  min-width: 180px;
  padding: 2px 0;
  background: #f0f0f0;
  border: 1px solid #a0a0a0;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.25);
  font-size: 11px;
  font-family: Tahoma, Verdana, sans-serif;
}
.xp-context-menu[hidden] { display: none !important; }
.xp-context-item {
  display: block;
  width: 100%;
  padding: 4px 24px 4px 20px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 11px;
  color: #000;
}
.xp-context-item:hover { background: #316ac5; color: #fff; }
.xp-context-sep { height: 1px; margin: 2px 4px; background: #c0c0c0; }

/* Tray clock panel */
.xp-tray-panel {
  position: fixed;
  bottom: 36px;
  right: 8px;
  z-index: 120;
  background: #f0f0f0;
  border: 1px solid #808080;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
  padding: 12px;
  font: 11px Tahoma;
}
.xp-tray-panel[hidden] { display: none !important; }
.xp-tray-panel-inner #tray-panel-time { font-size: 18px; font-weight: bold; margin-bottom: 4px; }
.xp-tray-panel-inner #tray-panel-date { margin-bottom: 12px; color: #333; }
.xp-tray-panel-inner .btn-xp { width: 100%; }

/* Rekenmachine */
.calc-body { padding: 8px; }
.calc-display {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 8px;
  font: 18px 'Courier New', monospace;
  text-align: right;
  border: 1px solid #7f9db9;
  border-radius: 2px;
  background: #fff;
  box-sizing: border-box;
}
.calc-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.calc-btn {
  height: 32px;
  padding: 0;
  font: 12px Tahoma;
  border: 1px solid #808080;
  border-radius: 2px;
  background: linear-gradient(180deg, #f0f0f0 0%, #d4d0c8 100%);
  cursor: pointer;
  box-shadow: inset 1px 1px 0 #fff, 0 1px 1px rgba(0,0,0,0.15);
}
.calc-btn:hover { background: linear-gradient(180deg, #fff 0%, #e8e4d8 100%); }
.calc-btn:active { box-shadow: inset 1px 1px 2px rgba(0,0,0,0.2); }
.calc-btn.op { background: linear-gradient(180deg, #e8e8e8 0%, #d0d0d0 100%); }
.calc-btn.eq { background: linear-gradient(180deg, #0a246a 0%, #1e5bb8 100%); color: #fff; border-color: #0a246a; }
.calc-btn.eq:hover { background: linear-gradient(180deg, #1a3a8a 0%, #2e6ee8 100%); }

/* Menubalk (Notepad, etc.) */
.xp-menubar {
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  padding: 0 4px;
  background: linear-gradient(180deg, #fff 0%, #e8e4d4 100%);
  border-bottom: 1px solid #b5b09a;
  font-size: 11px;
}
.xp-menubar-item {
  padding: 4px 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: 11px Tahoma;
  color: #000;
}
.xp-menubar-item:hover { background: #316ac5; color: #fff; }

/* Statusbalk (Explorer) */
.xp-statusbar {
  flex-shrink: 0;
  padding: 2px 8px;
  background: linear-gradient(180deg, #e0dcc8 0%, #d4d0c0 100%);
  border-top: 1px solid #b5b09a;
  font-size: 11px;
  color: #333;
}

.solitaire-felt { border-radius: 4px; }
.solitaire-top { margin-bottom: 8px; }

@media (max-width: 520px) {
  .scoreboard-header,
  .scoreboard-row {
    grid-template-columns: 28px 1fr 52px 40px;
    gap: 6px;
    padding: 6px;
    font-size: 10px;
  }
}
