/* ===================================
   mjdbjgs.com - 增强版样式
   版本：2.0 (2026-04-04)
   设计：现代简约 + 科技感
   =================================== */

/* === CSS 变量系统 === */
:root {
    /* 主色调 */
    --primary-start: #667eea;
    --primary-end: #764ba2;
    --primary-dark: #5a67d8;
    
    /* 辅助色 */
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    
    /* 中性色 */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    /* 背景色 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.3);
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* === 深色模式 === */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f1f5f9;
        --text-secondary: #94a3b8;
        --text-muted: #64748b;
        
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-tertiary: #334155;
        
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === 导航栏 - 毛玻璃效果 === */
header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-base);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.logo a:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: none;
    position: relative;
    padding: 0.5rem 0;
    transition: color var(--transition-fast);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-start), var(--primary-end));
    transition: width var(--transition-base);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-start);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* 移动端汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* === Hero 区域 - 增强版 === */
.hero {
    background: linear-gradient(135deg, var(--primary-start) 0%, var(--primary-end) 100%);
    color: white;
    padding: 6rem 0 8rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: white;
    color: var(--primary-start);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-start);
}

/* === AI 助手区 - 悬浮卡片 === */
.ai-assistant {
    background: var(--bg-primary);
    margin: -4rem auto 3rem;
    max-width: 1000px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    position: relative;
    z-index: 10;
}

.ai-assistant h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.8rem;
}

.ai-assistant p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.ai-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.ai-feature {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-base);
    cursor: pointer;
    text-decoration: none;
    display: block;
    border: 1px solid transparent;
}

.ai-feature:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(102, 126, 234, 0.1) 100%);
    border-color: rgba(102, 126, 234, 0.3);
}

.ai-feature-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
    transition: transform var(--transition-base);
}

.ai-feature:hover .ai-feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.ai-feature-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: block;
    font-size: 1.1rem;
}

.ai-feature-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: block;
    line-height: 1.5;
}

/* === 文章卡片系统 === */
.section-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-align: center;
}

.section-desc {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    text-align: center;
    font-size: 1.1rem;
}

.articles {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.article-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid var(--bg-tertiary);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(102, 126, 234, 0.3);
}

.article-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
    line-height: 1.4;
}

.article-card h3 a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.article-card h3 a:hover {
    color: var(--primary-start);
}

.article-card .meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}

.article-card .excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
    flex: 1;
}

.article-card .read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    color: var(--primary-start);
    text-decoration: none;
    font-weight: 600;
    transition: gap var(--transition-fast);
}

.article-card .read-more:hover {
    gap: 0.75rem;
}

/* 标签系统 */
.tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.tag-beginner {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
}

.tag-project {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-purple);
}

.tag-advanced {
    background: rgba(236, 72, 153, 0.1);
    color: var(--accent-pink);
}/* === 视频区域 === */
.videos {
    background: var(--bg-primary);
    padding: 4rem 2rem;
    margin: 3rem 0;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.video-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    cursor: pointer;
}

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

.video-thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 比例 */
    background: var(--bg-tertiary);
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(102, 126, 234, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.play-button::before {
    content: '▶';
    color: white;
    font-size: 1.5rem;
    margin-left: 4px;
}

.video-card:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--primary-start);
}

.video-info {
    padding: 1.5rem;
}

.video-info h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.video-info .meta {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* === 公众号区域 === */
.wechat {
    background: var(--bg-primary);
    padding: 4rem 2rem;
    margin: 3rem auto;
    max-width: 1000px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.wechat h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    font-size: 2rem;
}

.wechat-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
    border-radius: var(--radius-lg);
    color: white;
    box-shadow: var(--shadow-glow);
}

.wechat-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.wechat-info .desc {
    opacity: 0.95;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.wechat-info .wxid {
    opacity: 0.9;
    font-size: 0.95rem;
}

.wechat-info .wxid strong {
    font-size: 1.1rem;
    display: block;
    margin-top: 0.5rem;
}

.qr-code {
    width: 200px;
    text-align: center;
    flex-shrink: 0;
}

.qr-code img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    background: white;
    border-radius: var(--radius-md);
    padding: 8px;
    box-shadow: var(--shadow-lg);
}

.qr-code .tip {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.75rem;
}

/* === 页脚 === */
footer {
    background: var(--bg-primary);
    color: var(--text-secondary);
    padding: 3rem 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--bg-tertiary);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-content p {
    margin-bottom: 0.75rem;
}

.footer-content a {
    color: var(--primary-start);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.beian {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* === 动画关键帧 === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === 加载动画 === */
.loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--primary-start);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === 响应式设计 === */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        opacity: 0;
        transition: all var(--transition-base);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .hero {
        padding: 4rem 0 6rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .ai-assistant {
        margin: -3rem 1rem 2rem;
        padding: 1.5rem;
    }

    .ai-features {
        grid-template-columns: 1fr;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .wechat-card {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* === 辅助类 === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: 4rem; }

.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mb-4 { margin-bottom: 4rem; }

/* === 滚动条美化 === */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}