:root {
  --bg: #23272f;
  --card: #2b303a;
  --inner: #262a33;
  --raised: #313744;
  --raised-hover: #383f4d;
  --text: #e8eaf0;
  --text-2: #c3cad8;
  --muted: #9aa3b5;
  --muted-2: #7d8597;
  --dim: #5d6576;
  --accent: #7FA2F0;
  --accent-hover: #93b2f3;
  --accent-light: #a9c0f6;
  --on-accent: #1b1f27;
  --green: #8fe3a8;
  --red: #f39a9a;
  --gold: #f6c453;
  --line: rgba(255, 255, 255, .06);
  --line-2: rgba(255, 255, 255, .08);
  --line-3: rgba(255, 255, 255, .1);
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

html, body { margin: 0; background: var(--bg); color: var(--text); font-family: Manrope, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-light); }
button, input, select, textarea { font-family: inherit; }
select option { background: var(--inner); color: var(--text); }
[hidden] { display: none !important; }

.ms {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-size: 18px;
}
.mono { font-family: var(--mono); }

/* ---------- Layout ---------- */
.page { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}
.topbar.sticky { background: rgba(35, 39, 47, .85); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
/* Breadcrumb: Highju / Cookie Clicker / Admin / … – jeder Teil ist ein eigener Link. */
.brand { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; min-width: 0; }
.brand a { color: inherit; transition: color .15s; }
.brand .home { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand .home:hover { color: var(--accent-light); }
.brand img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; background: var(--raised); flex: none; }
.brand .name { font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.brand .sep { color: var(--dim); font-weight: 600; }
.brand .sub { font-weight: 600; color: var(--muted); font-size: 15px; white-space: nowrap; }
.brand a.sub:hover { color: var(--text); }
.brand .sub.active { font-weight: 700; color: var(--accent); }
.brand a.sub.active:hover { color: var(--accent-light); }
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.vsep { width: 1px; height: 24px; background: var(--line-2); margin: 0 4px; }

.footer {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 20px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--line);
  color: var(--muted-2); font-size: 13px;
}
.footer-logo { font-family: Chewy, cursive; font-weight: 400; font-size: 20px; color: var(--accent); }
.footer .links { display: flex; align-items: center; gap: 16px; }
.footer .discord { display: flex; color: var(--muted-2); transition: color .15s; }
.footer .discord:hover { color: #5865F2; }
.footer .discord svg { width: 22px; height: 22px; fill: currentColor; }

/* ---------- Profil-Menü ---------- */
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 220px;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; padding: 6px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .45); display: flex; flex-direction: column; gap: 2px;
  animation: hjMenuIn .16s ease both;
}
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 12px; color: var(--muted-2); font-weight: 600; }
.menu-head b { display: block; color: var(--text); font-size: 14px; font-weight: 700; }
.menu button, .menu a {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: transparent; border: none; border-radius: 9px; padding: 9px 10px;
  color: var(--text-2); font-size: 14px; font-weight: 600; cursor: pointer;
}
.menu button:hover, .menu a:hover { background: var(--raised); color: var(--text); }
.menu .ms { font-size: 19px; color: var(--muted-2); }
.menu .danger, .menu .danger .ms { color: var(--red); }
.menu .danger:hover { background: rgba(240, 110, 110, .1); color: var(--red); }
.menu hr { border: none; border-top: 1px solid var(--line); margin: 4px 0; }
@keyframes hjMenuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- Changelog-Text ---------- */
.cl-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; font-size: 12px; color: var(--muted-2); font-weight: 600; }
.cl-version { font-family: var(--mono); font-weight: 700; color: var(--accent); background: rgba(127, 162, 240, .12); border-radius: 6px; padding: 2px 6px; }
.cl-badge { color: var(--on-accent); background: var(--accent); border-radius: 6px; padding: 2px 6px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: 10px; }
.cl-body { font-size: 14px; line-height: 1.6; color: var(--text-2); overflow-wrap: anywhere; }
.cl-body p { margin: 0 0 10px; }
.cl-body h4 { margin: 14px 0 6px; font-size: 15px; font-weight: 800; color: var(--text); }
.cl-body ul { margin: 0 0 10px; padding-left: 20px; }
.cl-body li { margin: 2px 0; }
.cl-body li::marker { color: var(--accent); }
.cl-body strong { color: var(--text); }
.cl-body > :first-child { margin-top: 0; }
.cl-body > :last-child { margin-bottom: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  background: transparent; border: 1px solid var(--line-3); color: var(--text-2);
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.btn.danger-hover:hover { background: rgba(240, 110, 110, .1); color: var(--red); border-color: rgba(240, 110, 110, .3); }
.btn.accent-soft { background: rgba(127, 162, 240, .12); border-color: rgba(127, 162, 240, .35); color: var(--accent-light); font-weight: 700; padding: 8px 14px; }
.btn.accent-soft:hover { background: rgba(127, 162, 240, .2); color: #fff; }
.btn.primary { background: var(--accent); border: none; color: var(--on-accent); font-weight: 800; }
.btn.primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn.danger { border-color: rgba(240, 110, 110, .3); color: var(--red); }
.btn.danger:hover { background: rgba(240, 110, 110, .1); color: var(--red); }
.btn.gold { background: rgba(246, 196, 83, .12); border-color: rgba(246, 196, 83, .35); color: var(--gold); font-weight: 700; }
.btn.gold:hover { background: rgba(246, 196, 83, .2); color: var(--gold); }
a.btn { padding: 8px 14px; }
.btn.block { width: 100%; justify-content: center; padding: 13px; border-radius: 12px; font-size: 15px; }
.btn[aria-disabled="true"] { opacity: .45; }

.icon-btn {
  background: transparent; border: none; color: var(--muted-2); cursor: pointer;
  padding: 4px; border-radius: 8px; display: flex; transition: background .15s, color .15s;
}
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.icon-btn.del:hover { color: var(--red); background: rgba(240, 110, 110, .1); }
.icon-btn .ms { font-size: 20px; }

.switch { flex: none; width: 40px; height: 24px; border-radius: 999px; border: none; cursor: pointer; padding: 3px; background: #3a4150; transition: background .2s; display: flex; }
.switch > span { width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.on { background: var(--accent); }
.switch.on > span { transform: translateX(16px); }
.switch.lg { width: 48px; height: 28px; }
.switch.lg > span { width: 22px; height: 22px; }
.switch.lg.on > span { transform: translateX(20px); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > .lbl { font-size: 12px; font-weight: 600; color: var(--muted-2); }
.input {
  background: var(--inner); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 9px 12px; color: var(--text); font-size: 14px; outline: none; width: 100%; min-width: 0;
}
.input:focus { border-color: var(--accent); }
.input.mono { font-family: var(--mono); }
select.input { cursor: pointer; padding: 9px 10px; }
.input-wrap { display: flex; align-items: center; background: var(--inner); border: 1px solid var(--line-2); border-radius: 10px; padding-right: 12px; }
.input-wrap:focus-within { border-color: var(--accent); }
.input-wrap input { flex: 1; min-width: 0; background: transparent; border: none; padding: 9px 12px; color: var(--text); font-family: var(--mono); font-size: 14px; outline: none; }
.input-wrap .unit { font-size: 12px; color: var(--dim); font-weight: 600; }
.hint { font-size: 12px; color: var(--dim); }

/* ---------- Animations ---------- */
@keyframes hjFloat { 0% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -90px) scale(1.15); } }
@keyframes hjModalIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes hjFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hjReward { 0% { opacity: 0; transform: scale(.6); } 60% { opacity: 1; transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes hjBob { 0%, 100% { transform: scale(.8); } 50% { transform: scale(1.25); } }
@keyframes hjHalo { 0%, 100% { transform: scale(1); opacity: .55; } 50% { transform: scale(1.35); opacity: .15; } }
@keyframes hjRing { 0% { transform: translate(-50%, -50%) scale(.2); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(7); opacity: 0; } }
@keyframes hjSpark { 0% { transform: translate(-50%, -50%) translate(0, 0) scale(1); opacity: 1; } 100% { transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
@keyframes hjPop { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 25% { transform: translate(-50%, -60%) scale(1.25); opacity: 1; } 100% { transform: translate(-50%, -160%) scale(1); opacity: 0; } }
@keyframes hjFlash { 0% { opacity: .55; } 100% { opacity: 0; } }
@keyframes hjBanner { 0% { transform: translate(-50%, -30px) scale(.8); opacity: 0; } 60% { transform: translate(-50%, 4px) scale(1.04); opacity: 1; } 100% { transform: translate(-50%, 0) scale(1); opacity: 1; } }
@keyframes hjShine { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes hjCardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes hjShake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--raised); border: 1px solid var(--line-3); border-radius: 12px;
  padding: 10px 16px; font-size: 14px; font-weight: 600;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .4); z-index: 20;
  animation: hjFade .2s ease both;
}

@media (max-width: 460px) {
  .topbar { flex-wrap: wrap; }
  .brand { gap: 4px 8px; }
  .brand .sub { font-size: 14px; }
}
