/* ===================================
   mjdbjgs.com - 现代渐变风格
   版本：3.0 (2026-04-05)
   设计：现代科技感 + 邪修神秘元素
   =================================== */

/* === CSS 变量系统 === */
:root {
    /* 主色调 - 紫色渐变 */
    --primary-start: #667eea;
    --primary-end: #764ba2;
    --primary-dark: #5a67d8;
    --primary-light: #a3bffa;
    
    /* 辅助色 - 蓝色科技 */
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    
    /* 邪修主题色 - 暗红 */
    --xiuxiu-red: #dc2626;
    --xiuxiu-dark: #991b1b;
    
    /* 中性色 */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-light: #f1f5f9;
    
    /* 背景色 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* 阴影系统 */
    --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);
    --shadow-glow-hover: 0 0 60px rgba(102, 126, 234, 0.5);
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* 过渡 */
    --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, "Noto Sans SC", 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) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    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);
}

@media (prefers-color-scheme: dark) {
    header {
        background: rgba(15, 23, 42, 0.85);
    }
    header.scrolled {
        background: rgba(15, 23, 42, 0.95);
    }
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: opacity var(--transition-base);
}

.logo a:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: color var(--transition-base);
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bg-gradient);
    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;
}

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

/* === Hero 区域 - 渐变背景 === */
.hero {
    background: var(--bg-gradient);
    color: white;
    padding: 120px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

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

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

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

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

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

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

.btn {
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-base);
    display: inline-block;
}

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

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

.btn-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-3px);
}

/* === AI 助手区域 === */
.ai-assistant {
    padding: 80px 20px;
    background: var(--bg-primary);
}

.ai-assistant h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 10px;
}

.ai-assistant > p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 50px;
}

.ai-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.ai-feature {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.ai-feature:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-light);
}

.ai-feature-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.ai-feature-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.ai-feature-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* === 技术文章区域 === */
.articles {
    padding: 80px 20px;
    background: var(--bg-secondary);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 10px;
}

.section-desc {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 50px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.article-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow-hover);
    border-color: var(--primary-light);
}

.tags {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-beginner {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.tag-advanced {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.tag-project {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.article-card h3 {
    margin-bottom: 12px;
}

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

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

.meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 15px;
}

.read-more {
    color: var(--primary-start);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap var(--transition-base);
}

.read-more:hover {
    gap: 10px;
}

/* === 视频教程区域 === */
.videos {
    padding: 80px 20px;
    background: var(--bg-primary);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

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

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

.video-thumbnail {
    position: relative;
    padding-top: 56.25%;
    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.1);
}

.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;
    cursor: pointer;
    transition: all var(--transition-base);
}

.play-button:before {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 5px;
}

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

.video-info {
    padding: 20px;
    background: var(--bg-primary);
}

.video-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

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

/* === 公众号区域 === */
.wechat {
    padding: 80px 20px;
    background: linear-gradient(135deg, #07c160 0%, #06a855 100%);
    color: white;
    text-align: center;
}

.wechat h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.wechat p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 30px;
}

.wechat-qr {
    width: 200px;
    height: 200px;
    background: white;
    border-radius: var(--radius-lg);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
}

.wechat-qr-placeholder {
    font-size: 4rem;
    color: #07c160;
}

/* === 页脚 === */
footer {
    background: var(--bg-primary);
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--bg-tertiary);
}

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

footer a:hover {
    text-decoration: underline;
}

/* === 响应式 === */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero {
        padding: 80px 20px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .article-grid,
    .video-grid {
        grid-template-columns: 1fr;
    }
}

/* === 动画工具类 === */
.fade-in {
    animation: fadeIn 0.5s ease;
}

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

.slide-up {
    animation: slideUp 0.5s ease;
}

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

/* === 加载动画 === */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s ease infinite;
}
