/* ============================================================
 * 单路行驶数据仪表盘（2026-10-15；views/road_track.php）
 * 2026-10-15 晚改版：白底黑字（与站点亮色风格一致）。
 * 2026-10-22 老麦要求两轮改版，当前布局：左列一列 / 右列三行——
 *   左列 = 排名榜（跨 3 张卡片高度，行格式参考 /index.php/rank，带霸榜天数）；
 *   右列 = 视频（16:9 小窗，窗上方排名依据）/ 卫星影像 / 速度海拔曲线。
 * 顶栏：标题（粗体蓝字）在前、LIVE 红标在后（2026-10-22 三改：LIVE 由标题前移到标题后；标题「量产车型」系列更名「全国车辆…均速排行榜」）。
 * 注意：.rank-vplayer/.rank-ppbtn/.rank-pause-frame 样式必须自带——
 *      本页不引 rank-common.css，缺了它们 15s 自动暂停后播放键会跑位、
 *      暂停静图会按原始尺寸撑破布局（表现为"黑屏"/无法续播）。
 * ============================================================ */
.rt-wrap {
    max-width: 100%;                   /* 2026-10-22 四改：套 .content-center 后填满左导航右侧区域（原 1120px 居中，现与 result() 页宽一致） */
    margin: 10px 0 24px;               /* 取消横向 auto（已占满 content-center） */
    background: #f6f8fb;
    border: 1px solid #e5e9f0;
    border-radius: 14px;
    padding: 14px 16px 16px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, .08);
    /* 2026-10-16 与 result() 页一致：宝马字体 bmwTypeNext（中文回退 Noto Sans SC/微软雅黑） */
    font-family: 'bmwTypeNext', 'Noto Sans SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}

