/* AI助教页面样式 */

.ai-tutor-main {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    background: #f8f9fa;
    padding: 2rem 0;
}

/* 页面标题 */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    color: #666;
}

/* AI助教容器 */
.ai-tutor-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* 左侧边栏 */
.tutor-sidebar {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.tutor-sidebar h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

/* 功能选择器 */
.function-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.function-tab {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid #f0f0f0;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-weight: 500;
    color: #666;
}

.function-tab:hover {
    border-color: #52c41a;
    background: #f6ffed;
    color: #333;
}

.function-tab.active {
    border-color: #52c41a;
    background: linear-gradient(135deg, #7cb305 0%, #52c41a 100%);
    color: white;
}

.function-tab i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

/* 学习进度 */
.progress-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.stat-value {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

/* 快捷操作 */
.quick-actions {
    margin-top: 2rem;
}

.quick-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid #e9ecef;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: #666;
}

.quick-btn:hover {
    border-color: #52c41a;
    background: #f6ffed;
    color: #333;
}

.quick-btn i {
    width: 16px;
    text-align: center;
}

/* 右侧主界面 */
.tutor-main {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* 界面切换 */
.tutor-interface {
    display: none;
    padding: 2rem;
    min-height: 600px;
}

.tutor-interface.active {
    display: block;
}

/* 界面头部 */
.interface-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.interface-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.interface-header p {
    color: #666;
    font-size: 1rem;
}

/* 录音状态 */
.recording-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #666;
    margin-top: 1rem;
}

.recording-status.recording {
    background: #fff3cd;
    color: #856404;
}

.recording-status.processing {
    background: #d1ecf1;
    color: #0c5460;
}

/* 口语练习内容 */
.speaking-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 练习卡片 */
.exercise-card {
    background: linear-gradient(135deg, #7cb305 0%, #52c41a 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
}

.exercise-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.exercise-card p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.exercise-timer {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 录音区域 */
.recording-area {
    text-align: center;
    padding: 2rem;
}

.recording-circle {
    width: 120px;
    height: 120px;
    border: 4px solid #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.recording-circle:hover {
    border-color: #52c41a;
    background: #f6ffed;
}

.recording-circle.recording {
    border-color: #dc3545;
    background: #f8d7da;
    animation: pulse 1s infinite;
}

.recording-circle i {
    font-size: 2rem;
    color: #52c41a;
}

.recording-circle.recording i {
    color: #dc3545;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.recording-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.recording-timer {
    font-size: 1.1rem;
    font-weight: 600;
    color: #dc3545;
}

/* 分析结果 */
.analysis-result {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
}

.analysis-result h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
}

.analysis-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.analysis-section {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.analysis-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7cb305 0%, #52c41a 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.grammar-issues,
.vocabulary-suggestions {
    text-align: left;
}

.issue-item,
.suggestion-item {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9rem;
}

.issue-item.error {
    background: #f8d7da;
    color: #721c24;
}

.suggestion-item {
    background: #d4edda;
    color: #155724;
}

/* 语法检查界面 */
.grammar-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.input-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-area textarea {
    resize: vertical;
    min-height: 120px;
}

.grammar-result {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
}

.grammar-result h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
}

.result-content {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* 翻译助手界面 */
.translation-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.translation-input {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.language-selector {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: #666;
}

.lang-btn.active {
    border-color: #52c41a;
    background: #52c41a;
    color: white;
}

.lang-btn:hover:not(.active) {
    border-color: #52c41a;
    color: #333;
}

.translation-result {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
}

.translation-result h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
}

/* 词汇学习界面 */
.vocabulary-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.word-search {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.word-search input {
    flex: 1;
}

.word-result {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
}

.word-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.word-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.word-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.word-phonetic {
    color: #666;
    font-style: italic;
}

.word-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #52c41a;
    color: white;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.word-meaning {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.word-examples {
    margin-top: 1rem;
}

.word-examples h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.example-item {
    padding: 0.5rem 0;
    border-left: 3px solid #52c41a;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    background: #f6ffed;
    border-radius: 0 6px 6px 0;
}

.example-en {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.25rem;
}

.example-zh {
    color: #666;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .ai-tutor-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tutor-sidebar {
        position: static;
        order: 2;
    }
    
    .tutor-main {
        order: 1;
    }
}

@media (max-width: 768px) {
    .ai-tutor-main {
        margin-top: 70px;
        padding: 1rem 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .tutor-interface {
        padding: 1rem;
        min-height: 500px;
    }
    
    .analysis-sections {
        grid-template-columns: 1fr;
    }
    
    .recording-circle {
        width: 100px;
        height: 100px;
    }
    
    .recording-circle i {
        font-size: 1.5rem;
    }
    
    .recording-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .recording-controls .btn {
        width: 200px;
    }
    
    .word-search {
        flex-direction: column;
    }
    
    .word-search input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .function-tab {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .exercise-card {
        padding: 1.5rem;
    }
    
    .recording-circle {
        width: 80px;
        height: 80px;
    }
    
    .recording-circle i {
        font-size: 1.2rem;
    }
    
    .analysis-section {
        padding: 1rem;
    }
    
    .score-circle {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
}

/* 动画效果 */
.tutor-interface {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.recording-circle.recording {
    animation: pulse 1s infinite, rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 加载状态 */
.loading-state {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: #666;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #52c41a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
