/* Presentation Practice Module Styles */
/* 演讲练习模块专用样式 */

/* 演讲布局 */
.presentation-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* 侧边栏样式 */
.ppt-upload-sidebar {
    background: var(--card-bg, #ffffff);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.ppt-upload-sidebar h3 {
    margin-bottom: 1rem;
    color: var(--text-primary, #333333);
    font-size: 1.2rem;
    font-weight: 600;
}

.ppt-upload-sidebar .card {
    background: var(--bg-light, #f8f9fa);
    border: 2px dashed var(--border-color, #e0e0e0);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    transition: border-color 0.3s ease;
}

.ppt-upload-sidebar .card:hover {
    border-color: var(--primary-color, #4A90E2);
}

.ppt-upload-sidebar .btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color, #4A90E2);
    color: var(--primary-color, #4A90E2);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 500;
}

.ppt-upload-sidebar .btn-outline:hover {
    background: var(--primary-color, #4A90E2);
    color: white;
}

.small-text {
    font-size: 0.9rem;
    color: var(--text-secondary, #666666);
    margin: 1rem 0 0.5rem 0;
}

.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.item-list li {
    margin-bottom: 0.5rem;
}

.item-list-link {
    display: block;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-primary, #333333);
    border: 1px solid var(--border-color, #e0e0e0);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.item-list-link:hover {
    background: var(--primary-color, #4A90E2);
    color: white;
    transform: translateY(-1px);
}

.illustration-sidebar {
    margin-top: 1.5rem;
    text-align: center;
}

.illustration-sidebar img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 演讲练习区域 */
.presentation-practice-zone {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* PPT显示区域 */
.ppt-display-area {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.ppt-display-area h4 {
    margin-bottom: 1rem;
    color: var(--text-primary, #333333);
    font-size: 1.1rem;
    font-weight: 600;
}

#ppt-slide-image {
    width: 100%;
    max-width: 700px;
    height: 400px;
    object-fit: contain;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    background: #f8f9fa;
    display: block;
    margin: 0 auto 1rem auto;
    transition: transform 0.3s ease, cursor 0.3s ease;
    cursor: pointer;
}

#ppt-slide-image:hover {
    transform: scale(1.02);
}

#ppt-slide-image.zoomed {
    transform: scale(1.5);
    z-index: 1000;
    position: relative;
    cursor: zoom-out;
}

#ppt-slide-image:fullscreen {
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
}

.ppt-slide-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #666;
    font-size: 1.1rem;
}

.slide-navigation {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-secondary {
    background: var(--secondary-color, #6c757d);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--secondary-dark, #5a6268);
    transform: translateY(-1px);
}

.btn-secondary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 控制面板 */
.controls-panel {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: var(--primary-color, #4A90E2);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--primary-dark, #357abd);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger-color, #dc3545);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-danger:hover {
    background: var(--danger-dark, #c82333);
    transform: translateY(-1px);
}

/* AI反馈区域 */
.ai-feedback-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ai-feedback-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary, #333333);
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feedback-text {
    color: var(--text-secondary, #666666);
    line-height: 1.6;
    margin-bottom: 1rem;
}

#presentation-feedback-content p {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

#presentation-feedback-content strong {
    color: var(--text-primary, #333333);
    font-weight: 600;
}

/* 加载覆盖层 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color, #4A90E2);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    margin: 0;
    color: var(--text-primary, #333333);
    font-weight: 500;
}

/* 录音状态指示器 */
.recording-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--danger-color, #dc3545);
    font-weight: 500;
}

/* 录音按钮状态 */
.record-btn.recording {
    background: #ff4444 !important;
    animation: pulse 1.5s infinite;
}

.record-btn.recording:hover {
    background: #ff6666 !important;
}

.recording-dot {
    width: 8px;
    height: 8px;
    background: var(--danger-color, #dc3545);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .presentation-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .ppt-upload-sidebar {
        position: static;
        order: 2;
    }
    
    .presentation-practice-zone {
        order: 1;
    }
}

/* 键盘快捷键提示 */
.keyboard-hint {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    font-size: 14px;
}

.keyboard-hint .hint-content {
    margin: 0;
}

.keyboard-hint p {
    margin: 5px 0;
    color: #1976d2;
}

.keyboard-hint kbd {
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 12px;
    color: #333;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 全屏模式样式 */
.ppt-display-area:fullscreen {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ppt-display-area:fullscreen #ppt-slide-image {
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    border-radius: 0;
}

/* 缩放过渡效果 */
.slide-zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: zoom-out;
}

.slide-zoom-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .controls-panel {
        flex-direction: column;
        align-items: center;
    }
    
    .slide-navigation {
        flex-direction: column;
        align-items: center;
    }
    
    #ppt-slide-image {
        height: 300px;
    }
    
    .ppt-upload-sidebar {
        padding: 1rem;
    }
    
    .ppt-display-area {
        padding: 1rem;
    }
    
    .ai-feedback-section {
        padding: 1rem;
    }
    
    .keyboard-hint {
        font-size: 12px;
        padding: 10px;
    }
    
    .keyboard-hint kbd {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    #ppt-slide-image.zoomed {
        transform: scale(1.2);
    }
}

@media (max-width: 480px) {
    .presentation-layout {
        gap: 1rem;
    }
    
    #ppt-slide-image {
        height: 250px;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* 图标样式 (如果使用Font Awesome) */
.icon-mic::before { content: '\f130'; }
.icon-stop::before { content: '\f04d'; }
.icon-play-user::before { content: '\f144'; }
.icon-prev::before { content: '\f104'; }
.icon-next::before { content: '\f105'; }
.icon-ai-feedback::before { content: '\f544'; }

/* 文件拖拽样式 */
.drag-over {
    border-color: var(--primary-color, #4A90E2) !important;
    background-color: rgba(74, 144, 226, 0.1) !important;
}

/* 成功状态 */
.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 0.75rem;
    margin: 1rem 0;
}

/* 错误状态 */
.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 0.75rem;
    margin: 1rem 0;
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color, #4A90E2);
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* 音频波形可视化 (预留) */
.audio-visualizer {
    width: 100%;
    height: 60px;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.9rem;
}