/**
 * 51漫画 - 全新原创CSS样式
 * 域名: 51self-learning.com
 * 设计风格: 现代渐变、卡片式布局、深色主题
 */

/* ========== 基础重置 ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #f59e0b;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f1f5f9;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --shadow: 0 10px 40px rgba(0,0,0,0.15);
    --radius: 16px;
    --radius-sm: 8px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* ========== 布局容器 ========== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-dark {
    background: var(--dark);
    color: var(--white);
}

/* ========== 顶部导航 ========== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.site-logo img {
    height: 40px;
    width: auto;
}

.site-logo span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--gray);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
    background: rgba(99,102,241,0.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--dark);
    transition: all 0.3s ease;
}

/* ========== 英雄区域 ========== */
.hero {
    padding: 120px 0 80px;
    background: var(--dark);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient);
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero h1 em {
    font-style: normal;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--gray-light);
    margin-bottom: 40px;
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== 按钮样式 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(99,102,241,0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99,102,241,0.5);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
}

/* ========== 轮播Banner ========== */
.banner-section {
    padding: 40px 0;
    background: var(--dark);
}

.banner-wrapper {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
}

.banner-track {
    display: flex;
    transition: transform 0.5s ease;
}

.banner-item {
    min-width: 100%;
    position: relative;
}

.banner-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--white);
}

.banner-overlay h2 {
    font-size: 1.75rem;
    margin-bottom: 10px;
}

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.banner-dot.active {
    background: var(--primary);
    width: 30px;
    border-radius: 5px;
}

/* ========== 区块标题 ========== */
.section-head {
    text-align: center;
    margin-bottom: 50px;
}

.section-head h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.section-head p {
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-dark .section-head p {
    color: var(--gray-light);
}

/* ========== 视频卡片网格 ========== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.video-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.video-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.video-card:hover .video-thumb img {
    transform: scale(1.1);
}

.video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.video-play::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent var(--white);
    margin-left: 4px;
}

.video-card:hover .video-play {
    opacity: 1;
}

.video-time {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.video-live {
    background: var(--secondary);
}

.video-body {
    padding: 16px;
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray);
    font-size: 0.85rem;
}

.video-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========== 分类标签 ========== */
.category-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-tab {
    padding: 10px 24px;
    border-radius: 50px;
    background: var(--white);
    color: var(--gray);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.category-tab:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.category-tab.active {
    background: var(--gradient);
    color: var(--white);
}

/* ========== 专家团队 ========== */
.expert-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.expert-card {
    text-align: center;
    padding: 30px 20px;
    background: var(--white);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.expert-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.expert-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 4px solid var(--light);
}

.expert-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.expert-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.expert-role {
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.expert-bio {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ========== 特色功能 ========== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    padding: 40px 30px;
    background: var(--dark-light);
    border-radius: var(--radius);
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, var(--dark-light), var(--dark));
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--white);
}

.feature-card p {
    color: var(--gray-light);
    font-size: 0.95rem;
}

/* ========== 用户评价 ========== */
.review-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.review-card {
    padding: 30px;
    background: var(--white);
    border-radius: var(--radius);
    position: relative;
}

.review-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 25px;
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.review-text {
    font-size: 1rem;
    color: var(--gray);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.review-author-info h4 {
    font-size: 1rem;
    font-weight: 600;
}

.review-author-info span {
    font-size: 0.85rem;
    color: var(--gray);
}

.review-stars {
    color: var(--accent);
    margin-bottom: 15px;
}

/* ========== FAQ ========== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-question {
    padding: 20px 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 25px 20px;
    max-height: 500px;
}

.faq-answer p {
    color: var(--gray);
}

/* ========== 页脚 ========== */
.site-footer {
    background: var(--dark);
    color: var(--gray-light);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    margin-top: 15px;
    font-size: 0.95rem;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 20px;
}

.footer-links a {
    display: block;
    padding: 8px 0;
    color: var(--gray-light);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-copyright {
    font-size: 0.9rem;
}

.footer-update {
    font-size: 0.9rem;
    color: var(--gray);
}

/* ========== 面包屑 ========== */
.breadcrumb {
    padding: 100px 0 20px;
    background: var(--dark);
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-light);
    font-size: 0.9rem;
}

.breadcrumb-list a {
    color: var(--gray-light);
}

.breadcrumb-list a:hover {
    color: var(--primary);
}

.breadcrumb-sep {
    color: var(--gray);
}

/* ========== 页面标题 ========== */
.page-hero {
    padding: 40px 0 60px;
    background: var(--dark);
    text-align: center;
    color: var(--white);
}

.page-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.page-hero p {
    color: var(--gray-light);
    font-size: 1.1rem;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .expert-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 5px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: var(--shadow);
    }
    
    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .main-nav a {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .expert-grid,
    .feature-grid,
    .review-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .banner-item img {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
}
