:root {
  --bg: #0d1b2a;
  --panel: #12233a;
  --v: #c0392b;
  --a: #e8dcc8;
  --txt: #e8dcc8;
  --danger: #ff4d4d;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: 'Segoe UI', Arial, sans-serif;
  height: 100vh;
  overflow: hidden;
  background-image: radial-gradient(ellipse at 50% -10%, rgba(80, 200, 160, 0.12), transparent 55%);
}
#topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--panel);
  border-bottom: 2px solid #1e3a5f;
  font-size: 28px;
}
#topbar .clan b { font-size: 34px; margin-left: 10px; }
.clan.v { color: var(--v); }
.clan.a { color: var(--a); }
#day { font-weight: 700; letter-spacing: 1px; }
#main { display: flex; height: calc(100vh - 64px - 80px); }
#cam {
  width: 25%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #16283f, #0d1b2a);
  color: #4a6584;
  font-size: 22px;
  letter-spacing: 3px;
  border-right: 1px solid #1e3a5f;
}
#mapwrap { position: relative; width: 55%; display: flex; align-items: center; justify-content: center; }
#map { width: 95%; height: 95%; }
#boards { width: 20%; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.board { background: var(--panel); border-radius: 10px; padding: 12px; }
.board.v h3 { color: var(--v); }
.board.a h3 { color: var(--a); }
.board ol { list-style: none; margin-top: 8px; }
.board li { padding: 5px 0; font-size: 16px; border-bottom: 1px solid #1e3a5f; display: flex; justify-content: space-between; }
.board li .acts { color: #8fb8dd; }
#fury {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(90deg, var(--v), #e67e22, var(--a));
  color: #111; font-weight: 800; font-size: 22px; padding: 8px 24px;
  border-radius: 30px; animation: pulse 0.6s infinite alternate; z-index: 5;
}
#clock {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  font-size: 64px; font-weight: 900; color: var(--txt);
  text-shadow: 0 0 20px rgba(232, 220, 200, 0.4); z-index: 5;
}
#clock.red { color: var(--danger); animation: pulse 0.5s infinite alternate; }
#targetbar { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); width: 60%; z-index: 5; text-align: center; }
#targetlabel { font-size: 18px; margin-bottom: 6px; font-weight: 700; }
#targetbar .bar { height: 18px; background: #1e3a5f; border-radius: 9px; overflow: hidden; }
#targetfill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--v), #e67e22); transition: width 0.3s; }
#ticker {
  height: 80px; background: var(--panel); border-top: 2px solid #1e3a5f;
  padding: 10px 24px; font-size: 16px; overflow: hidden;
}
#ticker div { opacity: 0.9; }
#cliff {
  position: fixed; inset: 0; background: rgba(5, 10, 18, 0.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 50;
}
#cliff h1 { font-size: 56px; letter-spacing: 2px; }
#cliff h2 { margin-top: 24px; font-size: 26px; color: #8fb8dd; letter-spacing: 4px; }
.hex { stroke: #2c4a6b; stroke-width: 2; transition: fill 0.4s; }
.hex.neutral { fill: #1a2f47; }
.hex.v { fill: rgba(192, 57, 43, 0.75); }
.hex.a { fill: rgba(232, 220, 200, 0.75); }
.hex.front { animation: frontpulse 1.2s infinite; }
.hex.key { stroke: #ffd700; stroke-width: 4; animation: frontpulse 0.5s infinite; }
.hexid { fill: #5a7ba0; font-size: 11px; pointer-events: none; }
.arrow { stroke-width: 3; fill: none; opacity: 0.9; animation: fly 0.5s linear forwards; }
.hidden { display: none !important; }
@keyframes pulse { from { transform: translateX(-50%) scale(1); } to { transform: translateX(-50%) scale(1.06); } }
@keyframes frontpulse { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.5); } }
@keyframes fly { from { opacity: 1; } to { opacity: 0; } }

@media (max-width: 900px) {
  #topbar { font-size: 16px; height: 44px; padding: 0 12px; }
  #topbar .clan b { font-size: 20px; margin-left: 6px; }
  #main { flex-direction: column; height: calc(100vh - 44px - 56px); }
  #cam { display: none; }
  #mapwrap { width: 100%; height: 70%; }
  #boards { width: 100%; height: 30%; flex-direction: row; gap: 8px; padding: 8px; overflow: hidden; }
  .board { flex: 1; padding: 8px; }
  .board li { font-size: 12px; padding: 2px 0; }
  .board h3 { font-size: 14px; }
  #clock { font-size: 36px; bottom: 8px; }
  #fury { font-size: 14px; padding: 5px 14px; }
  #ticker { height: 56px; font-size: 13px; padding: 6px 12px; }
  #cliff h1 { font-size: 26px; }
  #cliff h2 { font-size: 15px; }
}
