/* 教程详情页面样式 */

/* 教程头部 */
.tutorial-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    padding: 60px 0;
    align-items: center;
}

.tutorial-info {
    animation: fadeInLeft 0.8s;
}

.difficulty {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 20px;
}

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

.tutorial-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    color: #666;
    flex-wrap: wrap;
}

.tutorial-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tutorial-meta i {
    color: #ff6b9d;
}

.tutorial-info h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #333;
    line-height: 1.3;
}

.tutorial-desc {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

.tutorial-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    background: #fff5f8;
    color: #ff6b9d;
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.tutorial-video {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    animation: fadeInRight 0.8s;
}

.tutorial-video img {
    width: 100%;
    height: auto;
    max-width: 100%;
    box-sizing: border-box;
    display: block;
}

/* 教程主体内容 */
.tutorial-body {
    overflow-x: hidden;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 50px;
    padding: 60px 0;
}

.main-content {
    animation: fadeInUp 0.8s;
}

/* 步骤部分 */
.step-section {
    margin-bottom: 60px;
    padding-bottom: 60px;
    border-bottom: 2px solid #f0f0f0;
}

.step-section:last-of-type {
    border-bottom: none;
}

.step-section h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b9d, #ff3d7f);
    color: white;
    border-radius: 15px;
    font-size: 1.5rem;
    font-weight: bold;
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.step-content img {
    width: 100%;
    max-width: 600px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: block;
}

.step-text {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.step-text h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
}

.step-text p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

.step-text ul {
    list-style: none;
    margin-bottom: 20px;
}

.step-text li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    color: #555;
    line-height: 1.6;
}

.step-text li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #ff6b9d;
    font-weight: bold;
}

.step-text li strong {
    color: #333;
}

/* 提示框 */
.tip-box {
    background: #fff5f8;
    border-left: 4px solid #ff6b9d;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.tip-box i {
    color: #FFD700;
    font-size: 1.5rem;
    margin-top: 3px;
}

.tip-box p {
    color: #555;
    line-height: 1.8;
    margin: 0;
}

/* 产品推荐 */
.products-recommended {
    margin-top: 60px;
    padding-top: 60px;
    border-top: 2px solid #f0f0f0;
}

.products-recommended h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 30px;
}

.product-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.product-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.product-card h4 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 10px;
}

.product-card .price {
    color: #ff6b9d;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.btn-buy {
    display: inline-block;
    padding: 10px 30px;
    background: linear-gradient(135deg, #ff6b9d, #ff3d7f);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-buy:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.4);
}

/* 侧边栏 */
.sidebar {
    animation: fadeInRight 0.8s;
}

.sidebar-widget {
    background: #fff5f8;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6b9d;
}

.toc {
    list-style: none;
}

.toc li {
    margin-bottom: 12px;
}

.toc a {
    color: #555;
    text-decoration: none;
    transition: all 0.3s;
    display: block;
    padding: 8px 0;
}

.toc a:hover {
    color: #ff6b9d;
    padding-left: 10px;
}

.tools-list {
    list-style: none;
}

.tools-list li {
    padding: 10px 0;
    color: #555;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tools-list i {
    color: #4CAF50;
}

.related-tutorials {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.related-item {
    display: flex;
    gap: 15px;
    text-decoration: none;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s;
}

.related-item:hover {
    background: white;
}

.related-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
}

.related-item h4 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 5px;
}

.related-item span {
    color: #999;
    font-size: 0.9rem;
}

/* 动画 */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

/* 响应式设计 */
@media (max-width: 968px) {
    .tutorial-header {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .tutorial-body {
    overflow-x: hidden;
        grid-template-columns: 1fr;
    }

    .step-content {
        grid-template-columns: 1fr;
    }

    .tutorial-info h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .tutorial-meta {
        flex-direction: column;
        gap: 10px;
    }

    .step-section h2 {
        font-size: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .product-cards {
        grid-template-columns: 1fr;
    }
}