/* Windows 95-achtige vormgeving voor de HUD, dialogen, minigames en schermen. */

:root {
  --win-bg: #c0c0c0;
  --win-dark: #808080;
  --win-darker: #404040;
  --win-light: #ffffff;
  --win-title: linear-gradient(90deg, #000080, #1084d0);
  --ink: #111111;
  --accent: #c0182b;
}

.hidden {
  display: none !important;
}

/* ---------- Vensters en knoppen ---------- */

.win95 {
  background: var(--win-bg);
  border: 2px solid;
  border-color: var(--win-light) var(--win-darker) var(--win-darker) var(--win-light);
  box-shadow: inset -1px -1px var(--win-dark), inset 1px 1px #dfdfdf;
  color: var(--ink);
  font-size: 13px;
  padding: 2px;
  pointer-events: auto;
}

.win-title {
  background: var(--win-title);
  color: #fff;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 4px 3px 6px;
  font-size: 13px;
}

.win-title-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-close {
  width: 18px;
  height: 16px;
  padding: 0;
  font-weight: bold;
  line-height: 14px;
  background: var(--win-bg);
  border: 1px solid;
  border-color: var(--win-light) var(--win-darker) var(--win-darker) var(--win-light);
  cursor: pointer;
}

.win-body {
  padding: 6px;
}

.win-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn {
  font-family: inherit;
  font-size: 13px;
  padding: 5px 12px;
  background: var(--win-bg);
  color: var(--ink);
  border: 2px solid;
  border-color: var(--win-light) var(--win-darker) var(--win-darker) var(--win-light);
  box-shadow: inset -1px -1px var(--win-dark), inset 1px 1px #dfdfdf;
  cursor: pointer;
  min-width: 80px;
}

.btn:active:not(:disabled) {
  border-color: var(--win-darker) var(--win-light) var(--win-light) var(--win-darker);
  box-shadow: inset 1px 1px var(--win-dark);
}

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

.btn-primary {
  font-weight: bold;
  outline: 1px dotted #000;
  outline-offset: -5px;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.tab {
  min-width: 0;
}

.tab-active {
  font-weight: bold;
  box-shadow: inset 1px 1px var(--win-dark);
  border-color: var(--win-darker) var(--win-light) var(--win-light) var(--win-darker);
}

/* ---------- HUD ---------- */

.hud-panels {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 262px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hud-win {
  width: 100%;
}

.meter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.meter-value {
  font-weight: bold;
  font-family: "Courier New", monospace;
  white-space: nowrap;
}

.meter-value.down {
  color: var(--accent);
}

.cup {
  position: relative;
  width: 64px;
  height: 76px;
  border: 3px solid #222;
  border-radius: 0 0 22px 22px;
  background: #f7f7f2;
  overflow: hidden;
  flex-shrink: 0;
}

.cup::after {
  content: "";
  position: absolute;
  right: -14px;
  top: 16px;
  width: 14px;
  height: 22px;
  border: 3px solid #222;
  border-left: none;
  border-radius: 0 12px 12px 0;
}

.cup-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  background: #6b4226;
  transition: height 0.5s ease-out;
}

.cup.burst {
  border-color: #b00000;
  background: #ffd6d6;
  animation: shake 0.25s infinite;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

.chart {
  width: 100%;
  height: auto;
  border: 2px solid;
  border-color: var(--win-darker) var(--win-light) var(--win-light) var(--win-darker);
  background: #fff;
  display: block;
  margin-bottom: 6px;
}

.bar {
  flex: 1;
  height: 16px;
  background: #fff;
  border: 2px solid;
  border-color: var(--win-darker) var(--win-light) var(--win-light) var(--win-darker);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  background: #2a7a3a;
  transition: width 0.4s;
}

.bar-fill.alert {
  background: #d33;
  animation: blink 0.8s steps(2, start) infinite;
}

@keyframes blink {
  to { visibility: hidden; }
}

.task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
}

.task {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 2px 0;
}

.task-done {
  color: var(--win-darker);
  text-decoration: line-through;
}

.task-doing .task-title {
  color: #000080;
  font-weight: bold;
}

.task-mark {
  font-family: "Segoe UI Symbol", sans-serif;
}

.task-bar {
  display: block;
  width: 100%;
  height: 6px;
  background: #fff;
  border: 1px solid var(--win-darker);
  margin-left: 22px;
}

.task-bar > span {
  display: block;
  height: 100%;
  background: #000080;
}

/* ---------- Taakbalk ---------- */

.taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36px;
  background: var(--win-bg);
  border-top: 1px solid var(--win-light);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  pointer-events: auto;
  box-sizing: border-box;
  font-size: 13px;
}

.start-btn {
  font-weight: bold;
  padding: 3px 14px;
  background: var(--win-bg);
  border: 2px solid;
  border-color: var(--win-light) var(--win-darker) var(--win-darker) var(--win-light);
  box-shadow: inset -1px -1px var(--win-dark), inset 1px 1px #dfdfdf;
  cursor: pointer;
  font-family: inherit;
}

.start-menu {
  position: absolute;
  left: 2px;
  bottom: 38px;
  width: 210px;
  background: var(--win-bg);
  border: 2px solid;
  border-color: var(--win-light) var(--win-darker) var(--win-darker) var(--win-light);
  box-shadow: inset -1px -1px var(--win-dark), inset 1px 1px #dfdfdf;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.start-item {
  text-align: left;
  font-family: inherit;
  font-size: 13px;
  padding: 6px 10px;
  background: var(--win-bg);
  border: 1px solid transparent;
  cursor: pointer;
}

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

.taskbar-app {
  padding: 3px 10px;
  border: 2px solid;
  border-color: var(--win-darker) var(--win-light) var(--win-light) var(--win-darker);
  background: #d4d0c8;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tray {
  margin-left: auto;
  padding: 3px 10px;
  border: 1px solid;
  border-color: var(--win-darker) var(--win-light) var(--win-light) var(--win-darker);
}

.clock {
  font-family: "Courier New", monospace;
  font-weight: bold;
}

/* ---------- Prompt, meldingen, dialogen, bellen ---------- */

.prompt {
  position: absolute;
  left: 50%;
  bottom: 50px;
  transform: translateX(-50%);
  background: rgba(20, 20, 20, 0.82);
  color: #fff;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 14px;
  pointer-events: none;
  white-space: nowrap;
}

.toasts {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 340px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.toast {
  background: #fff;
  border: 2px solid var(--win-darker);
  border-left-width: 8px;
  padding: 7px 10px;
  font-size: 13px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
  animation: toast-in 0.25s ease-out;
}

.toast-ok { border-left-color: #2b8a3e; }
.toast-bad { border-left-color: var(--accent); }
.toast-alarm { border-left-color: #e67700; }
.toast-warn { border-left-color: #e8a317; }
.toast-info { border-left-color: #1864ab; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.dialog {
  position: absolute;
  left: 50%;
  bottom: 54px;
  transform: translateX(-50%);
  width: min(600px, 94vw);
  z-index: 30;
}

.dialog-body {
  padding: 6px;
}

.dialog-text {
  font-size: 15px;
  line-height: 1.4;
  margin: 4px 0 10px;
  min-height: 2.8em;
}

.dialog-bad .dialog-text {
  color: var(--accent);
}

.dialog-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dialog-hint {
  display: block;
  text-align: right;
  font-size: 11px;
  color: var(--win-darker);
  margin-top: 6px;
}

.bubble {
  position: absolute;
  left: 0;
  top: 0;
  max-width: 230px;
  background: #fff;
  border: 2px solid #222;
  border-radius: 10px;
  padding: 5px 9px;
  font-size: 13px;
  line-height: 1.3;
  pointer-events: none;
  white-space: normal;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  margin-left: -7px;
  border: 7px solid transparent;
  border-top-color: #222;
  border-bottom: 0;
}

.bubble-bad {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Minigames ---------- */

.overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(10, 12, 14, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.minigame {
  width: min(560px, 94vw);
}

.qte-body,
.xl-body {
  padding: 4px;
}

.qte-intro,
.xl-intro {
  margin: 4px 0 8px;
}

.qte-status {
  font-weight: bold;
  margin: 6px 0;
}

.qte-timer {
  height: 12px;
  background: #fff;
  border: 2px solid;
  border-color: var(--win-darker) var(--win-light) var(--win-light) var(--win-darker);
  margin-bottom: 4px;
}

.qte-timer-fill {
  height: 100%;
  width: 100%;
  background: var(--accent);
}

.qte-stage {
  min-height: 180px;
  background: #e8e8e4;
  border: 2px solid;
  border-color: var(--win-darker) var(--win-light) var(--win-light) var(--win-darker);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
}

.qte-sheet {
  width: 70%;
  height: 46px;
  line-height: 46px;
  text-align: center;
  background: #fff;
  border: 1px solid #888;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.2);
  cursor: grab;
  user-select: none;
  touch-action: none;
  color: #444;
  font-style: italic;
}

.qte-combo span {
  display: inline-block;
  font-size: 30px;
  margin: 0 6px;
  padding: 4px 10px;
  background: #fff;
  border: 1px solid #888;
  min-width: 36px;
  text-align: center;
}

.qte-combo span.done {
  color: #999;
  background: #ddd;
}

.qte-combo span.next {
  background: #ffe27a;
  font-weight: bold;
}

.xl-field {
  position: relative;
  height: 300px;
  background-color: #fff;
  background-image:
    linear-gradient(#e4e4e4 1px, transparent 1px),
    linear-gradient(90deg, #e4e4e4 1px, transparent 1px);
  background-size: 40px 28px;
  border: 2px solid;
  border-color: var(--win-darker) var(--win-light) var(--win-light) var(--win-darker);
  overflow: hidden;
}

.xl-hitline {
  position: absolute;
  left: 0;
  right: 0;
  top: 88%;
  height: 3px;
  background: var(--accent);
}

.xl-note {
  position: absolute;
  transform: translateX(-50%);
  font-family: "Courier New", monospace;
  font-size: 22px;
  font-weight: bold;
  padding: 2px 10px;
  background: #dbe7ff;
  border: 1px solid #4a6fa5;
  box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.2);
}

.xl-typed {
  margin: 10px 0 4px;
  font-size: 14px;
}

.xl-input {
  display: inline-block;
  min-width: 110px;
  padding: 2px 8px;
  font-family: "Courier New", monospace;
  font-size: 20px;
  background: #fff;
  border: 2px solid;
  border-color: var(--win-darker) var(--win-light) var(--win-light) var(--win-darker);
}

.xl-score {
  font-size: 12px;
  margin: 4px 0;
}

.xl-flash {
  font-weight: bold;
  min-height: 1.2em;
}

.alt-warning {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  background: #ffec99;
  border: 3px solid var(--accent);
  padding: 12px 18px;
  z-index: 60;
  pointer-events: none;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
  min-width: 340px;
  text-align: center;
}

.alt-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--accent);
}

.alt-hint {
  margin: 4px 0 8px;
}

.alt-bar {
  height: 10px;
  background: #fff;
  border: 1px solid #222;
}

.alt-bar-fill {
  height: 100%;
  width: 100%;
  background: var(--accent);
}

.alt-sheet {
  position: absolute;
  inset: 0;
  z-index: 55;
  background: rgba(255, 255, 255, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.sheet-win {
  width: min(900px, 92vw);
}

.sheet-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1px;
  background: #bbb;
  font-family: "Courier New", monospace;
  font-size: 13px;
}

.sheet-cell {
  background: #fff;
  padding: 6px;
  text-align: right;
}

.sheet-head {
  background: #dfe8f5;
  font-weight: bold;
  text-align: left;
}

/* ---------- Schermen ---------- */

.screen-wrap {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 16, 19, 0.6);
  pointer-events: auto;
  padding: 12px;
  box-sizing: border-box;
}

.screen-win {
  width: min(460px, 94vw);
  max-height: 92vh;
  overflow: auto;
}

.screen-win.wide {
  width: min(680px, 94vw);
}

.screen-pad {
  padding: 8px;
}

.intro {
  margin: 6px 0 10px;
  line-height: 1.4;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
}

.auth-form input {
  font-family: inherit;
  font-size: 15px;
  padding: 4px 6px;
  border: 2px solid;
  border-color: var(--win-darker) var(--win-light) var(--win-light) var(--win-darker);
  background: #fff;
}

.form-error {
  color: var(--accent);
  font-weight: bold;
  min-height: 1.2em;
  margin: 0;
}

.form-hint {
  font-size: 12px;
  margin: 0;
}

.menu-buttons {
  display: grid;
  gap: 8px;
}

.menu-buttons .btn {
  width: 100%;
  padding: 8px;
  font-size: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table td,
.table th {
  padding: 3px 6px;
  border-bottom: 1px dotted var(--win-dark);
  text-align: left;
}

.table .num {
  text-align: right;
  font-family: "Courier New", monospace;
  white-space: nowrap;
}

.verdict {
  background: #fff;
  border-left: 6px solid;
  padding: 6px 10px;
  margin: 8px 0;
}

.verdict p {
  margin: 4px 0 0;
}

.verdict-ok { border-color: #2b8a3e; }
.verdict-warn { border-color: #e67700; }
.verdict-bad { border-color: var(--accent); }

@media (max-width: 720px) {
  .hud-panels {
    width: 200px;
    top: 6px;
    left: 6px;
  }
  .toasts {
    width: 220px;
    right: 6px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Tutorial-modus ---------- */

.tutorial-panel {
  position: absolute;
  right: 10px;
  top: 150px;
  width: 300px;
  pointer-events: auto;
  z-index: 20;
}

.tutorial-win {
  width: 100%;
}

.tutorial-body {
  padding: 6px;
}

.tutorial-count {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: bold;
  color: #000080;
}

.tutorial-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}
/* ---------- Taken en nieuwe minigames ---------- */

.task-missed {
  color: #c0182b;
  text-decoration: line-through;
}

.win-tasks .win-body {
  max-height: 210px;
  overflow-y: auto;
}

.mc-bar {
  position: relative;
  height: 36px;
  background: #fff;
  border: 2px solid;
  border-color: var(--win-darker) var(--win-light) var(--win-light) var(--win-darker);
  margin: 10px 0;
}

.mc-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #4caf50;
}

.mc-marker {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 6px;
  margin-left: -3px;
  background: var(--accent);
}

.pw-display {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8e8e4;
  border: 2px solid;
  border-color: var(--win-darker) var(--win-light) var(--win-light) var(--win-darker);
}

.pw-arrow {
  font-size: 52px;
}

.pw-hidden {
  font-size: 40px;
  letter-spacing: 6px;
  color: #888;
}

.pw-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

.pw-buttons .btn {
  min-width: 56px;
  font-size: 20px;
}
/* ---------- Doelen, dossiers en declaratie ---------- */

.win-goals {
  position: absolute;
  right: 10px;
  bottom: 50px;
  width: 240px;
  pointer-events: auto;
}

.win-goals .win-body {
  font-size: 12px;
  padding: 4px 6px;
}

.goal-ok { color: #2b8a3e; font-weight: bold; }
.goal-open { color: #555; }

.goal-box {
  background: #fff;
  border: 1px solid var(--win-darker);
  padding: 6px 10px;
  margin: 6px 0;
}

.goal-list {
  margin: 4px 0 0;
  padding-left: 0;
  list-style: none;
}

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

.dc-row {
  text-align: left;
  font-family: "Courier New", monospace;
}

.dos-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  min-height: 120px;
  align-items: center;
  background: #e8e8e4;
  border: 2px solid;
  border-color: var(--win-darker) var(--win-light) var(--win-light) var(--win-darker);
  padding: 10px;
}

.dos-card {
  min-width: 96px;
  font-weight: bold;
}

.dos-done {
  opacity: 0.4;
}
.status-line {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: bold;
  color: #000080;
}

.task-help {
  display: block;
  width: 100%;
  font-size: 11px;
  color: #444;
  margin-left: 22px;
}
