/* ==========================================================================
   Venora – Webseite im Minecraft-Style (gleiches Design wie der Launcher)
   ========================================================================== */
@font-face { font-family: 'Pixel'; src: url('/fonts/monocraft.ttf') format('truetype'); font-weight: 400 500; font-display: swap; }
@font-face { font-family: 'Pixel'; src: url('/fonts/monocraft-bold.ttf') format('truetype'); font-weight: 600 900; font-display: swap; }

:root {
  --ink: #08070c;
  --panel: rgba(24, 22, 32, 0.86);
  --panel-2: rgba(36, 33, 48, 0.92);
  --line: rgba(255, 255, 255, 0.07);
  --text: #f4f2fa;
  --muted: #aaa5bd;
  --accent: #8b5cf6;
  --accent-2: #b9a3ff;
  --accent-glow: rgba(139, 92, 246, 0.35);
  --green: #3c8527; --green-hi: #5bb240; --green-sh: #1d4d13;
  --purple: #6f42e8; --purple-hi: #9470ff; --purple-sh: #2f1784;
  --stone: #48474f; --stone-hi: #66656e; --stone-sh: #26252b;
  --gold: #ffff55;
  --xp: #80ff20;
  --red: #e5484d;
  --yellow: #eab308;
  --common: #c7c7c7; --rare: #55b4ff; --epic: #c56bff; --legendary: #ffb83d;
  --pixel: 'Pixel', 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: #0d0b14; color: var(--text); min-height: 100vh; display: flex; flex-direction: column; font: 15px/1.55 'Segoe UI', system-ui, -apple-system, sans-serif; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #fff; }
img { max-width: 100%; }
img.px, canvas { image-rendering: pixelated; }
img.px { display: inline-block; vertical-align: middle; flex-shrink: 0; }
h1, h2, h3 { font-family: var(--pixel); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: .01em; }
main { flex: 1; position: relative; z-index: 2; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.mt { margin-top: 24px; }
.mb { margin-bottom: 24px; }

/* ---------------------------------------------------------------- Hintergrund-Landschaft */
#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; image-rendering: pixelated; }
.scene-shade { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(10, 8, 18, .55) 0%, rgba(10, 8, 18, .82) 40%, rgba(10, 8, 18, .9) 100%); }
body.home-page .scene-shade { background: linear-gradient(180deg, rgba(10, 8, 18, .25) 0%, rgba(10, 8, 18, .55) 55vh, rgba(10, 8, 18, .9) 100vh, rgba(10, 8, 18, .94) 100%); }

/* ---------------------------------------------------------------- Navigation */
.nav { position: sticky; top: 0; z-index: 50; background: linear-gradient(180deg, rgba(14, 12, 22, .95), rgba(14, 12, 22, .88)); border-bottom: 2px solid var(--ink); box-shadow: inset 0 -2px 0 var(--line), 0 4px 0 rgba(0, 0, 0, .25); backdrop-filter: blur(10px); }
.nav .container { display: flex; align-items: center; height: 66px; gap: 22px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--pixel); font-weight: 700; font-size: 1.35rem; letter-spacing: .06em; color: #fff; text-shadow: 0 3px 0 var(--purple-sh); }
.logo img { filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .5)); }
.logo-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--purple); border: 2px solid var(--ink); font-family: var(--pixel); font-weight: 900; color: #fff; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a { display: flex; align-items: center; gap: 7px; color: var(--muted); padding: 8px 12px; font-family: var(--pixel); font-size: .92rem; border: 2px solid transparent; }
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav-links a.active { color: #fff; background: rgba(111, 66, 232, .25); border-color: var(--ink); box-shadow: inset 0 0 0 1px rgba(148, 112, 255, .5), inset 0 -3px 0 rgba(47, 23, 132, .8); }
.nav-user { display: flex; align-items: center; gap: 8px; }
.nav-user .me { display: flex; align-items: center; gap: 8px; color: #fff; font-family: var(--pixel); font-size: .92rem; padding: 4px 8px; border: 2px solid transparent; }
.nav-user .me:hover { background: rgba(255, 255, 255, .06); border-color: var(--ink); }
.nav-badge { margin-left: 2px; min-width: 18px; height: 18px; padding: 0 4px; display: inline-grid; place-items: center; font-size: 11px; color: #fff; background: var(--red); border: 2px solid var(--ink); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; }
@media (max-width: 960px) {
  .nav-toggle { display: block; margin-left: auto; }
  .nav-links, .nav-user { display: none; }
  .nav.open .nav-links, .nav.open .nav-user { display: flex; flex-direction: column; align-items: stretch; position: absolute; left: 0; right: 0; background: #14121c; padding: 12px 20px; border-bottom: 2px solid var(--ink); }
  .nav.open .nav-links { top: 66px; }
  .nav.open .nav-user { top: calc(66px + 300px); }
}

/* ---------------------------------------------------------------- Knöpfe (Ore-UI-Stil) */
.btn {
  --b: var(--stone); --bh: var(--stone-hi); --bs: var(--stone-sh);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  padding: 9px 18px 13px; border: 2px solid var(--ink); background: var(--b); color: #fff; cursor: pointer;
  font-family: var(--pixel); font-size: .95rem; font-weight: 600; text-shadow: 0 2px 0 rgba(0, 0, 0, .35);
  box-shadow: inset 0 2px 0 var(--bh), inset 0 -4px 0 var(--bs); transition: filter .12s;
}
.btn:hover { filter: brightness(1.12); color: #fff; }
.btn:active { transform: translateY(2px); box-shadow: inset 0 2px 0 var(--bs), inset 0 -1px 0 var(--bs); padding: 10px 18px 12px; }
.btn:disabled { filter: grayscale(.8) brightness(.7); cursor: not-allowed; transform: none; }
.btn-primary { --b: var(--purple); --bh: var(--purple-hi); --bs: var(--purple-sh); }
.btn-green { --b: var(--green); --bh: var(--green-hi); --bs: var(--green-sh); }
.btn-danger { --b: #b8352f; --bh: #e05a52; --bs: #6e1813; }
.btn-ghost { --b: rgba(0, 0, 0, .35); --bh: rgba(255, 255, 255, .08); --bs: rgba(0, 0, 0, .4); }
.btn-sm { padding: 5px 11px 8px; font-size: .82rem; }
.btn-sm:active { padding: 6px 11px 7px; }
.btn-lg { padding: 14px 28px 19px; font-size: 1.15rem; }
.btn-lg:active { padding: 15px 28px 18px; }

label { display: block; font-family: var(--pixel); font-size: .85rem; margin-bottom: 6px; color: #d9d5e8; }
.field { margin-bottom: 16px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], textarea, select {
  width: 100%; padding: 11px 13px; border: 2px solid var(--ink); background: rgba(0, 0, 0, .45); color: var(--text);
  font: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); border-radius: 0;
}
input:focus, textarea:focus, select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--purple-hi); }
select option { background: #1b1a22; }
textarea { resize: vertical; min-height: 90px; }
input[type=color] { width: 44px; height: 36px; padding: 2px; border: 2px solid var(--ink); background: rgba(0, 0, 0, .45); cursor: pointer; }
.checkbox { display: flex; align-items: center; gap: 10px; font-family: inherit; font-size: .95rem; cursor: pointer; }
.checkbox input { appearance: none; width: 22px; height: 22px; margin: 0; border: 2px solid var(--ink); background: #2b2a31; cursor: pointer; position: relative; flex-shrink: 0; }
.checkbox input:checked { background: var(--green); box-shadow: inset 0 2px 0 var(--green-hi); }
.checkbox input:checked::after { content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }

/* ---------------------------------------------------------------- Panels & Layout */
.card { background: var(--panel); border: 2px solid var(--ink); padding: 22px 24px; box-shadow: inset 0 0 0 2px var(--line), 0 6px 0 rgba(0, 0, 0, .35); backdrop-filter: blur(8px); }
.card h2 { font-size: 1.15rem; }
.card + .card { margin-top: 20px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.page-head { padding: 44px 0 26px; }
.page-head h1 { font-size: 2.3rem; text-shadow: 0 4px 0 var(--purple-sh), 0 8px 16px rgba(0, 0, 0, .5); }
.section { padding: 72px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 2rem; text-shadow: 0 4px 0 var(--purple-sh); }
.sidebar-layout { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .sidebar-layout { grid-template-columns: 1fr; } }
.side-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 90px; background: var(--panel); border: 2px solid var(--ink); padding: 8px; box-shadow: inset 0 0 0 2px var(--line); }
.side-nav button { text-align: left; background: none; border: 2px solid transparent; color: var(--muted); padding: 10px 12px; font-family: var(--pixel); font-size: .9rem; cursor: pointer; }
.side-nav button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-nav button.active { background: rgba(111, 66, 232, .28); color: #fff; border-color: var(--ink); box-shadow: inset 0 0 0 1px rgba(148, 112, 255, .5); }

/* ---------------------------------------------------------------- Startseite / Hero */
.hero { padding: 110px 0 80px; text-align: center; position: relative; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); font-weight: 700; color: #f5f0ff; letter-spacing: .02em;
  text-shadow: 0 3px 0 #c9b6ff, 0 6px 0 #8a63f2, 0 9px 0 #5a33c8, 0 12px 0 #2f1784, 0 15px 0 #160a40, 0 24px 30px rgba(0, 0, 0, .6); }
.hero h1 .grad { color: var(--gold); text-shadow: 0 3px 0 #b5b53a, 0 6px 0 #6f6f1c, 0 9px 0 #3f3f15, 0 18px 24px rgba(0, 0, 0, .6); }
.hero p { font-size: 1.2rem; color: #e2ddf2; max-width: 660px; margin: 26px auto 34px; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
.hero .row { justify-content: center; }
.splash { display: inline-block; font-family: var(--pixel); color: var(--gold); text-shadow: 2px 2px 0 #3f3f15; transform: rotate(-12deg); animation: splash .9s ease-in-out infinite alternate; font-size: 1.05rem; }
.badge-pill { display: inline-flex; gap: 10px; align-items: center; padding: 6px 14px 7px; border: 2px solid var(--ink); background: rgba(0, 0, 0, .5); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); color: #ddd; font-family: var(--pixel); font-size: .85rem; margin-bottom: 26px; }
.badge-pill .dot { width: 10px; height: 10px; background: #5dff2a; border: 2px solid var(--ink); box-shadow: 0 0 10px #5dff2a; }
.stats { display: flex; justify-content: center; gap: 14px; margin-top: 56px; flex-wrap: wrap; }
.stat { background: rgba(0, 0, 0, .5); border: 2px solid var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); padding: 12px 22px; min-width: 140px; }
.stat strong { display: block; font-family: var(--pixel); font-size: 2rem; color: var(--xp); text-shadow: 2px 2px 0 #1b3d06; }
.stat span { color: var(--muted); font-size: .88rem; }
.feature { padding: 26px; transition: transform .15s; }
.feature:hover { transform: translateY(-3px); }
.feature .icon { width: 56px; height: 56px; display: grid; place-items: center; font-size: 1.6rem; background: rgba(0, 0, 0, .45); border: 2px solid var(--ink); margin-bottom: 16px; font-family: var(--pixel); color: var(--gold); }
.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--muted); margin: 0; }

/* ---------------------------------------------------------------- Cosmetics */
.cosmetic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cosmetic { position: relative; background: var(--panel); border: 2px solid var(--ink); box-shadow: inset 0 0 0 1px var(--line), 0 4px 0 rgba(0, 0, 0, .3); padding: 10px; cursor: pointer; transition: transform .12s, box-shadow .15s; text-align: center; }
.cosmetic:hover { transform: translateY(-3px); }
.cosmetic.selected { box-shadow: inset 0 0 0 2px var(--purple-hi), 0 4px 0 rgba(0, 0, 0, .3), 0 0 22px var(--accent-glow); }
.cosmetic.equipped::after { content: 'AUSGERÜSTET'; position: absolute; top: 6px; left: 6px; font-family: var(--pixel); font-size: .62rem; background: var(--green); color: #fff; padding: 1px 6px 2px; border: 2px solid var(--ink); }
.cosmetic.locked { opacity: .55; }
.cosmetic.locked::before { content: '🔒'; position: absolute; top: 6px; right: 8px; }
.cosmetic .preview { height: 110px; display: grid; place-items: center; margin-bottom: 10px; overflow: hidden; background: rgba(0, 0, 0, .45); border: 2px solid var(--ink); font-size: 2.6rem; }
.cosmetic .preview canvas { image-rendering: pixelated; height: 100%; width: auto; }
.cosmetic .name { font-family: var(--pixel); font-weight: 600; font-size: .9rem; }
.rarity { font-family: var(--pixel); font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; }
.rarity-common { color: var(--common); }
.rarity-rare { color: var(--rare); }
.rarity-epic { color: var(--epic); }
.rarity-legendary { color: var(--legendary); text-shadow: 0 0 8px rgba(255, 184, 61, .5); }
.cosmetic.r-legendary { box-shadow: inset 0 0 0 1px rgba(255, 184, 61, .4), 0 4px 0 rgba(0, 0, 0, .3); background: linear-gradient(180deg, rgba(255, 184, 61, .12), var(--panel) 55%); }
.cosmetic.r-epic { background: linear-gradient(180deg, rgba(197, 107, 255, .12), var(--panel) 55%); }
.cosmetic.r-rare { background: linear-gradient(180deg, rgba(85, 180, 255, .1), var(--panel) 55%); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.tab { padding: 7px 14px 10px; border: 2px solid var(--ink); background: var(--stone); color: #ddd; cursor: pointer; font-family: var(--pixel); font-size: .85rem; box-shadow: inset 0 2px 0 var(--stone-hi), inset 0 -4px 0 var(--stone-sh); }
.tab:hover { filter: brightness(1.12); color: #fff; }
.tab.active { background: var(--purple); color: #fff; box-shadow: inset 0 2px 0 var(--purple-hi), inset 0 -4px 0 var(--purple-sh); }

.locker { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.locker { grid-template-columns: 360px 1fr; }
@media (max-width: 900px) { .locker { grid-template-columns: 1fr; } }
.viewer-card { position: sticky; top: 90px; text-align: center; }
.viewer-card canvas#skin-viewer { width: 100%; max-width: 300px; height: 400px; background: radial-gradient(ellipse 60% 55% at 50% 45%, rgba(148, 112, 255, .35), transparent 70%), rgba(0, 0, 0, .35); border: 2px solid var(--ink); }
.equipped-list { display: grid; gap: 6px; margin-top: 16px; text-align: left; }
.equipped-item { display: flex; align-items: center; gap: 10px; background: rgba(0, 0, 0, .4); border: 2px solid var(--ink); padding: 7px 10px; font-size: .9rem; }
.equipped-item .type { color: var(--muted); width: 110px; font-family: var(--pixel); font-size: .78rem; }
.swatch { width: 16px; height: 16px; display: inline-block; border: 2px solid var(--ink); vertical-align: middle; }

/* ---------------------------------------------------------------- Listen, Tabellen, Avatare */
.avatar { width: 40px; height: 40px; object-fit: cover; background: linear-gradient(135deg, #6f42e8, #c084fc); display: inline-grid; place-items: center; font-family: var(--pixel); font-weight: 700; color: #fff; flex-shrink: 0; overflow: hidden; border: 2px solid var(--ink); image-rendering: pixelated; }
.avatar-lg { width: 96px; height: 96px; font-size: 2.4rem; }
.avatar-sm { width: 30px; height: 30px; font-size: .85rem; }
.list { display: flex; flex-direction: column; gap: 8px; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: rgba(0, 0, 0, .38); border: 2px solid var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.list-item .info { flex: 1; min-width: 0; }
.list-item .title { font-weight: 700; }
.status-dot { width: 10px; height: 10px; background: #555; border: 2px solid var(--ink); display: inline-block; vertical-align: middle; }
.status-dot.online { background: #5dff2a; box-shadow: 0 0 8px #5dff2a; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 2px solid rgba(0, 0, 0, .5); }
th { color: var(--gold); font-family: var(--pixel); font-weight: 600; font-size: .78rem; text-transform: uppercase; text-shadow: 1px 1px 0 #3f3f15; }
.table-wrap { overflow-x: auto; }
code { font-family: var(--pixel); font-size: .85rem; background: rgba(0, 0, 0, .5); padding: 2px 6px; border: 2px solid var(--ink); }
.tag { display: inline-block; padding: 2px 8px 3px; font-family: var(--pixel); font-size: .72rem; background: rgba(0, 0, 0, .45); color: var(--muted); border: 2px solid var(--ink); }
.tag-admin { color: #ff8a8a; box-shadow: inset 0 0 0 1px rgba(255, 90, 90, .4); }
.tag-moderator { color: #8ac7ff; box-shadow: inset 0 0 0 1px rgba(85, 180, 255, .4); }
.tag-green { color: #9dff6b; box-shadow: inset 0 0 0 1px rgba(128, 255, 32, .4); }
.tag-red { color: #ff8a8a; box-shadow: inset 0 0 0 1px rgba(255, 90, 90, .4); }

/* ---------------------------------------------------------------- Auth */
.auth-wrap { display: grid; place-items: center; padding: 70px 20px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 1.7rem; text-align: center; text-shadow: 0 3px 0 var(--purple-sh); }
.alert { padding: 12px 16px; margin-bottom: 16px; font-size: .93rem; border: 2px solid var(--ink); }
.alert-error { background: rgba(229, 72, 77, .18); box-shadow: inset 0 0 0 1px rgba(255, 90, 90, .4); color: #ffd0d0; }
.alert-success { background: rgba(60, 133, 39, .25); box-shadow: inset 0 0 0 1px rgba(128, 255, 32, .35); color: #d6ffc0; }
.alert-info { background: rgba(111, 66, 232, .22); box-shadow: inset 0 0 0 1px rgba(148, 112, 255, .45); color: #e4dbff; }

/* ---------------------------------------------------------------- Toasts (Erfolgs-Stil) */
#toasts { position: fixed; top: 80px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { display: flex; align-items: center; gap: 12px; min-width: 280px; max-width: 380px; padding: 10px 14px; background: #212121; border: 2px solid var(--ink); box-shadow: inset 0 0 0 2px #555, 0 6px 0 rgba(0, 0, 0, .4); animation: toastIn .35s cubic-bezier(.2, 1.3, .4, 1) both; cursor: default; }
.toast .t-title { font-family: var(--pixel); font-size: .85rem; color: var(--gold); text-shadow: 1px 1px 0 #3f3f15; }
.toast.error .t-title { color: #ff6b6b; text-shadow: 1px 1px 0 #3f1515; }
.toast .t-msg { font-size: .9rem; color: #fff; }

/* ---------------------------------------------------------------- Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(5, 4, 10, .7); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal { width: 100%; max-width: 500px; max-height: 90vh; overflow: auto; }

/* ---------------------------------------------------------------- Versionen, News, Mods */
.version-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.version-chip { padding: 5px 12px 7px; background: rgba(0, 0, 0, .45); border: 2px solid var(--ink); font-family: var(--pixel); font-size: .85rem; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.version-chip.venora { color: #fff; background: rgba(111, 66, 232, .4); box-shadow: inset 0 0 0 1px rgba(148, 112, 255, .6), 0 0 14px var(--accent-glow); }
.news-item { padding: 22px 24px; }
.news-item h3 { margin-bottom: 4px; }
.news-item .body { white-space: pre-wrap; color: #ddd8ee; margin-top: 10px; }
.mod-card { display: flex; gap: 14px; align-items: flex-start; }
.mod-card .mod-icon { width: 54px; height: 54px; background: rgba(0, 0, 0, .45); border: 2px solid var(--ink); display: grid; place-items: center; font-size: 1.5rem; flex-shrink: 0; overflow: hidden; }
.mod-card .mod-icon img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- Chat */
.chat-layout { display: grid; grid-template-columns: 320px 1fr; gap: 18px; height: calc(100vh - 66px - 150px); min-height: 480px; }
@media (max-width: 800px) { .chat-layout { grid-template-columns: 1fr; height: auto; } }
.chat-side, .chat-main { display: flex; flex-direction: column; min-height: 0; padding: 16px; }
.conv-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.conv { display: flex; align-items: center; gap: 10px; padding: 8px; background: transparent; border: 2px solid transparent; cursor: pointer; text-align: left; color: var(--text); font: inherit; width: 100%; }
.conv:hover { background: rgba(255, 255, 255, .05); }
.conv.active { background: rgba(111, 66, 232, .28); border-color: var(--ink); box-shadow: inset 0 0 0 1px rgba(148, 112, 255, .5); }
.conv .av { position: relative; }
.conv .av .st { position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; background: #555; border: 2px solid var(--ink); }
.conv.online .av .st { background: #5dff2a; }
.conv .c-body { flex: 1; min-width: 0; }
.conv .c-name { font-weight: 700; }
.conv .c-last { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.conv .unread { min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; font-family: var(--pixel); font-size: .7rem; background: var(--red); border: 2px solid var(--ink); }
.chat-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.chat-head .h-name { font-family: var(--pixel); font-size: 1.15rem; font-weight: 700; }
.messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 10px 4px; }
.day-sep { align-self: center; font-family: var(--pixel); font-size: .7rem; color: var(--gold); text-shadow: 1px 1px 0 #3f3f15; margin: 10px 0 4px; }
.msg { max-width: 72%; padding: 7px 11px 8px; border: 2px solid var(--ink); background: rgba(0, 0, 0, .45); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); align-self: flex-start; overflow-wrap: anywhere; white-space: pre-wrap; animation: msgIn .18s ease-out; }
.msg.me { align-self: flex-end; background: rgba(111, 66, 232, .55); box-shadow: inset 0 0 0 1px rgba(196, 181, 253, .35), inset 0 -3px 0 rgba(47, 23, 132, .6); }
.msg .meta { display: block; font-size: .68rem; color: rgba(255, 255, 255, .55); margin-top: 3px; text-align: right; }
.typing { font-size: .8rem; color: var(--muted); padding: 4px 6px; min-height: 22px; }
.chat-input { display: flex; gap: 8px; padding-top: 10px; border-top: 2px solid var(--ink); }
.chat-empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--muted); }

/* ---------------------------------------------------------------- Footer */
footer { position: relative; z-index: 2; border-top: 2px solid var(--ink); background: rgba(10, 8, 18, .92); padding: 28px 0; margin-top: 64px; color: var(--muted); font-size: .88rem; box-shadow: inset 0 2px 0 var(--line); }
footer .container { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
footer a { color: var(--muted); font-family: var(--pixel); font-size: .82rem; }

.loader { width: 32px; height: 32px; margin: 32px auto; background: var(--purple); border: 2px solid var(--ink); animation: blockspin 1s steps(4) infinite; }
.empty { text-align: center; color: var(--muted); padding: 32px; }
.dropzone { border: 2px dashed #555; padding: 24px; text-align: center; color: var(--muted); cursor: pointer; background: rgba(0, 0, 0, .35); transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.drag { border-color: var(--purple-hi); background: rgba(111, 66, 232, .12); color: #fff; }
.dropzone img { max-height: 120px; image-rendering: pixelated; margin-top: 10px; }

::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-thumb { background: #3a3846; border: 2px solid #111; }
::-webkit-scrollbar-track { background: #0d0b14; }

/* ---------------------------------------------------------------- 3D-Vorschau-Bühne */
.stage { position: relative; border: 2px solid var(--ink); overflow: hidden;
  background:
    radial-gradient(ellipse 55% 40% at 50% 42%, rgba(148, 112, 255, .45), transparent 70%),
    radial-gradient(ellipse 80% 30% at 50% 100%, rgba(236, 72, 153, .22), transparent 70%),
    linear-gradient(180deg, #1a1530 0%, #0d0b18 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 -40px 60px rgba(0, 0, 0, .5); }
.stage::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background-image: linear-gradient(rgba(255, 255, 255, .25) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .25) 1px, transparent 1px);
  background-size: 24px 24px; mask-image: linear-gradient(180deg, transparent 40%, #000 100%); -webkit-mask-image: linear-gradient(180deg, transparent 40%, #000 100%); }
.viewer-card .stage canvas#skin-viewer { position: relative; z-index: 1; display: block; margin: 0 auto; width: 100%; max-width: 320px; height: 440px; background: transparent; border: 0; cursor: grab; }
.viewer-card .stage canvas#skin-viewer:active { cursor: grabbing; }
.stage-floor { position: absolute; left: 50%; bottom: 34px; width: 150px; height: 26px; transform: translateX(-50%); background: radial-gradient(ellipse, rgba(0, 0, 0, .65), transparent 70%); }
.stage-badge { position: absolute; top: 10px; left: 10px; z-index: 2; font-family: var(--pixel); font-size: .68rem; color: var(--gold); text-shadow: 1px 1px 0 #3f3f15; background: rgba(0, 0, 0, .55); border: 2px solid var(--ink); padding: 2px 8px 3px; }
.anim-chips { display: flex; gap: 4px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.chip-btn { font-family: var(--pixel); font-size: .78rem; padding: 5px 10px 7px; color: #ddd; cursor: pointer; background: var(--stone); border: 2px solid var(--ink); box-shadow: inset 0 2px 0 var(--stone-hi), inset 0 -3px 0 var(--stone-sh); }
.chip-btn:hover { filter: brightness(1.12); color: #fff; }
.chip-btn.active { background: var(--purple); color: #fff; box-shadow: inset 0 2px 0 var(--purple-hi), inset 0 -3px 0 var(--purple-sh); }
.profile-stage { height: 420px; }

@keyframes splash { from { transform: rotate(-12deg) scale(1); } to { transform: rotate(-12deg) scale(1.08); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes blockspin { to { transform: rotate(360deg); } }
