.tool-fullwidth {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Tool shell */
.audio-tool {
    max-width: 100%;
    margin: 0 auto;
}

.audio-tool.editor-section,
.editor-section.audio-tool {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.audio-tool .card:not(.result-card) {
    border: 1px solid var(--color-border, #e5e7eb);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
    border-radius: var(--radius, 12px);
    background: var(--color-surface, #fff);
}

.audio-tool .card-body {
    padding: 1.25rem 1.35rem;
}

.audio-tool .card-title {
    color: var(--color-text, #1f2937);
    font-weight: 700;
    font-size: 1.05rem;
}

.audio-tool .form-control,
.audio-tool .form-select,
.audio-tool .select-input,
.audio-tool textarea {
    border-radius: 8px;
    border: 1px solid var(--color-border, #e5e7eb);
}

.audio-tool .form-control:focus,
.audio-tool .form-select:focus,
.audio-tool textarea:focus {
    border-color: var(--color-primary, #0d9488);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.audio-tool .btn-primary {
    background: var(--color-primary, #0d9488);
    border-color: var(--color-primary, #0d9488);
}

.audio-tool .btn-primary:hover {
    background: var(--color-primary-hover, #0f766e);
    border-color: var(--color-primary-hover, #0f766e);
}

.audio-tool .alert {
    border-radius: 10px;
}

[data-theme="dark"] .audio-tool .card:not(.result-card) {
    background: var(--color-surface, #1f2937);
    border-color: var(--color-border, #374151);
}

[data-theme="dark"] .audio-tool .card-title,
[data-theme="dark"] .audio-tool .form-label,
[data-theme="dark"] .audio-tool {
    color: var(--color-text, #f9fafb);
}

[data-theme="dark"] .audio-tool .text-muted,
[data-theme="dark"] .audio-tool .form-text {
    color: var(--color-text-secondary, #9ca3af) !important;
}

[data-theme="dark"] .audio-tool .form-control,
[data-theme="dark"] .audio-tool .form-select,
[data-theme="dark"] .audio-tool textarea {
    background: #111827;
    color: var(--color-text, #f9fafb);
    border-color: var(--color-border, #374151);
}

/* --- tool: microphone-test --- */
/* 麦克风测试工具样式 */
.tool-microphone-test-full {
    padding: 2rem 0;
}

.microphone-icon-wrapper {
    position: relative;
    display: inline-block;
}

.microphone-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.microphone-icon i {
    font-size: 3rem;
    color: white;
}

.microphone-icon.testing {
    animation: pulse 1.5s infinite;
    background: linear-gradient(135deg, #dc3545, #fd7e14);
}

.microphone-icon.recording {
    animation: recording-pulse 0.8s infinite;
    background: linear-gradient(135deg, #dc3545, #e83e8c);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes recording-pulse {
    0% { transform: scale(1); box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 8px 35px rgba(220, 53, 69, 0.5); }
    100% { transform: scale(1); box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3); }
}

.audio-visualization {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #dee2e6;
}

.volume-indicator .progress {
    background-color: #e9ecef;
    border-radius: 10px;
}

.volume-indicator .progress-bar {
    border-radius: 10px;
    transition: width 0.1s ease;
}

.recording-controls .btn {
    width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.recording-controls .btn:hover {
    transform: scale(1.1);
}

.recording-controls .btn:disabled {
    opacity: 0.6;
    transform: none;
}

.device-info-item {
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #6c757d;
}

.result-item {
    padding: 1rem;
}

.result-icon {
    color: #6c757d;
}

.result-value {
    font-weight: bold;
    color: #28a745;
}

.recording-time .badge {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .microphone-icon {
        width: 100px;
        height: 100px;
    }
    
    .microphone-icon i {
        font-size: 2.5rem;
    }
    
    .recording-controls .btn {
        width: 60px;
        height: 60px;
    }
    
    .recording-controls .btn i {
        font-size: 1.2rem;
    }
}

/* 音频可视化样式 */
#audioCanvas {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #000;
}

/* 状态指示器 */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.success {
    background-color: #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.5);
}

.status-indicator.warning {
    background-color: #ffc107;
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.5);
}

.status-indicator.danger {
    background-color: #dc3545;
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.5);
}
