/* ===== 文件上传组件 ===== */
.audio-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 48px;
}

.upload-progress {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.upload-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== 任务卡片组件 ===== */
.rerun-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--warning-color);
    color: white;
    font-size: 11px;
    font-weight: 500;
    border-radius: 10px;
    margin-left: 8px;
}

.progress-text {
    display: inline-block;
    margin-left: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== 过滤器组件 ===== */
.filter-group {
    display: flex;
    gap: 8px;
}

.filter-group .form-select {
    width: auto;
}

/* ===== 表格组件 ===== */
.data-table {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.data-table th {
    background: var(--bg-tertiary);
    padding: 12px 16px;
    text-align: left;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.data-table tr:hover {
    background: var(--bg-secondary);
}

/* ===== 空状态组件 ===== */
.empty-state {
    text-align: center;
    padding: 48px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state-message {
    font-size: 14px;
}

/* ===== 统计图表组件 ===== */
.chart-container {
    position: relative;
    height: 300px;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* ===== 服务器状态组件 ===== */
.gpu-usage-bar {
    position: relative;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.gpu-usage-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--warning-color), var(--danger-color));
    background-size: 300% 100%;
    transition: width var(--transition-normal) ease;
}

.gpu-usage-fill.low {
    background-position: 0% 0%;
}

.gpu-usage-fill.medium {
    background-position: 50% 0%;
}

.gpu-usage-fill.high {
    background-position: 100% 0%;
}

/* ===== 标签组件 ===== */
.tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 12px;
    border-radius: 12px;
    margin-right: 4px;
}

.tag.primary {
    background: rgba(26, 115, 232, 0.1);
    color: var(--primary-color);
}

.tag.success {
    background: rgba(52, 168, 83, 0.1);
    color: var(--success-color);
}

/* ===== 模态框组件 ===== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(2px);
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* === 注册页面样式 === */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.auth-card {
    max-width: 450px;
    padding: 40px;
}

.password-strength {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    margin-top: 8px;
    transition: all var(--transition-normal);
}

.password-strength.weak { background: var(--danger-color); width: 20%; }
.password-strength.fair { background: var(--warning-color); width: 40%; }
.password-strength.medium { background: var(--warning-color); width: 60%; }
.password-strength.strong { background: var(--success-color); width: 80%; }
.password-strength.very-strong { background: var(--success-color); width: 100%; }

/* === 队列状态组件 === */
.queue-status {
    padding: 20px;
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.queue-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.queue-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

.queue-position {
    font-weight: bold;
    color: var(--primary-color);
    margin-right: 12px;
}

/* === 任务历史时间轴 === */
.timeline-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: 24px;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 32px;
    bottom: -24px;
    width: 2px;
    background: var(--border-color);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
}

/* === 个人中心增强 === */
.profile-container {
    display: grid;
    gap: 24px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    font-size: 60px;
    color: var(--primary-color);
}

.btn-edit-profile {
    position: absolute;
    top: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-edit-profile:hover {
    background: var(--primary-color);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* === 模态框覆盖层 === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.modal-overlay.show {
    opacity: 1;
}

.modal-dialog {
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

/* === 个人中心卡片样式 === */
.profile-card {
    padding: 32px;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.profile-email {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

.profile-role {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 16px;
}

/* === 详情信息 === */
.profile-details {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--bg-tertiary);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* === 操作按钮区域 === */
.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* === 统计卡片 === */
.stats-card {
    padding: 24px;
}

.chart-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
}

.chart-container h6 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* === 最近任务卡片 === */
.recent-tasks-card {
    padding: 24px;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.task-item:hover {
    background: var(--bg-tertiary);
}

.task-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--bg-tertiary);
}

.task-icon.completed {
    color: var(--success-color);
    background: rgba(52, 168, 83, 0.1);
}

.task-icon.failed {
    color: var(--danger-color);
    background: rgba(234, 67, 53, 0.1);
}

.task-info {
    flex: 1;
}

.task-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.task-time {
    font-size: 12px;
    color: var(--text-muted);
}

.task-content {
    flex: 1;
    min-width: 0;
}

.progress-container {
    margin: 16px 0;
}
.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.card-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.card-footer a:hover {
    text-decoration: underline;
}

/* ===== 说话人数滑块样式 ===== */
.speaker-num-container {
    margin-bottom: 20px;
}

.speaker-num-container .form-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
    color: var(--text-primary);
}

.speaker-num-container .form-label span {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 16px;
}

/* Range滑块样式 */
.form-range {
    width: 100%;
    height: 6px;
    padding: 0;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.form-range:focus {
    outline: none;
}

/* 滑块轨道 */
.form-range::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    border: 1px solid var(--border-color);
}

.form-range::-moz-range-track {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    border: 1px solid var(--border-color);
}

/* 滑块按钮 */
.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    margin-top: -7px;
    transition: all var(--transition-fast) ease;
}

.form-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all var(--transition-fast) ease;
}

/* 悬停效果 */
.form-range:hover::-webkit-slider-thumb {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.4);
}

.form-range:hover::-moz-range-thumb {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.4);
}

/* 聚焦效果 */
.form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.2);
}

.form-range:focus::-moz-range-thumb {
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.2);
}

/* 最小最大值标签 */
.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.range-labels .range-min {
    text-align: left;
}

.range-labels .range-max {
    text-align: right;
}

/* 响应式调整 */
@media (max-width: 576px) {
    .speaker-num-container {
        padding: 0 10px;
    }

    .form-range {
        width: 100%;
    }
}

