/* ===== Subnet — Default Skin ===== */
:root {
  --accent:        #0891b2;
  --accent-dark:   #0e7490;
  --accent-soft:   #e0f2fe;
  --ok:            #16a34a;
  --warn:          #d97706;
  --err:           #dc2626;
  --text:          #0f172a;
  --text-muted:    #64748b;
  --bg:            #f8fafc;
  --card:          #ffffff;
  --border:        #e2e8f0;
}

/* ===== Dark / Hacker Mode ===== */
body.theme-hacker {
  --accent:        #00e676;
  --accent-dark:   #00c853;
  --accent-soft:   #001a0d;
  --ok:            #00e676;
  --warn:          #ffab40;
  --err:           #ff5252;
  --text:          #c8ffd4;
  --text-muted:    #4a8a6a;
  --bg:            #050e08;
  --card:          #0a1a0e;
  --border:        #0d2e16;
}
body.theme-hacker {
  font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
}
body.theme-hacker .header {
  background: #050e08;
  border-color: #0d2e16;
}
body.theme-hacker .header .logo { color: #00e676; text-shadow: 0 0 12px #00e676; }
body.theme-hacker .header .logo .slash { color: #00c853; }
body.theme-hacker .navigation li a { font-family: 'JetBrains Mono', monospace; }
body.theme-hacker .statbar .v { text-shadow: 0 0 8px currentColor; }
body.theme-hacker .statbar .item { border-color: #0d2e16; }
body.theme-hacker table.grid th { background: #050e08; }
body.theme-hacker .footer { background: #050e08; }
body.theme-hacker .btn {
  background: #001a0d;
  color: #00e676 !important;
  border: 1px solid #00e676;
  box-shadow: 0 0 6px rgba(0,230,118,.25);
}
body.theme-hacker .btn:hover { background: #00e676; color: #050e08 !important; }
body.theme-hacker input[type="text"],
body.theme-hacker input[type="password"],
body.theme-hacker input[type="number"],
body.theme-hacker select { background: #050e08; color: #c8ffd4; border-color: #0d2e16; }
body.theme-hacker input[type="submit"] { background: #00e676; color: #050e08; }
body.theme-hacker a { color: #00e676; }
body.theme-hacker .bonusbar { background: #001a0d; border-left-color: #00e676; color: #00e676; }

/* ─── Theme-Toggle Button ─── */
.theme-toggle {
  cursor: pointer; background: none; border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 12px; font-size: 11px; font-family: inherit;
  color: var(--text-muted); transition: all .2s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
body.theme-hacker .theme-toggle {
  border-color: #00e676; color: #00e676;
  box-shadow: 0 0 8px rgba(0,230,118,.3);
  font-family: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

/* ===== Header ===== */
.header {
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 14px 28px; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 8px;
}
.header .logo {
  font-family: 'Inter', sans-serif; font-size: 22px; font-weight: 700;
  letter-spacing: -0.02em; color: var(--text);
}
.header .logo .slash { color: var(--accent); font-weight: 400; }
.header .logo .ver { color: var(--text-muted); font-size: 11px; vertical-align: super; margin-left: 6px; font-weight: 400; letter-spacing: 0; }
@keyframes blink { 50% { opacity: 0; } }
.header .tag { color: var(--text-muted); font-size: 12px; }
.header .session { font-size: 12px; color: var(--text-muted); }
.header .session b { color: var(--text); font-weight: 600; }
.header .session a { color: var(--accent); font-weight: 500; }
.header .session a[data-action="reload"] { font-weight: 600; }

/* ===== Bonus-Banner ===== */
.bonusbar {
  background: linear-gradient(90deg, var(--accent-soft) 0%, transparent 100%);
  border-left: 3px solid var(--accent);
  padding: 10px 28px; color: var(--accent-dark);
  font-weight: 600; font-size: 13px;
}

/* ===== Linke Navigation ===== */
#navi {
  list-style: none; padding: 16px 0; margin: 0;
  width: 200px; float: left;
  background: var(--card); border-right: 1px solid var(--border);
  min-height: calc(100vh - 53px);
}
.navigation li a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px; color: var(--text);
  border-left: 3px solid transparent;
  font-size: 13px; font-weight: 500; text-decoration: none;
  transition: background 0.1s;
}
.navigation li a:hover { background: var(--accent-soft); text-decoration: none; }
.navigation li.active a {
  background: var(--accent-soft);
  border-left-color: var(--accent);
  color: var(--accent-dark);
}
.navigation .help { display: none; }

/* ===== Inhalt ===== */
.content { margin-left: 200px; padding: 24px 32px 48px; min-height: 470px; }
h2 {
  font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--text); margin: 0 0 16px; padding: 0;
  border-bottom: 1px solid var(--border); padding-bottom: 12px;
}
h3 {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--text-muted);
  margin: 24px 0 8px;
}
.content p, .content .indent { max-width: 660px; line-height: 1.6; }

/* ===== Formulare ===== */
table.form { border-collapse: collapse; font-size: 13px; margin: 8px 0 6px; }
table.form td { background: transparent; padding: 6px 10px 6px 0; vertical-align: middle; }
table.form td.label { font-weight: 600; color: var(--text-muted); white-space: nowrap; padding-right: 14px; }
input[type="text"], input[type="password"], input[type="number"], select, textarea {
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--card); font-size: 13px; font-family: inherit; color: var(--text);
  width: 220px;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input[type="submit"] {
  padding: 7px 18px; border-radius: 6px; width: auto;
  background: var(--accent); color: white; font-size: 13px;
  font-family: inherit; font-weight: 600; border: none; cursor: pointer;
  transition: background 0.15s;
}
input[type="submit"]:hover { background: var(--accent-dark); }

/* ===== Statbar ===== */
.statbar { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 20px; }
.statbar .item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 16px; min-width: 160px;
}
.statbar .k {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-muted); font-weight: 600; display: block; margin-bottom: 3px;
}
.statbar .v { font-size: 17px; font-weight: 700; color: var(--text); }
.statbar .v.credits { color: var(--warn); }
.statbar .v.income  { color: var(--ok); }

/* ===== Daten-Tabellen ===== */
table.grid {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden; margin: 0 0 16px;
  font-size: 13px;
}
table.grid th {
  background: var(--bg); text-align: left; padding: 10px 14px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); font-weight: 700;
  border-bottom: 1px solid var(--border);
}
table.grid td {
  padding: 11px 14px; color: var(--text);
  border-bottom: 1px solid var(--border);
}
table.grid tr:last-child td { border-bottom: none; }
table.grid tbody tr:hover td { background: var(--accent-soft); }
table.grid tr.building td { background: #fefce8; }
table.grid tr.you td { background: #eff6ff; font-weight: 600; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 6px;
  background: var(--accent); color: white !important;
  font-size: 12px; font-weight: 500; font-family: inherit; cursor: pointer;
  border: none; text-decoration: none; transition: background 0.15s;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn.disabled, .btn[disabled] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn.danger { background: var(--err); }
.btn.danger:hover { background: #b91c1c; }

/* ===== Status & Hilfstexte ===== */
.muted { color: var(--text-muted); }
.note { margin: 6px 0 8px; color: var(--text-muted); font-size: 12px; max-width: 660px; line-height: 1.55; }
.error, .error-text { color: var(--err); }
.error { margin: 4px 0; font-size: 12px; min-height: 14px; }
.success, .ok-text { color: var(--ok); font-weight: 600; }
.warn-text { color: var(--warn); font-weight: 600; }

/* ===== Fortschrittsbalken ===== */
.timed-block { border: 1px solid var(--border); background: var(--card); border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; }
.progress { height: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; margin: 6px 0; }
.progress .bar { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.4s; }

/* ===== Hack-Log ===== */
.logbox {
  border: 1px solid var(--border); background: var(--card); padding: 10px 14px;
  max-width: 660px; border-radius: 8px;
  font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
  font-size: 12px; line-height: 1.8; color: var(--text);
}

/* ===== Monospace ===== */
code, .ip, .mono {
  font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
  font-size: 0.9em;
}

/* ===== Hack-Terminal (Matrix-Atmosphaere) ===== */
.hack-term {
  position: relative; margin: 8px 0 16px; max-width: 780px;
  border: 1px solid var(--ok); background: #000; color: #0f0;
  font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace; font-size: 11px;
  box-shadow: 0 0 14px rgba(0,255,0,.2), inset 0 0 30px rgba(0,80,0,.4);
  overflow: hidden; border-radius: 6px;
}
.hack-term .ht-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 10px; background: linear-gradient(90deg, #021 0%, #031 100%);
  border-bottom: 1px solid #0a0; font-size: 11px; color: #9f9; letter-spacing: 1px;
}
.hack-term .ht-bar .dots span {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  margin-right: 5px; background: #063; box-shadow: 0 0 6px #0f0;
}
.hack-term .ht-bar .dots span.r { background: #a00; box-shadow: 0 0 6px #f00; }
.hack-term .ht-bar .dots span.y { background: #aa0; box-shadow: 0 0 6px #ff0; }
.hack-term .ht-target { color: #ff6; }
.hack-term .ht-wrap { position: relative; height: 240px; }
.hack-term canvas.ht-rain { position: absolute; inset: 0; opacity: .35; pointer-events: none; }
.hack-term .ht-screen {
  position: absolute; inset: 0; padding: 8px 12px; overflow: hidden;
  white-space: pre; line-height: 1.4; text-shadow: 0 0 6px #0f0;
}
.hack-term .ht-screen .ln { display: block; }
.hack-term .ht-screen .cmd { color: #9f9; }
.hack-term .ht-screen .ok  { color: #0f0; }
.hack-term .ht-screen .warn{ color: #fc6; }
.hack-term .ht-screen .err { color: #f44; }
.hack-term .ht-screen .dim { color: #393; }
.hack-term .ht-screen .hex { color: #6cf; }
.hack-term .ht-screen .cursor {
  display: inline-block; width: 8px; height: 12px; background: #0f0;
  vertical-align: middle; animation: ht-blink 1s steps(2) infinite;
  box-shadow: 0 0 6px #0f0;
}
@keyframes ht-blink { 50% { opacity: 0; } }
.hack-term .ht-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 10px; border-top: 1px solid #0a0;
  background: #010; color: #7f7; font-size: 11px;
}
.hack-term .ht-progress { flex: 1; height: 7px; margin: 0 12px; border: 1px solid #0a0; background: #020; }
.hack-term .ht-progress > div { height: 100%; background: #0f0; box-shadow: 0 0 6px #0f0; width: 0%; }
.hack-term .ht-foot .ht-eta { min-width: 74px; text-align: right; color: #cfc; }
.hack-term .ht-cancel { color: #f99; cursor: pointer; text-decoration: underline; }
.hack-term .ht-cancel:hover { color: #fff; }
.hack-term::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px, rgba(0,255,0,.05) 3px, rgba(0,0,0,0) 4px);
  mix-blend-mode: screen;
}

/* ===== Chaos-Operationen ===== */
.chaos-grid { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; }
.chaos-card {
  border: 1px solid var(--border); background: var(--card);
  border-radius: 8px; padding: 14px 16px; width: 230px; font-size: 13px; line-height: 1.5;
}
.chaos-card-title { font-weight: 700; color: var(--accent-dark); font-size: 14px; margin-bottom: 4px; }
.chaos-card-flavor { font-style: italic; color: var(--text-muted); margin-bottom: 6px; font-size: 11px; }
.chaos-card-desc { color: var(--text); margin-bottom: 8px; font-size: 12px; }
.chaos-result {
  margin: 0 0 14px; padding: 10px 14px;
  border-left: 3px solid var(--border); background: var(--bg);
  font-size: 13px; border-radius: 0 6px 6px 0;
}
.chaos-term {
  margin: 8px 0 16px; max-width: 640px;
  border: 1px solid var(--err); background: #0a0000; color: #f66;
  font-family: 'JetBrains Mono', 'Consolas', monospace; font-size: 11px;
  border-radius: 6px; overflow: hidden;
}
.chaos-term .ct-header {
  display: flex; justify-content: space-between;
  padding: 5px 10px; background: #180000; border-bottom: 1px solid #600;
  color: #f44; letter-spacing: 1px; font-size: 11px;
}
.chaos-term .ct-body { padding: 8px 12px; min-height: 100px; max-height: 180px; overflow: hidden; }
.chaos-term .ct-line { display: block; line-height: 1.5; }
.chaos-term .ct-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px; border-top: 1px solid #600; background: #100000;
}
.chaos-term .ht-progress { flex: 1; height: 7px; border: 1px solid #600; background: #200000; }
.chaos-term .ht-progress > div { height: 100%; background: var(--err); box-shadow: 0 0 6px #f00; width: 0%; }

/* ===== Phishing-Kampagnen ===== */
.phish-stage {
  display: flex; gap: 16px; margin: 0 0 16px;
  border: 1px solid #333; background: #050505; padding: 12px;
  max-width: 640px; border-radius: 6px;
  color: #0f0; font-family: 'JetBrains Mono', 'Consolas', monospace; font-size: 11px;
}
.phish-spycam { flex: 0 0 auto; text-align: center; }
.spycam-label { color: #f00; font-size: 10px; letter-spacing: 2px; margin-bottom: 4px; animation: ht-blink 1s steps(2) infinite; }
.phish-info { margin-top: 6px; color: #aaa; font-size: 10px; line-height: 1.4; text-align: left; }
.phish-terminal { flex: 1; display: flex; flex-direction: column; }
.phish-terminal > div:first-child { flex: 1; padding: 4px 0; min-height: 80px; overflow: hidden; }
.phish-grid { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; }
.phish-card {
  border: 1px solid var(--border); background: var(--card);
  border-radius: 8px; padding: 14px 16px; width: 230px; font-size: 13px; line-height: 1.5;
}
.phish-card.locked { opacity: 0.55; }
.phish-result { margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--border); font-size: 13px; border-radius: 0 6px 6px 0; }
.phish-result.ok  { background: #f0fdf4; border-left-color: var(--ok); }
.phish-result.fail{ background: #fef2f2; border-left-color: var(--err); }

/* ===== Notification-Toast ===== */
.notif-toast {
  position: fixed; bottom: 24px; right: 24px; max-width: 380px;
  background: var(--text); color: #f8fafc;
  padding: 12px 16px; border-left: 4px solid var(--accent);
  font-size: 13px; line-height: 1.5;
  opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .35s;
  z-index: 9999; border-radius: 0 6px 6px 0; box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.notif-toast.notif-toast-in { opacity: 1; transform: translateY(0); }

/* ===== Postfach ===== */
.nav-badge {
  display: inline-block; margin-left: 6px; min-width: 16px; padding: 0 5px;
  font-size: 11px; line-height: 16px; text-align: center;
  background: var(--accent); color: #fff; border-radius: 8px; font-weight: bold;
}
.postfach td { font-size: 13px; vertical-align: top; line-height: 1.5; }
.postfach td:first-child { font-size: 15px; width: 28px; }            /* Icon-Spalte */
.postfach td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; max-width: 560px; }
.postfach tr.msg-unread td { background: var(--accent-soft); }
.postfach tr.msg-unread td:nth-child(2) { font-weight: 600; }
.postfach tr.msg-read td { color: var(--text-muted); }
.postfach td:last-child { width: 28px; }
.msg-del { color: var(--text-muted); text-decoration: none; font-weight: 700; }
.msg-del:hover { color: #b91c1c; }
@media (max-width: 820px) {
  /* Postfach soll umbrechen statt horizontal zu scrollen */
  .content table.grid.postfach { white-space: normal; }
  .postfach td:nth-child(2) { max-width: none; }
}

/* ===== Fusszeile ===== */
.footer {
  clear: both; border-top: 1px solid var(--border); margin-top: 8px;
  padding: 10px 28px; color: var(--text-muted); font-size: 11px;
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card);
}
.footer .badge {
  background: var(--accent-soft); color: var(--accent-dark);
  padding: 3px 8px; border-radius: 4px; font-size: 10px; font-weight: 600;
}

/* ===== ACP (Tab-Layout) ===== */
.acp-tabs {
  display: flex; gap: 4px; flex-wrap: wrap; padding: 12px 24px 0;
  border-bottom: 1px solid var(--border); background: var(--bg);
}
.acp-tabs .acp-tab {
  padding: 7px 16px; border: 1px solid var(--border); border-bottom: none;
  border-radius: 6px 6px 0 0; background: var(--bg);
  color: var(--text-muted); font-weight: 600; font-size: 13px;
  text-decoration: none; position: relative; top: 1px;
}
.acp-tabs .acp-tab:hover { background: var(--accent-soft); color: var(--accent-dark); text-decoration: none; }
.acp-tabs .acp-tab.active { background: var(--card); color: var(--accent-dark); border-color: var(--border); border-bottom: 1px solid var(--card); }
.acp-tabs + .content { margin-left: 0; padding: 16px 24px 40px; font-size: 13px; }
.acp-tabs + .content p, .acp-tabs + .content .indent { margin-left: 0; }
.acp-tabs + .content table.grid, .acp-tabs + .content table.form { margin-left: 0; }
.acp-tabs + .content h2 { padding-left: 0; font-size: 20px; margin: 0 0 14px; padding-bottom: 10px; }
.acp-tabs + .content h3 { margin: 20px 0 8px; }
.acp-tabs + .content .note { margin-left: 0; max-width: 720px; }

.acp-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0 0 16px; }
.acp-kpi { border: 1px solid var(--border); background: var(--card); border-radius: 8px; padding: 12px 14px; }
.acp-kpi-val { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.1; }
.acp-kpi-val.good { color: var(--ok); }
.acp-kpi-val.warn { color: var(--err); }
.acp-kpi-lbl { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.acp-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.acp-toolbar input[type="search"] { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; min-width: 200px; font-family: inherit; font-size: 13px; }
.acp-toolbar select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; font-size: 13px; width: auto; }

/* Changelog */
.cl-entry { border: 1px solid var(--border); border-radius: 8px; background: var(--card); padding: 12px 16px; margin: 0 0 12px; }
.cl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-bottom: 6px; }
.cl-ver { font-weight: 700; font-size: 16px; color: var(--accent-dark); }
.cl-title { font-weight: 600; color: var(--text); }
.cl-date { margin-left: auto; color: var(--text-muted); font-size: 12px; }
.cl-list { margin: 0; padding-left: 20px; line-height: 1.7; color: var(--text); }
.cl-list li { margin: 0; }

/* ===== Mobil / Smartphone + Tablet (PWA) ===== */
@media (max-width: 820px) {
  html, body { overflow-x: hidden; max-width: 100%; }

  .header {
    padding: calc(12px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) 10px calc(14px + env(safe-area-inset-left));
  }
  .header .session { font-size: 12px; }
  .header .logo { font-size: 18px; }

  #navi {
    float: none; width: auto; margin: 0; padding: 8px 10px;
    border-right: none; border-bottom: 1px solid var(--border);
    background: var(--card);
    position: sticky; top: env(safe-area-inset-top); z-index: 20;
    display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; min-height: auto;
  }
  #navi::-webkit-scrollbar { display: none; }
  .navigation li a {
    padding: 7px 13px; white-space: nowrap; border-left: none;
    border-radius: 6px; border: 1px solid var(--border);
    background: var(--bg); font-size: 13px;
  }
  .navigation li.active a {
    background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark);
  }

  .acp-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 8px 12px 0; scrollbar-width: none; }
  .acp-tabs::-webkit-scrollbar { display: none; }
  .acp-tabs .acp-tab { flex: 0 0 auto; }
  .acp-tabs + .content { padding: 12px; }
  .acp-kpis { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

  .content { margin-left: 0; padding: 16px 14px 48px; }
  h2 { font-size: 19px; margin-bottom: 12px; }
  h3 { margin-left: 0; }
  .content p, .content .indent, .note, .statbar, .progress, .logbox,
  table.form, table.grid, #game-msg, form, .hack-term { margin-left: 0 !important; }

  .statbar, .note, .logbox, .hack-term { max-width: 100% !important; }
  .content p, .content .indent, .note { max-width: 100% !important; overflow-wrap: break-word; }
  .progress { width: 100% !important; box-sizing: border-box; }
  input[type="text"], input[type="password"], input[type="number"], select { width: 100%; }

  .statbar .item { flex: 1 1 auto; min-width: calc(50% - 8px); }

  .content table.grid { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; white-space: nowrap; }
  table.grid th, table.grid td { padding: 7px 10px; }
  table.form { width: 100%; }
  table.form td { display: block; width: 100%; box-sizing: border-box; }
  table.form td.label { border-bottom: none; }

  .hack-term { font-size: 10px; }
  .hack-term .ht-wrap { height: 200px; }
  .hack-term .ht-screen { white-space: pre-wrap; word-break: break-all; padding: 6px 8px; }
  .hack-term .ht-bar { flex-wrap: wrap; gap: 4px 8px; padding: 6px 8px; }
  .hack-term .ht-target { word-break: break-all; }
  .hack-term .ht-foot { flex-wrap: wrap; gap: 4px 8px; }
  .hack-term .ht-progress { order: 3; flex: 1 1 100%; margin: 4px 0 0; }

  input[type="text"], input[type="password"], input[type="number"], textarea { font-size: 16px; }
  input[type="submit"] { font-size: 14px; padding: 8px 18px; }
  .btn { padding: 7px 13px; font-size: 13px; }
  .footer { flex-direction: column; gap: 6px; align-items: flex-start; padding: 10px 14px; margin-left: 0; }
  .notif-toast { bottom: 12px; right: 12px; left: 12px; max-width: none; }
}

/* ===== BTC-Shop Aktive Boosts ===== */
.btcshop-active { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.btcshop-boost-active {
  padding: 6px 12px; border-radius: 20px; font-size: 12px;
  background: var(--accent-soft); border: 1px solid var(--accent);
}

/* ===== BTC-Markt ===== */
.btcmarket-header {
  display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start;
  margin: 0 0 16px; padding: 14px 18px;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
}
.btcmarket-rate { flex: 1 1 auto; line-height: 1.4; }
.btcmarket-balances {
  display: flex; gap: 20px; flex-wrap: wrap; align-items: center;
  font-size: 13px; padding-top: 4px;
}
.btcmarket-balances .k {
  display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-muted); font-weight: 700; margin-bottom: 2px;
}
.btcmarket-balances .btc-val  { font-size: 15px; font-weight: 700; color: #f0a000; font-family: 'JetBrains Mono', monospace; }
.btcmarket-balances .cred-val { font-size: 15px; font-weight: 700; color: var(--accent); }
.btcmarket-chart-wrap { margin: 0 0 20px; }
.btcmarket-chart-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted); margin-bottom: 4px; font-weight: 700;
}
.btcmarket-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 8px 0 12px; }
.btcmarket-quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 16px; }
.cred-val { color: var(--accent); }

/* Hacker-Mode Trading Chart Glow */
body.theme-hacker .btcmarket-chart-wrap svg { box-shadow: 0 0 18px rgba(0,230,118,.12); }
body.theme-hacker .btcmarket-header { background: #050e08; border-color: #0d2e16; }

/* ===== Mobile BTC-Markt ===== */
@media (max-width: 820px) {
  .btcmarket-header { flex-direction: column; gap: 10px; }
  .btcmarket-form { flex-direction: column; align-items: flex-start; }
  .btcmarket-quick { flex-direction: column; }
}

/* ===== Gacha-System ===== */
.gacha-header {
  display: flex; gap: 20px; flex-wrap: wrap; align-items: center;
  padding: 14px 18px; margin: 0 0 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
}
.gacha-token-display { display: flex; align-items: center; gap: 8px; }
.gacha-token-icon { font-size: 1.8em; }
.gacha-token-count { font-size: 2em; font-weight: 800; color: var(--accent); font-family: 'JetBrains Mono', monospace; }
.gacha-header-actions { display: flex; flex-direction: column; gap: 4px; }

.gacha-box-wrap {
  display: flex; gap: 24px; flex-wrap: wrap; align-items: center;
  padding: 18px; margin: 0 0 20px;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
}
.gacha-box-art {
  font-size: 4em; text-align: center; min-width: 72px;
  transition: transform .3s ease;
}
.gacha-box-art.gacha-opening { animation: gacha-shake .5s ease; }
@keyframes gacha-shake {
  0%,100% { transform: rotate(0); }
  20%  { transform: rotate(-12deg) scale(1.1); }
  40%  { transform: rotate(12deg)  scale(1.2); }
  60%  { transform: rotate(-8deg)  scale(1.15); }
  80%  { transform: rotate(8deg)   scale(1.1); }
}
.gacha-box-info { flex: 1 1 200px; }

.gacha-pity-wrap { width: 220px; max-width: 100%; height: 6px; background: var(--border); border-radius: 3px; margin: 4px 0; }
.gacha-pity-bar  { height: 100%; border-radius: 3px; background: var(--accent); transition: width .5s; }
.gacha-pity-bar.warn-bar { background: #ff9800; }
.gacha-pity-bar.ok-bar   { background: #4caf50; }

.gacha-open-btn.disabled { opacity: .45; pointer-events: none; }

.gacha-missions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0 0 24px; }
.gacha-missions-col h3 { font-size: 13px; margin: 0 0 10px; }
.gacha-mission {
  padding: 10px 12px; margin: 0 0 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 6px;
}
.gacha-mission.done    { border-color: #4caf50; }
.gacha-mission.claimed { opacity: .55; }
.gacha-mission-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 4px; }
.gacha-mission-title { font-weight: 700; font-size: 13px; flex: 1; }
.gacha-mission-reward { font-size: 11px; color: var(--accent); font-weight: 700; white-space: nowrap; }
.gacha-mission-desc { font-size: 11px; margin: 0 0 6px; }
.gacha-mission-count { font-size: 10px; text-align: right; }
.gacha-progress-wrap { height: 5px; background: var(--border); border-radius: 3px; margin: 3px 0; }
.gacha-progress-bar  { height: 100%; border-radius: 3px; background: var(--accent); transition: width .5s; }

.gacha-result-wrap { margin: 0 0 20px; }
.gacha-result {
  padding: 20px 24px; border-radius: 10px; text-align: center;
  border: 2px solid var(--glow, #aaa);
  box-shadow: 0 0 18px var(--glow, #aaa);
  animation: gacha-reveal .5s cubic-bezier(.17,.67,.52,1.4);
}
@keyframes gacha-reveal {
  from { transform: scale(0.6) rotate(-6deg); opacity: 0; }
  to   { transform: scale(1)   rotate(0deg);  opacity: 1; }
}
.gacha-result-rarity { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; margin: 0 0 6px; }
.gacha-result-label  { font-size: 1.4em; font-weight: 800; }

.gacha-perms { padding: 10px 16px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; margin: 0 0 20px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.gacha-perms h3 { margin: 0; font-size: 13px; }

.rarity-common    { color: #aaa; }
.rarity-uncommon  { color: #4fc3f7; }
.rarity-rare      { color: #9c27b0; font-weight: 700; }
.rarity-epic      { color: #ff9800; font-weight: 700; }
.rarity-legendary { color: #ffd700; font-weight: 800; text-shadow: 0 0 8px #ffd700; }

body.theme-hacker .gacha-header,
body.theme-hacker .gacha-box-wrap,
body.theme-hacker .gacha-mission,
body.theme-hacker .gacha-perms,
body.theme-hacker .gacha-result { background: #050e08; border-color: #0d2e16; }

@media (max-width: 820px) {
  .gacha-missions-grid { grid-template-columns: 1fr; }
  .gacha-box-wrap      { flex-direction: column; }
}
