/* ========================================
   编程教程页面专属样式 - 香水轻奢风
   配色：浅紫 + 纯白 + 香槟金
   ======================================== */

/* 教程英雄区域 */
.tutorial-hero {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8f5fc 0%, #ffffff 50%, #faf8f0 100%);
    position: relative;
    overflow: hidden;
}

.tutorial-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(147, 112, 219, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text {
    padding: 20px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #9370db 0%, #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero-description {
    font-size: 1.2rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 35px;
}

.hero-stats {
    display: flex;
    gap: 30px;
}

.stat-box {
    text-align: center;
    padding: 20px 25px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(147, 112, 219, 0.1);
    border: 1px solid rgba(147, 112, 219, 0.08);
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(147, 112, 219, 0.15);
}

.stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #9370db;
    margin-bottom: 8px;
}

.stat-desc {
    font-size: 0.9rem;
    color: #999;
}

/* 代码窗口效果 */
.code-window {
    background: #1e1e2e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(147, 112, 219, 0.3);
}

.window-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #2a2a3e;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca40; }

.title {
    margin-left: auto;
    color: #888;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

.window-body {
    padding: 25px;
    overflow-x: auto;
}

.window-body pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.8;
}

.window-body code {
    color: #a9b7c6;
}

.tag { color: #cc7832; }
.attr { color: #9876aa; }
.str { color: #6a8759; }

/* 学习路径区域 */
.learning-path {
    padding: 100px 0;
    background: #ffffff;
}

.path-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    position: relative;
}

.path-steps::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(90deg, rgba(147, 112, 219, 0.2) 0%, rgba(212, 175, 55, 0.2) 100%);
    z-index: 1;
}

.path-step {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
}

.step-number {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, #9370db, #d4af37);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(147, 112, 219, 0.3);
    transition: all 0.4s ease;
}

.path-step:hover .step-number {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.4);
}

.step-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.1), rgba(212, 175, 55, 0.1));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-content h3 {
    font-size: 1.3rem;
    color: #9370db;
    margin-bottom: 12px;
    font-weight: 600;
}

.step-content p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 15px;
}

.step-topics {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    background: #faf8fc;
    border-radius: 10px;
    padding: 15px;
}

.step-topics li {
    padding: 8px 0;
    color: #555;
    font-size: 0.9rem;
    position: relative;
    padding-left: 20px;
}

.step-topics li::before {
    content: '•';
    position: absolute;
    left: 8px;
    color: #d4af37;
    font-weight: bold;
}

/* 课程区域 */
.courses-section {
    padding: 100px 0;
    background: linear-gradient(180deg, #faf8fc 0%, #ffffff 100%);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
}

.course-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(147, 112, 219, 0.1);
    border: 1px solid rgba(147, 112, 219, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(147, 112, 219, 0.2);
}

.course-thumb {
    position: relative;
    overflow: hidden;
}

.course-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.course-card:hover .course-thumb img {
    transform: scale(1.1);
}

.course-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #9370db, #d4af37);
    color: #ffffff;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.course-info {
    padding: 25px;
}

.course-info h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 12px;
    font-weight: 600;
}

.course-desc {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(147, 112, 219, 0.1);
}

.lesson-count {
    color: #9370db;
    font-size: 0.9rem;
    font-weight: 600;
}

.difficulty {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.difficulty.easy {
    background: rgba(39, 202, 64, 0.1);
    color: #27ca40;
}

.difficulty.medium {
    background: rgba(255, 189, 46, 0.1);
    color: #ffbd2e;
}

.difficulty.hard {
    background: rgba(255, 95, 86, 0.1);
    color: #ff5f56;
}

/* 资源区域 */
.resources-section {
    padding: 100px 0;
    background: #ffffff;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.resource-item {
    text-align: center;
    padding: 35px 25px;
    background: linear-gradient(180deg, #faf8fc 0%, #ffffff 100%);
    border-radius: 16px;
    border: 1px solid rgba(147, 112, 219, 0.08);
    transition: all 0.4s ease;
}

.resource-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(147, 112, 219, 0.15);
    border-color: rgba(147, 112, 219, 0.2);
}

.resource-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.1), rgba(212, 175, 55, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resource-item h3 {
    font-size: 1.2rem;
    color: #9370db;
    margin-bottom: 12px;
    font-weight: 600;
}

.resource-item p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .path-steps {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .path-steps::before {
        display: none;
    }
    
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .hero-content-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-text {
        order: -1;
    }
    
    .resources-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tutorial-hero {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .path-steps,
    .courses-grid,
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .learning-path,
    .courses-section,
    .resources-section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .stat-box {
        padding: 15px 20px;
    }
    
    .stat-num {
        font-size: 1.5rem;
    }
}
