/* ──────────────────────────────────────────────────────────────
   Респаун боссов — Perfect World
   Тема «aurora» (циан + тёплый акцент). Все переменные — в :root.
   ────────────────────────────────────────────────────────────── */
:root {
  --panel: rgba(18,26,40,.72);
  --panel-2: rgba(11,17,28,.66);
  --line: rgba(120,180,230,.16);
  --line-strong: rgba(54,214,255,.5);
  --text: #e8f1fb;
  --muted: #8aa0bb;
  --accent: #36d6ff;
  --accent-soft: rgba(54,214,255,.13);
  --accent-dim: rgba(54,214,255,.32);
  --warm: #ffcf73;
  --warm-soft: rgba(255,207,115,.14);
  --ok: #46e08a;
  --ok-soft: rgba(70,224,138,.13);
  --radius: 8px;
  --radius-sm: 5px;
  --shadow: 0 10px 34px rgba(0,0,0,.5);

  /* фоновые штриховки заглушек (когда картинка не загрузилась) */
  --stripes-sm: repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 7px, rgba(255,255,255,.06) 7px 14px);
  --stripes-md: repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 8px, rgba(255,255,255,.06) 8px 16px);
  --stripes-lg: repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 11px, rgba(255,255,255,.05) 11px 22px);

  /* подкраска эмодзи-дракона в циан (как в логотипе хедера) */
  --tint: grayscale(1) contrast(1.2) sepia(1) hue-rotate(155deg) saturate(7) brightness(1.15) drop-shadow(0 0 7px rgba(54,214,255,.55));
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1100px 520px at 78% -12%, rgba(54,214,255,.10), transparent 60%),
    radial-gradient(900px 480px at 6% 112%, rgba(255,207,115,.06), transparent 55%),
    #0a0e16;
  background-attachment: fixed;
}

.wrap { max-width: 1340px; margin: 0 auto; padding: 18px 20px 44px; }

