/* 沈阳地铁动态运行图 - 学生风格样式
   设计原则: 简单、无渐变、无阴影、无衬线字体、配色朴素 */

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f5f5f5; color: #333; font-size: 14px; }
a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }

#app { display: flex; flex-direction: column; height: 100vh; min-height: 600px; }

/* 顶部标题栏 */
#titlebar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px; background: #fff; border-bottom: 1px solid #ddd;
  flex-shrink: 0;
}
.title-left { display: flex; align-items: center; gap: 8px; }
.title-text { font-size: 16px; font-weight: bold; }
.icon-emoji { font-size: 18px; }
#btn-refresh-top {
  background: none; border: 1px solid #ccc; border-radius: 3px;
  padding: 2px 8px; cursor: pointer; font-size: 14px;
}
#btn-refresh-top:hover { background: #f0f0f0; }

/* 蓝色二级状态栏 */
#statusbar {
  background: #1e3a6f; color: #fff; padding: 6px 16px;
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0;
}
.status-title { font-size: 14px; font-weight: bold; }
.status-meta { display: flex; gap: 24px; font-size: 13px; }
.status-meta strong { color: #ffcc00; font-size: 15px; }

/* 主区域: 侧栏 + 地图 */
#main-area { flex: 1; display: flex; overflow: hidden; min-height: 0; }

/* 侧边栏 15 图标 */
#sidebar {
  width: 48px; background: #2c3e50; display: flex; flex-direction: column;
  padding: 4px 0; gap: 2px; flex-shrink: 0;
}
#sidebar button {
  background: none; border: none; color: #ecf0f1; padding: 8px 0;
  font-size: 16px; cursor: pointer; transition: background 0.15s;
  font-family: inherit;
}
#sidebar button:hover { background: #34495e; }
#sidebar button.active { background: #1e3a6f; color: #ffcc00; }
#sidebar.collapsed { width: 0; overflow: hidden; padding: 0; }

/* 地图容器 */
#map-container {
  flex: 1; position: relative; overflow: hidden;
  background: #fff; border: 1px solid #ddd;
}
#map-bg {
  position: absolute; inset: 0;
  background: url('shenyang_map.jpg') center/contain no-repeat;
  opacity: 0.35;  /* 底图作为参考,半透明 */
  pointer-events: none;
}
#map-svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  cursor: grab;
}
#map-svg.dragging { cursor: grabbing; }

/* SVG 元素样式 */
.station-circle { fill: #fff; stroke-width: 2; cursor: pointer; }
.station-circle:hover { fill: #ffcc00; }
.station-name { font-size: 18px; fill: #333; pointer-events: none; user-select: none; }
.train-circle { stroke: #000; stroke-width: 1; cursor: pointer; }
.train-circle:hover { stroke: #ffcc00; stroke-width: 2; }
.train-label { font-size: 16px; fill: #fff; text-anchor: middle; pointer-events: none; user-select: none; font-weight: bold; }

/* 信息卡片 */
#info-card {
  position: absolute; top: 12px; right: 12px;
  background: #fff; border: 1px solid #1e3a6f; border-radius: 4px;
  padding: 12px 16px; min-width: 200px; max-width: 320px;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.15); z-index: 5;
}
#info-card h3 { color: #1e3a6f; margin-bottom: 8px; border-bottom: 1px solid #eee; padding-bottom: 4px; }
#info-card .row { margin: 4px 0; font-size: 13px; }
#info-card .label { color: #666; }
#info-card .value { color: #333; font-weight: bold; }
#info-card .close-btn { position: absolute; top: 4px; right: 8px; cursor: pointer; color: #999; }

/* 设置面板 */
#settings-panel {
  position: absolute; top: 12px; left: 60px;
  background: #fff; border: 1px solid #1e3a6f; border-radius: 4px;
  padding: 12px 16px; z-index: 5;
}
#settings-panel h3 { color: #1e3a6f; margin-bottom: 8px; }
#settings-panel label { display: block; margin: 6px 0; font-size: 13px; }
#speed-slider { width: 120px; }

/* 底部控制栏 */
#bottom-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px; background: #fff; border-top: 1px solid #ddd;
  flex-shrink: 0;
}
.bottom-cell { display: flex; align-items: center; gap: 4px; color: #666; }
.cell-icon { font-size: 14px; }
.cell-value { font-size: 13px; }
.bottom-toggle { display: flex; align-items: center; gap: 4px; }
.bottom-toggle button {
  background: none; border: 1px solid #ccc; padding: 4px 12px;
  cursor: pointer; font-size: 13px; border-radius: 3px;
}
.bottom-toggle button.active { background: #1e3a6f; color: #fff; border-color: #1e3a6f; }
.toggle-sep { color: #ccc; }

/* 页脚 */
#footer {
  background: #eee; color: #666; font-size: 12px;
  padding: 6px 16px; display: flex; flex-wrap: wrap;
  gap: 16px; justify-content: space-between; align-items: center;
  flex-shrink: 0;
}
#footer strong { color: #1e3a6f; }

/* 响应式 */
@media (max-width: 768px) {
  #sidebar { width: 40px; }
  #sidebar button { font-size: 14px; padding: 6px 0; }
  .status-title { display: none; }
  #footer { font-size: 11px; flex-direction: column; gap: 4px; }
}
