:root {
  --bg: #0a0a0f;
  --panel: #12121a;
  --accent: #00f0ff;
  --accent2: #ff0055;
  --text: #e0e0e0;
  --muted: #888;
  --border: #222;
  --danger: #ff3333;
  --success: #00ff88;
  --warn: #ffaa00;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 12px;
}
#game {
  width: 100%;
  max-width: 520px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 90vh;
}
header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
header h1 {
  font-size: 16px;
  color: var(--accent);
  letter-spacing: 2px;
}
header .meta {
  font-size: 13px;
  color: var(--muted);
}
#stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.stat {
  background: #0d0d14;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}
.stat label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}
.stat .val {
  font-size: 16px;
  font-weight: bold;
}
.stat .bar {
  height: 4px;
  background: #222;
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}
.stat .bar > div {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s;
}
#phase-indicator {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--accent2);
  border-bottom: 1px solid var(--border);
  letter-spacing: 1px;
  flex-shrink: 0;
}
#main {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  min-height: 0;
}
#log {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.log-item {
  padding: 10px 12px;
  background: #0d0d14;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  line-height: 1.6;
  animation: fadeIn 0.3s ease;
}
.log-item.danger { border-left-color: var(--danger); }
.log-item.success { border-left-color: var(--success); }
.log-item.warn { border-left-color: var(--warn); }
.log-item.muted { border-left-color: var(--muted); color: var(--muted); }
.log-item.info { border-left-color: var(--accent); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
#actions {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  max-height: 200px;
  overflow-y: auto;
}
button {
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: #1a1a24;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  text-align: left;
  font-family: inherit;
}
button:hover {
  border-color: var(--accent);
  background: #1e1e2e;
}
button.primary {
  border-color: var(--accent);
  color: var(--accent);
}
button.danger {
  border-color: var(--danger);
  color: var(--danger);
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.identity-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.identity-card:hover {
  border-color: var(--accent);
  background: #151520;
}
.identity-card h3 {
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 6px;
}
.identity-card .attrs {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.identity-card .desc {
  font-size: 13px;
  line-height: 1.5;
}
.platform-tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 12px;
  background: #1a1a24;
  border: 1px solid var(--border);
  margin-right: 6px;
  margin-top: 4px;
}
.time-bar {
  width: 100%;
  height: 6px;
  background: #222;
  border-radius: 3px;
  margin: 8px 0;
  overflow: hidden;
}
.time-bar > div {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.5s;
}
.ending-screen {
  text-align: center;
  padding: 40px 20px;
}
.ending-screen h2 {
  font-size: 24px;
  margin-bottom: 16px;
}
.ending-screen p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 24px;
}
.ending-screen.good h2 { color: var(--success); }
.ending-screen.bad h2 { color: var(--danger); }
.ending-screen.neutral h2 { color: var(--warn); }

/* ===== 兴趣点系统样式 ===== */
#poi-bar {
  padding: 8px 16px;
  background: #0d0d14;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.poi-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.poi-dist {
  color: var(--accent);
  cursor: pointer;
}
.poi-dist:hover {
  text-decoration: underline;
}
#map-btn {
  padding: 4px 10px;
  font-size: 12px;
  background: #1a1a24;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
}
#map-btn:hover {
  border-color: var(--accent);
}

/* 天气状态栏 */
#weather-bar {
  padding: 6px 16px;
  background: #0d0d14;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.weather-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.weather-sep {
  color: var(--border);
}

/* 地图弹窗 */
#map-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-hidden { display: none !important; }
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
}
.modal-content {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 {
  font-size: 15px;
  color: var(--text);
  margin: 0;
}
.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.modal-close:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}
.map-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  font-size: 13px;
}
.map-node {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.map-node:hover {
  background: rgba(255,255,255,0.05);
}
.map-node.current {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--accent);
}
.map-node.visited {
  opacity: 0.7;
}
.map-node-name {
  flex: 1;
  color: var(--text);
}
.map-node-km {
  color: var(--muted);
  font-size: 11px;
}
.map-connector {
  padding-left: 28px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.map-legend {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.map-detail {
  padding: 10px;
  background: #0d0d14;
  border-radius: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.map-detail-title {
  color: var(--accent);
  font-weight: bold;
  margin-bottom: 4px;
}

/* 城市菜单 */
.city-menu-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}
.city-menu-tab {
  flex: 1;
  padding: 8px;
  font-size: 13px;
  text-align: center;
  background: #0d0d14;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--muted);
}
.city-menu-tab.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,240,255,0.05);
}
.shop-item, .hotel-item, .attraction-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #0d0d14;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
}
.shop-item-info, .hotel-info {
  flex: 1;
}
.shop-item-name, .hotel-name, .attraction-name {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
}
.shop-item-desc, .hotel-desc, .attraction-desc {
  font-size: 11px;
  color: var(--muted);
}
.shop-item-price, .hotel-price {
  font-size: 13px;
  color: var(--warn);
  white-space: nowrap;
}
.attraction-time {
  font-size: 11px;
  color: var(--accent);
  white-space: nowrap;
}