/* ---- 顶栏 ---- */
.rt-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.rt-tb-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rt-live {
    display: inline-flex; align-items: center; gap: 5px;
    background: #e60012; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 1px;
    border-radius: 5px; padding: 3px 8px;
}
.rt-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: rtBlink 1.4s infinite; }
@keyframes rtBlink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
/* 2026-10-22 二改：删去路名（原 .rt-pagename），标题改为「量产车型{榜单名}榜」——粗体蓝字，字号 12.5→25px（放大一倍） */
.rt-roadtitle { font-size: 25px; font-weight: 800; color: #1d4ed8; letter-spacing: .5px; }
.rt-tb-right { font-size: 12px; color: #334155; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 12px; max-width: 100%; box-shadow: 0 1px 3px rgba(15,23,42,.05); }

/* ---- 2列×3行卡片网格（2026-10-22 二改：排名榜换到左列，视频/卫星/曲线在右列）---- */
.rt-grid {
    display: grid;
    /* 2026-10-22 三改：右列（视频/卫星/曲线）窗口宽、高压缩，同步压矮左列排名榜、收紧行间区。
       宽：右列 1.08fr→0.918fr（-15%）；高：卫星/曲线卡改固定 200px（原 1fr 实渲染 335px，
       minmax 压不住会回弹），排名榜总高 1190→~850、行高 ~107→~82px，消除稀疏感。 */
    grid-template-columns: 1fr 0.918fr;     /* 右列 1.08fr × 0.85 */
    grid-template-rows: auto 320px 200px;   /* 2026-10-22 五改：卫星行 +90px（230→320），曲线行保持 200；视频行为 auto（排名依据+固定 395px 高小窗） */
    grid-template-areas:
        "rank  video"
        "rank  map"
        "rank  chart";
    gap: 12px;
}
.rt-area-video { grid-area: video; }
.rt-area-rank  { grid-area: rank; }
.rt-area-map   { grid-area: map; }
.rt-area-chart { grid-area: chart; }

.rt-card {
    background: #ffffff;
    border: 1px solid #e5e9f0;
    border-radius: 10px;
    display: flex; flex-direction: column;
    overflow: hidden;
    min-width: 0;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .06);
}
.rt-card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid #eef1f6;
    background: #fafbfc;
    flex: none;
}
.rt-card-title { font-size: 14px; font-weight: 700; color: #0f172a; letter-spacing: .5px; }
.rt-card-title::before { content: ""; display: inline-block; width: 3px; height: 13px; background: #f59e0b; border-radius: 2px; margin-right: 7px; vertical-align: -1px; }
.rt-card-note { font-size: 12px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- 右上：视频（2026-10-22：窗口缩为 16:9 小窗，不再撑满整卡）---- */
/* 2026-10-22 五改：视频窗高度由 aspect-ratio 改为固定 px——实测老麦浏览器内核不支持 aspect-ratio
   （Chrome 88+ 才支持），视频一直按片源原始比例 704:576 渲染（宽 594 时高约 486px），前两轮 -15% 均未生效。
   桌面端按 1500 视口自然高 486 - 90 = ~395px 定高；视频 object-fit:cover 自动裁切，不变形。
   aspect-ratio 保留但对已定高元素无副作用（现代浏览器 height 优先）。 */
.rt-video-box { position: relative; flex: none; width: 100%; height: 395px; aspect-ratio: 16 / 7.65; background: #000; }
.rank-v-slot { position: relative; line-height: 0; width: 100%; height: 100%; }
.rank-vplayer { position: relative; line-height: 0; width: 100%; height: 100%; }
.rank-vplayer video { width: 100%; height: 100%; display: block; background: #000; object-fit: cover; }
/* 15s 自动暂停后的续播键：绝对居中、置于 HUD 之上，保证可见可点 */
.rank-ppbtn {
    position: absolute; left: 50%; top: 50%; z-index: 20;
    transform: translate(-50%, -50%);
    width: 56px; height: 56px; padding: 0; border: none; border-radius: 50%;
    cursor: pointer; text-align: center;
    background: rgba(15, 23, 42, .55); color: #fff;
    font-size: 20px; line-height: 54px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .35);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.rank-ppbtn:hover { background: rgba(15, 23, 42, .78); transform: translate(-50%, -50%) scale(1.07); }
/* 暂停静图：全覆盖，避免暂停后黑屏/破版 */
.rank-pause-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; display: none; }
.rank-v-slot .rank-v-loading {
    position: absolute; inset: 0; z-index: 5;
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; font-size: 12.5px; background: #0b1118;
}
.rank-v-slot .rank-empty {
    position: absolute; inset: 0; z-index: 6;
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; font-size: 12.5px; background: #0b1118;
}
/* 视频 HUD 叠层（白底黑字，压视频画面上） */
.rt-hud { position: absolute; inset: 0; pointer-events: none; z-index: 8; }
.rt-hud-tl { position: absolute; top: 10px; left: 12px; display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.92); border: 1px solid rgba(15,23,42,.08); border-radius: 8px; padding: 5px 10px;
    box-shadow: 0 2px 10px rgba(15,23,42,.18); }
.rt-hud-live { width: 7px; height: 7px; border-radius: 50%; background: #e60012; animation: rtBlink 1.4s infinite; }
.rt-hud-tl b { font-size: 12.5px; color: #0f172a; }
.rt-hud-tl span { font-size: 11px; color: #1d4ed8; font-variant-numeric: tabular-nums; }
.rt-hud-tr { position: absolute; top: 10px; right: 12px; text-align: right;
    background: rgba(255,255,255,.92); border: 1px solid rgba(15,23,42,.08); border-radius: 8px; padding: 4px 12px;
    box-shadow: 0 2px 10px rgba(15,23,42,.18); }
.rt-hud-tr b { font-size: 26px; font-weight: 800; color: #0f172a; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rt-hud-tr i { font-style: normal; font-size: 10.5px; color: #64748b; margin-left: 3px; }
.rt-hud-bl { position: absolute; bottom: 10px; left: 12px; max-width: calc(100% - 24px);
    background: rgba(255,255,255,.92); border: 1px solid rgba(15,23,42,.08); border-radius: 8px; padding: 4px 10px;
    font-size: 11.5px; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    box-shadow: 0 2px 10px rgba(15,23,42,.18); }

/* ---- 视频上方：排名依据（2026-10-22 二改：移到视频窗上方；同 /index.php/rank 榜单头部：文字说明 + 配图）---- */
.rt-basis { flex: 1; min-height: 0; overflow: auto; padding: 9px 12px 11px; display: flex; flex-direction: column; gap: 7px; }
.rt-basis-title { flex: none; font-size: 12px; font-weight: 800; color: #b45309; letter-spacing: 2px; }
.rt-basis-title::before { content: ""; display: inline-block; width: 3px; height: 12px; background: #f59e0b; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.rt-basis-desc { font-size: 12.5px; line-height: 1.75; color: #475569; }
.rt-basis-desc-empty { color: #94a3b8; }
.rt-basis-img { flex: none; }
.rt-basis-img img { display: block; width: 100%; max-height: 150px; object-fit: contain; border-radius: 8px; background: #f8fafc; border: 1px solid #eef1f6; }

/* ---- 左列：排名榜（2026-10-22 二改：换到左列，跨 3 张卡片高度；行格式参考 /index.php/rank：
       名次色 + 车型图标 + 品牌·级别 + 霸榜天数徽章 + 成绩 + 查看；TOP10 全量展示不滚动） ---- */
.rt-rank { flex: 1; min-height: 0; overflow: hidden; padding: 6px 10px; display: flex; flex-direction: column; }
.rt-rank-empty { padding: 40px 0; text-align: center; color: #94a3b8; font-size: 12.5px; }
.rt-rank-row { flex: 1; min-height: 0; display: flex; align-items: center; gap: 12px; padding: 4px 8px; border-bottom: 1px solid #f0f0f2; }
.rt-rank-row.is-top { background: #fffbeb; }
/* 2026-10-23：TOP10（及同格式的慢速TOP3）字体统一放大 20% */
.rt-rank-pos { flex: none; width: 30px; text-align: center; font-size: 20px; font-weight: 800; color: #b0b0b5; font-variant-numeric: tabular-nums; }
.rt-rank-pos.top1 { color: #ff3b30; }
.rt-rank-pos.top2 { color: #ff9500; }
.rt-rank-pos.top3 { color: #ffcc00; }
.rt-rank-icon { flex: none; width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: #f0f0f2; border: 1px solid #eef1f6; }
.rt-rank-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rt-rank-name { display: block; font-size: 17px; font-weight: 600; color: #1c1c1e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.rt-rank-name:hover { color: #0a84ff; }
.rt-rank-sub { font-size: 14px; color: #8e8e93; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-rank-ba { align-self: flex-start; padding: 1px 9px; font-size: 11px; font-weight: 700; line-height: 1.5; color: #fff;
    background: linear-gradient(135deg, #ff9f0a, #ff6a00); border-radius: 980px; box-shadow: 0 2px 6px rgba(255,106,0,.32); white-space: nowrap; }
.rt-rank-score { flex: none; font-size: 19px; font-weight: 800; color: #0a84ff; font-variant-numeric: tabular-nums; }
.rt-rank-score i { font-style: normal; font-size: 13px; font-weight: 500; color: #6aa9dd; margin-left: 3px; }
.rt-rank-get { flex: none; text-decoration: none; background: #0a84ff; color: #fff; font-size: 13px; font-weight: 600;
    padding: 5px 13px; border-radius: 980px; transition: background .15s; }
.rt-rank-get:hover { background: #007aff; }

/* ---- 2026-10-23：慢速TOP3 区块标题（行本身复用 TOP10 行格式，无额外样式；去掉前置竖线）---- */
.rt-rank-b3head { flex: none; padding: 8px 8px 4px; font-size: 13px; font-weight: 800; color: #475569;
    letter-spacing: 1px; border-top: 1px dashed #e2e8f0; margin-top: 2px; }

/* ---- 右中：卫星影像 ---- */
.rt-map-box { position: relative; flex: 1; min-height: 0; }
.rt-map { width: 100%; height: 100%; background: #e8eef4; }
/* 2026-10-22 末：隐藏卫星影像左下角高德地图 logo / 版权文字（高德 2.0 无官方关闭项，用 CSS 隐藏；作用域限定本窗，不动其它地图页） */
.rt-map .amap-logo,
.rt-map .amap-copyright { display: none !important; }
.rt-map-chip { position: absolute; top: 10px; left: 10px; z-index: 10; max-width: calc(100% - 20px);
    background: rgba(255,255,255,.92); border: 1px solid rgba(15,23,42,.08); border-radius: 8px; padding: 5px 11px;
    font-size: 12px; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    box-shadow: 0 2px 10px rgba(15,23,42,.15); }
.rt-map-nofix { position: absolute; inset: 0; z-index: 9; display: flex; align-items: center; justify-content: center;
    background: rgba(246,248,251,.88); color: #64748b; font-size: 12.5px; }
.rt-map-nofix[hidden] { display: none; }
/* 红点（Marker content） */
.rt-veh { position: relative; width: 34px; height: 34px; }
.rt-veh svg { display: block; filter: drop-shadow(0 3px 4px rgba(15,23,42,.35)); }
.rt-veh-ring { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px;
    border: 2.5px solid currentColor; border-radius: 50%; opacity: 0; pointer-events: none;
    animation: rtRing 1.5s ease-out infinite; }
@keyframes rtRing { 0% { transform: scale(.7); opacity:.95; } 70% { opacity:.3; } 100% { transform: scale(1.7); opacity:0; } }

/* ---- 右下：曲线 ---- */
.rt-chart-box { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rt-chart-box canvas { flex: 1; width: 100%; min-height: 0; }
.rt-chart-legend { flex: none; display: flex; gap: 18px; padding: 6px 12px 8px; font-size: 11.5px; color: #64748b; }
.rt-chart-legend b { font-size: 13px; font-variant-numeric: tabular-nums; }
.rt-chart-legend .lg-sp b { color: #dc2626; }
.rt-chart-legend .lg-alt b { color: #d97706; }

/* ---- 移动端：单列 ---- */
@media (max-width: 980px) {
    .rt-wrap { margin: 8px 10px 16px; padding: 10px 10px 12px; }
    .rt-grid { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "video" "rank" "map" "chart"; }
    .rt-area-video, .rt-area-rank, .rt-area-map, .rt-area-chart { min-height: 360px; }
    .rt-area-rank { min-height: 620px; }   /* TOP10 + 霸榜徽章 + 查看按钮，一行不滚动 */
    /* 2026-10-22 五改：窄屏下视频窗按片源自然高（约 593px @784 视口）-90px 定高；卫星影像卡 +90px（360→450） */
    .rt-video-box { height: 505px; }
    .rt-area-map { min-height: 450px; }
    .rt-roadtitle { font-size: 20px; }     /* 顶栏标题移动端略收，避免换行 */
    /* 2026-10-22 四改：移动端不再保留 200px 侧栏（否则内容被压窄）——左导航整块落地到仪表盘上方、全宽堆叠 */
    .m-content.page-layout { flex-direction: column; gap: 0; }
    .content-left { width: 100%; flex: none; margin-bottom: 12px; }
    .content-left .site-nav { position: static; }
}
