/* Blog Styles for InstantGames */

:root {
    --primary-color: #4caf50;
    --secondary-color: #2196f3;
    --accent-color: #e91e63;
    --bg-color: #f5f5f7;
    --text-color: #1d1d1f;
    --card-bg: #fff;
    --header-bg: #1d1d1f;
    --header-text: #f5f5f7;
    --footer-bg: #1d1d1f;
    --footer-text: #f5f5f7;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    --border-radius: 10px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Global Header */
.blog-header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.blog-header .header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-header .logo {
    font-size: 1.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    color: var(--header-text);
}

.blog-header .logo i {
    color: var(--primary-color);
    margin-right: 10px;
}

.blog-header nav {
    display: flex;
    align-items: center;
}

.blog-header .menu-btn {
    display: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--header-text);
}

.blog-header .nav-links {
    list-style: none;
    display: flex;
    align-items: center;
}

.blog-header .nav-links li {
    margin-left: 20px;
}

.blog-header .nav-links a {
    color: var(--header-text);
    padding: 0.4rem 0.6rem;
    transition: color 0.3s ease;
}

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

@media (max-width: 768px) {
    .blog-header .menu-btn {
        display: block;
    }

    .blog-header .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--header-bg);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: var(--shadow);
    }

    .blog-header .nav-links.active {
        display: flex;
    }

    .blog-header .nav-links li {
        margin: 0.5rem 0;
        text-align: center;
    }
}

