/* PC-Desktop: Fenster, Taskleiste, Mauszeiger, Shop-Karten und kleine Apps (Ladereihenfolge siehe index.html) */

/* ---------- PC-Desktop ---------- */

/* Eigener Mauszeiger wie auf einem Windows-PC: Pfeil, über Knöpfen die Hand */
#shop {
  --cursor-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='30' viewBox='0 0 22 30'%3E%3Cpath d='M1.5 1.5v23l6-5.5 4 9 3.5-1.5-4-8.8h8.3z' fill='%23fff' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") 1 1, default;
  --cursor-hand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='30' viewBox='0 0 26 30'%3E%3Cpath d='M8 13V3.5a2 2 0 0 1 4 0V12m0-1.5a2 2 0 0 1 4 0V13m0-1a2 2 0 0 1 4 0v2m0-.5a2 2 0 0 1 4 0V21c0 4.5-3 7.5-7.5 7.5h-3C9 28.5 7 27 5.5 24.5L2 18.5a2 2 0 0 1 3.4-2.1L8 20z' fill='%23fff' stroke='%23000' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 8 1, pointer;
  position: fixed;
  inset: 0;
  z-index: 20;
  background-color: #0b1d3a;
  background-size: cover;
  background-position: center;
  user-select: none;
}
#shop, #shop * { cursor: var(--cursor-arrow); }
#shop button:not(:disabled), #shop button:not(:disabled) *, #shop select { cursor: var(--cursor-hand); }
#shop textarea { cursor: text; }

.desktop-icons {
  position: absolute;
  top: 16px;
  left: 16px;
  bottom: 64px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
}

.desktop-icon {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 96px;
  padding: 8px 4px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.desktop-icon:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.2); }
.desktop-icon img { width: 48px; height: 48px; }

.icon-badge:empty { display: none; }
.icon-badge {
  position: absolute;
  top: 4px;
  right: 18px;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e0402f;
  font-size: 0.75rem;
  font-weight: 700;
  text-shadow: none;
}

.taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 12px;
  background: rgba(28, 32, 44, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.taskbar-power {
  padding: 8px 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
}
.taskbar-power:hover { background: #c42b1c; }
.taskbar-power { display: flex; align-items: center; gap: 8px; }
.power-icon { width: 16px; height: 16px; flex: none; }

.taskbar-apps {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 4px;
  transform: translateX(-50%);
}
.taskbar-start { width: 24px; height: 24px; margin: 0 10px; }

.taskbar-app {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
}
.taskbar-app:hover { background: rgba(255, 255, 255, 0.1); }
.taskbar-app img { width: 28px; height: 28px; }
.taskbar-app.active { background: rgba(255, 255, 255, 0.08); }
.taskbar-app.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: #7cc4ff;
}

.taskbar-clock {
  margin-left: auto;
  font-size: 0.8rem;
  line-height: 1.3;
  text-align: right;
}

/* App-Fenster */

.shop-window {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  width: min(960px, calc(100% - 32px));
  height: min(680px, calc(100% - 52px - 32px));
  transform: translate(-50%, calc(-50% - 26px));
  background: rgba(28, 31, 38, 0.9);
  backdrop-filter: blur(18px) saturate(1.2);
  animation: window-in 0.18s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.shop-window.hidden { display: none; }
@keyframes window-in { from { opacity: 0; transform: translate(-50%, calc(-50% - 16px)) scale(0.97); } }
.shop-window.small { width: min(360px, calc(100% - 32px)); height: min(520px, calc(100% - 52px - 32px)); }

.shop-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 12px;
  background: #1a1c21;
}

.shop-icon { width: 20px; height: 20px; }
.shop-title { font-weight: 600; flex: 1; }
.shop-balance { color: #7ee08a; font-weight: 600; font-variant-numeric: tabular-nums; }

.shop-close {
  width: 36px;
  height: 30px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #eee;
  font-size: 1rem;
}
.shop-close:hover { background: #c42b1c; }

/* Notizen */

.notes {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 12px;
  border: 0;
  border-radius: 6px;
  outline: none;
  background: #fff8c4;
  color: #3a3000;
  font: 1rem/1.5 "Segoe UI", system-ui, sans-serif;
  resize: none;
}

/* Rechner */

.calc { display: flex; flex-direction: column; gap: 12px; height: 100%; }

.calc-display {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  min-height: 72px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #15171b;
  font-size: 2.2rem;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}
.calc-display small { font-size: 0.9rem; opacity: 0.6; }

.calc-keys {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.calc-keys button {
  border: 0;
  border-radius: 6px;
  background: #343944;
  color: #fff;
  font-size: 1.2rem;
}
.calc-keys button:hover { background: #434956; }
.calc-keys button.op { background: #e07a2f; }
.calc-keys button.op:hover { background: #f08a3f; }
.calc-keys button.wide { grid-column: span 2; }

.shop-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.shop-content section + section { margin-top: 22px; }
.shop-content h3 { margin: 0 0 10px; font-size: 1.05rem; }
.shop-content h3 .hint { margin-left: 8px; font-weight: 400; font-size: 0.85rem; opacity: 0.6; }
.server-series { margin: 14px 0 8px; padding-left: 8px; border-left: 4px solid var(--series, #3aa0ff); font-size: 0.95rem; }
.shop-content .slots { margin: 0 0 14px; opacity: 0.85; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 12px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: #2a2e36;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.card { min-width: 0; } /* lange Texte dürfen das Raster nicht über den Bildschirm hinaus aufblähen */
.card-head { display: flex; align-items: center; gap: 12px; }
.card-title { font-weight: 600; }
.card-sub { font-size: 0.85rem; opacity: 0.6; }

/* Filamentspule: farbiger Ring mit Nabe */
.spool {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, #555 0 22%, var(--c) 24% 90%, #444 92%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3);
}
/* Holzplatte im Holzshop: Fläche in Holzfarbe mit angedeuteter Maserung */
.wood-swatch {
  flex: none;
  width: 48px;
  height: 32px;
  border-radius: 3px;
  background:
    repeating-linear-gradient(175deg, rgba(90, 55, 25, 0.18) 0 2px, transparent 2px 7px),
    var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3);
}

.product-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 6px;
  background: radial-gradient(ellipse at 50% 40%, #4a5262, #2f343e 75%);
}

.card.printer .card-head { flex-direction: column; align-items: flex-start; gap: 6px; }

.badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--c);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

.specs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin: 0;
  font-size: 0.88rem;
}
.specs dt { opacity: 0.6; }
.specs dd { margin: 0; text-align: right; overflow-wrap: anywhere; }

/* Datenblatt im Drucker-Shop zum Aufklappen */
.tech-specs { font-size: 0.82rem; }
.tech-specs summary { cursor: pointer; opacity: 0.75; user-select: none; }
.tech-specs summary:hover { opacity: 1; }
.tech-specs .specs { margin-top: 6px; font-size: inherit; }

.card-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}
.stock { flex: 1; font-size: 0.85rem; opacity: 0.7; }
.price { font-weight: 600; font-variant-numeric: tabular-nums; }

.buy {
  padding: 7px 14px;
  border: 0;
  border-radius: 5px;
  background: #3aa0ff;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.buy:hover { background: #5cb2ff; }
.buy:disabled { background: #444a55; color: #99a; cursor: not-allowed; }
