* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    background: #fafafa;
}

header {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 8px 14px;
    background: #1565c0;
    color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
    z-index: 1000;
}

header h1 {
    font-size: 18px;
    margin: 0;
    white-space: nowrap;
}

.controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
}

select, input[type="datetime-local"] {
    border: none;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 13px;
    max-width: 300px;
}

button {
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    background: rgba(255, 255, 255, .22);
    color: #fff;
    font-size: 13px;
}

button:hover { background: rgba(255, 255, 255, .38); }
button.active { background: #ff9800; }

label { user-select: none; display: inline-flex; align-items: center; gap: 4px; }

#map { flex: 1; min-height: 0; }

/* 平滑参数控件（在 header 内） */
.smooth {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.smooth select { font-size: 12px; }

/* 回放控制条 */
#playback {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 6px 14px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
    color: #37474f;
    z-index: 1000;
}

#playback button {
    background: #1565c0;
    color: #fff;
    min-width: 40px;
    font-size: 15px;
    line-height: 1;
    padding: 6px 10px;
}

#playback button:hover { background: #0d47a1; }
#playback button:disabled { background: #cfd8dc; cursor: default; }
#playback select { border: 1px solid #cfd8dc; }
#playback input[type="range"] { flex: 1; min-width: 160px; accent-color: #f4511e; }
#playback label { color: #37474f; display: inline-flex; align-items: center; gap: 4px; }
#pbTime {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: #546e7a;
}

#authBar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 14px;
    background: #fff8e1;
    border-bottom: 1px solid #ffe082;
    font-size: 13px;
    color: #5d4037;
}

#authBar input {
    border: 1px solid #d7ccc8;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 13px;
    min-width: 220px;
}

#authBar button {
    background: #1565c0;
    color: #fff;
}

#authBar button:hover { background: #0d47a1; }

#authMsg { color: #c62828; }

#tileHint {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 14px;
    background: #fdecea;
    border-bottom: 1px solid #f5c6cb;
    font-size: 13px;
    color: #8b2b23;
}

#tileHint button {
    background: #c62828;
    color: #fff;
}

#tileHint button:hover { background: #8e1f1a; }

#tileHint #tileHintClose { background: rgba(0, 0, 0, .18); }
#tileHint #tileHintClose:hover { background: rgba(0, 0, 0, .3); }

#stats {
    padding: 6px 14px;
    background: #eceff1;
    font-size: 13px;
    color: #37474f;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    z-index: 1000;
}

.hidden { display: none; }

/* 起/终点圆形标记 */
.ep {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 4px rgba(0, 0, 0, .45);
}

.popup { font-size: 12px; line-height: 1.6; }
.popup b { margin-right: 6px; color: #555; }