/* Main Container */
.blog-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.blog-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.blog-description {
    font-size: 1.1rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Blog Post Cards (for index) */
.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-post-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.post-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.post-card-content {
    padding: 1.5rem;
}

.post-card-title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.post-card-title a {
    color: inherit;
    text-decoration: none;
}

.post-card-title a:hover {
    color: var(--primary-color);
}

.post-card-meta {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.post-card-date {
    margin-right: 1rem;
}

.post-card-category {
    background-color: var(--primary-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.8rem;
}

.post-card-excerpt {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--secondary-color);
}

/* Individual Post Page */
.blog-post {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.post-header {
    margin-bottom: 2rem;
    text-align: center;
}

.post-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    color: #666;
}

.post-date {
    margin-right: 1.5rem;
    display: flex;
    align-items: center;
}

.post-date i {
    margin-right: 0.4rem;
}

.post-category {
    background-color: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.9rem;
}

.post-content {
    line-height: 1.8;
    color: #333;
}

.post-content h2 {
    font-size: 1.8rem;
    margin: 2.5rem 0 1.2rem;
    color: var(--secondary-color);
}

.post-content h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--text-color);
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content ul, .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content pre {
    background-color: #f5f5f5;
    padding: 1.2rem;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.post-content code {
    font-family: 'Courier New', Courier, monospace;
    background-color: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1.5rem 0;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin-left: 0;
    margin-bottom: 1.5rem;
    font-style: italic;
    color: #555;
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.prev-post, .next-post {
    color: var(--secondary-color);
    transition: color 0.3s;
}

.prev-post:hover, .next-post:hover {
    color: var(--primary-color);
}

.back-to-list {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: var(--primary-color);
    font-weight: 500;
}

.back-to-list:hover {
    color: var(--secondary-color);
}

/* Author Section */
.author-section {
    display: flex;
    align-items: center;
    margin-top: 3rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
}

.author-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-right: 1.5rem;
}

.author-info h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.author-bio {
    color: #555;
    line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .blog-posts {
        grid-template-columns: 1fr;
    }
    
    .post-title {
        font-size: 1.8rem;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .post-date {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .author-section {
        flex-direction: column;
        text-align: center;
    }
    
    .author-image {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

/* Coming Soon Styling */
.coming-soon-overlay {
    position: relative;
}

.coming-soon-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #ff5722;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 2;
}

.post-card .coming-soon-overlay img,
.featured-post .coming-soon-overlay img {
    filter: brightness(0.9);
    transition: filter 0.3s ease;
}

.post-card:hover .coming-soon-overlay img,
.featured-post:hover .coming-soon-overlay img {
    filter: brightness(1);
}

/* 新增样式 - 个人化博客元素 */
.play-now-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin: 25px 0;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.play-now-box p {
    margin-bottom: 15px;
    font-weight: 500;
}

.play-button {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.play-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.play-button i {
    margin-right: 8px;
}

/* 错误提示卡片 */
.tip-card {
    background: #f8f9fa;
    border-left: 5px solid #28a745;
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* =====================================
   Article Detail Page Layout
   ===================================== */

/* Main article container */
.article-main {
    background-color: var(--bg-color);
    padding: 2rem 1.5rem;
    min-height: calc(100vh - 200px);
}

/* Article content wrapper with max-width */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 3rem 3rem;
    line-height: 1.8;
}

/* Article hero section */
.article-hero {
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 2px solid #eee;
    margin-bottom: 2.5rem;
}

.article-hero h1 {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 700;
}

.article-hero .subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
    font-weight: 400;
}

.article-hero .date {
    font-size: 0.95rem;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.article-hero .date i {
    color: var(--primary-color);
}

/* Article sections */
.article-section {
    margin-bottom: 3rem;
}

.article-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.article-section h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--text-color);
    font-weight: 600;
}

.article-section p {
    margin-bottom: 1.5rem;
    color: #333;
    line-height: 1.8;
}

.article-section ul,
.article-section ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-section li {
    margin-bottom: 0.8rem;
    line-height: 1.7;
}

.article-section li strong {
    color: var(--text-color);
}

/* Code blocks */
.article-section pre {
    background-color: #f6f8fa;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    line-height: 1.6;
}

.article-section code {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.9em;
    background-color: #f6f8fa;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    color: #24292e;
}

.article-section pre code {
    background: none;
    padding: 0;
    font-size: 0.9rem;
}

/* Lesson cards for dev logs */
.lesson-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lesson-card h3 {
    font-size: 1.2rem;
    margin: 0 0 0.8rem 0;
    color: var(--secondary-color);
}

.lesson-card p {
    margin: 0;
    color: #444;
    line-height: 1.7;
}

/* Responsive adjustments for articles */
@media (max-width: 768px) {
    .article-container {
        padding: 2rem 1.5rem;
        border-radius: 0;
    }
    
    .article-hero h1 {
        font-size: 1.8rem;
    }
    
    .article-hero .subtitle {
        font-size: 1rem;
    }
    
    .article-section h2 {
        font-size: 1.6rem;
    }
    
    .article-section h3 {
        font-size: 1.3rem;
    }
    
    .article-section pre {
        padding: 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .article-main {
        padding: 1rem 0.5rem;
    }
    
    .article-container {
        padding: 1.5rem 1rem;
    }
    
    .article-hero h1 {
        font-size: 1.5rem;
    }
    
    .article-section h2 {
        font-size: 1.4rem;
    }
}

.tip-card.error {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.tip-card h3, .tip-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.tip-card p {
    margin-bottom: 0;
    line-height: 1.6;
}

/* 实战小贴士网格 */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.tip-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.tip-item:hover {
    border-color: #4caf50;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.2);
}

.tip-item h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.1em;
}

.tip-item p {
    margin-bottom: 0;
    color: #666;
    line-height: 1.5;
}

/* 挑战目标列表 */
.challenge-list {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    list-style: none;
    margin: 25px 0;
}

.challenge-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.05em;
}

.challenge-list li:last-child {
    border-bottom: none;
}

.challenge-list strong {
    font-weight: 600;
}

/* 行动召唤区域 */
.call-to-action {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    text-align: center;
    padding: 40px 30px;
    border-radius: 15px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.3);
}

.call-to-action h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.cta-button {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    margin-bottom: 10px;
}

.cta-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.cta-button i {
    margin-right: 10px;
}

.cta-subtitle {
    margin: 10px 0 0 0;
    opacity: 0.9;
    font-style: italic;
}

/* 文章底部区域 */
.post-footer {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-top: 30px;
    border-top: 3px solid #4caf50;
}

.post-footer p {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.6;
}

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

.social-share p {
    margin-bottom: 15px;
    font-weight: 500;
    color: #333;
}

.share-btn {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 5px;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    text-decoration: none;
    color: #333;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.share-btn:hover {
    border-color: #4caf50;
    color: #4caf50;
    transform: translateY(-2px);
}

/* 相关内容侧边栏 */
.related-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.related-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

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

.related-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.related-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.related-item i {
    margin-right: 12px;
    font-size: 1.2em;
    color: #4caf50;
    width: 20px;
    text-align: center;
}

.related-item span {
    font-weight: 500;
}

/* 博客页脚 */
.blog-footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-links {
    margin-top: 15px;
}

.footer-links a {
    color: #ecf0f1;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #4caf50;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .tips-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .call-to-action {
        padding: 30px 20px;
    }
    
    .cta-button {
        padding: 12px 24px;
        font-size: 1em;
    }
    
    .challenge-list {
        padding: 20px;
    }
    
    .post-footer {
        padding: 20px;
    }
    
    .related-content {
        padding: 20px;
    }
}

/* 中文字体优化 */
.blog-post {
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'Arial', sans-serif;
}

/* 强调文字样式 */
.blog-post strong {
    color: #2c3e50;
    font-weight: 600;
}

/* emoji 和特殊字符优化 */
.blog-post h2 {
    position: relative;
    padding-left: 0;
}

.blog-post h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(135deg, #4caf50, #45a049);
    border-radius: 2px;
}

/* 博客主页新增样式 */
.blog-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 80px 20px 60px 20px;
    margin-bottom: 50px;
}

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

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* 分类网格 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.category-card {
    background: white;
    padding: 30px 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: #4caf50;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.2);
}

.category-card i {
    font-size: 2.5rem;
    color: #4caf50;
    margin-bottom: 20px;
    display: block;
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

.category-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.article-count {
    display: inline-block;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 号召行动区域 */
.cta-section {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 60px 20px;
    margin: 60px 0;
    border-radius: 20px;
}

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

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

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

.cta-btn.primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.cta-btn.secondary {
    background: white;
    color: #4facfe;
    border: 2px solid white;
}

.cta-btn.secondary:hover {
    background: transparent;
    color: white;
    border-color: white;
    transform: translateY(-3px);
}

.cta-btn i {
    margin-right: 8px;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .blog-hero {
        padding: 60px 20px 40px 20px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .category-card {
        padding: 25px 20px;
    }
    
    .cta-section {
        padding: 40px 20px;
        margin: 40px 0;
    }
    
    .cta-content h2 {
        font-size: 1.5rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

/* 修复文章卡片图片尺寸 */
.featured-post .post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    position: relative;
}

.featured-post .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.featured-post:hover .post-image img {
    transform: scale(1.05);
}

/* 文章网格布局优化 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.featured-post {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.featured-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.post-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-content {
    padding: 20px;
}

.post-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    line-height: 1.4;
}

.post-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #888;
}

.post-category {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 500;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    font-weight: 700;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .featured-post .post-image {
        height: 180px;
    }
    
    .post-content {
        padding: 15px;
    }
    
    .post-title {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }
}

/* Special styles for development diary articles */
.highlight-box {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-left: 4px solid #4caf50;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.highlight-box h3 {
    color: #2e7d32;
    margin-top: 0;
    margin-bottom: 1rem;
}

.code-block {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    overflow-x: auto;
}

.code-block h4 {
    color: #4caf50;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.code-block pre {
    background: transparent;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
}

.code-block code {
    background: transparent;
    color: #e0e0e0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.problem-solution {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.problem, .solution {
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid;
}

.problem {
    background: #ffebee;
    border-color: #f44336;
}

.problem h4 {
    color: #c62828;
    margin-top: 0;
}

.solution {
    background: #e8f5e8;
    border-color: #4caf50;
}

.solution h4 {
    color: #2e7d32;
    margin-top: 0;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.metric {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.metric h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.metric p {
    margin: 0;
    line-height: 1.6;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.comparison-table th {
    background: #4caf50;
    color: white;
    font-weight: 600;
}

.comparison-table tr:hover {
    background: #f5f5f5;
}

.architecture-diagram {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.architecture-diagram h3 {
    margin-top: 0;
    color: #495057;
}

.architecture-diagram pre {
    background: #343a40;
    color: #f8f9fa;
    border-radius: 4px;
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

.architecture-visual {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

.arch-layer {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.arch-layer:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ui-layer {
    border-color: #007bff;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.engine-layer {
    border-color: #28a745;
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
}

.state-layer {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
}

.storage-layer {
    border-color: #6f42c1;
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}

.layer-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #333;
    text-align: center;
}

.layer-content {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.layer-components {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.component {
    background: rgba(255, 255, 255, 0.7);
    padding: 0.5rem;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9rem;
    color: #555;
    border: 1px solid rgba(0,0,0,0.1);
}

.intro-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.intro-section p {
    margin-bottom: 1rem;
}

.intro-section p:last-child {
    margin-bottom: 0;
}

.post-author {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.author-info h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #495057;
}

.author-info p {
    margin: 0;
    color: #6c757d;
    font-style: italic;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #4caf50;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.cta-button.secondary {
    background: #6c757d;
}

.cta-button.secondary:hover {
    background: #5a6268;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

@media (max-width: 768px) {
    .problem-solution {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        flex-direction: column;
    }
    
    .intro-section {
        padding: 1.5rem;
    }
    
    .highlight-box {
        padding: 1rem;
    }
    
    .code-block {
        padding: 1rem;
    }
    
    .layer-components {
        grid-template-columns: 1fr;
    }
    
    .component {
        font-size: 0.8rem;
        padding: 0.4rem;
    }
    
    .layer-title {
        font-size: 1rem;
    }
}

/* Social Sharing Styles */
.social-sharing-top {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.sharing-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    min-width: 100px;
    justify-content: center;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.social-btn.twitter {
    background: #1da1f2;
}

.social-btn.twitter:hover {
    background: #0d8bd9;
}

.social-btn.facebook {
    background: #4267b2;
}

.social-btn.facebook:hover {
    background: #365899;
}

.social-btn.linkedin {
    background: #0077b5;
}

.social-btn.linkedin:hover {
    background: #005885;
}

.social-btn.reddit {
    background: #ff4500;
}

.social-btn.reddit:hover {
    background: #e03d00;
}

.social-btn.wechat {
    background: #07c160;
}

.social-btn.wechat:hover {
    background: #06ad56;
}

.social-btn.copy {
    background: #6c757d;
}

.social-btn.copy:hover {
    background: #5a6268;
}

/* Bottom Social Sharing */
.social-sharing-bottom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 2.5rem;
    margin: 3rem 0;
    text-align: center;
    color: white;
}

.sharing-header h3 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.sharing-header p {
    margin: 0 0 2rem 0;
    opacity: 0.9;
    font-size: 1.1rem;
    line-height: 1.6;
}

.social-buttons-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.social-btn-large {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.social-btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.social-btn-large i {
    font-size: 1.5rem;
    min-width: 24px;
}

.btn-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.btn-title {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
}

.btn-subtitle {
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1.2;
}

/* Platform-specific colors for large buttons */
.social-btn-large.twitter:hover {
    background: rgba(29, 161, 242, 0.2);
    border-color: #1da1f2;
}

.social-btn-large.facebook:hover {
    background: rgba(66, 103, 178, 0.2);
    border-color: #4267b2;
}

.social-btn-large.linkedin:hover {
    background: rgba(0, 119, 181, 0.2);
    border-color: #0077b5;
}

.social-btn-large.reddit:hover {
    background: rgba(255, 69, 0, 0.2);
    border-color: #ff4500;
}

.social-btn-large.copy:hover {
    background: rgba(108, 117, 125, 0.2);
    border-color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .social-buttons {
        gap: 0.5rem;
    }
    
    .social-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        min-width: 80px;
    }
    
    .social-btn span {
        display: none;
    }
    
    .social-sharing-bottom {
        padding: 2rem 1.5rem;
    }
    
    .sharing-header h3 {
        font-size: 1.3rem;
    }
    
    .sharing-header p {
        font-size: 1rem;
    }
    
    .social-buttons-large {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .social-btn-large {
        padding: 0.75rem 1rem;
    }
    
    .btn-title {
        font-size: 0.9rem;
    }
    
    .btn-subtitle {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .social-sharing-top {
        padding: 1rem;
    }
    
    .social-buttons {
        justify-content: center;
    }
    
    .social-btn {
        min-width: 60px;
        padding: 0.5rem;
    }
} 
