/* 深度思考界面优化样式 */

/* 主容器优化 */
.deep-thinking-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 步骤导航栏 */
.steps-navigation {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    background: white;
    border-radius: 50px;
    padding: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.step-nav-item {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
    color: #666;
    position: relative;
}

.step-nav-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.step-nav-item.completed {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.step-nav-item.completed::after {
    content: "✓";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
}

/* 步骤卡片容器 */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* 单个步骤卡片 */
.step-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #667eea;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.6s ease forwards;
}

.step-card:nth-child(1) { animation-delay: 0.1s; border-left-color: #667eea; }
.step-card:nth-child(2) { animation-delay: 0.2s; border-left-color: #f093fb; }
.step-card:nth-child(3) { animation-delay: 0.3s; border-left-color: #4facfe; }
.step-card:nth-child(4) { animation-delay: 0.4s; border-left-color: #43e97b; }
.step-card:nth-child(5) { animation-delay: 0.5s; border-left-color: #fa709a; }

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* 步骤标题 */
.step-title {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    cursor: pointer;
    user-select: none;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    margin-right: 15px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.step-title h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    flex: 1;
}

.step-toggle {
    font-size: 20px;
    color: #667eea;
    transition: transform 0.3s ease;
}

.step-toggle.collapsed {
    transform: rotate(-90deg);
}

/* 步骤内容 */
.step-content {
    line-height: 1.8;
    color: #34495e;
    font-size: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.step-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0;
    margin: 0;
}

.step-content.expanded {
    max-height: 2000px;
    opacity: 1;
}

/* 数学公式优化 */
.step-content .math-expression {
    font-family: 'Times New Roman', serif;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    display: inline;
}

/* 步骤列表优化 */
.step-content ol {
    padding-left: 0;
    counter-reset: step-counter;
}

.step-content ol li {
    list-style: none;
    counter-increment: step-counter;
    margin-bottom: 15px;
    padding-left: 40px;
    position: relative;
}

.step-content ol li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* 知识点标签 */
.knowledge-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.knowledge-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* 易错提醒样式 */
.error-reminder {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    border: none;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
}

.error-reminder::before {
    content: "⚠️";
    font-size: 18px;
    margin-right: 8px;
}

/* 练习题样式 */
.practice-question {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border: none;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
}

.practice-question::before {
    content: "🎯";
    font-size: 18px;
    margin-right: 8px;
}

/* 动画效果 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 响应式设计：手机端横向紧凑版导航 + 更宽的内容区 */
@media (max-width: 768px) {
    .deep-thinking-container {
        padding: 12px 8px;
        margin: 0;
        border-radius: 14px;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 247, 255, 0.96) 100%);
        box-shadow: 0 10px 28px rgba(102, 126, 234, 0.15);
    }
    
    .steps-navigation {
        flex-direction: row;
        align-items: stretch;
        justify-content: flex-start;
        gap: 10px;
        padding: 10px 6px;
        overflow-x: auto;
        scrollbar-width: thin;
        background: transparent;
        box-shadow: none;
    }
    
    .steps-navigation::-webkit-scrollbar {
        height: 6px;
    }
    
    .steps-navigation::-webkit-scrollbar-thumb {
        background: rgba(102, 126, 234, 0.35);
        border-radius: 999px;
    }
    
    .step-nav-item {
        min-width: 132px;
        padding: 12px 14px;
        font-size: 12px;
        border: 1px solid rgba(102, 126, 234, 0.18);
        border-radius: 14px;
        background: white;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
        display: flex;
        flex-direction: column;
        gap: 6px;
        position: relative;
        text-align: left;
    }

    .step-nav-item > div:first-child {
        width: 28px;
        height: 28px;
        border-radius: 9px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 13px;
        box-shadow: 0 4px 10px rgba(102, 126, 234, 0.35);
    }
    
    .step-nav-item:not(:last-child)::after {
        content: '→';
        position: absolute;
        right: -12px;
        top: 50%;
        transform: translateY(-50%);
        color: #9ca3af;
        font-weight: 700;
        font-size: 14px;
    }
    
    .step-card {
        padding: 16px 14px;
        margin-bottom: 12px;
        border-left-width: 4px;
        border-radius: 14px;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
    }
    
    .step-title h3 {
        font-size: 17px;
    }
    
    .step-content {
        font-size: 15px;
        line-height: 1.7;
    }
}

/* 打印样式 */
@media print {
    .steps-navigation {
        display: none;
    }
    
    .step-toggle {
        display: none;
    }
    
    .step-content.collapsed {
        max-height: none;
        opacity: 1;
    }
    
    .step-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* 题目内容展示样式 */
.problem-display {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe6cc 100%);
    border-left: 4px solid #ff9800;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.1);
    animation: slideInFromTop 0.5s ease-out;
}

.problem-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 16px;
    color: #e65100;
    font-weight: 600;
}

.problem-icon {
    font-size: 20px;
    animation: bounce 1s ease-in-out infinite;
}

.problem-content {
    background: white;
    border-radius: 8px;
    padding: 15px;
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.problem-content::-webkit-scrollbar {
    width: 6px;
}

.problem-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.problem-content::-webkit-scrollbar-thumb {
    background: #ff9800;
    border-radius: 3px;
}

.problem-content::-webkit-scrollbar-thumb:hover {
    background: #f57c00;
}

/* 动画效果 */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}
