* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 初始隐藏状?*/
#previewSection,
#controlsSection,
#progressSection,
#resultSection,
#eqControls,
#messageBox,
#permissionCardWrapper {
    display: none;
}

/* 权限卡片包装容器 - 只覆盖内容区 */
.permission-card-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* 内容区需要相对定?*/
.audio-content {
    position: relative;
}

/* 操作区域被屏蔽时 */
#operationArea.disabled {
    display: none !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #333;
}

.audio-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

/* Header */
.audio-header {
    background: #ffffff;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left h1 {
    color: #2d3748;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-left h1 i {
    color: #4299e1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f7fafc;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #2d3748;
}

.user-info i {
    color: #4299e1;
    font-size: 1.2rem;
}

.user-info .company {
    color: #718096;
    font-size: 0.85rem;
}

.btn-logout {
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 4px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.btn-logout:hover {
    background: #e2e8f0;
    color: #e53e3e;
}

.btn-back {
    padding: 0.6rem 1.2rem;
    background: #4299e1;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-back:hover {
    background: #3182ce;
    transform: translateY(-2px);
}

/* Content */
.audio-content {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    color: #2d3748;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: #4299e1;
}

.card h2 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card h2 i {
    color: #4299e1;
}

/* Upload Section */
.upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    background: #f7fafc;
}

.upload-area:hover {
    border-color: #4299e1;
    background: #edf2f7;
}

.upload-area.drag-over {
    border-color: #4299e1;
    background: #edf2f7;
}

.upload-placeholder i {
    font-size: 4rem;
    color: #4299e1;
    margin-bottom: 1rem;
}

.upload-placeholder p {
    font-size: 1.2rem;
    color: #2d3748;
    margin: 0.5rem 0;
}

.upload-hint {
    font-size: 0.9rem !important;
    color: #718096 !important;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-primary {
    background: #f7fafc;
    color: #2d3748;
    font-weight: 600;
    border: 2px solid #e2e8f0;
}

.btn-primary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #4299e1;
    color: white;
}

.btn-success:hover {
    background: #3182ce;
    transform: translateY(-2px);
}

/* File List */
.file-list {
    margin-top: 1.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.file-info i {
    font-size: 1.5rem;
    color: #4299e1;
}

.file-details h4 {
    margin: 0;
    color: #333;
}

.file-details p {
    margin: 0.2rem 0 0 0;
    font-size: 0.9rem;
    color: #666;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-icon:hover {
    transform: scale(1.1);
}

.btn-play {
    background: #4299e1;
    color: white;
}

.btn-remove {
    background: #4299e1;
    color: white;
}

/* Audio Preview */
.audio-player {
    margin-bottom: 1.5rem;
}

.audio-player audio {
    width: 100%;
    margin-bottom: 1rem;
}

.waveform {
    height: 100px;
    background: linear-gradient(to right, #4299e1, #3182ce);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.audio-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.info-item label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.info-item span {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4299e1;
}

/* Controls Section */
.control-group {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
}

.control-group > label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    font-weight: 600;
    color: #2d3748;
}

.control-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.control-slider {
    margin: 1rem 0;
}

.control-slider label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.control-slider input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.control-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4299e1;
    cursor: pointer;
}

.control-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4299e1;
    cursor: pointer;
    border: none;
}

.control-slider span {
    display: inline-block;
    margin-left: 1rem;
    font-weight: 600;
    color: #4299e1;
}

.format-select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    background: white;
}

.format-select:focus {
    outline: none;
    border-color: #4299e1;
}

.eq-controls {
    margin-top: 1rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.action-buttons .btn {
    flex: 1;
    justify-content: center;
}

/* Progress Section */
.progress-bar {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #3f68ff 0%, #3356cc 100%);
    transition: width 0.3s;
    border-radius: 15px;
}

.progress-text {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #4299e1;
    margin: 0.5rem 0;
}

.progress-status {
    text-align: center;
    color: #666;
}

/* Result Section */
.result-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.result-item {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.result-item h3 {
    color: #4299e1;
    margin-bottom: 1rem;
}

.result-item audio {
    width: 100%;
    margin-bottom: 1rem;
}

.audio-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
}

.stat-label {
    color: #666;
}

.stat-value {
    font-weight: 600;
    color: #4299e1;
}

/* 成功提示气泡 */
.success-badge {
    display: inline-block;
    animation: bounce 0.6s ease-in-out;
    margin-left: 0.5rem;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

#completionMessage {
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 预设描述样式 */
.preset-description {
    margin-top: 0.5rem !important;
    font-size: 0.9rem !important;
    color: #718096 !important;
    font-style: italic;
    padding-left: 0.5rem;
    border-left: 3px solid #4299e1;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Footer */
.audio-footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
}

.audio-footer p {
    margin: 0.5rem 0;
    color: #666;
}

.version-trigger {
    color: #667eea !important;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.version-trigger:hover {
    color: #764ba2 !important;
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
    .audio-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-left h1 {
        font-size: 1.4rem;
    }
    
    .audio-content {
        padding: 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .result-comparison {
        grid-template-columns: 1fr;
    }
    
    .result-actions {
        flex-direction: column;
    }
}

/* 权限提示卡片样式 - 蓝底白字 */
.permission-card {
    text-align: center;
    padding: 3rem !important;
    background: #3f68ff !important;
    color: white;
    border: none !important;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(63, 69, 255, 0.3) !important;
}

/* 权限加载状?*/
.permission-loading {
    padding: 2rem 0;
}

.loading-spinner {
    margin-bottom: 1.5rem;
}

.loading-spinner i {
    font-size: 4rem;
    color: white;
    opacity: 0.9;
}

.permission-loading p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    margin: 0;
}

/* 权限内容区域 */
.permission-content {
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.permission-card-icon {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    border: 3px solid rgba(255, 255, 255, 0.4);
}

.permission-card-icon i {
    font-size: 3rem;
    color: white;
}

.permission-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: white !important;
}

.permission-card h2 i {
    color: white !important;
}

.permission-message {
    color: rgba(255, 255, 255, 0.95) !important;
    line-height: 1.8;
    margin-bottom: 2rem !important;
    font-size: 1.1rem;
    white-space: pre-line;
}

.permission-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.permission-actions .btn {
    flex: 0 1 auto;
    min-width: 160px;
    background: white !important;
    color: #3f68ff !important;
    border: 2px solid white !important;
    font-weight: 600;
}

.permission-actions .btn:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
