
/* Desktop layout for front page only */
body.cadtb-desktop-body, .cadtb-desktop{
  height: 100vh;
  overflow: hidden;
}

/* teal grid background */
.cadtb-desktop{
  background:
    linear-gradient(rgba(0,0,0,0.06) 1px, transparent 1px) 0 0/24px 24px,
    linear-gradient(90deg, rgba(0,0,0,0.06) 1px, transparent 1px) 0 0/24px 24px,
    #0b7c7e;
  position: relative;
}

/* Icons column */
.icons{
  position: absolute;
  left: 16px;
  top: 16px;
  display: grid;
  gap: 28px;
}
.icon{
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 90px;
  text-decoration: none;
  color: #fff;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.6));
}
.icon img{ image-rendering: pixelated; }
.icon span{
  margin-top: 6px;
  font-size: 12px;
  text-shadow: 1px 1px 0 #000;
}

/* Latest posts window */
.latest-posts{
  position: absolute;
  max-width: 520px;
}

/* Taskbar */
.taskbar{
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--taskbar-height);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  background: #c0c0c0;
  border-top: 2px solid #fff;
  box-shadow: inset 0 2px #fff, inset 0 -2px #808080;
}
.start-button{
  padding: 6px 18px;
  font-weight: 700;
}
.start-menu{
  position: absolute;
  left: 8px;
  bottom: var(--taskbar-height);
  width: 320px;
  z-index: 1000;
}
.start-columns{ display: block; }
.taskbar-right{ margin-left: auto; }

/* Small screens: allow scroll instead of absolute overflow */
@media (max-width: 700px){
  .cadtb-desktop{ height: auto; min-height: 100vh; padding-bottom: var(--taskbar-height); }
  .latest-posts{ position: static; margin: 10px; }
  .taskbar{ position: fixed; }
}


/* Start menu sections + icons */
.start-menu .window-body{ padding: 6px 8px; }
.start-menu .section-title{
  font-weight: 700;
  margin: 6px 0 4px;
}
.start-menu .menu-list{ list-style:none; padding:0; margin:0 0 8px; }
.start-menu .menu-item{
  display:flex; align-items:center; gap:8px;
  padding:4px 6px; text-decoration:none; color:#000;
}
.start-menu .menu-item:hover{ background:#c0d0f0; }
.start-menu .mi{ width:16px; height:16px; image-rendering: pixelated; }
.start-menu .divider{ height:1px; background:#9b9b9b; border-top:1px solid #fff; margin:6px 0; }


/* Game windows */
.window.game-window{
  position:absolute;
  left: 280px; top: 120px;
  width: 420px;
  z-index: 1200;
}
.window.game-window .window-body{
  background: #00808022;
}
.canvas-wrap{ display:flex; justify-content:center; padding:6px; }
canvas.cadtb-snake{ image-rendering: pixelated; border:1px solid #333; background:#000; }
.status-bar{ font-size:12px; padding:4px 8px; color:#111; }


/* === Minesweeper === */
.msw-wrap{ padding:6px; }
.msw-top{ display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
.msw-grid{ display:grid; grid-template-columns: repeat(var(--msw-cols), 22px); gap:2px; user-select:none; }
.msw-cell{
  width:22px;height:22px; display:flex; align-items:center; justify-content:center;
  background:#c0c0c0; border:1px solid #7d7d7d; box-shadow: inset 1px 1px #fff, inset -1px -1px #808080;
  font-weight:700; font-size:12px; cursor:pointer;
}
.msw-cell.revealed{ background:#e0e0e0; box-shadow: none; border:1px solid #9b9b9b; cursor:default; }
.msw-cell.flag::after{ content:"⚑"; font-size:12px; color:#d00; }
.msw-cell.mine.revealed{ background:#f9c; }
.msw-counter{ font-family:Consolas, monospace; background:#000; color:#0f0; padding:2px 6px; border:2px inset #fff; }
.msw-btn{ padding:4px 8px; }

/* === Solitaire (Klondike, click-to-move) === */
.sol-wrap{ padding:6px; user-select:none; }
.sol-row{ display:flex; gap:12px; margin-bottom:12px; }
.sol-stock, .sol-waste, .sol-found, .sol-col{ width:90px; min-height:120px; border:1px dashed #9b9b9b; background:#dfe3f3; position:relative; }
.sol-card{
  position:absolute; width:90px; height:120px; background:#fff; border:1px solid #222;
  border-radius:4px; display:flex; justify-content:center; align-items:center; font-weight:700;
}
.sol-card.back{ background:#0a66c2; }
.sol-card.red{ color:#c00; }
.sol-col .sol-card{ box-shadow: 0 6px 0 rgba(0,0,0,0.05); }
.sol-col .sol-card{ transform: translateY(calc(var(--offset,0) * 24px)); }
.sol-controls{ display:flex; gap:8px; align-items:center; margin-bottom:6px; }
.sol-btn{ padding:4px 10px; }
.sol-msg{ font-size:12px; }


/* v1.4.5: ensure lists have no bullets in Start menu */
.start-menu ul{ list-style: none; padding-left: 0; }

.window .title-bar{ cursor: move; }

/* CADTB 1.80.6 helpers */
.mines-grid .cell{pointer-events:auto;}
.pile, .pile * { pointer-events:auto; }
.pile { width:100px; background:rgba(255,255,255,.18); }
.card { cursor: grab; }
.card:active { cursor: grabbing; }


/* CADTB 1.80.7 styling adjustments (closer to Win98) */
.mines-grid { border: 2px solid #808080; background: #c0c0c0; padding: 4px; display:grid }
.mines-grid .cell{
  width:24px;height:24px; display:flex; align-items:center; justify-content:center;
  font: bold 14px/1 monospace; color:#000;
  border-top:2px solid #fff; border-left:2px solid #fff;
  border-right:2px solid #808080; border-bottom:2px solid #808080;
  box-sizing:border-box; user-select:none; cursor:default;
}
.mines-grid .cell.revealed{
  border:1px solid #808080; background:#c0c0c0;
  border-top-color:#808080; border-left-color:#808080;
  border-right-color:#fff; border-bottom-color:#fff;
}
.mines-grid .cell.flag{ background:#c0c0c0; position:relative;}
.mines-grid .cell.flag::after{ content:'⚑'; font-size:14px; }
.mines-grid .cell.question{ background:#c0c0c0; }
.mines-grid .cell.bomb{ color:#000; }
.mines-grid .cell.n1{ color:#0000ff; }
.mines-grid .cell.n2{ color:#008000; }
.mines-grid .cell.n3{ color:#ff0000; }
.mines-grid .cell.n4{ color:#000080; }
.mines-grid .cell.n5{ color:#800000; }
.mines-grid .cell.n6{ color:#008080; }
.mines-grid .cell.n7{ color:#000000; }
.mines-grid .cell.n8{ color:#808080; }

.pile { width:100px; background:rgba(255,255,255,.12); }
.pile, .pile * { pointer-events:auto; }
.card { cursor:grab; }
.card:active { cursor:grabbing; }
