/* 整体布局 */
body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Arial, sans-serif;
    background: #f5f7fa;
}

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* 侧边栏样式 */
#sidebar {
    min-width: 250px;
    max-width: 250px;
    background: #2c3e50;
    color: #fff;
    transition: all 0.3s;
    min-height: 100vh;
}

#sidebar.active {
    margin-left: -250px;
}

.sidebar-header {
    padding: 20px;
    background: #34495e;
    border-bottom: 1px solid #455a64;
}

.sidebar-header h3 {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 0.85em;
    margin-bottom: 0;
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul li {
    border-bottom: 1px solid #455a64;
}

#sidebar ul li a {
    padding: 15px 20px;
    font-size: 1em;
    display: block;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
}

#sidebar ul li a i {
    margin-right: 10px;
    width: 20px;
}

#sidebar ul li a:hover,
#sidebar ul li.active > a {
    color: #fff;
    background: #34495e;
    border-left: 3px solid #3498db;
}

/* 主内容区 */
#content {
    width: 100%;
    padding: 0;
    min-height: 100vh;
    transition: all 0.3s;
}

.navbar {
    padding: 15px 20px;
    background: #fff !important;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.page-content {
    padding: 30px;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

.card-header {
    background: #fff;
    border-bottom: 2px solid #f0f0f0;
    padding: 20px;
    font-weight: 600;
    font-size: 1.1em;
}

.card-body {
    padding: 25px;
}

/* 按钮样式 */
.btn {
    border-radius: 4px;
    padding: 8px 20px;
    font-weight: 500;
}

.btn-primary {
    background: #3498db;
    border-color: #3498db;
}

.btn-primary:hover {
    background: #2980b9;
    border-color: #2980b9;
}

.btn-success {
    background: #27ae60;
    border-color: #27ae60;
}

.btn-success:hover {
    background: #229954;
    border-color: #229954;
}

.btn-danger {
    background: #e74c3c;
    border-color: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
    border-color: #c0392b;
}

/* 表格样式 */
.table {
    background: #fff;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    background: #f8f9fa;
}

.table td, .table th {
    vertical-align: middle;
    padding: 15px;
}

/* 表单样式 */
.form-control {
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 10px 15px;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* 统计卡片 */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.stat-card h3 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-card p {
    margin-bottom: 0;
    font-size: 1.1em;
}

/* 图片预览 */
.image-preview {
    max-width: 100px;
    max-height: 100px;
    border-radius: 4px;
    object-fit: cover;
}

/* 音频播放器控制栏 */
.audio-player-bar {
    position: fixed;
    bottom: 0;
    left: 250px;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 15px 30px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: all 0.3s;
}

.player-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
}

.player-info {
    flex: 0 0 250px;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.player-controls button {
    border: none;
    min-width: 40px;
}

.player-controls span {
    color: #fff;
    font-size: 13px;
    min-width: 45px;
    text-align: center;
}

.player-progress {
    flex: 1;
    max-width: 400px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.3);
    outline: none;
    cursor: pointer;
}

.player-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.player-progress::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.player-volume {
    width: 80px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.3);
    outline: none;
    cursor: pointer;
}

.player-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

.player-volume::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: none;
}

/* 侧边栏收起时的播放器 */
#sidebar.active ~ #content .audio-player-bar {
    left: 0;
}

/* 移动端播放器 */
@media (max-width: 768px) {
    .audio-player-bar {
        left: 0;
        padding: 10px 15px;
    }

    .player-content {
        flex-direction: column;
        gap: 10px;
    }

    .player-info {
        flex: 1;
        width: 100%;
        text-align: center;
    }

    .player-controls {
        width: 100%;
        flex-wrap: wrap;
    }

    .player-progress {
        max-width: 100%;
    }
}

/* 音频播放器 */
.audio-player {
    width: 200px;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 50px;
    color: #999;
}

.loading i {
    font-size: 2em;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 4em;
    margin-bottom: 20px;
    color: #ddd;
}

/* 响应式 */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -250px;
    }
    #sidebar.active {
        margin-left: 0;
    }
}

/* Modal 样式 */
.modal-header {
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.modal-footer {
    border-top: 1px solid #e0e0e0;
}

/* 文件上传样式 */
.custom-file-label::after {
    content: "浏览";
}

/* 操作按钮组 */
.action-buttons .btn {
    margin-right: 5px;
    margin-bottom: 5px;
}

/* 徽章样式 */
.badge {
    padding: 5px 10px;
    font-weight: 500;
}
