/* 铁血残明战争图示 */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; }
body { display: flex; flex-direction: column; background: #f4efe4; color: #3a2f22; overflow: hidden; }

#topbar { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; background: #2e2418; color: #f0e6d0; flex: 0 0 auto; }
#topbar h1 { font-size: 20px; letter-spacing: 4px; font-family: "Kaiti", "STKaiti", serif; }
.subtitle { font-size: 12px; color: #c9b898; margin-left: 12px; }
#legend { display: flex; gap: 14px; font-size: 13px; }
.lg-item { display: flex; align-items: center; gap: 5px; }
.lg-line { display: inline-block; width: 26px; height: 4px; border-radius: 2px; }

#main { flex: 1 1 auto; display: flex; min-height: 0; }
#map { flex: 1 1 auto; background: #e9e2d0; }

#battle-list { flex: 0 0 210px; background: #efe8d8; border-right: 1px solid #d5c9ae; display: flex; flex-direction: column; overflow-y: auto; }
.bl-header { padding: 10px 12px; font-weight: bold; font-size: 14px; background: #e2d7bf; border-bottom: 1px solid #d5c9ae; }
#battle-items { flex: 1 1 auto; }
.battle-item { padding: 9px 12px; border-bottom: 1px solid #e0d5bc; cursor: pointer; transition: background .15s; }
.battle-item:hover { background: #e6dcc4; }
.battle-item.active { background: #d8c9a6; border-left: 4px solid #c0392b; padding-left: 8px; }
.battle-item.done .bi-name::after { content: " ✓"; color: #7a6a4a; font-size: 11px; }
.bi-name { font-size: 13.5px; font-weight: 600; }
.bi-time { font-size: 11px; color: #7a6a4a; margin-top: 2px; }
.bl-footer { padding: 8px 10px; border-top: 1px solid #d5c9ae; font-size: 12px; }
.chk { display: block; margin: 4px 0; cursor: pointer; }

#event-panel { flex: 0 0 300px; background: #faf6ec; border-left: 1px solid #d5c9ae; padding: 14px; overflow-y: auto; }
#ep-battle-name { font-size: 13px; color: #8a6d3b; font-weight: 600; }
#ep-date { font-size: 12px; color: #7a6a4a; margin: 4px 0 8px; }
#ep-title { font-size: 18px; font-weight: bold; font-family: "Kaiti", "STKaiti", serif; margin-bottom: 8px; line-height: 1.35; }
#ep-desc { font-size: 13px; line-height: 1.75; color: #4a3f2e; }
#ep-chapters { margin-top: 10px; font-size: 11.5px; color: #8a7a5a; }
#ep-chapters .ch-tag { display: inline-block; background: #e8dfc8; border-radius: 3px; padding: 1px 6px; margin: 2px 3px 2px 0; }
#ep-factions { margin-top: 12px; font-size: 12px; line-height: 1.7; }
#ep-factions .fac { margin-bottom: 6px; padding-left: 8px; border-left: 3px solid #ccc; }
#ep-result { margin-top: 12px; font-size: 12.5px; background: #f0e9d6; border-radius: 4px; padding: 8px; line-height: 1.7; display: none; }

#player { flex: 0 0 auto; background: #2e2418; padding: 8px 16px 10px; color: #e8dcc0; }
#controls { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
#controls button { background: #4a3b26; color: #f0e6d0; border: 1px solid #6a5638; border-radius: 4px; padding: 4px 12px; font-size: 15px; cursor: pointer; }
#controls button:hover { background: #5d4b30; }
#btn-play { min-width: 52px; font-size: 17px; }
#speed { background: #4a3b26; color: #f0e6d0; border: 1px solid #6a5638; border-radius: 4px; padding: 4px; }
#play-status { font-size: 12px; color: #b8a888; margin-left: 10px; }
#timeline-wrap { position: relative; height: 22px; background: #241c12; border-radius: 4px; overflow: hidden; cursor: pointer; }
#timeline { display: flex; height: 100%; }
.tl-seg { height: 100%; border-right: 1px solid #241c12; opacity: .45; transition: opacity .2s; position: relative; }
.tl-seg.played { opacity: 1; }
.tl-seg.current { opacity: 1; box-shadow: inset 0 0 0 2px #f0e6d0; }
#timeline-cursor { position: absolute; top: 0; width: 3px; height: 100%; background: #fff; pointer-events: none; box-shadow: 0 0 6px #fff; }
#timeline-labels { display: flex; font-size: 10px; color: #b8a888; margin-top: 3px; }
.tl-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: center; }

/* 地图标注 */
.war-label { background: rgba(250,246,236,.88); border: 1px solid #b8a888; border-radius: 3px; padding: 0 4px; font-size: 11px; color: #3a2f22; white-space: nowrap; pointer-events: none; }
.war-label.major { font-size: 12.5px; font-weight: bold; }
.army-flag { font-size: 20px; text-shadow: 0 0 3px #fff, 0 0 6px #fff; pointer-events: none; }
.army-flag .flag-txt { font-size: 11px; font-weight: bold; display: block; text-align: center; margin-top: -4px; text-shadow: 0 0 3px #fff,0 0 4px #fff; }
.battle-burst { font-size: 24px; animation: pulse 1.2s infinite; pointer-events: none; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .75; } }
.seat-label { font-size: 11px; color: #6a5a3a; text-shadow: 0 0 3px #f4efe4,0 0 5px #f4efe4; white-space: nowrap; pointer-events: none; }
.route-flow { stroke-dasharray: 10 8; animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -18; } }

/* 路线方向箭头 */
.dir-arrow { font-size: 13px; pointer-events: none; text-shadow: 0 0 3px #fff; }

@media (max-width: 1100px) {
  #battle-list { flex-basis: 160px; }
  #event-panel { flex-basis: 240px; }
  .subtitle { display: none; }
}
