:root {
    --primary: #ff7b6b;
    --primary-dark: #e76b5b;
    --secondary: #5d9cec;
    --accent: #4cd964;
    --light: #fff9f5;
    --dark: #4a3f35;
    --gray: #f8f5f0;
    --gray-dark: #e9e5de;
    --shadow: 0 8px 24px rgba(93, 64, 55, 0.08);
    --shadow-hover: 0 12px 32px rgba(93, 64, 55, 0.15);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--light);
    color: #333;
    line-height: 1.7;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航栏 */
.top-bar {
    background: var(--dark);
    color: white;
    padding: 8px 0;
    font-size: 0.9rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info {
    display: flex;
    gap: 20px;
}

.contact-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.social-top {
    display: flex;
    gap: 12px;
}

.social-top a {
    color: white;
    transition: var(--transition);
}

.social-top a:hover {
    color: var(--primary);
}

/* 主导航栏 */
header {
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--dark);
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text h1 {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.logo-text span {
    font-size: 0.9rem;
    color: #777;
    font-weight: 400;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-list a {
    display: block;
    padding: 12px 20px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    border-radius: 25px;
    transition: var(--transition);
    position: relative;
}

.nav-list a:hover, .nav-list a.active {
    color: var(--primary);
    background: rgba(255, 123, 107, 0.08);
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.nav-list a:hover::after, .nav-list a.active::after {
    transform: scaleX(1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-btn, .cart-btn, .user-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray);
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.search-btn:hover, .cart-btn:hover, .user-btn:hover {
    background: var(--primary);
    color: white;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

/* 页面标题 */
.page-header {
    background: linear-gradient(135deg, rgba(255, 250, 245, 0.9), rgba(255, 245, 240, 0.9)),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100" opacity="0.05"><path d="M20,20 Q40,5 60,20 T100,20 L80,80 Q60,95 40,80 T0,80 Z" fill="%234a3f35"/></svg>');
    padding: 100px 0 60px;
    text-align: center;
}

.page-header h2 {
    font-size: 3rem;
    color: var(--dark);
    margin-bottom: 15px;
    font-weight: 800;
}

.page-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb span {
    color: #888;
}

/* 教程筛选 */
.section {
    padding: 60px 0;
}

.tutorial-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid var(--gray-dark);
    border-radius: 30px;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 30px;
    padding: 8px 20px;
    box-shadow: var(--shadow);
}

.search-box input {
    border: none;
    outline: none;
    padding: 8px 12px;
    width: 250px;
    font-size: 1rem;
}

.search-box button {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
}

/* 教程分类 */
.tutorial-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.category-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.category-img {
    height: 200px;
    overflow: hidden;
}

.category-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover .category-img img {
    transform: scale(1.05);
}

.category-content {
    padding: 25px;
}

.category-badge {
    display: inline-block;
    padding: 5px 12px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.category-badge.beginner {
    background: var(--accent);
}

.category-badge.intermediate {
    background: var(--secondary);
}

.category-badge.advanced {
    background: #ff6b9d;
}

.category-content h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.category-content p {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.category-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray);
}

.category-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #888;
    font-size: 0.9rem;
}

/* 教程视频部分 */
.video-section {
    background: var(--gray);
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 50px;
}

.section-subtitle {
    text-align: center;
    color: #666;
    max-width: 700px;
    margin: 0 auto 50px;
    font-size: 1.1rem;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.video-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.video-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.play-btn:hover {
    background: var(--primary);
    color: white;
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.video-info {
    padding: 20px;
}

.video-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.video-info p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #888;
    font-size: 0.9rem;
}

/* 分步教程 */
.step-tutorials {
    padding: 80px 0;
}

.step-container {
    max-width: 900px;
    margin: 0 auto;
}

.step-item {
    display: flex;
    margin-bottom: 50px;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
    margin-right: 30px;
    z-index: 1;
}

.step-content {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    flex: 1;
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark);
}

.step-content p {
    margin-bottom: 20px;
    color: #666;
}

.step-image {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.step-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.step-tips {
    background: rgba(255, 123, 107, 0.1);
    border-left: 4px solid var(--primary);
    padding: 15px;
    border-radius: 0 8px 8px 0;
    margin-top: 20px;
}

.step-tips h4 {
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 工具推荐 */
.tools-section {
    background: var(--gray);
    padding: 80px 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.tool-card {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.tool-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.tool-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark);
}

.tool-card p {
    color: #666;
    margin-bottom: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 123, 107, 0.3);
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* 下载资源 */
.downloads-section {
    padding: 80px 0;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.download-card {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.download-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.download-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.download-info h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--dark);
}

.download-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.download-size {
    color: #888;
    font-size: 0.85rem;
}

/* 页脚 */
footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-links i {
    width: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.9rem;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(255, 123, 107, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* 视频模态框 */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1001;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    width: 90%;
    max-width: 800px;
    overflow: hidden;
    position: relative;
}

.modal-header {
    padding: 20px;
    background: var(--dark);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    padding: 30px;
}

.modal-video {
    width: 100%;
    height: 400px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .top-bar {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 100;
    }

    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        gap: 5px;
    }

    .page-header h2 {
        font-size: 2.3rem;
    }

    .section {
        padding: 40px 0;
    }

    .tutorial-filter {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box input {
        width: 100%;
    }

    .tutorial-categories, .video-grid, .tools-grid, .download-grid {
        grid-template-columns: 1fr;
    }

    .step-item {
        flex-direction: column;
    }

    .step-number {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .modal-video {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 80px 0 40px;
    }

    .page-header h2 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }
}
