/* ===================================
   TalkMe V2 Design System
   Modern Language Learning Platform
   =================================== */

/* ===================================
   Reset & Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - V2 Design System */
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #EFF6FF;
    --primary-border: #BFDBFE;
    
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;
    
    --bg-page: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-gray: #F9FAFB;
    --bg-accent: #F3F4F6;
    
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    
    --success: #10B981;
    --success-bg: #ECFDF5;
    
    --pink: #EC4899;
    --pink-bg: #FDF2F8;
    
    --white: #FFFFFF;
    --black: #111827;
    
    /* Typography */
    --font-display: 'Google Sans Flex', 'PingFang SC', 'Microsoft YaHei', 'SimHei', sans-serif;
    --font-body: 'Google Sans Flex', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    
    /* Spacing */
    --container-width: 1280px;
    --container-padding: 80px;
    --section-padding: 120px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 100px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition: all 0.3s ease;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-page);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 80px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    :root {
        --container-padding: 24px;
        --section-padding: 60px;
    }
}

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ===================================
   Blog Page Styles
   =================================== */
.blog-hero {
    padding: 64px 0 24px;
    text-align: center;
}

.page-title {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 16px;
    text-align: left;
}

.page-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    text-align: left;
}

/* 分类页面的分类标题和描述 */
.category-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 32px;
    line-height: 1.3;
    text-align: center;
}

.category-description {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-top: 12px;
    line-height: 1.6;
    text-align: center;
}

.filters {
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
}

.filter-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    background: var(--white);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.blog-content {
    padding: 32px 0 64px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.article-image {
    width: 100%;
    height: 200px;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content {
    padding: 24px;
    text-align: left;
}

.article-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start !important;
    text-align: left;
}

.article-category {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary);
    padding: 4px 12px;
    background: var(--primary-light);
    border-radius: var(--radius-full);
}

.article-date {
    font-size: 13px;
    color: var(--text-muted);
}

.article-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.article-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-card .article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.loading {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
    font-size: 16px;
    color: var(--text-muted);
}

