/* Forever Live Map: WoW Advisor look (gold on near-black, bronze edges, terminal font) */
:root {
  --bg: #0c0b09; --bg2: #17140f; --bg3: #211c14; --edge: #6b5a26; --gold: #ffd100; --bright: #fff26b;
  --text: #e8e4da; --muted: #b3ad9f; --dim: #857f72; --good: #5af05a; --bad: #ff5050; --warn: #ff8040;
  --info: #5ea8ff; --xp: #b66dff; --ocean: #0e1a24;
  --mono: "DejaVu Sans Mono", "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 13px/1.45 var(--mono); overflow: hidden; }
body { display: flex; }
b { color: var(--bright); font-weight: 700; }
h4 { margin: 14px 0 6px; color: var(--gold); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--edge); padding-bottom: 3px; }
.dim { color: var(--dim); } .small { font-size: 11px; }
button, input { font: inherit; color: inherit; }

#side { width: 300px; min-width: 300px; height: 100%; overflow-y: auto; background: var(--bg); border-right: 1px solid var(--edge); padding: 12px 12px 20px; }
#side header { margin-bottom: 10px; }
.logo { font-size: 20px; letter-spacing: .04em; color: var(--gold); }
.logo b { color: var(--bad); }
.sub { color: var(--dim); font-size: 11px; }
#search, #side input:not([type=checkbox]) { width: 100%; background: var(--bg2); border: 1px solid var(--edge); padding: 7px 9px; outline: none; }
#search:focus, #side input:focus { border-color: var(--gold); }
#results { border: 1px solid var(--edge); border-top: 0; max-height: 300px; overflow-y: auto; background: var(--bg2); }
#results div { padding: 5px 9px; cursor: pointer; border-top: 1px solid #2a2418; }
#results div:hover { background: var(--bg3); color: var(--gold); }
#results i { color: var(--dim); font-style: normal; float: right; }

#pulse { margin: 12px 0; padding: 10px; border: 1px solid var(--edge); background: var(--bg2); }
.pulse-head { font-size: 15px; margin-bottom: 4px; }
.pulse-head b { font-size: 20px; color: var(--good); }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--good); margin-right: 6px; box-shadow: 0 0 6px var(--good); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .35; } }
#spark { width: 100%; height: 38px; display: block; margin: 4px 0 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; }
.grid3 b { display: block; font-size: 15px; }
.grid3 span { color: var(--dim); font-size: 10px; }

.tabs { display: flex; border-bottom: 1px solid var(--edge); }
.tabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 7px 0; color: var(--muted); cursor: pointer; }
.tabs button.on { color: var(--gold); border-bottom-color: var(--gold); }
.tab { padding-top: 4px; }
.row { display: flex; align-items: center; gap: 7px; padding: 3px 2px; cursor: pointer; user-select: none; }
.row:hover { color: var(--gold); }
.row .n { margin-left: auto; color: var(--dim); }
.row .sw { width: 12px; height: 12px; display: inline-block; border: 1px solid #0008; border-radius: 2px; }
input[type=checkbox] { accent-color: var(--gold); }
.list { margin: 0; padding-left: 20px; }
.list li { padding: 2px 0; cursor: pointer; }
.list li:hover { color: var(--gold); }
.list li i { color: var(--dim); font-style: normal; }
.bars div { display: flex; align-items: center; gap: 6px; font-size: 11px; margin: 2px 0; }
.bars span.k { width: 86px; color: var(--muted); }
.bars span.b { height: 8px; background: var(--gold); }
.bars span.v { color: var(--dim); }
.btn { background: var(--bg3); border: 1px solid var(--edge); padding: 6px 10px; cursor: pointer; color: var(--gold); margin-top: 8px; }
.btn:hover { border-color: var(--gold); }
.btn.ghost { color: var(--muted); }
#side footer { margin-top: 18px; color: var(--muted); font-size: 11px; border-top: 1px solid var(--edge); padding-top: 8px; }

#stage { position: relative; flex: 1; height: 100%; background: var(--ocean); }
#map { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#map.drag { cursor: grabbing; }
.conts { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; border: 1px solid var(--edge); background: #0c0b09e6; }
.conts button { background: none; border: 0; padding: 6px 12px; color: var(--muted); cursor: pointer; }
.conts button.on { color: var(--gold); background: var(--bg3); }
#zoom { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; border: 1px solid var(--edge); z-index: 2; }
#zoom button { width: 34px; height: 32px; background: #0c0b09e6; border: 0; border-bottom: 1px solid var(--edge); color: var(--gold); font-size: 18px; cursor: pointer; }
#zoom button:last-child { border-bottom: 0; font-size: 15px; }
#hint { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); background: #0c0b09e6; border: 1px solid var(--edge); padding: 5px 12px; color: var(--muted); font-size: 12px; pointer-events: none; }
.conn { position: absolute; bottom: 12px; right: 12px; font-size: 11px; color: var(--dim); background: #0c0b09cc; padding: 3px 8px; border: 1px solid var(--edge); }
.conn.ok { color: var(--good); } .conn.bad { color: var(--bad); }
#pop { position: absolute; z-index: 5; min-width: 220px; max-width: 320px; background: #0c0b09f2; border: 1px solid var(--gold); padding: 9px 11px; box-shadow: 0 6px 20px #000a; }
#pop h5 { margin: 0 0 4px; font-size: 14px; color: var(--gold); }
#pop .meta { color: var(--dim); font-size: 11px; }
#pop .acts { display: flex; gap: 6px; margin-top: 6px; }
#pop .acts .btn { margin: 0; padding: 4px 8px; font-size: 12px; }
#pop .x { position: absolute; top: 4px; right: 8px; color: var(--dim); cursor: pointer; }
.menu-btn { display: none; position: absolute; top: 10px; left: 10px; z-index: 3; background: #0c0b09e6; color: var(--gold); border: 1px solid var(--edge); width: 36px; height: 32px; font-size: 18px; }

dialog { background: var(--bg); color: var(--text); border: 1px solid var(--gold); padding: 14px 16px; width: min(420px, 92vw); }
dialog::backdrop { background: #000a; }
dialog h3 { margin: 0 0 4px; color: var(--gold); }
dialog input { width: 100%; background: var(--bg2); border: 1px solid var(--edge); padding: 7px 9px; margin-top: 7px; outline: none; }
.two { display: flex; gap: 6px; }
.kinds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; margin: 8px 0 2px; }
.kinds label { border: 1px solid var(--edge); padding: 6px 8px; cursor: pointer; display: flex; gap: 6px; align-items: center; }
.kinds input { display: none; }
.kinds label:has(input:checked) { border-color: var(--gold); color: var(--gold); background: var(--bg3); }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

@media (max-width: 760px) {
  #side { position: absolute; z-index: 10; transform: translateX(-100%); transition: transform .2s; box-shadow: 4px 0 20px #000a; }
  #side.open { transform: none; }
  .menu-btn { display: block; }
  .conts { left: 54px; }
  #hint { display: none; }
}
