.hidden {
  display: none !important;
}

:root {
    --primary-color: #4F46E5;
    --primary-hover: #4338CA;
    --secondary-color: #64748B;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-tertiary: #F1F5F9;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
}

body {
    padding: 0;
    margin: 0;
}

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

/* 页面容器样式 */
.page-container {
    min-height: calc(100vh - 120px);
    padding: 40px 0;
}

/* 页面头部样式 */
.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 12px;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin: 0;
}

/* 卡片样式 */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    outline: none;
    /* 触屏优化 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
    min-width: 44px;
}

/* 触屏反馈效果 */
.btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* 增强触屏操作体验 */
/* 确保所有可点击元素有足够的触摸目标大小 */
.btn, .nav-btn, .interaction-btn, .category-btn, .page-btn {
    min-height: 48px;
    min-width: 48px;
    padding: 12px 20px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* 确保链接有足够的点击区域 */
a {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* 确保表单元素有足够的触摸目标大小 */
input, button, select, textarea {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* 优化分类筛选按钮的触屏体验 */
.category-btn {
    min-height: 44px;
    min-width: 80px;
    padding: 10px 16px;
}

/* 优化文件互动按钮的触屏体验 */
.interaction-btn {
    min-height: 44px;
    min-width: 80px;
    padding: 8px 16px;
}

/* 优化分页按钮的触屏体验 */
.page-btn {
    min-height: 48px;
    min-width: 48px;
}

/* 优化移动端按钮间距，避免误触 */
@media (max-width: 768px) {
    /* 增加按钮之间的间距 */
    .btn, .nav-btn, .interaction-btn, .category-btn {
        margin-bottom: 8px;
    }
    
    /* 增加表单元素之间的间距 */
    .form-group {
        margin-bottom: 20px;
    }
    
    /* 确保按钮在移动端有足够的宽度，便于点击 */
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* 优化页面标题下方的间距 */
    .page-title {
        margin-bottom: 20px;
    }
    
    /* 优化提示消息在移动端的显示位置，避免遮挡内容 */
    .toast-container {
        top: 100px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        max-width: none;
    }
}

/* 表单元素触屏优化 */
.form-input,
.form-textarea,
.form-select {
    /* 触屏优化 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
}

/* 链接触屏优化 */
.card:hover,
.blog-post:hover,
.feature-card:hover {
    /* 触屏优化 */
    -webkit-tap-highlight-color: transparent;
}

/* 移动端按钮优化 */
@media (max-width: 768px) {
    /* 增大移动端按钮尺寸，便于触摸 */
    .btn {
        min-height: 48px;
        padding: 12px 24px;
    }
    
    /* 增大表单元素尺寸，便于触摸 */
    .form-input,
    .form-textarea,
    .form-select {
        min-height: 48px;
        padding: 12px 16px;
        font-size: 1rem;
    }
    
    /* 增大链接点击区域 */
    a {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* 增大文章卡片点击区域 */
    .blog-post {
        cursor: pointer;
    }
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* 轻量按钮样式，用于深色背景上 */
.btn-light {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.btn-light:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    resize: vertical;
    min-height: 120px;
    transition: var(--transition);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* 复选框样式 */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

/* 特性卡片样式 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.feature-card {
    background: var(--bg-primary);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--primary-color);
}

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

.feature-desc {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 博客页面样式 */
.blog-container {
    padding: 120px 20px 80px;
    margin: 0;
    background: var(--bg-secondary);
    position: relative;
    box-sizing: border-box;
}

/* 页面背景装饰 */
.blog-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.05;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
}

.blog-container::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    opacity: 0.05;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
}

/* 容器居中 */
.blog-container .container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* 页面标题区域 */
.page-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

/* 博客文章列表 */
.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 32px;
    margin-bottom: 60px;
}

/* 博客文章卡片 */
.blog-post {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.blog-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.blog-post:hover::before {
    transform: scaleX(1);
}

/* 文章头部 */
.post-header {
    padding: 28px 32px 0;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.blog-post:hover .post-title {
    color: #667eea;
}

/* 文章元信息 */
.post-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid #f1f5f9;
}

.post-date,
.post-category {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.post-category {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 文章摘要 */
.post-excerpt {
    padding: 0 32px 28px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
}

.post-excerpt p {
    margin: 0;
}

/* 文章底部 */
.post-footer {
    padding: 0 32px 32px;
    display: flex;
    justify-content: flex-start;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: white;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.page-btn.page-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.page-btn.page-active:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.page-btn.page-prev,
.page-btn.page-next {
    width: auto;
    padding: 0 20px;
}
/* 上传页面样式 */
.upload-container {
    min-height: calc(100vh - 120px);
    padding: 100px 0 40px;
}

.upload-header {
    text-align: center;
    margin-bottom: 40px;
}

.upload-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.upload-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.upload-form-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
    transition: var(--transition);
}

.upload-form-card:hover {
    box-shadow: var(--shadow-lg);
}

.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    background: var(--bg-secondary);
    transition: var(--transition);
    margin-bottom: 20px;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
}

.upload-zone.drag {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.1);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--primary-color);
}

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

.upload-sub {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.selected-file {
    background: var(--bg-tertiary);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* AI页面样式 */
.ai-container {
    min-height: calc(100vh - 120px);
    padding: 100px 0 40px;
}

.ai-header {
    text-align: center;
    margin-bottom: 40px;
}

.ai-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.ai-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.ai-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.ai-card:hover {
    box-shadow: var(--shadow-lg);
}

.ai-input {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-settings {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

/* 响应式设计 - 平板设备 */
@media (max-width: 1024px) {
    .blog-posts {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 24px;
    }
    
    .container {
        padding: 20px;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
}

/* 响应式设计 - 手机设备 */
@media (max-width: 768px) {
    .page-container,
    .blog-container,
    .upload-container,
    .ai-container {
        padding: 20px 0;
    }
    
    .container {
        padding: 16px;
    }
    
    .page-title,
    .upload-title,
    .ai-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .page-subtitle,
    .upload-subtitle,
    .ai-subtitle {
        font-size: 1rem;
    }
    
    .card,
    .blog-post,
    .upload-form-card,
    .ai-card {
        padding: 20px;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .page-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 1rem;
        height: auto;
    }
    
    /* 博客文章列表响应式 */
    .blog-posts {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* 表单元素响应式 */
    .form-input,
    .form-textarea,
    .form-select {
        padding: 12px 16px;
        font-size: 1rem;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    /* 卡片布局响应式 */
    .feature-card {
        padding: 24px;
    }
    
    /* 页脚响应式 */
    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    /* 上传表单响应式 */
    .upload-form-card {
        padding: 20px;
    }
    
    /* AI表单响应式 */
    .ai-card {
        gap: 20px;
    }
    
    /* 文件卡片响应式 */
    .file-card {
        margin-bottom: 20px;
    }
}

/* 响应式设计 - 小屏手机 */
@media (max-width: 480px) {
    .page-title,
    .upload-title,
    .ai-title {
        font-size: 1.75rem;
    }
    
    .card,
    .blog-post,
    .upload-form-card,
    .ai-card {
        padding: 16px;
    }
    
    .post-title {
        font-size: 1.25rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .feature-title {
        font-size: 1.1rem;
    }
}