/* ============================================================
   Papierschredder-Simulator – style.css
   ============================================================ */
:root {
  --accent: #ffc21a;
  --accent-2: #ff8a00;
  --panel: rgba(18, 22, 28, 0.82);
  --card: #1a1f27;
  --card-2: #232a34;
  --text: #eef1f4;
  --muted: #9aa5b1;
  --green: #5be37d;
  --red: #ff5a5a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #111;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  user-select: none;
}

#game canvas { display: block; }

/* ---------------- HUD ---------------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }

.panel {
  background: var(--panel);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  padding: 12px 14px;
  backdrop-filter: blur(3px);
}

.panel-title {
  font-size: 11px; font-weight: 800; letter-spacing: 0.14em;
  color: var(--accent); margin-bottom: 8px;
}

#infoPanel { position: absolute; top: 16px; left: 16px; width: 280px; }
.room-title { font-weight: 800; letter-spacing: 0.16em; font-size: 19px; color: var(--accent); }
.day-line { font-size: 14px; margin-top: 2px; font-weight: 600; }
.clock-line { font-size: 13px; color: var(--muted); margin: 2px 0 10px; }
.clock-line b { color: var(--text); font-size: 16px; font-variant-numeric: tabular-nums; }

.stat-grid {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 10px;
  font-size: 13px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 8px;
}
.stat-grid span { color: var(--muted); }
.stat-grid b { text-align: right; font-variant-numeric: tabular-nums; }
.green { color: var(--green); }
.yellow { color: var(--accent); }
.red { color: var(--red); }

#rightPanel {
  position: absolute; top: 16px; right: 16px; width: 270px;
  display: flex; flex-direction: column; gap: 10px;
}

.bar { height: 12px; background: rgba(255,255,255,0.12); border-radius: 6px; overflow: hidden; }
.bar > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.2s linear; }
.bar-info { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }

.price-list { list-style: none; font-size: 13px; }
.price-list li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.price-list li b { margin-left: auto; font-variant-numeric: tabular-nums; }
.swatch { width: 12px; height: 12px; border-radius: 2px; border: 1px solid rgba(0,0,0,0.4); flex: none; }

#crosshair {
  position: absolute; left: 50%; top: 50%;
  width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 1.5px rgba(0,0,0,0.55);
  transition: width .12s, height .12s, margin .12s, background .12s;
}
#crosshair.active {
  width: 24px; height: 24px; margin: -12px 0 0 -12px;
  background: transparent; border: 2px solid var(--accent);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(0,0,0,0.35);
}
#crosshair.blocked { border-color: var(--red); }

#interactText {
  position: absolute; left: 50%; top: calc(50% + 30px); transform: translateX(-50%);
  text-align: center; white-space: nowrap;
}
#interactMain {
  display: inline-block; background: rgba(18,22,28,0.88); padding: 6px 12px;
  border-radius: 4px; font-weight: 600; font-size: 15px;
}
#interactMain:empty, #interactSub:empty { display: none; }
#interactSub { font-size: 12px; color: #dfe5ea; margin-top: 4px; text-shadow: 0 1px 3px #000; }

.key {
  display: inline-block; min-width: 22px; text-align: center;
  background: var(--accent); color: #111; border-radius: 3px;
  padding: 0 6px; font-weight: 800; font-size: 12px; line-height: 20px; margin: 0 2px;
}

#handStatus {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  font-size: 14px; font-weight: 600; padding: 9px 18px; white-space: nowrap;
}
#handStatus small { color: var(--muted); font-weight: 400; margin-left: 6px; }

#keyHints {
  position: absolute; bottom: 22px; right: 16px; font-size: 12px; color: #e8ecef;
  text-shadow: 0 1px 3px #000; text-align: right; line-height: 26px;
}

#toasts {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.toast {
  background: var(--panel); border-left: 4px solid var(--accent); padding: 8px 14px;
  border-radius: 5px; font-size: 14px; animation: toastIn .25s ease-out;
}
.toast.out { opacity: 0; transform: translateY(-6px); transition: all .35s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }

#moneyPops .pop {
  position: absolute; left: 50%; top: 42%; transform: translateX(-50%);
  color: var(--green); font-weight: 800; font-size: 22px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.7);
  animation: rise 1.3s ease-out forwards;
}
@keyframes rise {
  from { opacity: 1; transform: translate(-50%, 0); }
  to   { opacity: 0; transform: translate(-50%, -70px); }
}

/* ---------------- Overlays / Menüs ---------------- */
.overlay {
  position: fixed; inset: 0; z-index: 20; display: none;
  align-items: center; justify-content: center;
  background: rgba(8, 10, 14, 0.55); backdrop-filter: blur(5px);
}
.overlay.show { display: flex; }

