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

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 应用容器 */
.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}

/* 顶部标题栏 */
.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.app-header h1 {
    font-size: 1.8em;
    font-weight: 600;
    margin: 0;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.auto-save-indicator {
    font-size: 0.9em;
    opacity: 0.9;
    animation: pulse 2s infinite;
}

/* 主要内容区域 - 左右布局 */
.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* 左侧控制面板 */
.left-panel {
    width: 380px;
    background: white;
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    padding: 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
}

/* 右侧主工作区 */
.right-panel {
    flex: 1;
    background: #f8fafc;
    overflow-y: auto;
    padding: 0;
}

/* 面板区域 */
.panel-section {
    padding: 25px;
    border-bottom: 1px solid #f1f5f9;
}

.panel-section:last-child {
    border-bottom: none;
}

.panel-section h2 {
    color: #1e293b;
    margin-bottom: 20px;
    font-size: 1.3em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-section h3 {
    color: #475569;
    margin-bottom: 12px;
    font-size: 1.1em;
    font-weight: 500;
}

/* 上传区域 */
.upload-area {
    text-align: center;
    padding: 30px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f1f5f9;
}

/* 手动输入区域 */
.manual-input-area {
    margin-top: 20px;
}

.student-textarea {
    width: 100%;
    height: 100px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
    margin-bottom: 12px;
    font-family: inherit;
}

.student-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-info:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* 文件状态 */
.file-status {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.3s ease;
}

/* 文件状态 */
.file-status.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.file-status.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* 语音控制 */
.voice-controls {
    text-align: center;
    margin-bottom: 20px;
}

.voice-status {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 500;
    text-align: center;
    font-size: 14px;
    border: 1px solid #bfdbfe;
    transition: all 0.3s ease;
}

.voice-status.listening {
    background: #fff3e0;
    color: #f57c00;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* 语音命令 */
.voice-commands {
    background: #f1f5f9;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.voice-commands h3 {
    color: #334155;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.feature-highlight {
    color: #3b82f6;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 14px;
}

.voice-commands-list {
    list-style: none;
    padding-left: 0;
}

.voice-commands-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    font-size: 13px;
}

.voice-commands-list li:before {
    content: "🎤";
    margin-right: 8px;
}

.voice-commands-list li:last-child {
    border-bottom: none;
}

.voice-tips {
    margin-top: 15px;
    padding: 12px;
    background: rgba(102, 126, 234, 0.08);
    border-left: 3px solid #667eea;
    border-radius: 6px;
    font-size: 12px;
    color: #475569;
    line-height: 1.5;
}

/* 右侧工作区 */
.student-workspace {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.workspace-header {
    background: white;
    padding: 25px 30px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.workspace-header h2 {
    color: #1e293b;
    font-size: 1.4em;
    font-weight: 600;
    margin: 0;
}

.student-counter {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.student-counter span {
    color: #3b82f6;
    font-weight: 600;
}

.student-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

/* 空状态 */
.empty-state {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #64748b;
}

.empty-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: #475569;
}

.empty-state p {
    margin-bottom: 5px;
    font-size: 14px;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.save-tip {
    font-size: 12px;
    color: #64748b;
    margin-top: 10px;
    padding: 8px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 6px;
}

/* 作者信息二维码区域 */
.author-info-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-top: 2px solid #e2e8f0;
}

.qr-code-container {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    align-items: center;
}

.qr-code-display {
    flex: 0 0 120px;
    height: 120px;
    position: relative;
}

.qr-code-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: white;
    padding: 5px;
}

.qr-code-placeholder {
    width: 100%;
    height: 100%;
    background: white;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.qr-code-placeholder:hover {
    border-color: #667eea;
    background: #f8fafc;
}

.qr-code-icon {
    font-size: 2.5em;
    margin-bottom: 8px;
    opacity: 0.7;
}

.qr-code-placeholder p {
    font-size: 11px;
    color: #64748b;
    text-align: center;
    margin: 0;
    line-height: 1.3;
}

.author-info {
    flex: 1;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.author-info p {
    margin: 6px 0;
    font-size: 13px;
    color: #475569;
    line-height: 1.4;
}

.author-info p strong {
    color: #1e293b;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.contact-tip {
    font-size: 11px;
    color: #64748b;
    background: rgba(102, 126, 234, 0.05);
    padding: 10px;
    border-radius: 6px;
    line-height: 1.5;
    border-left: 3px solid #667eea;
}

.contact-tip strong {
    color: #475569;
}

/* 学生列表样式 */
.student-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    padding: 0;
}

.student-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.student-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #cbd5e1;
}

.student-item.highlighted {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.student-item.completed {
    border-color: #10b981;
    background: #f0fdf4;
}

.student-name {
    font-size: 16px;
    font-weight: 500;
    color: #1e293b;
    flex: 1;
    margin-right: 15px;
}

.student-score {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
}

.student-score:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.student-item.completed .student-score {
    border-color: #10b981;
    background: #f0fdf4;
    color: #047857;
    font-weight: 600;
}

.voice-test {
    background: #e8f5e8;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #4caf50;
}

.voice-test h3 {
    color: #2e7d32;
    margin-bottom: 15px;
}

.btn-secondary {
    background: linear-gradient(135deg, #78909c 0%, #546e7a 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(120, 144, 156, 0.4);
}

#testResult {
    font-size: 14px;
    line-height: 1.5;
}

#testResult.success {
    background: #d4edda !important;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#testResult.warning {
    background: #fff3cd !important;
    color: #856404;
    border: 1px solid #ffeaa7;
}

#testResult.error {
    background: #f8d7da !important;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.student-list {
    max-height: 400px;
    overflow-y: auto;
}

.student-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.student-item:hover {
    background: #f8f9ff;
    border-color: #667eea;
}

.student-item.highlighted {
    background: #fff3cd;
    border-color: #ffc107;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

.student-item.completed {
    background: #d4edda;
    border-color: #28a745;
}

.student-name {
    flex: 1;
    font-weight: bold;
    color: #333;
}

.student-score {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
}

.student-score:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.recognition-result {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    max-width: 320px;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    border: 1px solid #e2e8f0;
}

.recognition-result.show {
    transform: translateX(0);
}

.recognition-result h4 {
    color: #1e293b;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.result-text {
    color: #475569;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.confidence {
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .left-panel {
        width: 320px;
    }
    
    .student-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .left-panel {
        width: 100%;
        max-height: 50vh;
    }
    
    .app-header {
        padding: 15px 20px;
    }
    
    .app-header h1 {
        font-size: 1.5em;
    }
    
    .student-list {
        grid-template-columns: 1fr;
    }
    
    .recognition-result {
        right: 10px;
        max-width: 280px;
    }
}

/* 动画效果 */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 页面加载动画 */
.panel-section {
    animation: slideInUp 0.6s ease-out;
}

.student-item {
    animation: fadeIn 0.4s ease-out;
}

/* 语音状态动画 */
.voice-status.listening {
    background: #fef3c7;
    color: #d97706;
    border-color: #fbbf24;
    animation: pulse 1.5s infinite;
}

/* 按钮点击效果 */
.btn:active {
    transform: translateY(0) scale(0.98);
}

/* 滚动条美化 */
.left-panel::-webkit-scrollbar,
.student-list-container::-webkit-scrollbar {
    width: 6px;
}

.left-panel::-webkit-scrollbar-track,
.student-list-container::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.left-panel::-webkit-scrollbar-thumb,
.student-list-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.left-panel::-webkit-scrollbar-thumb:hover,
.student-list-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}