/* Farben und Rahmen wie Age of Castlefight (src/style.css) */
:root {
  --gold: #f1c75b; --border: #6b5126; --border-light: #a88440; --text: #efe5cf; --muted: #b5a582;
  --font-ui: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --font-display: Georgia, "Palatino Linotype", "Book Antiqua", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0c1108; color: var(--text); font: 14px/1.3 var(--font-ui); user-select: none; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: default; }
#game.foe { cursor: crosshair; }
[hidden] { display: none !important; }

.box { position: fixed; background: linear-gradient(rgba(42,33,22,.95), rgba(18,13,8,.95)); border: 1px solid #000; border-radius: 6px;
  box-shadow: inset 0 0 0 1px #6b5226, inset 0 1px 0 #a88a4a, 0 8px 24px rgba(0,0,0,.55); padding: 8px 10px; }
#me { left: 14px; top: 14px; width: 270px; }
#target { left: 50%; top: 14px; width: 260px; transform: translateX(-50%); }
#side { position: fixed; right: 14px; top: 14px; display: flex; flex-direction: column; gap: 8px; align-items: stretch; width: 200px; }
#side .box { position: static; }
#online { font-size: 13px; color: var(--muted); }
#online b { color: var(--gold); }
#online-list { margin-top: 4px; color: var(--text); font-size: 12.5px; line-height: 1.45; }
#online-list .self { color: var(--gold); }
.me-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-family: var(--font-display); font-size: 16px; }
.me-head b { color: var(--gold); text-shadow: 0 1px 0 #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lvl { color: var(--text); font: 600 13px var(--font-ui); background: rgba(0,0,0,.35); border: 1px solid var(--border); border-radius: 10px; padding: 1px 8px; }
.bar { position: relative; height: 16px; border-radius: 4px; background: #1b0d0b; border: 1px solid #000; overflow: hidden; margin-top: 4px; }
.bar i { position: absolute; inset: 0 auto 0 0; width: 100%; transition: width .15s; }
.bar.hp i { background: linear-gradient(#78e05a, #3a9a2c); }
.bar.hp.foe i { background: linear-gradient(#ff7a5a, #b8321e); }
.bar.xp { height: 10px; background: #120f1e; }
.bar.xp i { background: linear-gradient(#c79bff, #7a4ad8); }
.bar span { position: absolute; inset: 0; text-align: center; font-size: 11px; line-height: 15px; font-weight: 600; text-shadow: 0 1px 1px #000, 0 0 3px #000; }
.bar.xp span { font-size: 9px; line-height: 9px; }

#skillbar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 6px; padding: 6px; border-radius: 10px;
  background: rgba(8,12,22,.82); border: 1.5px solid var(--border); box-shadow: 0 6px 18px rgba(0,0,0,.5); }
.slot { position: relative; width: 52px; height: 52px; border-radius: 7px; border: 1.5px solid var(--border-light); background: linear-gradient(#1e2c4e, #0d1424); padding: 5px; color: var(--text); cursor: pointer; font: inherit; }
.slot svg { width: 100%; height: 100%; display: block; }
.slot:hover { border-color: var(--gold); box-shadow: 0 0 10px rgba(241,199,91,.35); }
.slot.empty { opacity: .45; cursor: default; border-color: var(--border); }
.slot .key { position: absolute; left: 3px; top: 1px; font-size: 11px; font-weight: 700; color: var(--gold); text-shadow: 0 1px 1px #000; }
.slot .cd { position: absolute; inset: 0; border-radius: 6px; background: conic-gradient(rgba(0,0,0,.72) calc(var(--cd, 0) * 1turn), transparent 0); pointer-events: none; }
.slot .cdt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; text-shadow: 0 1px 2px #000; pointer-events: none; }
.slot.flash { animation: slotFlash .35s; }
@keyframes slotFlash { 0% { box-shadow: 0 0 18px rgba(255,230,140,.9); } 100% { box-shadow: none; } }

#help { font-size: 12px; color: var(--muted); text-shadow: 0 1px 2px #000; margin-top: 6px; }
#help b { color: var(--gold); }
#zone-name { position: fixed; left: 50%; top: 80px; transform: translateX(-50%); font: italic 26px var(--font-display); color: var(--gold);
  text-shadow: 0 2px 0 #000, 0 0 18px rgba(241,199,91,.45); opacity: 0; pointer-events: none; }
#zone-name.show { animation: zoneName 4s ease forwards; }
@keyframes zoneName { 0% { opacity: 0; } 15%, 70% { opacity: 1; } 100% { opacity: 0; } }
#banner { position: fixed; left: 50%; top: 32%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; font-family: var(--font-display); }
#banner .big { font-size: 40px; color: var(--gold); letter-spacing: .05em; text-shadow: 0 3px 0 #000, 0 0 24px rgba(241,199,91,.55); }
#banner .small { font-size: 16px; color: var(--text); text-shadow: 0 1px 2px #000; margin-top: 4px; font-family: var(--font-ui); }
#banner .dead { color: #ff8070; }
#banner.pop { animation: bannerPop 2.6s ease forwards; }
@keyframes bannerPop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.7); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } 20% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }

.overlay { position: fixed; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; background: rgba(5,6,8,.45); }
.panel { width: min(440px, 92%); padding: 24px 30px; text-align: center; border-radius: 10px; background: linear-gradient(#16203a, #0b101d); border: 2px solid var(--border-light);
  box-shadow: 0 0 0 4px rgba(0,0,0,.5), 0 20px 60px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,215,140,.25); }
.panel h1 { margin: 0; font: 38px var(--font-display); letter-spacing: .05em; color: var(--gold); text-shadow: 0 2px 0 #000, 0 0 18px rgba(241,199,91,.35); }
.subtitle { margin: 2px 0 18px; color: var(--muted); font-style: italic; }
.panel label { display: block; text-align: left; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.panel input { width: 100%; font: 18px var(--font-ui); padding: 9px 12px; border-radius: 6px; border: 1.5px solid var(--border); background: #0a0f1b; color: var(--text); outline: none; user-select: text; }
.panel input:focus { border-color: var(--gold); }
.panel button { margin-top: 14px; width: 100%; padding: 11px; font: 700 17px var(--font-ui); letter-spacing: .03em; color: #1a1206; border: 0; border-radius: 6px; cursor: pointer;
  background: linear-gradient(#ffe08a, #e0a83a); box-shadow: 0 3px 0 #7a5a1a, 0 6px 14px rgba(0,0,0,.4); }
.panel button:disabled { filter: grayscale(.7) brightness(.7); cursor: wait; }
.note { color: var(--muted); font-size: 12px; margin: 12px 0 0; }

/* ---------- Ausbau: Klasse, Auftrag, Chat, Inventar, Gespräche ---------- */
.cls { color: var(--muted); font-size: 12px; margin: -4px 0 4px; font-style: italic; }
#quest { font-size: 13px; }
#quest .q-title { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
#quest b { color: var(--gold); font-family: var(--font-display); font-size: 15px; display: block; }
#q-prog { margin-top: 2px; }
#q-prog.ready { color: #8dff8a; }
#skillbar .slot .icon { position: absolute; inset: 5px; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff; text-shadow: 0 1px 3px #000; }
#skillbar .slot .num { position: absolute; right: 3px; bottom: 1px; font-size: 11px; font-weight: 700; text-shadow: 0 1px 2px #000; }
#menu-btns { position: fixed; right: 14px; bottom: 14px; display: flex; gap: 6px; }
.hud-btn { height: 34px; padding: 0 12px; border-radius: 7px; border: 1.5px solid var(--border-light); background: linear-gradient(#1e2c4e, #0d1424); color: var(--text); font: 600 13px var(--font-ui); cursor: pointer; }
.hud-btn:hover { border-color: var(--gold); color: #fff; }
kbd { font: 700 11px var(--font-ui); color: var(--gold); border: 1px solid var(--border); border-radius: 3px; padding: 0 4px; margin-left: 4px; }

#chat { position: fixed; left: 14px; bottom: 14px; width: min(420px, 32vw); }
#chat-log { max-height: 190px; overflow-y: auto; font-size: 13px; line-height: 1.35; text-shadow: 0 1px 2px #000, 0 0 3px #000; scrollbar-width: thin; padding-right: 4px; }
#chat-log:not(.open) { pointer-events: none; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 30%); mask-image: linear-gradient(transparent, #000 30%); }
#chat-log div { margin-top: 2px; animation: chatFade 14s forwards; }
#chat-log.open div { animation: none; }
@keyframes chatFade { 0%, 75% { opacity: 1; } 100% { opacity: .25; } }
#chat-log .n { color: var(--gold); font-weight: 600; }
#chat-log .sys { color: #ffd98a; }
#chat-log .info { color: #9fd0ff; }
#chat-log .loot { color: #cfc6b0; }
#chat-in { margin-top: 6px; width: 100%; font: 14px var(--font-ui); padding: 7px 10px; border-radius: 4px; border: 1px solid #6b5226; background: rgba(18,13,8,.92); color: var(--text); outline: none; user-select: text; }
#toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); color: #ffe6a0; font-weight: 600; text-shadow: 0 1px 2px #000, 0 0 6px #000; pointer-events: none; opacity: 0; transition: opacity .3s; }
#toast.on { opacity: 1; }

.panel-box { z-index: 4; }
.pb-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pb-head b { font: 18px var(--font-display); color: var(--gold); }
.x { background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; }
.x:hover { color: #fff; }
#inv { right: 14px; bottom: 60px; width: 470px; }
.inv-body { display: flex; gap: 12px; }
.inv-left { width: 150px; }
.eq-slots { display: flex; flex-direction: column; gap: 6px; }
.eq, .bag .cell { position: relative; border-radius: 6px; border: 1.5px solid var(--border); background: rgba(0,0,0,.35); display: flex; align-items: center; gap: 8px; cursor: pointer; }
.eq { height: 48px; padding: 0 8px; font-size: 12px; color: var(--muted); }
.eq .ic, .bag .cell .ic { font-size: 22px; width: 30px; text-align: center; filter: drop-shadow(0 1px 1px #000); }
.eq b { display: block; font-size: 12.5px; }
.bag { display: grid; grid-template-columns: repeat(6, 44px); gap: 5px; }
.bag .cell { width: 44px; height: 44px; justify-content: center; }
.bag .cell.empty { cursor: default; opacity: .5; }
.bag .cell .lv, .eq .lv { position: absolute; right: 2px; bottom: 0; font-size: 9.5px; color: #ddd; text-shadow: 0 1px 1px #000; }
.bag .cell.no { opacity: .55; }
.bag .cell:hover, .eq:hover { border-color: var(--gold); }
.stats { margin-top: 10px; font-size: 12.5px; line-height: 1.6; }
.stats div { display: flex; justify-content: space-between; }
.stats b { color: var(--gold); }
.inv-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.gold { color: var(--gold); font-weight: 700; font-size: 14px; }
.gold::before { content: '● '; color: #f1c75b; }
#tip { position: fixed; z-index: 9; pointer-events: none; max-width: 260px; background: rgba(20,14,8,.97); border: 1px solid #a88a4a; border-radius: 5px; padding: 8px 10px; font-size: 12.5px; line-height: 1.45; box-shadow: 0 6px 18px rgba(0,0,0,.6); }
#tip .t { font-weight: 700; font-size: 14px; }
#tip .r { font-size: 11px; margin-bottom: 4px; }
#tip .bad { color: #ff8070; }
#tip .m { color: var(--muted); }

#dialog { left: 50%; top: 96px; transform: translateX(-50%); width: min(560px, 92vw); max-height: calc(100vh - 190px); overflow: auto; }
#dlg-body p { margin: 0 0 10px; line-height: 1.5; }
#dlg-body .role { color: var(--muted); font-style: italic; margin-bottom: 8px; }
#dlg-body .qbox { border: 1px solid var(--border); border-radius: 7px; padding: 10px 12px; background: rgba(0,0,0,.25); margin-bottom: 10px; }
#dlg-body .qbox h3 { margin: 0 0 4px; font: 17px var(--font-display); color: var(--gold); }
#dlg-body .reward { color: var(--muted); font-size: 12.5px; }
.btn { padding: 8px 14px; font: 700 14px var(--font-ui); color: #1a1206; border: 0; border-radius: 6px; cursor: pointer; background: linear-gradient(#ffe08a, #e0a83a); box-shadow: 0 2px 0 #7a5a1a; margin-right: 6px; }
.btn.alt { background: linear-gradient(#3a4a6e, #1e2a44); color: var(--text); box-shadow: 0 2px 0 #0a0f1a; }
.btn:disabled { filter: grayscale(.8) brightness(.7); cursor: default; }
.classes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 6px; }
.ccard { border: 1.5px solid var(--border); border-radius: 8px; padding: 8px; text-align: center; background: rgba(0,0,0,.3); cursor: pointer; }
.ccard:hover { border-color: var(--gold); box-shadow: 0 0 12px rgba(241,199,91,.3); }
.ccard img { height: 84px; display: block; margin: 0 auto 4px; }
.ccard b { color: var(--gold); font-family: var(--font-display); font-size: 15px; display: block; }
.ccard small { color: var(--muted); display: block; font-size: 11.5px; min-height: 30px; }
.ccard .sk { font-size: 11px; color: var(--text); margin-top: 4px; }
.ccard.on { border-color: var(--gold); background: rgba(241,199,91,.12); box-shadow: 0 0 14px rgba(241,199,91,.35); }
#cls-go + .reward { margin-left: 6px; }
