/* public/assets/css/audio/voice-recorder.css */

.tool-surface, .tool-surface * { box-sizing: border-box; }

.vr-workspace {
    display: flex; flex-direction: column; gap: 24px; width: 100%;
}

.vr-console-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
    display: flex; flex-direction: column; align-items: center;
}

/* 巨型时间显示器 */
.vr-time-display {
    font-size: 4.5rem;
    font-weight: 800;
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
    color: var(--text-main);
    letter-spacing: -2px;
    margin-bottom: 24px;
    font-variant-numeric: tabular-nums; /* 确保数字等宽，防止跳动 */
}

/* 波形可视化区域 (科技感黑屏) */
.vr-canvas-wrapper {
    width: 100%; max-width: 800px; height: 160px;
    background: #0f172a; /* 始终保持暗色系作为背景，波形才好看 */
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 32px;
    border: 2px solid #1e293b;
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.5);
}

canvas#vrVisualizer {
    width: 100%; height: 100%; display: block;
}

/* 录音控制按钮组 */
.vr-controls {
    display: flex; gap: 16px; align-items: center; justify-content: center;
}

.vr-btn {
    padding: 16px 32px; border: none; border-radius: 50px;
    font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.vr-btn i { font-size: 1.2rem; }
.vr-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.15); }

/* 具体按钮颜色 */
.vr-btn-start { background: linear-gradient(135deg, #ef4444, #dc2626); }
.vr-btn-start:hover { box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4); }

.vr-btn-pause { background: #f59e0b; color: #fff; }
.vr-btn-resume { background: #3b82f6; color: #fff; }
.vr-btn-stop { background: #10b981; color: #fff; }

/* 录音历史列表 */
.vr-history-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

.vr-panel-title {
    font-size: 1.1rem; color: var(--text-main); font-weight: 700;
    margin: 0 0 16px 0; padding-bottom: 12px; border-bottom: 1px dashed var(--border-color);
}

.vr-audio-list { display: flex; flex-direction: column; gap: 16px; }

/* 单个音频条目 */
.vr-audio-item {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
    background: var(--bg-body); border: 1px solid var(--border-color);
    padding: 16px 20px; border-radius: 12px; transition: 0.2s;
}
.vr-audio-item:hover { border-color: var(--primary-color); }
.vr-audio-info { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 12px; }
.vr-audio-info span { font-weight: 600; color: var(--text-main); font-family: ui-monospace, monospace; }

/* 覆盖原生 audio 样式使其更美观 */
.vr-audio-item audio { height: 40px; outline: none; border-radius: 20px; flex: 2; min-width: 250px; }

.vr-btn-dl {
    background: transparent; border: 2px solid var(--border-color);
    color: var(--text-main); padding: 8px 16px; border-radius: 8px;
    font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: 0.2s;
}
.vr-btn-dl:hover { background: var(--bg-surface); border-color: var(--primary-color); color: var(--primary-color); }

/* SEO 组件复用 */
.tool-seo-content { margin-top: 40px; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 40px; }
.tool-seo-content h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 24px; color: var(--text-main); }
.seo-feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-bottom: 32px; }
.seo-feature-card { background: var(--bg-body); border: 1px solid var(--border-color); padding: 24px; border-radius: 12px; transition: 0.3s; }
.seo-feature-card:hover { border-color: var(--primary-color); transform: translateY(-2px); }
.seo-feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; color: var(--text-main); }
.seo-feature-card p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; margin: 0; }
.seo-divider { border: none; border-top: 1px dashed var(--border-color); margin: 40px 0; }
.seo-guide-box { background: rgba(0, 102, 204, 0.03); border-left: 4px solid var(--primary-color); padding: 20px 24px; border-radius: 0 8px 8px 0; }
.seo-guide-box p { font-size: 1rem; color: var(--text-main); margin-bottom: 12px; font-weight: 600; }

/* 暗黑模式 */
[data-theme="dark"] .vr-console-panel, [data-theme="dark"] .vr-history-panel { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .vr-audio-item { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .vr-btn-dl { border-color: #475569; }
[data-theme="dark"] .tool-seo-content { background: var(--bg-surface); }
[data-theme="dark"] .seo-feature-card { background: #0f172a; border-color: #334155; }

/* 移动端适配 */
@media (max-width: 600px) {
    .vr-time-display { font-size: 3rem; }
    .vr-controls { flex-wrap: wrap; }
    .vr-btn { flex: 1; min-width: 140px; padding: 14px 20px; font-size: 1rem; }
    .vr-audio-item { justify-content: center; }
    .vr-audio-item audio { width: 100%; min-width: unset; }
}