/* AI功能相关样式 - 统一管理 */

/* AI渐变背景动画 - 模拟图片中的柔和渐变效果 */
@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* AI渐变背景类 - 使用多层渐变和动画 */
.ai-gradient-bg {
    background: 
        radial-gradient(circle at 20% 50%, rgba(96, 165, 250, 0.8) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(168, 85, 247, 0.8) 0%, transparent 50%),
        linear-gradient(135deg, #60a5fa 0%, #3b82f6 25%, #6366f1 50%, #8b5cf6 75%, #a855f7 100%);
    background-size: 200% 200%, 200% 200%, 200% 200%;
    background-position: 0% 50%, 100% 50%, 0% 50%;
    animation: gradientFlow 8s ease infinite;
}

/* ========== AI评价回复相关样式 ========== */
.ai-review-reply-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border: 1px solid #e0e4ff;
    border-radius: 12px;
    padding: 10px;
    margin: 10px 0;
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.08);
}

.ai-review-reply-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ai-review-reply-title {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
}

.ai-review-reply-title::before {
    content: '✨';
    margin-right: 8px;
    font-size: 18px;
}

.ai-review-reply-btn {
    background: 
        radial-gradient(circle at 20% 50%, rgba(96, 165, 250, 0.8) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(168, 85, 247, 0.8) 0%, transparent 50%),
        linear-gradient(135deg, #60a5fa 0%, #3b82f6 25%, #6366f1 50%, #8b5cf6 75%, #a855f7 100%);
    background-size: 200% 200%, 200% 200%, 200% 200%;
    background-position: 0% 50%, 100% 50%, 0% 50%;
    animation: gradientFlow 8s ease infinite;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
}

.ai-review-reply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.ai-review-reply-btn .loading {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 6px;
}

.ai-review-reply-content {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    min-height: 120px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.ai-review-reply-content:empty::before {
    content: 'AI将为您生成专业的评价回复...';
    color: #999;
}

/* ========== AI按钮相关样式 ========== */
.ai-title-btn {
    background: 
        radial-gradient(circle at 20% 50%, rgba(96, 165, 250, 0.8) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(168, 85, 247, 0.8) 0%, transparent 50%),
        linear-gradient(135deg, #60a5fa 0%, #3b82f6 25%, #6366f1 50%, #8b5cf6 75%, #a855f7 100%);
    background-size: 200% 200%, 200% 200%, 200% 200%;
    background-position: 0% 50%, 100% 50%, 0% 50%;
    animation: gradientFlow 8s ease infinite;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.ai-title-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ai-title-btn:active {
    transform: translateY(0);
}

.ai-title-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ai-title-btn img {
    display: inline-block;
}

/* ========== AI分析页面相关样式 ========== */
.ai-analysis-container {
    padding: 20px 0;
}

/* 营种卡片列表 */
.course-summary-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    gap: 25px;
}

.course-summary-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.course-summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15);
}

.course-summary-header {
    background: 
        radial-gradient(circle at 20% 50%, rgba(96, 165, 250, 0.6) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(168, 85, 247, 0.6) 0%, transparent 50%),
        linear-gradient(135deg, #60a5fa 0%, #3b82f6 25%, #6366f1 50%, #8b5cf6 75%, #a855f7 100%);
    background-size: 200% 200%, 200% 200%, 200% 200%;
    background-position: 0% 50%, 100% 50%, 0% 50%;
    animation: gradientFlow 8s ease infinite;
    padding: 16px 20px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.course-summary-title {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.course-summary-title::before {
    content: '✨';
    font-size: 20px;
}

.course-summary-meta {
    font-size: 14px;
    opacity: 0.9;
    display: flex;
    gap: 15px;
    align-items: center;
}

.course-summary-body {
    padding: 25px;
}

/* ========== AI助手聊天窗口相关样式 ========== */
.ai-assistant-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 500px;
    height: 900px;
    z-index: 9999;
    transition: height 0.3s ease, width 0.3s ease;
}

.ai-assistant-wrapper {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-assistant-header {
    background: 
        radial-gradient(circle at 20% 50%, rgba(96, 165, 250, 0.8) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(168, 85, 247, 0.8) 0%, transparent 50%),
        linear-gradient(135deg, #60a5fa 0%, #3b82f6 25%, #6366f1 50%, #8b5cf6 75%, #a855f7 100%);
    background-size: 200% 200%, 200% 200%, 200% 200%;
    background-position: 0% 50%, 100% 50%, 0% 50%;
    animation: gradientFlow 8s ease infinite;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.ai-assistant-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.ai-assistant-header .button-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ai-assistant-history,
.ai-assistant-collapse,
.ai-assistant-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.ai-assistant-history:hover,
.ai-assistant-collapse:hover,
.ai-assistant-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ai-assistant-collapse {
    font-size: 20px;
    line-height: 1;
}

.ai-assistant-close {
    font-size: 24px;
    line-height: 1;
}

.ai-assistant-iframe {
    flex: 1;
    border: none;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease, height 0.3s ease;
}