@keyframes pwpulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes pwfade  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Рамочная панель + декоративные уголки ── */
.box {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.corner { position: absolute; width: 13px; height: 13px; opacity: .55; pointer-events: none; }
.corner.tl { top: 7px; left: 7px;  border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.corner.tr { top: 7px; right: 7px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.corner.bl { bottom: 7px; left: 7px;  border-bottom: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.corner.br { bottom: 7px; right: 7px; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.corner.lg { width: 15px; height: 15px; opacity: .6; }

/* заглушка-иконка под картинкой */
.ph { color: var(--muted); opacity: .5; display: grid; place-items: center; }
.tint { filter: var(--tint); }

/* ── Хедер (HUD) ── */
.hud {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px;
  padding: 15px 20px; margin-bottom: 20px;
}
.logo { display: flex; align-items: center; gap: 13px; }
.logo .badge {
  position: relative; width: 46px; height: 46px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: var(--radius-sm);
  background: var(--accent-soft); border: 1px solid var(--line-strong);
}
.logo .badge span { font-size: 30px; line-height: 1; filter: var(--tint); }
.logo .title { font-family: 'Forum', Georgia, serif; font-size: 24px; line-height: 1.05; letter-spacing: .01em; color: var(--text); }
.logo .sub   { font-size: 10.5px; font-weight: 700; letter-spacing: .22em; color: var(--accent); margin-top: 3px; }

.spacer { flex: 1 1 auto; }

.status { display: inline-flex; align-items: center; gap: 9px; padding: 9px 15px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.status .dot { width: 9px; height: 9px; border-radius: 50%; }
.status.on  { background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok); }
.status.on  .dot { background: var(--ok); box-shadow: 0 0 9px var(--ok); animation: pwpulse 1.6s ease-in-out infinite; }
.status.off { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); font-weight: 600; font-size: 12.5px; }
.status.off .dot { background: var(--muted); opacity: .7; }

.clock-wrap { text-align: right; padding-left: 4px; }
.clock { font-family: 'JetBrains Mono', monospace; font-size: 24px; font-weight: 700; line-height: 1; letter-spacing: .5px; color: var(--text); font-variant-numeric: tabular-nums; }
.clock-label { font-size: 10px; font-weight: 700; letter-spacing: .14em; color: var(--muted); margin-top: 4px; }

/* ── Двухколоночная раскладка ── */
.layout { display: flex; gap: 20px; align-items: flex-start; }
.sidebar { flex: 0 0 282px; max-width: 282px; }
.content { flex: 1; min-width: 0; }

.roster-title { font-size: 11px; font-weight: 700; letter-spacing: .18em; color: var(--muted); margin: 0 0 12px 2px; }
.roster { display: flex; flex-direction: column; gap: 9px; }

.boss-btn {
  position: relative; display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left; color: var(--text); cursor: pointer;
  border-radius: var(--radius-sm); padding: 9px 11px;
  background: var(--panel); border: 1px solid var(--line);
  transition: border-color .15s, background .15s; backdrop-filter: blur(8px);
}
.boss-btn:hover { border-color: var(--line-strong); }
.boss-btn.active { background: var(--accent-soft); border: 1px solid var(--line-strong); }
.boss-btn .thumb-box {
  position: relative; width: 50px; height: 50px; flex: 0 0 auto;
  border-radius: var(--radius-sm); overflow: hidden;
  background: var(--stripes-sm); border: 1px solid var(--line);
}
.boss-btn .thumb-box .ph { position: absolute; inset: 0; }
.boss-btn .thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.boss-btn .info { min-width: 0; text-align: left; flex: 1; }
.boss-btn .bn { font-weight: 700; font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.boss-btn .bl { font-size: 11.5px; margin-top: 3px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.boss-btn.active .bl { color: var(--accent); }
.boss-btn .active-bar { position: absolute; top: 0; right: 0; bottom: 0; width: 3px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); display: none; }
.boss-btn.active .active-bar { display: block; }

.donate {
  display: flex; align-items: center; gap: 12px; margin-top: 16px;
  text-decoration: none; padding: 12px 14px; border-radius: var(--radius);
  background: var(--warm-soft); border: 1px solid var(--warm);
  width: 100%; text-align: left; font-family: inherit; cursor: pointer;
  transition: filter .15s;
}
.donate:hover { filter: brightness(1.08); }
.donate .ico { font-size: 22px; line-height: 1; }
.donate .dt { display: block; font-weight: 700; font-size: 13.5px; color: var(--warm); }
.donate .ds { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ── Карточки доната (модалка «Купить мне кофе») ── */
.donate-opts { display: flex; flex-direction: column; gap: 11px; margin-top: 2px; }
.donate-opt {
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; padding: 16px; border-radius: var(--radius);
  background: var(--panel-2); border: 1px solid var(--line);
  transition: border-color .15s, background .15s;
}
.donate-opt:hover { border-color: var(--line-strong); background: var(--accent-soft); }
.donate-opt .do-logo { display: flex; align-items: center; justify-content: center; max-width: 100%; }
.donate-opt .do-logo .do-svg { display: block; height: 26px; width: auto; max-width: 100%; }

/* ── Плашка демо ── */
.demo-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 11px 16px;
  border: 1px solid var(--accent); background: var(--accent-soft);
  border-radius: var(--radius); color: var(--accent); font-size: 13px; font-weight: 600;
}
.demo-bar .label { display: inline-flex; align-items: center; gap: 9px; }
.demo-bar .x { margin-left: auto; padding: 7px 15px; border: none; border-radius: var(--radius-sm); background: var(--accent); color: #04121c; font-weight: 700; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.demo-bar .x:hover { filter: brightness(1.08); }

/* ── Карточка выбранного босса ── */
.detail { padding: 20px; }
.detail-head { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-bottom: 18px; }
.portrait-box {
  position: relative; width: 92px; height: 112px; flex: 0 0 auto;
  border-radius: var(--radius); overflow: hidden;
  background: var(--stripes-md); border: 1px solid var(--line-strong);
}
.portrait-box .ph { position: absolute; inset: 0; }
.portrait { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.meta { min-width: 200px; flex: 1; }
.boss-name { margin: 0 0 8px; font-family: 'Forum', Georgia, serif; font-size: 27px; line-height: 1.1; color: var(--text); }
.next-change { font-size: 13.5px; color: var(--muted); }
.next-change b { font-family: 'JetBrains Mono', monospace; font-size: 16px; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.frozen { font-size: 13.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.progress { margin-top: 9px; height: 5px; border-radius: 3px; background: var(--panel-2); overflow: hidden; max-width: 260px; }
.progress .fill { height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 10px var(--accent-dim); border-radius: 3px; transition: width .9s linear; }

.kill-btn {
  margin-left: auto; flex: 0 0 auto; padding: 13px 20px; border: none;
  border-radius: var(--radius); background: var(--ok); color: #042414;
  font-size: 14px; font-weight: 800; cursor: pointer; white-space: nowrap;
  box-shadow: 0 0 18px var(--ok-soft);
}
.kill-btn:hover { filter: brightness(1.06); }
.kill-btn:active { transform: scale(.99); }

/* ── Индикатор цикла локаций ── */
.cycle { margin-bottom: 16px; padding: 13px 15px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line); }
.cycle-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.cycle-top .lbl { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; color: var(--muted); white-space: nowrap; }
.cycle-top .pos { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; color: var(--accent); }
.bars { display: flex; gap: 6px; }
.bar { flex: 1; height: 5px; border-radius: 3px; background: var(--line); transition: background .3s, box-shadow .3s; }
.bar.past { background: var(--accent-dim); }
.bar.current { background: rgba(54,214,255,.5); }
.bar.viewed { background: var(--accent); box-shadow: 0 0 10px var(--accent-dim); }

/* ── Карточки локаций ── */
.loc-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.loc {
  text-align: left; width: 100%; color: var(--text); cursor: pointer;
  border-radius: var(--radius); padding: 15px 16px;
  background: var(--panel-2); border: 1px solid var(--line);
  transition: box-shadow .12s, border-color .12s;
}
.loc:hover { border-color: var(--line-strong); }
.loc .tag { font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 7px; }
.loc .name { font-size: 16px; font-weight: 600; color: var(--text); }
.loc.current { background: var(--accent-soft); border: 1px solid var(--line-strong); }
.loc.current .tag { color: var(--accent); font-weight: 700; }
.loc.current .name { font-family: 'Forum', Georgia, serif; font-size: 23px; line-height: 1.12; color: var(--accent); }
.loc.viewing { box-shadow: 0 0 0 2px var(--accent); }
.loc.hidden { visibility: hidden; pointer-events: none; }

/* Текущая локация в режиме «все локации» (подсветка без увеличенного шрифта) */
.loc.now { background: var(--accent-soft); border-color: var(--line-strong); }
.loc.now .tag { color: var(--accent); font-weight: 700; }
.loc.now .name { color: var(--accent); }

/* ── Переключатель «Ближайшие / Все локации» ── */
.loc-toggle {
  display: inline-flex; margin-bottom: 13px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2);
}
.lt-btn {
  padding: 8px 15px; border: none; background: transparent; color: var(--muted);
  font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: .15s;
}
.lt-btn + .lt-btn { border-left: 1px solid var(--line); }
.lt-btn.active { background: var(--accent-soft); color: var(--accent); }
.lt-btn:not(.active):hover { color: var(--text); }

/* ── Сетка «все локации» (6 карточек) ── */
.loc-all { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }

/* ── Карта ── */
.map-title { font-size: 13px; color: var(--muted); margin-bottom: 9px; }
.map-title b { color: var(--accent); }
.map-link { display: block; position: relative; }
.map-box {
  position: relative; width: 100%; min-height: 240px;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--stripes-lg);
}
.map-placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; }
.map-placeholder .ic { font-size: 30px; opacity: .4; }
.map-placeholder .cap { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); margin-top: 8px; letter-spacing: .04em; }
.map-img { display: block; position: relative; width: 100%; max-height: 74vh; object-fit: contain; background: var(--panel-2); }
.map-hint { font-size: 11px; color: var(--muted); margin-top: 7px; text-align: right; }

/* ── Дежурный экран ── */
.idle {
  max-width: 640px; margin: 44px auto 0; text-align: center;
  padding: 42px 32px; animation: pwfade .4s ease;
}
.idle .corner.tl, .idle .corner.tr, .idle .corner.bl, .idle .corner.br { opacity: .6; }
.idle .dragon { font-size: 78px; line-height: 1; filter: grayscale(1) contrast(1.2) sepia(1) hue-rotate(155deg) saturate(7) brightness(1.2) drop-shadow(0 0 16px rgba(54,214,255,.6)); }
.idle h2 { margin: 16px 0 8px; font-family: 'Forum', Georgia, serif; font-size: 32px; color: var(--text); }
.idle p { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin: 10px auto; max-width: 480px; }
.idle p.small { font-size: 13px; line-height: 1.55; max-width: 460px; }
.idle .start-in { font-size: 13.5px; margin-top: 10px; }
.idle .start-in b { color: var(--text); font-family: 'JetBrains Mono', monospace; }
.next-event {
  display: inline-flex; align-items: center; gap: 13px; margin: 18px 0 6px;
  padding: 12px 22px 12px 17px; background: var(--warm-soft);
  border: 1px solid var(--warm); border-radius: 14px; color: var(--warm);
}
.next-event .info { text-align: left; }
.next-event .ne-lbl { font-size: 9.5px; font-weight: 700; letter-spacing: .18em; opacity: .85; }
.next-event .ne-when { font-size: 17px; font-weight: 800; color: var(--text); margin-top: 2px; line-height: 1.1; }
.next-event .ne-when span { color: var(--muted); font-weight: 600; font-size: 12.5px; letter-spacing: .04em; }
.demo-open {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 18px;
  padding: 13px 24px; border: 1px solid var(--accent); border-radius: var(--radius);
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; cursor: pointer;
}
.demo-open:hover { background: rgba(54,214,255,.2); }
.idle .donate { max-width: 320px; margin: 12px auto 0; justify-content: center; display: inline-flex; }

/* ── Кнопка «Сообщить об ошибке» в хедере ── */
.report-btn {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel-2); color: var(--muted); cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: 600; line-height: 1;
  transition: color .15s, border-color .15s, background .15s;
}
.report-btn:hover { color: var(--accent); border-color: var(--line-strong); background: var(--accent-soft); }
.report-btn svg { flex: none; }

/* ── Модалка ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 18px;
  background: rgba(5,9,16,.72); backdrop-filter: blur(3px);
  animation: pwfade .15s ease;
}
.modal-overlay[hidden] { display: none; }

.modal-card { width: 100%; max-width: 470px; position: relative; padding: 22px 22px 18px; }
.modal-x {
  position: absolute; top: 11px; right: 12px; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: transparent; color: var(--muted); font-size: 14px; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.modal-x:hover { color: var(--accent); border-color: var(--line-strong); }

.modal-title { margin: 2px 0 6px; font-family: 'Forum', Georgia, serif; font-size: 24px; font-weight: 400; }
.modal-sub { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.55; }

.report-text {
  width: 100%; resize: vertical; min-height: 84px;
  padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel-2); color: var(--text);
  font-family: inherit; font-size: 14px; line-height: 1.5;
}
.report-text:focus { outline: none; border-color: var(--line-strong); }
.report-text::placeholder { color: var(--muted); }

/* honeypot — спрятан от людей, виден ботам */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.report-ctx {
  margin: 13px 0 4px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2);
}
.report-ctx .rc-title {
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 7px;
}
.report-ctx ul { margin: 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--muted); }
.report-ctx li { display: flex; gap: 8px; padding: 2px 0; }
.report-ctx li b { color: var(--text); font-weight: 600; }
.report-ctx li span:first-child { flex: 0 0 132px; }

.report-status {
  margin-top: 12px; padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.45;
}
.report-status.ok   { background: var(--ok-soft);   color: var(--ok);   border: 1px solid rgba(70,224,138,.4); }
.report-status.err  { background: var(--warm-soft);  color: var(--warm); border: 1px solid rgba(255,207,115,.4); }

.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 15px; }
.btn-ghost, .btn-send {
  padding: 11px 20px; border-radius: var(--radius); cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 700; transition: .15s;
}
.btn-ghost { border: 1px solid var(--line); background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); border-color: var(--line-strong); }
.btn-send { border: none; background: var(--accent); color: #042231; }
.btn-send:hover { filter: brightness(1.06); }
.btn-send:disabled { opacity: .55; cursor: default; filter: none; }

/* ── Узкие экраны ── */
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { flex: none; width: 100%; max-width: none; }
  .roster { display: grid; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .loc-row { grid-template-columns: 1fr; }
  .loc-all { grid-template-columns: repeat(2, 1fr); }
  .roster { grid-template-columns: 1fr; }
  .report-btn .rb-label { display: none; }
  .report-btn { padding: 8px 10px; }
  .report-ctx li { flex-direction: column; gap: 1px; }
  .report-ctx li span:first-child { flex: none; }
}
