/* AI时文阅读模块样式 */

/* 新闻阅读面板样式 */
#newsReadingPanel {
    background: var(--bg-primary);
    min-height: 100vh;
}

#newsReadingPanel .panel-header {
    background: linear-gradient(135deg, #1E3C72, #2A5298);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#newsReadingPanel .panel-header h2 {
    color: #ffffff;
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 配置区域样式 */
.news-config-section {
    background: linear-gradient(145deg, #1A1A2E, #16213E);
    border: 2px solid rgba(100, 181, 246, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.news-config-section select {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    height: 40px !important;
    min-height: 40px !important;
    padding: 8px 12px !important;
    line-height: 1.4 !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    border-radius: 6px !important;
    background: #16213E !important;
    color: #E2E2E2 !important;
}

.news-config-section select:focus {
    border-color: #64B5F6;
    box-shadow: 0 0 10px rgba(100, 181, 246, 0.3);
}

/* 统计卡片样式 */
.stat-card {
    background: linear-gradient(145deg, #1A1A2E, #0F3460);
    border: 1px solid rgba(100, 181, 246, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(100, 181, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(100, 181, 246, 0.2);
    border-color: rgba(100, 181, 246, 0.4);
}

.stat-card div:first-child {
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 加载动画样式 */
#news-loading {
    background: linear-gradient(145deg, #1A1A2E, #0F3460);
    border: 2px solid rgba(100, 181, 246, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

#news-progress-bar {
    background: linear-gradient(90deg, #4CAF50, #45a049, #66BB6A);
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 文章内容样式 */
#news-meta-info {
    background: linear-gradient(145deg, #1A1A2E, #16213E);
    border: 1px solid rgba(100, 181, 246, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-size: 14px;
}

#news-article-content {
    background: linear-gradient(145deg, #1A1A2E, #0F3460);
    border: 1px solid rgba(100, 181, 246, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    font-family: '宋体', 'SimSun', serif;
    line-height: 1.9;
}

#news-article-content h2 {
    background: linear-gradient(45deg, #64B5F6, #42A5F5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
}

#news-article-content h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #64B5F6, #42A5F5);
    border-radius: 2px;
}

/* 题目样式 */
.news-question {
    background: linear-gradient(145deg, #16213E, #0F3460);
    border: 1px solid rgba(100, 181, 246, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

.news-question:hover {
    border-color: rgba(100, 181, 246, 0.4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.news-question::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #64B5F6, #42A5F5);
    border-radius: 2px 0 0 2px;
}

.news-option {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.news-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.1), transparent);
    transition: left 0.4s ease;
}

.news-option:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(100, 181, 246, 0.2);
}

.news-option:hover::before {
    left: 100%;
}

.news-option.selected {
    background: linear-gradient(145deg, #1E4B2F, #2E5B3F);
    border-color: #4CAF50 !important;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

/* 按钮样式 */
#generate-news-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 20px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
}

/* 时文阅读按钮对齐样式 */
#generate-english-news-btn {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    display: inline-block !important;
    vertical-align: bottom !important;
    padding: 0 20px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    margin: 0 !important;
    line-height: 40px !important;
    border: none !important;
}

#generate-news-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#generate-news-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

#generate-news-btn:active::before {
    width: 300px;
    height: 300px;
}

#submit-news-answers-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    transition: all 0.3s ease;
}

#submit-news-answers-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

#new-news-btn {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    transition: all 0.3s ease;
}

#new-news-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3);
}

/* 阅读报告样式 */
.news-report {
    background: linear-gradient(145deg, #1A1A2E, #0F3460);
    border: 1px solid rgba(100, 181, 246, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* 分数显示样式 */
.score-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    min-width: 80px;
    max-width: 80px;
    min-height: 80px;
    max-height: 80px;
    border-radius: 50%;
    color: white;
    font-weight: 700;
    font-size: 24px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    aspect-ratio: 1;
}

.score-circle::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: rotate 3s linear infinite;
}

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

.score-excellent {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.score-good {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

.score-poor {
    background: linear-gradient(135deg, #F44336, #D32F2F);
}

/* 答题详情样式 */
.answer-detail {
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.answer-detail.correct {
    background: linear-gradient(145deg, #1E4B2F, #2E5B3F);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.answer-detail.incorrect {
    background: linear-gradient(145deg, #4A1E1E, #5C2E2E);
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.answer-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.answer-detail.correct::before {
    background: linear-gradient(180deg, #4CAF50, #45a049);
}

.answer-detail.incorrect::before {
    background: linear-gradient(180deg, #F44336, #D32F2F);
}

/* 重点词汇样式 */
.vocabulary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.vocabulary-item {
    background: linear-gradient(145deg, #0F3460, #16213E);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(255, 152, 0, 0.2);
    transition: all 0.3s ease;
}

.vocabulary-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.2);
    border-color: rgba(255, 152, 0, 0.4);
}

.vocabulary-word {
    color: #4CAF50;
    font-weight: 600;
    margin-bottom: 5px;
}

/* 学习建议样式 */
.learning-advice {
    background: linear-gradient(145deg, #16213E, #0F3460);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(100, 181, 246, 0.2);
    line-height: 1.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #newsReadingPanel .panel-header {
        padding: 20px 15px;
    }
    
    #newsReadingPanel .panel-header h2 {
        font-size: 24px;
    }
    
    .news-config-section {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }
    
    .news-stats-section {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    #news-article-content {
        padding: 20px 15px;
        font-size: 15px;
    }
    
    .news-question {
        padding: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .vocabulary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .news-stats-section {
        grid-template-columns: 1fr !important;
    }
    
    #news-meta-info {
        flex-direction: column;
        text-align: left;
        gap: 8px;
    }
    
    #news-meta-info > div {
        width: 100%;
    }
}

/* 暗色主题适配 */
@media (prefers-color-scheme: dark) {
    .news-config-section,
    .stat-card,
    #news-loading,
    #news-article-content,
    .news-question,
    .news-report {
        background: linear-gradient(145deg, #0D1117, #161B22);
        border-color: rgba(100, 181, 246, 0.1);
    }
    
    #news-article-content h2 {
        background: linear-gradient(45deg, #58A6FF, #79C0FF);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-up {
    animation: slideUp 0.6s ease-out;
}

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

/* 选中标记动画 */
.selection-indicator {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #4CAF50;
    font-size: 20px;
    opacity: 0;
    transition: all 0.3s ease;
}

.news-option.selected .selection-indicator {
    opacity: 1;
    animation: checkmark 0.3s ease-out;
}

@keyframes checkmark {
    0% { transform: translateY(-50%) scale(0); }
    50% { transform: translateY(-50%) scale(1.2); }
    100% { transform: translateY(-50%) scale(1); }
}

/* 加载动画增强 */
#news-loading .fa-spinner {
    animation: spin 1s linear infinite;
    margin-right: 10px;
    color: #64B5F6;
}

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

/* 按钮悬停效果 */
.btn-hover-enhanced {
    position: relative;
    overflow: hidden;
}

.btn-hover-enhanced::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn-hover-enhanced:hover::after {
    width: 400px;
    height: 400px;
}

/* 自定义滚动条 */
#news-article-content::-webkit-scrollbar,
#news-questions-container::-webkit-scrollbar {
    width: 8px;
}

#news-article-content::-webkit-scrollbar-track,
#news-questions-container::-webkit-scrollbar-track {
    background: #0F3460;
    border-radius: 4px;
}

#news-article-content::-webkit-scrollbar-thumb,
#news-questions-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #64B5F6, #42A5F5);
    border-radius: 4px;
}

#news-article-content::-webkit-scrollbar-thumb:hover,
#news-questions-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #42A5F5, #2196F3);
}