:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-panel: rgba(30, 41, 59, 0.95);
    --bg-card: #1e293b;
    --bg-card-hover: #253348;
    --border: #334155;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #60a5fa;
    --radius: 8px;
    --radius-sm: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg-primary); color: var(--text-primary); height: 100vh; overflow: hidden; }

/* 导航栏 */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; height: 56px; z-index: 1000;
    background: rgba(15, 23, 42, 0.92); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; padding: 0 16px;
}
.navbar-left, .navbar-right { display: flex; align-items: center; gap: 8px; }
.navbar-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-right: 16px; }
.navbar-title i { color: var(--accent); margin-right: 6px; }

/* 通用按钮 */
.btn {
    padding: 6px 14px; border: none; border-radius: var(--radius-sm); font-size: 13px;
    font-weight: 600; cursor: pointer; transition: all 0.2s; display: inline-flex;
    align-items: center; gap: 5px; white-space: nowrap;
}
.btn-sm { padding: 4px 10px; font-size: 11px; }
.btn-xs { padding: 2px 6px; font-size: 10px; border-radius: 4px; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: #2563eb; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #d97706; }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost.active { background: var(--accent); color: white; border-color: var(--accent); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 左侧面板 */
.left-panel {
    position: fixed; left: 0; top: 56px; bottom: 0; width: 520px;
    background: var(--bg-panel); backdrop-filter: blur(12px);
    border-right: 1px solid var(--border);
    transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 900; overflow-y: auto; overflow-x: hidden;
}
.left-panel.open { transform: translateX(0); }
.left-panel-header {
    position: sticky; top: 0; z-index: 10; padding: 12px 16px;
    background: rgba(30, 41, 59, 0.98); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.left-panel-header h3 { font-size: 15px; font-weight: 600; }

/* 右侧抽屉 */
.right-drawer {
    position: fixed; right: 0; top: 56px; bottom: 0; width: 400px;
    background: var(--bg-panel); backdrop-filter: blur(12px);
    border-left: 1px solid var(--border);
    transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 900; overflow-y: auto;
}
.right-drawer.open { transform: translateX(0); }
.right-drawer-header {
    position: sticky; top: 0; z-index: 10; padding: 12px 16px;
    background: rgba(30, 41, 59, 0.98); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}

/* 遮罩层 */
.overlay {
    position: fixed; top: 56px; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3); z-index: 800;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.overlay.active { opacity: 1; pointer-events: auto; }

/* 地图 */
#map { position: fixed; top: 56px; left: 0; right: 0; bottom: 0; z-index: 1; }
.cesium-viewer { width: 100%; height: 100%; }
.cesium-viewer .cesium-widget-credits { display: none !important; }

/* 路线点标记（绿色+数字） */
.waypoint-marker { background: none !important; border: none !important; }
.waypoint-dot {
    width: 22px; height: 22px; border-radius: 50%;
    background: #10b981; color: #fff; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.5);
    border: 2px solid #fff;
}

/* 跑步者标记 */
.runner-marker { background: none !important; border: none !important; }
.runner-dot {
    width: 14px; height: 14px; border-radius: 50%;
    position: relative; z-index: 2;
}
.runner-pulse {
    position: absolute; top: -4px; left: -4px;
    width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid; opacity: 0;
    animation: runner-pulse-anim 1.5s ease-out infinite;
}
@keyframes runner-pulse-anim {
    0% { transform: scale(0.8); opacity: 0.6; }
    100% { transform: scale(2); opacity: 0; }
}

/* 跑步者姓名标签 */
.runner-tooltip {
    background: rgba(15, 23, 42, 0.85) !important;
    color: #fff !important; font-size: 11px !important; font-weight: 500 !important;
    border: none !important; border-radius: 4px !important;
    padding: 2px 6px !important; box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}
.runner-tooltip::before { border-top-color: rgba(15, 23, 42, 0.85) !important; }

/* 用户卡片 */
.user-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 12px;
    border-left: 3px solid var(--text-muted); cursor: pointer;
    transition: all 0.2s; position: relative;
}
.user-card:hover { background: var(--bg-card-hover); }
.user-card.status-online { border-left-color: var(--success); }
.user-card.status-running { border-left-color: var(--accent); }
.user-card.status-paused { border-left-color: var(--warning); }
.user-card.status-offline { border-left-color: var(--text-muted); }
.user-card.status-error { border-left-color: var(--danger); }
.user-card.selected { outline: 2px solid var(--accent); outline-offset: -2px; }

/* 多选模式 */
.multi-select-tip {
    padding: 8px 16px; font-size: 12px; color: var(--danger);
    background: rgba(244, 67, 54, 0.06); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 6px;
}
.user-card.multi-active { cursor: pointer; }
.user-card.multi-active:active { transform: scale(0.98); }
.user-card.multi-active .user-card-group { opacity: 0.4; pointer-events: none; }
.user-card.multi-active .user-card-group .dropdown-menu { display: none; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.user-card.status-running .status-dot { animation: pulse 2s infinite; }
.user-card.status-paused .status-dot { animation: pulse 3s infinite; }

.user-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.user-card-checkbox { accent-color: var(--accent); width: 14px; height: 14px; cursor: pointer; }
.user-card-name { font-size: 13px; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card-phone { font-size: 10px; color: var(--text-muted); }
.card-refresh-btn { margin-left: auto !important; opacity: 0.5; transition: opacity 0.2s; }
.card-refresh-btn:hover { opacity: 1; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.online { background: var(--success); }
.status-dot.running { background: var(--accent); }
.status-dot.paused { background: var(--warning); }
.status-dot.offline { background: var(--text-muted); }
.status-dot.error { background: var(--danger); }

.user-card-status { font-size: 11px; color: var(--text-secondary); margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.today-ran-tag { font-size: 9px; color: var(--success); background: rgba(16, 185, 129, 0.1); padding: 1px 5px; border-radius: 3px; font-weight: 500; white-space: nowrap; }
.today-ran-tag.valid { color: var(--success); background: rgba(16, 185, 129, 0.15); }
.today-ran-tag.error { color: var(--danger); background: rgba(239, 68, 68, 0.1); }
.today-ran-tag.used-up { color: var(--danger); background: rgba(239, 68, 68, 0.1); }
.user-card-actions { display: flex; gap: 4px; flex-wrap: wrap; }

.progress-bar { width: 100%; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #8b5cf6); border-radius: 2px; transition: width 0.3s; }
.progress-bar-fill.running { background: linear-gradient(90deg, #10b981, #34d399); }
.progress-bar-fill.done { background: linear-gradient(90deg, #10b981, #6ee7b7); }

/* 学期任务进度 */
.task-info { margin-bottom: 6px; }
.run-progress-info { margin-bottom: 6px; padding: 6px 8px; background: rgba(16, 185, 129, 0.08); border-radius: 6px; border: 1px solid rgba(16, 185, 129, 0.2); }
.run-progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.run-progress-label { font-size: 10px; font-weight: 600; color: var(--success); }
.run-progress-percent { font-size: 10px; font-weight: 700; color: var(--success); }
.task-info-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.task-name { font-size: 10px; color: var(--info); font-weight: 500; }
.task-progress-text { font-size: 10px; font-weight: 700; }
.task-progress-text.pending { color: var(--warning); }
.task-progress-text.done { color: var(--success); }
.task-completed-tag { font-size: 10px; color: #fff; background: var(--success); padding: 1px 6px; border-radius: 8px; font-weight: 600; }
.task-progress-bar { width: 100%; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.task-progress-fill { height: 100%; border-radius: 2px; transition: width 0.5s; background: linear-gradient(90deg, var(--warning), #f97316); }
.task-progress-fill.done { background: linear-gradient(90deg, var(--success), #34d399); }
.task-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 8px; margin-top: 4px; font-size: 9px; color: var(--text-secondary); }
.task-detail-grid i { margin-right: 2px; font-size: 8px; color: var(--text-muted); }

/* 卡片网格 */
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 16px; }

/* 分组标签 */
.group-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); padding: 0 16px; overflow-x: auto; }
.group-tab {
    padding: 8px 14px; font-size: 12px; color: var(--text-muted); cursor: pointer;
    border-bottom: 2px solid transparent; white-space: nowrap; transition: all 0.2s;
}
.group-tab:hover { color: var(--text-secondary); }
.group-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* 批量操作栏 */
.batch-bar {
    position: sticky; bottom: 0; padding: 10px 16px;
    background: rgba(15, 23, 42, 0.98); border-top: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 8px;
}
.batch-bar-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.batch-count { font-size: 12px; color: var(--info); display: inline-flex; align-items: center; gap: 5px; }
.batch-count b { font-size: 13px; }
.batch-tools { display: flex; gap: 4px; }
.batch-bar-body { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.batch-op { display: flex; align-items: center; gap: 6px; }

/* 详情Tab */
.detail-tabs { display: flex; border-bottom: 1px solid var(--border); }
.detail-tab {
    flex: 1; padding: 10px; text-align: center; font-size: 13px;
    color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.detail-tab:hover { color: var(--text-secondary); }
.detail-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.detail-section { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.detail-section-title { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.task-rule-item { display:flex; flex-direction:column; gap:2px; padding:6px 8px; background:var(--bg-secondary); border-radius:var(--radius); }
.task-rule-item .label { font-size:10px; }
.task-rule-item .value { font-size:13px; color:var(--text-primary); }

/* 表单 */
.form-group { margin-bottom: 10px; }
.form-group label { display: block; font-size: 11px; color: var(--text-secondary); margin-bottom: 3px; }
.form-input {
    width: 100%; padding: 7px 10px; background: var(--bg-primary); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary); font-size: 13px; outline: none;
    transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--accent); }
select.form-input { cursor: pointer; }
textarea.form-input { resize: vertical; min-height: 80px; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.stat-card { background: var(--bg-primary); border-radius: var(--radius-sm); padding: 8px; text-align: center; }
.stat-card .value { font-size: 18px; font-weight: 700; color: var(--accent); }
.stat-card .label { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.stat-card.highlight { background: rgba(16, 185, 129, 0.1); }
.stat-card.highlight .value { color: var(--success); }
.run-live-section { border: 1px solid rgba(16, 185, 129, 0.3); border-radius: 8px; background: rgba(16, 185, 129, 0.05); }

/* 跑步记录 */
.record-item { background: var(--bg-primary); border-radius: var(--radius-sm); padding: 10px; margin-bottom: 6px; transition: all 0.15s ease; border: 1px solid transparent; }
.record-item:hover { background: var(--bg-secondary); border-color: var(--border); }
.record-item.active { border-color: var(--accent); background: rgba(59,130,246,0.08); }
.record-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.record-date { font-size: 12px; font-weight: 600; }
.record-status { font-size: 10px; padding: 1px 6px; border-radius: 8px; font-weight: 600; }
.record-status.valid { color: var(--success); background: rgba(16, 185, 129, 0.15); }
.record-status.invalid { color: var(--danger); background: rgba(239, 68, 68, 0.15); }
.record-status.done { color: var(--warning); background: rgba(245, 158, 11, 0.15); }
.record-stats { display: flex; justify-content: space-between; color: var(--text-secondary); font-size: 11px; }

/* 模态框 */
.modal-mask {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 2000;
    display: flex; align-items: center; justify-content: center;
}
.modal-box {
    background: var(--bg-secondary); border-radius: 12px; padding: 20px;
    width: 90%; max-width: 480px; max-height: 80vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-header h3 { font-size: 16px; }

/* 队列进度条 */
.queue-progress-bar {
    position: fixed; top: 56px; left: 0; right: 0; z-index: 999;
    background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border); padding: 6px 16px;
    transition: opacity 0.3s;
}
.queue-progress-bar.complete { opacity: 0.8; }
.queue-progress-info { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 11px; }
.queue-progress-label { color: var(--accent); font-weight: 600; }
.queue-progress-detail { color: var(--text-secondary); }
.queue-progress-result { color: var(--success); margin-left: auto; }

/* Toast */
.toast-container { position: fixed; top: 68px; right: 16px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; }
.toast {
    padding: 10px 16px; border-radius: var(--radius); font-size: 13px; font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3); animation: slideIn 0.3s ease;
    max-width: 320px;
}
.toast-success { background: var(--success); color: white; }
.toast-error { background: var(--danger); color: white; }
.toast-info { background: var(--accent); color: white; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* 地图浮层 */
.map-run-overlay {
    position: fixed; top: 68px; left: 50%; transform: translateX(-50%); z-index: 100;
    background: rgba(15, 23, 42, 0.92); backdrop-filter: blur(8px);
    border-radius: 12px; padding: 10px 16px; min-width: 280px; max-width: 360px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.map-run-user { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.map-run-user:last-child { border-bottom: none; }
.carousel-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.3); cursor: pointer; transition: all 0.3s; }
.carousel-dot.active { background: var(--success); transform: scale(1.3); }
.runner-color-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.carousel-transition { animation: carouselFadeIn 0.4s ease; }
@keyframes carouselFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.map-toolbar {
    position: fixed; bottom: 24px; right: 16px; z-index: 100;
    display: flex; flex-direction: column; gap: 6px;
}
.map-btn {
    width: 40px; height: 40px; border-radius: var(--radius); border: none;
    background: var(--bg-secondary); color: var(--text-primary); font-size: 16px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3); transition: all 0.2s;
}
.map-btn:hover { background: var(--border); }
.map-btn.active { background: var(--accent); color: white; }

.map-search {
    position: fixed; top: 68px; left: 16px; z-index: 1001;
    background: var(--bg-panel); border-radius: var(--radius); padding: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3); min-width: 260px;
}
.map-search-input {
    width: 100%; padding: 6px 10px; background: var(--bg-primary); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary); font-size: 13px; outline: none;
}
.map-search-results { margin-top: 6px; max-height: 200px; overflow-y: auto; }
.map-search-item { padding: 6px 8px; cursor: pointer; font-size: 12px; color: var(--text-secondary); border-bottom: 1px solid var(--border); }
.map-search-item:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.map-search-history-header { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; font-size: 10px; color: var(--text-muted); border-bottom: 1px solid var(--border); }

/* 路线绘制面板 */
.route-info-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 12px; }
.route-info-row .label { color: var(--text-muted); }
.route-info-row .value { color: var(--text-primary); font-weight: 500; }

/* 路线列表 */
.route-list-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 10px; border-radius: var(--radius-sm); margin-bottom: 4px;
    background: var(--bg-card); transition: all 0.2s; cursor: pointer;
}
.route-list-item:hover { background: var(--bg-card-hover); }
.route-list-item.active { background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3); }
.route-list-info { display: flex; align-items: center; flex: 1; min-width: 0; }
.route-list-actions { display: flex; gap: 2px; flex-shrink: 0; }

/* 分组管理 */
.group-item {
    background: var(--bg-card); border-radius: var(--radius); padding: 12px; margin-bottom: 8px;
    cursor: pointer; transition: all 0.2s;
}
.group-item:hover { background: var(--bg-card-hover); }
.group-item-header { display: flex; justify-content: space-between; align-items: center; }
.group-item-name { font-size: 14px; font-weight: 600; }
.group-item-count { font-size: 11px; color: var(--text-muted); }
.group-item-config { font-size: 11px; color: var(--text-secondary); margin-top: 6px; }
.group-item-config span { margin-right: 8px; }

/* 分组成员标签 */
.group-members { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.group-member-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; font-size: 10px; border-radius: 10px;
    background: rgba(59, 130, 246, 0.15); color: var(--info);
}
.group-member-tag i { font-size: 8px; cursor: pointer; opacity: 0.5; }
.group-member-tag i:hover { opacity: 1; color: var(--danger); }

/* 用户卡片分组标签 */
.user-card-group { margin-bottom: 4px; position: relative; }
.group-tag {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 1px 8px; font-size: 10px; border-radius: 8px; cursor: pointer;
    transition: all 0.2s;
}
.group-tag.assigned { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.group-tag.none { background: rgba(100, 116, 139, 0.15); color: var(--text-muted); }
.group-tag:hover { background: rgba(59, 130, 246, 0.25); }
.dropdown-item.active { color: var(--accent); font-weight: 600; }

/* 配速快捷按钮 */
.pace-btns { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.pace-btn {
    padding: 2px 8px; font-size: 10px; border-radius: 4px; cursor: pointer;
    background: transparent; color: var(--text-secondary); border: 1px solid var(--border);
    transition: all 0.2s;
}
.pace-btn:hover, .pace-btn.active { background: var(--accent); color: white; border-color: var(--accent); }

/* 开关样式 */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--border); transition: .3s; border-radius: 22px; }
.switch .slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; }
.switch input:checked + .slider { background-color: var(--success); }
.switch input:checked + .slider:before { transform: translateX(18px); }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* 下拉菜单 */
.dropdown-menu {
    position: absolute; right: 0; top: 100%; z-index: 100;
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 4px 0; min-width: 140px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.dropdown-item {
    padding: 7px 12px; font-size: 12px; color: var(--text-secondary);
    cursor: pointer; display: flex; align-items: center; gap: 8px;
    transition: all 0.15s;
}
.dropdown-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: rgba(239,68,68,0.15); }
.dropdown-item i { width: 14px; text-align: center; }

/* 日志列表 */
.log-list { max-height: 60vh; overflow-y: auto; }
.log-item {
    display: flex; align-items: flex-start; gap: 6px; padding: 6px 0;
    border-bottom: 1px solid rgba(51, 65, 85, 0.4); font-size: 11px;
}
.log-item:last-child { border-bottom: none; }
.log-time { color: var(--text-muted); font-size: 10px; white-space: nowrap; min-width: 50px; padding-top: 1px; }
.log-badge {
    font-size: 9px; padding: 1px 5px; border-radius: 3px; white-space: nowrap;
    font-weight: 600; text-transform: uppercase; min-width: 30px; text-align: center;
}
.log-info { background: rgba(96, 165, 250, 0.2); color: var(--info); }
.log-success { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.log-warning { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.log-error { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.log-msg { color: var(--text-secondary); line-height: 1.4; word-break: break-all; flex: 1; }

/* GTA5风格地图切换过渡动画 */
.gta-transition-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2000; pointer-events: none;
    transition: opacity 0.3s ease;
}
.gta-transition-overlay.ascend {
    animation: gta-ascend 0.81s ease-out forwards;
}
.gta-transition-overlay.panoramic {
    animation: gta-panoramic 0.56s ease-in-out forwards;
}
.gta-transition-overlay.dive {
    animation: gta-dive 1.06s ease-in forwards;
}
/* 暗角效果 - 升空时加深边缘 */
.gta-vignette {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.6) 100%);
    opacity: 0; transition: opacity 0.3s;
}
.ascend .gta-vignette { opacity: 1; animation: gta-vignette-in 0.75s ease-out forwards; }
.panoramic .gta-vignette { opacity: 1; }
.dive .gta-vignette { animation: gta-vignette-out 1.0s ease-in forwards; }
/* 扫描线效果 */
.gta-scanlines {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px
    );
    opacity: 0; pointer-events: none;
}
.ascend .gta-scanlines, .panoramic .gta-scanlines { opacity: 1; }
.dive .gta-scanlines { opacity: 0; }
/* 目标脉冲标记 */
.gta-target-pulse {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 24px; height: 24px;
}
.gta-target-pulse::before, .gta-target-pulse::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}
.gta-target-pulse::before {
    width: 12px; height: 12px; background: #3b82f6;
    box-shadow: 0 0 12px #3b82f6, 0 0 24px rgba(59,130,246,0.4);
    animation: gta-pulse-core 1.25s ease-in-out infinite;
}
.gta-target-pulse::after {
    width: 40px; height: 40px; border: 2px solid #3b82f6;
    animation: gta-pulse-ring 1.5s ease-out infinite;
}
/* 地点名称标签 */
.gta-location-label {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, 30px);
    color: #fff; font-size: 14px; font-weight: 700;
    text-shadow: 0 0 10px rgba(59,130,246,0.8), 0 2px 4px rgba(0,0,0,0.8);
    letter-spacing: 2px; text-transform: uppercase;
    white-space: nowrap; pointer-events: none;
    animation: gta-label-in 0.3s ease-out forwards;
}
.gta-location-label i { color: #3b82f6; margin-right: 6px; }
/* 动画关键帧 */
@keyframes gta-ascend {
    0% { opacity: 0; }
    20% { opacity: 1; }
    100% { opacity: 1; }
}
@keyframes gta-panoramic {
    0% { opacity: 1; }
    50% { opacity: 1; }
    100% { opacity: 1; }
}
@keyframes gta-dive {
    0% { opacity: 1; }
    70% { opacity: 0.6; }
    100% { opacity: 0; }
}
@keyframes gta-vignette-in {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes gta-vignette-out {
    0% { opacity: 1; }
    100% { opacity: 0; }
}
@keyframes gta-pulse-core {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.7; }
}
@keyframes gta-pulse-ring {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}
@keyframes gta-label-in {
    0% { opacity: 0; transform: translate(-50%, 40px); }
    100% { opacity: 1; transform: translate(-50%, 30px); }
}
/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    .gta-transition-overlay, .gta-vignette, .gta-scanlines,
    .gta-target-pulse::before, .gta-target-pulse::after, .gta-location-label {
        animation: none !important;
        transition: none !important;
    }
}

/* 补录弹窗 */
.makeup-info-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    background: var(--bg-primary); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 8px;
}
.makeup-info-item { display: flex; flex-direction: column; gap: 2px; }
.makeup-info-item .label { font-size: 10px; color: var(--text-muted); }
.makeup-info-item .value { font-size: 13px; font-weight: 600; }

.makeup-mode-select {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 12px 0;
}
.makeup-mode-option {
    background: var(--bg-primary); border: 2px solid var(--border); border-radius: var(--radius-sm);
    padding: 10px 6px; text-align: center; cursor: pointer; transition: all 0.2s;
}
.makeup-mode-option:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.makeup-mode-option.active { border-color: var(--accent); background: rgba(59, 130, 246, 0.1); }
.makeup-mode-option .mode-icon { font-size: 18px; margin-bottom: 4px; }
.makeup-mode-option .mode-title { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.makeup-mode-option .mode-desc { font-size: 10px; color: var(--text-muted); }

.makeup-batch-config {
    background: var(--bg-primary); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px;
}
.makeup-batch-config .form-group { display: flex; align-items: center; gap: 8px; }
.makeup-batch-config .form-group label { min-width: 60px; }

.makeup-warning {
    background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm); padding: 8px 12px;
    font-size: 11px; color: var(--warning); line-height: 1.5;
}
.makeup-warning i { margin-right: 4px; }

.makeup-progress-section { padding: 8px 0; }
.makeup-stats-row {
    display: flex; gap: 16px; font-size: 12px; font-weight: 600;
}

.makeup-result-section { padding: 12px 0; text-align: center; }

.makeup-preview-item:hover { background: var(--bg-card-hover); }
.makeup-preview-item.selected { background: rgba(59, 130, 246, 0.08); }

.makeup-log-box::-webkit-scrollbar { width: 4px; }
.makeup-log-box::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