.card {
  background: var(--card); border-radius: 10px; width: min(760px, 94vw);
  max-height: 92vh; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6); border-top: 5px solid var(--accent);
  overflow: hidden;
}
.card.small { width: min(420px, 94vw); }
.card.wide { width: min(1000px, 96vw); }
.card-head { padding: 18px 24px 12px; }
.card-head.row { display: flex; justify-content: space-between; align-items: center; }
.card-head h1 { font-size: 22px; letter-spacing: 0.12em; color: var(--accent); }
.card-head .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.card-body { padding: 8px 24px 18px; overflow-y: auto; }
.card-foot {
  padding: 14px 24px; background: var(--card-2);
  display: flex; justify-content: flex-end; align-items: center; gap: 10px;
}
.card-foot .hint { margin-right: auto; }

.two-col { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.btn-col { display: flex; flex-direction: column; gap: 10px; }

.btn {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  background: #2c3440; color: var(--text); border: 1px solid #3a4452;
  border-radius: 6px; padding: 10px 16px; transition: background .12s, transform .05s;
}
.btn:hover:not(:disabled) { background: #384252; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: #141414; border-color: var(--accent); }
.btn.primary:hover:not(:disabled) { background: #ffd04d; }
.btn.danger { border-color: #6b2f2f; color: #ff9b9b; }
.btn.small { padding: 6px 10px; font-size: 12px; }

.howto h3, section h3 {
  font-size: 12px; letter-spacing: 0.14em; color: var(--accent);
  margin: 6px 0 10px; text-transform: uppercase;
}
section h3:not(:first-child) { margin-top: 18px; }
.howto ul { padding-left: 18px; font-size: 14px; line-height: 1.6; color: #d7dde3; }
.keys { margin-top: 14px; font-size: 13px; line-height: 2; color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); margin-bottom: 10px; }

/* Settings */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.slider { display: block; font-size: 14px; margin-bottom: 14px; }
.slider span { float: right; color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.slider input { width: 100%; margin-top: 6px; accent-color: var(--accent); cursor: pointer; }
.bind-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 14px;
}
.bind-btn { min-width: 120px; }
.bind-btn.waiting { background: var(--accent-2); color: #111; border-color: var(--accent-2); }

/* Shop */
.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.shop-money { text-align: right; color: var(--muted); font-size: 12px; }
.shop-money b { color: var(--accent); font-size: 22px; font-variant-numeric: tabular-nums; }
.shop-item {
  background: var(--card-2); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px;
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
}
.shop-item h4 { font-size: 15px; }
.shop-item .lvl { font-size: 12px; color: var(--accent); font-weight: 700; margin-left: 6px; }
.shop-item p { font-size: 12px; color: var(--muted); grid-column: 1; }
.shop-item .effect { font-size: 12px; color: #cfe8d6; grid-column: 1; }
.shop-item .btn { grid-row: 1 / span 3; grid-column: 2; min-width: 120px; }
.pips { display: flex; gap: 3px; margin-top: 4px; grid-column: 1; }
.pips i { width: 14px; height: 5px; border-radius: 2px; background: #3a4452; }
.pips i.on { background: var(--accent); }
.team-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 13px;
}
.team-row .dot { width: 10px; height: 10px; border-radius: 50%; }
.team-row .meta { color: var(--muted); margin-left: auto; margin-right: 8px; font-size: 12px; }
.empty { color: var(--muted); font-size: 13px; font-style: italic; }

/* Report */
.report-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.report-table td { padding: 7px 4px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.report-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.report-table tr.sum td { border-top: 2px solid var(--accent); font-size: 16px; }
.report-table tr.section td { color: var(--accent); font-size: 11px; letter-spacing: .14em; font-weight: 800; padding-top: 14px; }
.rating { margin-top: 14px; padding: 10px 14px; background: var(--card-2); border-radius: 6px; font-size: 14px; }

@media (max-width: 760px) {
  .two-col, .settings-grid, .shop-grid { grid-template-columns: 1fr; }
}

/* Mehrspieler */
.hidden { display: none !important; }
.mp-only { display: none; }
body.multiplayer .mp-only { display: block; }
input { user-select: text; }
.mp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.text-input {
  width: 100%; font: inherit; font-size: 15px; color: var(--text);
  background: #11151b; border: 1px solid #3a4452; border-radius: 6px; padding: 9px 12px; outline: none;
}
.text-input:focus { border-color: var(--accent); }
.text-input.small { font-size: 12px; padding: 6px 10px; margin-top: 8px; color: var(--muted); }
.text-input.code { text-transform: uppercase; letter-spacing: 0.3em; font-weight: 700; font-size: 18px; }
.mp-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.mp-row .text-input { flex: 1; }
.mp-info { margin-top: 18px; background: var(--card-2); border-radius: 8px; padding: 14px; }
.mp-code-label { font-size: 11px; letter-spacing: .14em; color: var(--muted); font-weight: 700; }
.mp-code { font-size: 38px; font-weight: 800; letter-spacing: 0.25em; color: var(--accent); font-variant-numeric: tabular-nums; }
.mp-info .btn.danger { margin-top: 10px; }
.player-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 14px; }
.player-row .dot { width: 10px; height: 10px; border-radius: 50%; }
.player-row .meta { margin-left: auto; color: var(--muted); font-size: 12px; }
@media (max-width: 760px) { .mp-grid { grid-template-columns: 1fr; } }
