/**
 * 个性化学习诊断报告 - 卡片样式
 * 用于打造高潮体验的精致卡片设计
 */

/* 报告容器 */
.summary-report {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 0;
    animation: fadeInUp 0.6s ease-out;
}

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

/* 卡片基础样式 */
.summary-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 10px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.1);
    animation: cardFadeIn 0.5s ease-out backwards;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 卡片标题 */
.summary-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-card-title .icon {
    font-size: 24px;
}

/* 庆祝卡片 - 特殊高亮 */
.summary-card.celebration {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9e7 100%);
    border: 2px solid #fbbf24;
    box-shadow: 
        0 0 20px rgba(251, 191, 36, 0.3),
        0 4px 6px rgba(0, 0, 0, 0.05);
    animation: celebration 1s ease-out;
}

@keyframes celebration {
    0% { transform: scale(0.9); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.celebration .summary-card-title {
    color: #b45309;
    font-size: 20px;
}

.celebration .card-content {
    font-size: 16px;
    line-height: 1.6;
    color: #78350f;
}

/* 掌握度分析卡片 */
.summary-card.mastery {
    background: linear-gradient(135deg, #dcfce7 0%, #f0fdf4 100%);
    border: 1px solid #4ade80;
}

.mastery .summary-card-title {
    color: #15803d;
}

.mastery .section-title {
    font-size: 16px;
    font-weight: 600;
    color: #166534;
    margin-top: 12px;
    margin-bottom: 8px;
}

.mastery .card-content ul {
    margin: 0;
    padding-left: 20px;
}

.mastery .card-content li {
    margin: 6px 0;
    color: #14532d;
    line-height: 1.5;
}

/* 推荐内容卡片 */
.summary-card.recommendations {
    background: linear-gradient(135deg, #fce7f3 0%, #fef3f9 100%);
    border: 1px solid #f472b6;
}

.recommendations .summary-card-title {
    color: #be185d;
}

.recommendation-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
    border: 1px solid rgba(244, 114, 182, 0.2);
    transition: all 0.3s ease;
}

.recommendation-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 114, 182, 0.2);
}

.recommendation-item .item-type {
    font-size: 16px;
    font-weight: 600;
    color: #be185d;
    margin-bottom: 8px;
}

.recommendation-item .item-title {
    font-size: 15px;
    font-weight: 500;
    color: #9f1239;
    margin-bottom: 6px;
}

.recommendation-item .item-meta {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.recommendation-item .item-description {
    font-size: 14px;
    color: #831843;
    line-height: 1.5;
}

/* 鼓励卡片 */
.summary-card.encouragement {
    background: linear-gradient(135deg, #e0e7ff 0%, #eef2ff 100%);
    border: 1px solid #a5b4fc;
    text-align: center;
}

.encouragement .summary-card-title {
    color: #4338ca;
    justify-content: center;
}

.encouragement .card-content {
    font-size: 15px;
    line-height: 1.6;
    color: #3730a3;
    font-style: italic;
}

/* 卡片内容通用样式 */
.card-content {
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
    white-space: pre-line;
    
    /* 公式超长时支持卡片内横向滑动 */
    overflow-x: auto; /* 横向超出时可滚动 */
    overflow-y: visible; /* 纵向完全展示，不滚动 */
    
    /* 滚动条样式优化 */
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

/* Webkit 浏览器（Chrome, Safari）滚动条样式 */
.card-content::-webkit-scrollbar {
    height: 6px;
}

.card-content::-webkit-scrollbar-track {
    background: transparent;
}

.card-content::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.card-content::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

.card-content strong {
    font-weight: 600;
    color: #1e293b;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .summary-card {
        padding: 16px;
        border-radius: 12px;
    }
    
    .summary-card-title {
        font-size: 16px;
    }
    
    .card-content {
        font-size: 13px;
    }
    
    .recommendation-item {
        padding: 12px;
    }
}

/* 动画延迟，让卡片依次出现 */
.summary-card:nth-child(1) { animation-delay: 0s; }
.summary-card:nth-child(2) { animation-delay: 0.1s; }
.summary-card:nth-child(3) { animation-delay: 0.2s; }
.summary-card:nth-child(4) { animation-delay: 0.3s; }
.summary-card:nth-child(5) { animation-delay: 0.4s; }

/* 高亮动画（用于庆祝卡片） */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.celebration .summary-card-title {
    animation: pulse 2s ease-in-out infinite;
}