.no-articles {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

@media (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 80px 0 40px;
    }
    
    .page-title {
        font-size: 40px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   Article Detail Page Styles
   =================================== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(37, 99, 235, 0.1);
    z-index: 9999;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    width: 0%;
    transition: width 0.1s ease;
}

.breadcrumb-nav {
    background: var(--bg-gray);
    padding: 16px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.breadcrumb {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb li:not(:last-child)::after {
    content: '›';
    margin-left: 8px;
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.breadcrumb a:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.breadcrumb li:first-child a::before {
    content: '🏠';
    margin-right: 4px;
    font-size: 14px;
}

.breadcrumb li:last-child span {
    color: var(--text-primary);
    font-weight: 500;
    padding: 4px 8px;
}

/* 旧样式保留为注释：
 .article-hero { padding: 160px 0 60px; }
*/

.article-hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    white-space: normal;
}

.article-meta-info {
    display: flex;
    gap: 16px;
    justify-content: center;
    font-size: 15px;
    color: var(--text-muted);
    flex-wrap: wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.article-container {
    padding: 40px 0 60px;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 60px;
    align-items: start;
    position: relative;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.article-body {
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.article-body p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 24px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.article-body h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 48px 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.article-body h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 36px 0 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.article-body ul,
.article-body ol {
    margin: 24px 0;
    padding-left: 24px;
}

.article-body li {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.article-body img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
    box-sizing: border-box;
    display: block;
}

.article-body table {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    display: block;
    box-sizing: border-box;
}

.article-body pre,
.article-body code {
    max-width: 100%;
    overflow-x: auto;
    word-wrap: break-word;
    box-sizing: border-box;
}

.article-body blockquote {
    max-width: 100%;
    box-sizing: border-box;
}

.article-body * {
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.article-content-body {
    width: 100%;
    overflow: visible;
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
}

.article-content-body p,
.article-content-body h2,
.article-content-body h3,
.article-content-body ul,
.article-content-body ol,
.article-content-body li,
.article-content-body img {
    /* 继承 article-body 的样式 */
}

.article-hero {
    position: relative;
    padding: 80px 0 48px;
    text-align: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.article-hero--with-cover {
    color: #fff;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-hero--with-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    /* 只做轻微暗角，不做毛玻璃 */
    background: linear-gradient(180deg, rgba(0,0,0,0.10), rgba(0,0,0,0.25));
    z-index: 0;
}

.article-hero .container {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
    max-width: 100%;
    padding: 0 var(--container-padding);
    box-sizing: border-box;
}

.article-hero--with-cover .article-hero-title {
    color: #fff;
}

.article-hero--with-cover .article-meta,
.article-hero--with-cover .article-meta-info {
    color: rgba(255,255,255,0.85);
}

.article-hero--with-cover .article-meta-info .article-category {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

.article-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 2px solid var(--border);
}

.article-tags {
    margin-bottom: 30px;
}

.article-tags strong {
    margin-right: 12px;
    color: var(--text-secondary);
}

.article-tags a {
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 8px;
    padding: 6px 12px;
    background: var(--bg-gray);
    color: var(--primary);
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.article-tags a:hover {
    background: var(--primary);
    color: var(--white);
}

.blog-filters {
    margin-top: 24px;
    margin-bottom: 16px;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
    text-align: left;
}

.filter-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 999px;
    background: var(--bg-gray);
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: left !important;
    justify-content: flex-start !important;
    direction: ltr !important;
}

.filter-chip span:not(.new-badge) {
    text-align: left !important;
    display: block;
    width: auto;
    flex: 0 0 auto;
    direction: ltr !important;
}

.filter-chip a,
.filter-chip {
    text-align: left !important;
    justify-content: flex-start !important;
    direction: ltr !important;
}

.filter-chip:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.filter-chip--primary {
    background: var(--primary);
    color: #fff;
}

.filter-chip--primary:hover {
    background: var(--primary-dark);
    color: #fff;
}
.article-sidebar {
    position: relative;
    align-self: flex-start;
    height: fit-content;
    width: 280px;
}

.sidebar-sticky {
    position: relative;
    top: 0;
    width: 100%;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    will-change: transform;
    z-index: 10;
    transition: top 0.1s ease-out;
}

/* Related posts section */
.related-posts {
    margin-top: 64px;
    padding: 48px 0 80px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-page);
    clear: both;
}

.related-posts-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    gap: 24px;
}

.article-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

.article-toc {
    background: var(--bg-gray);
    border-radius: 12px;
    padding: 24px;
}

.article-toc h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
}

.article-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.article-toc li {
    margin-bottom: 8px;
}

.article-toc ul ul {
    margin-left: 16px;
    margin-top: 8px;
}

.article-toc a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.6;
    transition: color 0.3s ease;
    display: block;
    padding: 4px 0;
}

.article-toc a:hover,
.article-toc a.active {
    color: var(--primary);
    font-weight: 600;
}

@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .breadcrumb-nav {
        padding: 12px 0;
        font-size: 12px;
    }
    
    .breadcrumb {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .breadcrumb li {
        gap: 4px;
    }
    
    .breadcrumb li:not(:last-child)::after {
        margin-left: 4px;
        font-size: 14px;
    }
    
    .breadcrumb a {
        padding: 2px 6px;
        font-size: 12px;
    }
    
    .article-hero {
        padding: 40px 0 24px;
        min-height: 200px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .article-hero--with-cover {
        min-height: 250px;
        padding: 40px 0 24px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .article-hero .container {
        padding: 0 var(--container-padding);
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .article-hero-title {
        font-size: 22px;
        line-height: 1.4;
        margin-bottom: 16px;
        padding: 0;
        word-break: break-word;
        overflow-wrap: break-word;
        word-wrap: break-word;
        white-space: normal;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        display: block;
    }
    
    .article-meta-info {
        font-size: 12px;
        gap: 6px;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }
    
    .article-meta-info span {
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }
    
    .article-container {
        padding: 24px 0 48px;
        margin-bottom: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .article-layout {
        gap: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .article-body {
        padding: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
        overflow-x: hidden;
    }
    
    .article-content-body {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
        overflow-x: hidden;
    }
    
    .article-body p {
        font-size: 16px;
        line-height: 1.7;
        margin-bottom: 20px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
        width: 100%;
        max-width: 100%;
    }
    
    .article-body h2 {
        font-size: 24px;
        margin: 32px 0 16px;
        padding-bottom: 8px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
        width: 100%;
        max-width: 100%;
    }
    
    .article-body h3 {
        font-size: 20px;
        margin: 24px 0 12px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
        width: 100%;
        max-width: 100%;
    }
    
    .article-body ul,
    .article-body ol {
        margin: 20px 0;
        padding-left: 20px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .article-body li {
        font-size: 16px;
        line-height: 1.7;
        margin-bottom: 10px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
        width: 100%;
        max-width: 100%;
    }
    
    .article-body img {
        margin: 20px 0;
        border-radius: 6px;
        width: 100%;
        max-width: 100%;
        height: auto;
        box-sizing: border-box;
    }
    
    .article-body table {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        display: block;
        box-sizing: border-box;
    }
    
    .article-body pre,
    .article-body code {
        max-width: 100%;
        overflow-x: auto;
        word-wrap: break-word;
        box-sizing: border-box;
        white-space: pre-wrap;
    }
    
    .article-body blockquote {
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .article-body * {
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .related-posts {
        margin-top: 32px;
        padding: 32px 0 48px;
        clear: both;
    }
    
    .related-posts-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .related-posts-grid {
        gap: 16px;
    }
    
    .article-body {
        margin-bottom: 32px;
    }
}

/* ===================================
   CTA Section
   =================================== */
.cta {
    padding: 100px 0;
    display: flex;
    justify-content: center;
}

.cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-2xl);
    padding: 80px;
    text-align: center;
    max-width: 1200px;
    width: 100%;
}

.cta-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
}

.cta-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--white);
    color: var(--primary);
}

.btn-primary:hover {
    background: var(--bg-gray);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cta-box .btn-primary {
    background: var(--white);
    color: var(--primary);
}

.cta-box .btn-primary:hover {
    background: var(--bg-gray);
}

@media (max-width: 768px) {
    .cta-box {
        padding: 48px 32px;
    }
    
    .cta-title {
        font-size: 28px;
    }
}

/* ===================================
   Header & Footer Styles
   =================================== */
#app-header,
.header {
    position: relative;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
}

.header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1432px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.header-logo .logo-img {
    width: 138px;
    height: 28px;
    object-fit: contain;
}

.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu .nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
    border-radius: 8px;
}

.nav-menu .nav-link:hover,
.nav-menu .nav-link.active {
    color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--text-primary);
}

@media (max-width: 1024px) {
    .header-nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
        z-index: 999;
    }

    .header-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .mobile-menu-toggle {
        display: flex;
    }
}

.footer-wrapper {
    background: var(--bg-gray);
}

.footer-cta {
    padding: 60px 20px;
    text-align: center;
    background: #fff;
}

.footer-main {
    padding: 60px 0 40px;
    background: var(--bg-gray);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-col h4 {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.footer-col h4 a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col h4 a:hover {
    color: var(--primary);
}

.footer-social {
    display: flex;
    justify-content: flex-start;
    gap: 16px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: var(--text-primary);
    text-decoration: none;
    transition: transform 0.2s, background 0.2s;
}

.social-icon:hover {
    transform: scale(1.1);
    background: var(--primary-light);
}

.social-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

@media (max-width: 1024px) {
    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-columns {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        padding: 0 20px;
    }
}

/* ===================================
   Pagination
   =================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-top: 60px;
}

.pagination-btn {
    padding: 10px 20px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text-primary);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===================================
   Additional Styles from style_v2.css
   - Language Dropdown, Mobile Menu, Footer CTA, CTA Button
   =================================== */

.lang-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    margin: 0;
    padding: 8px 0;
    list-style: none;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 10000;
    font-family: var(--font-body);
    pointer-events: none;
    display: block;
}

/* 在下拉菜单上方添加一个不可见的过渡区域，防止鼠标移动时菜单消失 */
.lang-dropdown::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
}

.language-switcher.open .lang-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    display: block !important;
}

.lang-dropdown li {
    margin: 0;
}

.lang-dropdown li + li {
    margin-top: 4px;
}

.lang-dropdown .sub-item {
    display: block;
    padding: 10px 16px;
    font-family: var(--font-body);
    font-size: 15px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s;
}

.lang-dropdown .sub-item:hover {
    background-color: #f5f6f7;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--text-primary);
}

.mobile-menu-toggle .menu-icon-close {
    display: none;
}

.mobile-menu-toggle.active .menu-icon-open {
    display: none;
}

.mobile-menu-toggle.active .menu-icon-close {
    display: block;
}

.footer-cta {
    padding: 60px 20px;
    text-align: center;
    background: #fff;
}

.footer-cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-logo img {
    width: 138px;
    height: 28px;
    object-fit: contain;
    margin-bottom: 24px;
}

.footer-title-wrapper {
    margin-bottom: 32px;
}

.footer-title {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.footer-title .talkme {
    color: #2e6aff;
}

.footer-title .ai {
    color: #2e6aff;
}

.footer-title .blog {
    color: var(--text-primary);
}

.footer-cta-button {
    margin-top: 32px;
}

.btn-cta {
    display: inline-block;
    padding: 16px 32px;
    background: linear-gradient(135deg, #3478F6 0%, #3277FF 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(50, 55, 255, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(50, 55, 255, 0.3);
    color: #ffffff;
}

/* 语言切换器整体样式，确保下拉在 English 按钮下方 */
.language-switcher {
    position: relative;
    font-family: var(--font-body);
    z-index: 1000;
}

.language-switcher .lang-name {
    font-family: var(--font-body);
    font-size: 15px;
}

.language-switcher .has-submenu {
    background-color: #f0f1f3;
    padding: 14px 20px;
    min-height: 48px;
    min-width: 120px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    font-family: var(--font-body);
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.language-switcher .has-submenu:hover {
    background-color: #e8eaed;
}

.language-switcher .sub-arrow {
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
}

.language-switcher .icon-caret {
    width: 12px;
    height: 12px;
    fill: currentColor;
    transition: transform 0.2s ease;
}

.language-switcher.open .icon-caret {
    transform: rotate(180deg);
}

/* 下载按钮样式（导航 Download Now） */
.menu-btn .btn-download {
    background: linear-gradient(135deg, #3478F6 0%, #3277FF 100%);
    color: #ffffff !important;
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 600;
    padding: 14px 28px;
    min-height: 48px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(50, 55, 255, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.menu-btn .btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(50, 55, 255, 0.3);
    color: #ffffff !important;
}

/* ===================================
   New Article Badges
   - 分类按钮上的小红点
   - 文章标题旁的 "New" 标签
   =================================== */

/* 分类按钮上的小红点 */
.filter-chip .new-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background-color: #ff4444;
    border-radius: 50%;
    display: none;
    z-index: 10;
    box-shadow: 0 0 0 2px #ffffff;
}

.article-new-badge {
    display: none;
    background: linear-gradient(135deg, #ff4444 0%, #ff6666 100%);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    white-space: nowrap;
}

