/* ============================================================
   在线音频编辑器 audio-editor · zhandu.cn
   波形编辑器 UI；适配 PC / 手机 / 平板
   ============================================================ */

.ae-card { padding: 20px 18px 16px; }

/* ---------- 新手引导条 ---------- */
.ae-guide {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
}
.ae-step {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #47536b;
    background: #f6f8fc;
    border: 1px solid #e6ebf3;
    border-radius: 999px;
    padding: 6px 13px 6px 8px;
    line-height: 1.3;
}
.ae-step b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px;
    font-size: 12px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 50%;
    flex-shrink: 0;
}
.ae-step.on { border-color: #b9cffb; background: #eef4ff; color: #1d2940; font-weight: 600; }

/* ---------- 顶栏 ---------- */
.ae-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eceff4;
}
.ae-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13.5px;
    font-weight: 600;
    color: #33415c;
    background: #f1f4f9;
    border: 1px solid #e2e8f1;
    border-radius: 9px;
    padding: 7px 13px;
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
    user-select: none;
}
/* 线条图标（与全站 svg-icon 体系统一） */
.ae-btn .svg-icon, .ae-fxbtn .svg-icon, .ae-playbtn .svg-icon, .ae-step .svg-icon { flex-shrink: 0; }
.ae-btn svg, .ae-fxbtn svg, .ae-playbtn svg { width: 15px; height: 15px; stroke-width: 2.2; }
.ae-fxbtn .svg-icon { margin-bottom: 1px; }
.ae-fxbtn svg { width: 17px; height: 17px; }
.ae-btn:hover { color: #1d4ed8; border-color: #b9cffb; background: #eef4ff; }
.ae-btn:active { transform: scale(.96); }
.ae-btn.danger:hover { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
.ae-btn.primary {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .25);
}
.ae-btn.primary:hover { box-shadow: 0 6px 16px rgba(37, 99, 235, .35); color: #fff; }
.ae-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.ae-btn.primary:disabled { box-shadow: none; }
.ae-btn.rec { color: #b91c1c; }
.ae-btn.rec:hover { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.ae-btn.rec.on { color: #fff; background: #dc2626; border-color: #dc2626; animation: ae-pulse 1.2s infinite; }
@keyframes ae-pulse { 50% { box-shadow: 0 0 0 6px rgba(220,38,38,.18); } }
.ae-label { font-size: 13px; color: #5b6b85; }
.ae-filelabel { font-size: 13px; color: #1d2940; font-weight: 700; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 波形区 ---------- */
/* 定高必须带 !important：对抗全局移动样式的 height:auto!important（历史误伤源） */
.ae-wave-wrap { position: relative; }
.ae-wave {
    display: block;
    width: 100%;
    height: 200px !important;
    background: #fafbfd;
    border: 1px solid #e2e8f1;
    border-radius: 10px;
    cursor: text;
    touch-action: none;
}
.ae-wave + .ae-wave { margin-top: 8px; }
.ae-wave.empty { display: none; }
.ae-minimap {
    display: block;
    width: 100%;
    height: 44px !important;
    margin-top: 8px;
    background: #f4f6fa;
    border: 1px solid #e6ebf3;
    border-radius: 8px;
    cursor: pointer;
    touch-action: none;
}
.ae-minimap.empty { display: none; }

/* 空状态 */
.ae-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 260px;
    border: 2px dashed #c9d6ea;
    border-radius: 12px;
    background: #fafcff;
    text-align: center;
    padding: 24px 16px;
    transition: all .2s;
}
.ae-empty.drag { border-color: #2563eb; background: #eef4ff; }
.ae-empty .big { font-size: 38px; line-height: 1; }
.ae-empty p { margin: 0; font-size: 14.5px; color: #33415c; font-weight: 600; }
.ae-empty small { color: #6b7a94; font-size: 13px; }
.ae-empty .ae-btn { font-size: 14px; padding: 9px 18px; }
.ae-empty-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- 播放条 ---------- */
.ae-transport {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: #f6f8fc;
    border: 1px solid #e6ebf3;
    border-radius: 10px;
}
.ae-playbtn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border: none;
    border-radius: 10px;
    padding: 9px 20px;
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
}
.ae-playbtn:hover { box-shadow: 0 5px 14px rgba(37, 99, 235, .35); }
.ae-playbtn:active { transform: scale(.96); }
.ae-time { font-variant-numeric: tabular-nums; font-size: 14.5px; font-weight: 700; color: #1d2940; }
.ae-time small { color: #6b7a94; font-weight: 400; }
.ae-selinfo {
    font-size: 12.5px;
    color: #5b6b85;
    background: #fff;
    border: 1px solid #e2e8f1;
    border-radius: 8px;
    padding: 4px 10px;
    font-variant-numeric: tabular-nums;
}
.ae-selinfo b { color: #1d4ed8; }
.ae-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #47536b; cursor: pointer; white-space: nowrap; }

/* ---------- 编辑条 ---------- */
.ae-editrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}
.ae-sep { width: 1px; height: 22px; background: #e2e8f1; margin: 0 4px; }

/* ---------- 效果面板 ---------- */
.ae-fx {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eceff4;
}
.ae-fxbtn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    text-align: left;
    font-size: 13.5px;
    font-weight: 700;
    color: #1d2940;
    background: #fff;
    border: 1px solid #e2e8f1;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all .18s;
}
.ae-fxbtn small { font-size: 11.5px; font-weight: 400; color: #6b7a94; line-height: 1.35; }
.ae-fxbtn:hover { border-color: #b9cffb; background: #f3f8ff; color: #1d4ed8; }
.ae-fxbtn:active { transform: scale(.97); }
.ae-fxbtn:disabled { opacity: .4; cursor: not-allowed; }
.ae-fxbtn:disabled small { color: #9aa7bd; }

/* ---------- 导出条 ---------- */
.ae-export {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 12px;
    background: linear-gradient(135deg, #f4f8ff, #f8f5ff);
    border: 1px solid #e2e8f1;
    border-radius: 10px;
}
.ae-note { font-size: 12.5px; color: #6b7a94; }

/* ---------- 提示条 / Toast ---------- */
.ae-hint {
    margin-top: 10px;
    font-size: 12.5px;
    color: #5b6b85;
    background: #f6f8fc;
    border: 1px solid #e6ebf3;
    border-radius: 8px;
    padding: 7px 12px;
    min-height: 32px;
    line-height: 1.5;
}
.ae-hint b { color: #1d4ed8; }
.ae-toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%) translateY(20px);
    max-width: min(92vw, 460px);
    background: rgba(29, 41, 64, .95);
    color: #fff;
    font-size: 13.5px;
    line-height: 1.5;
    padding: 10px 18px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .35);
    opacity: 0;
    pointer-events: none;
    transition: all .25s;
    z-index: 999;
}
.ae-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.ae-toast.err { background: rgba(153, 27, 27, .96); }

/* ---------- 变速对话框 ---------- */
.ae-dlg-back {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 998;
    padding: 16px;
}
.ae-dlg-back.on { display: flex; }
.ae-dlg {
    width: min(92vw, 380px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .3);
    padding: 20px;
}
.ae-dlg h3 { margin: 0 0 6px; font-size: 16px; color: #1d2940; }
.ae-dlg p { margin: 0 0 14px; font-size: 13px; color: #5b6b85; line-height: 1.6; }
.ae-dlg .ae-rangerow { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ae-dlg .ae-rangerow b { font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }
.ae-dlg-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ae-dlg input[type="range"] { flex: 1; accent-color: #2563eb; }
.ae-dlg-foot { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .ae-wave { height: 150px !important; }
    .ae-fx { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .ae-btn, .ae-playbtn { padding: 10px 14px; min-height: 40px; }
    .ae-filelabel { max-width: 120px; }
    .ae-export .ae-btn { flex: 1 1 auto; justify-content: center; }
    .ae-step { font-size: 12px; padding: 5px 10px 5px 7px; }
}
