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

html {
    scroll-behavior: smooth;
    /* 设置基础字体大小为16px，符合Google移动端要求 */
    font-size: 16px;
}

/* 响应式基础字体大小 */
@media (max-width: 768px) {
    html {
        font-size: 16px; /* 移动端保持16px，防止iOS自动缩放 */
    }
}

@media (min-width: 769px) {
    html {
        font-size: 16px; /* 桌面端也使用16px作为基准 */
    }
}

@media (min-width: 1200px) {
    html {
        font-size: 17px; /* 大屏幕稍微增大，提升可读性 */
    }
}

body {
    /* 优化的字体栈：系统字体优先，确保快速加载和良好显示 */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    /* 行高1.7符合WCAG可读性要求（至少1.5） */
    line-height: 1.7;
    /* 字体大小使用rem，基于16px基准，确保可访问性 */
    font-size: 1rem; /* 16px */
    /* 颜色对比度至少4.5:1，符合WCAG AA标准 */
    color: #1f2937;
    background: #fafafa;
    /* 字体渲染优化 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* 改善字体显示 */
    font-feature-settings: "kern" 1;
    font-kerning: normal;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
}

/* 头部 */
.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.6);
    padding: 0.875rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    line-height: 1.2;
    transition: all 0.3s ease;
}

.logo:hover .logo-text {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .logo-text {
        font-size: 1.375rem;
    }
}

.nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.08);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.nav-link:hover {
    color: #2563eb;
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link:active {
    transform: scale(0.98);
}

/* 头部操作区域 */
.auth-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-link {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-link:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
}

.btn-sm {
    padding: 0.5rem 1.125rem;
    font-size: 0.875rem;
    font-weight: 600;
}

/* 用户菜单 */
.user-menu {
    position: relative;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.875rem;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.user-trigger:hover {
    background: rgba(0, 0, 0, 0.04);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.user-name {
    color: #111827;
    font-weight: 500;
    font-size: 0.9375rem;
    white-space: nowrap;
}

.dropdown-icon {
    color: #6b7280;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.user-menu:hover .dropdown-icon,
.user-menu.active .dropdown-icon {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
}

.user-menu:hover .user-dropdown,
.user-menu.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (hover: none) {
    .user-menu:hover .user-dropdown {
        opacity: 0;
        visibility: hidden;
    }
    
    .user-menu.active .user-dropdown {
        opacity: 1;
        visibility: visible;
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item svg {
    color: #6b7280;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.dropdown-item:hover {
    background: #f9fafb;
    color: #111827;
}

.dropdown-item:hover svg {
    color: #2563eb;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

/* 认证页面 */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem 0;
}

.auth-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 3rem;
    max-width: 450px;
    width: 100%;
}

.auth-box h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #111827;
}

.auth-subtitle {
    color: #6b7280;
    margin-bottom: 2rem;
}

.auth-form {
    margin-top: 2rem;
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.auth-footer p {
    color: #6b7280;
    margin: 0;
}

.auth-footer a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

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

/* 个人中心 */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.profile-header {
    margin-bottom: 2rem;
}

.profile-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.profile-header p {
    color: #6b7280;
}

.profile-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 2rem;
}

.profile-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.profile-section h3 {
    font-size: 1.25rem;
    margin: 2rem 0 1rem;
}

.profile-form {
    margin-top: 1.5rem;
}

.profile-form input[disabled] {
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

/* 评论登录提示 */
.comment-login-prompt {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.comment-login-prompt p {
    margin: 0.5rem 0;
    color: #374151;
}

.comment-login-prompt a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.comment-login-prompt a:hover {
    text-decoration: underline;
}

/* 文章分享 */
.post-share {
    margin: 4rem 0;
    padding: 2.5rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, rgba(147, 51, 234, 0.02) 100%);
    border-radius: 12px;
    padding: 2.5rem;
}

.post-share h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: #111827;
    font-weight: 700;
}

.share-buttons-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.share-btn-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #fff;
    color: #4b5563;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e5e7eb;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.share-btn-inline:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.share-facebook:hover {
    background: linear-gradient(135deg, #1877f2 0%, #166fe5 100%);
    color: #fff;
    border-color: #1877f2;
}

.share-twitter:hover {
    background: linear-gradient(135deg, #1da1f2 0%, #1a91da 100%);
    color: #fff;
    border-color: #1da1f2;
}

.share-linkedin:hover {
    background: linear-gradient(135deg, #0077b5 0%, #006399 100%);
    color: #fff;
    border-color: #0077b5;
}

.share-whatsapp:hover {
    background: linear-gradient(135deg, #25d366 0%, #20ba5a 100%);
    color: #fff;
    border-color: #25d366;
}

.share-copy:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border-color: #10b981;
}

.share-more:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border-color: #2563eb;
}

/* 分享页面 */
.share-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem 0;
}

.share-box {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 3.5rem;
    max-width: 650px;
    width: 100%;
    border: 1px solid rgba(229, 231, 235, 0.5);
}

@media (max-width: 768px) {
    .share-box {
        padding: 2rem 1.5rem;
    }
    
    .share-box h1 {
        font-size: 1.75rem;
    }
    
    .share-content h2 {
        font-size: 1.25rem;
    }
    
    .share-buttons {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .share-btn {
        width: 100%;
        padding: 0.875rem;
    }
    
    .url-input-group {
        flex-direction: column;
    }
    
    .url-input-group input {
        width: 100%;
    }
    
    .share-actions {
        flex-direction: column;
    }
    
    .share-actions .btn-primary,
    .share-actions .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .share-box {
        padding: 1.5rem 1rem;
    }
    
    .share-box h1 {
        font-size: 1.5rem;
    }
    
    .share-content {
        padding: 1rem;
    }
    
    .share-content h2 {
        font-size: 1.125rem;
    }
}

.share-box h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #111827;
}

.share-subtitle {
    color: #6b7280;
    margin-bottom: 2rem;
}

.share-content {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.share-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #111827;
}

.share-excerpt {
    color: #6b7280;
    margin: 0;
}

.share-options {
    margin-bottom: 2rem;
}

.share-options h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: #374151;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.75rem;
    background: #fff;
    color: #374151;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e5e7eb;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.share-btn:hover {
    background: #f9fafb;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.share-icon {
    font-size: 2rem;
}

.share-url-box {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 8px;
}

.share-url-box label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.url-input-group {
    display: flex;
    gap: 0.5rem;
}

.url-input-group input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background: #fff;
}

.share-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* 响应式 */
@media (max-width: 768px) {
    .share-buttons-inline {
        flex-direction: column;
    }
    
    .share-btn-inline {
        width: 100%;
        justify-content: center;
    }
    
    .share-buttons {
        grid-template-columns: 1fr;
    }
}

/* 主要内容 */
.main {
    min-height: calc(100vh - 200px);
    padding: 3rem 0;
}

@media (max-width: 768px) {
    .main {
        padding: 2rem 0;
    }
}

/* 经典博客布局 - 两栏结构 */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* 主内容区 */
.main-content {
    min-width: 0; /* 防止grid溢出 */
}

/* 侧边栏 */
.sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

@media (max-width: 1024px) {
    .sidebar {
        position: static;
        max-height: none;
    }
}

.sidebar-widget {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-widget:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-widget h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.sidebar-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-widget li {
    margin-bottom: 0.75rem;
}

.sidebar-widget li:last-child {
    margin-bottom: 0;
}

.sidebar-widget a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.2s ease;
    display: block;
    padding: 0.5rem 0;
    border-left: 3px solid transparent;
    padding-left: 0.75rem;
    transition: all 0.2s ease;
}

.sidebar-widget a:hover {
    color: #2563eb;
    border-left-color: #2563eb;
    padding-left: 1rem;
}

.sidebar-widget p {
    color: #6b7280;
    line-height: 1.7;
    font-size: 0.9375rem;
}

/* 文章卡片 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 2.5rem;
}

/* 在侧边栏布局中，文章网格改为单列 */
.blog-layout .posts-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .blog-layout .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .blog-layout .posts-grid {
        grid-template-columns: 1fr;
    }
}

.post-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(229, 231, 235, 0.5);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.2);
}

.post-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.post-content {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.category {
    font-size: 0.75rem;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 20px;
    margin-bottom: 1rem;
}

.post-card h3 {
    margin: 0.75rem 0;
    font-size: 1.375rem;
    line-height: 1.4;
    font-weight: 700;
}

.post-card h3 a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card h3 a:hover {
    color: #2563eb;
}

.post-meta {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex-wrap: wrap;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.post-meta span::before {
    content: '';
    width: 4px;
    height: 4px;
    background: #d1d5db;
    border-radius: 50%;
}

.post-meta span:first-child::before {
    display: none;
}

/* 按钮 */
.btn-primary {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: #fff;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 表单 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
    color: #1f2937;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background: #fafafa;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9ca3af;
}

/* 移动端表单优化 */
@media (max-width: 768px) {
    .form-group input,
    .form-group textarea {
        font-size: 16px; /* 防止iOS自动缩放 */
    }
    
    .form-group input[type="email"],
    .form-group input[type="password"],
    .form-group input[type="text"],
    .form-group textarea {
        font-size: 16px;
    }
}

/* 表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.data-table th {
    background: #f9fafb;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.data-table tr:hover {
    background: #f9fafb;
}

/* 表格响应式包装 */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
}

@media (max-width: 768px) {
    .table-wrapper {
        margin: 1rem -1rem;
        padding: 0 1rem;
    }
}

/* 页脚 */
.footer {
    background: #111827;
    color: #9ca3af;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: #fff;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
}

.footer-section a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
}

/* Hero区域 */
.hero {
    text-align: center;
    padding: 4rem 0 5rem;
    margin-bottom: 4rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(147, 51, 234, 0.05) 100%);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

/* 在侧边栏布局中，hero区域占满宽度 */
.blog-layout {
    margin-top: 2rem;
}

.blog-layout .hero {
    grid-column: 1 / -1;
    margin-bottom: 3rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(37, 99, 235, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero h1 {
    /* Hero标题：56px，符合大文本要求 */
    font-size: 3.5rem; /* 56px */
    margin-bottom: 1.25rem;
    color: #111827; /* 高对比度 */
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem; /* 移动端32px，确保可读性 */
        line-height: 1.3;
    }
}

.hero-subtitle {
    /* Hero副标题：22px，符合大文本要求 */
    font-size: 1.375rem; /* 22px */
    color: #4b5563; /* 对比度至少4.5:1 */
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease 0.2s both;
    font-weight: 400;
}

@media (max-width: 768px) {
    .hero-subtitle {
        font-size: 1.125rem; /* 移动端18px */
        line-height: 1.7;
    }
}

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

/* 特色文章 */
.featured-post {
    margin-bottom: 3rem;
}

/* 在侧边栏布局中，特色文章占满宽度 */
.blog-layout .featured-post {
    grid-column: 1 / -1;
}

.featured-post h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.post-card.featured {
    display: flex;
    flex-direction: column;
    border: 2px solid rgba(37, 99, 235, 0.2);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.15);
}

.post-card.featured:hover {
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.2);
    border-color: rgba(37, 99, 235, 0.4);
}

.post-card.featured img {
    height: 350px;
}

.post-card.featured .post-content {
    padding: 2rem;
}

.post-card.featured h3 {
    font-size: 1.75rem;
}

/* 分类区域 */
.categories {
    margin-bottom: 3rem;
}

/* 在侧边栏布局中，分类区域占满宽度 */
.blog-layout .categories {
    grid-column: 1 / -1;
    margin-bottom: 2rem;
}

/* 分类筛选 */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin: 2rem 0;
}

.category-tag {
    padding: 0.625rem 1.5rem;
    background: #fff;
    color: #4b5563;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.category-tag:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

/* 分类网格 */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s;
}

.category-card:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.category-card h2 {
    color: #2563eb;
    margin-bottom: 0.5rem;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #111827;
}

/* 快速操作 */
.quick-actions {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.quick-actions h2 {
    margin-bottom: 1.5rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* 文章详情页 */
.post-detail {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .post-detail {
        padding: 2rem 1.5rem;
        border-radius: 12px;
    }
}

.post-header {
    margin-bottom: 3rem;
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.post-header h1 {
    font-size: 2.75rem;
    margin: 1.25rem 0;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #111827;
}

@media (max-width: 768px) {
    .post-header h1 {
        font-size: 2rem;
    }
}

.excerpt {
    /* 摘要字体大小：22px，符合大文本要求（18px+） */
    font-size: 1.375rem; /* 22px */
    color: #4b5563; /* 对比度至少4.5:1 */
    margin: 1.5rem 0;
    line-height: 1.7;
    font-weight: 400;
    letter-spacing: 0.01em;
}

@media (max-width: 768px) {
    .excerpt {
        font-size: 1.125rem; /* 移动端18px */
        line-height: 1.6;
    }
}

.cover-image {
    width: 100%;
    max-height: 550px;
    object-fit: cover;
    border-radius: 16px;
    margin: 3rem 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease;
}

.cover-image:hover {
    transform: scale(1.01);
}

/* 文章内容区域 - 符合Google可读性要求 */
.post-content {
    /* 正文字体大小：18px (1.125rem)，符合Google移动端可读性要求（最小16px） */
    font-size: 1.125rem; /* 18px */
    /* 行高1.8，提供舒适的阅读体验（WCAG建议至少1.5） */
    line-height: 1.8;
    margin: 2.5rem 0;
    /* 颜色对比度至少4.5:1 */
    color: #374151;
    /* 字间距优化 */
    letter-spacing: 0.01em;
    /* 段落间距 */
}

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

/* 响应式字体大小 */
@media (max-width: 768px) {
    .post-content {
        font-size: 1rem; /* 移动端16px，确保可读性 */
        line-height: 1.75;
    }
    
    .post-content h2 {
        font-size: 1.75rem;
    }
    
    .post-content h3 {
        font-size: 1.5rem;
    }
}

.post-content h2 {
    font-size: 2rem;
    margin: 3rem 0 1.25rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    padding-top: 1rem;
}

.post-content h3 {
    font-size: 1.625rem;
    margin: 2.5rem 0 1rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
}

.post-content p {
    margin-bottom: 1.75rem;
    color: #4b5563;
}

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

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

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: block;
}

.post-content img:hover {
    transform: scale(1.02);
}

/* 移动端图片优化 */
@media (max-width: 768px) {
    .post-content img {
        margin: 1.5rem 0;
        border-radius: 8px;
    }
    
    .post-card img {
        border-radius: 8px;
    }
    
    .cover-image {
        border-radius: 12px;
        margin: 2rem 0;
    }
}

.post-content blockquote {
    border-left: 4px solid #2563eb;
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
    font-style: italic;
    color: #4b5563;
    background: rgba(37, 99, 235, 0.05);
    border-radius: 0 8px 8px 0;
    font-size: 1.125rem;
    line-height: 1.7;
}

.post-content code {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.875em;
    font-weight: 500;
    color: #dc2626;
    border: 1px solid #e5e7eb;
}

.post-content pre {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: #f9fafb;
    padding: 1.75rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.post-content pre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #8b5cf6, #ec4899);
    border-radius: 12px 12px 0 0;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* 标签 */
.post-tags {
    margin: 2rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
}

.post-tags h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #6b7280;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.tag:hover {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    transform: translateY(-1px);
}

/* 评论区域 */
.comments {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
}

.comments h2 {
    margin-bottom: 2rem;
}

.comment-form {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 2.5rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comment-form label {
    font-size: 1rem; /* 16px */
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
    display: block;
}

.comment-form textarea {
    font-size: 1rem; /* 16px，防止iOS自动缩放 */
    line-height: 1.6;
    font-family: inherit;
}

.comments-list {
    space-y: 1.5rem;
}

.comment-item {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid #2563eb;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.comment-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateX(4px);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.comment-header h4 {
    color: #111827;
    margin: 0;
    font-size: 1rem; /* 16px */
    font-weight: 600;
}

.comment-header span {
    font-size: 0.875rem; /* 14px */
    color: #6b7280;
}

.comment-content {
    max-width: 100%;
    font-size: 1rem; /* 16px，符合Google要求 */
    line-height: 1.7;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    word-break: break-word;
}

@media (max-width: 768px) {
    .comment-content {
        max-width: 100%;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

.text-muted {
    color: #6b7280;
    font-size: 0.875rem;
}

/* 相关文章 */
.related-posts {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
}

.related-posts h2 {
    margin-bottom: 2rem;
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-gray {
    background: #f3f4f6;
    color: #374151;
}

/* 小按钮 */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

.btn-success {
    background: #10b981;
    color: #fff;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

/* 页面头部 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* 表单行 */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-section {
    margin: 2rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
}

.form-section h3 {
    margin-bottom: 1.5rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* 错误页面 */
.error-page {
    text-align: center;
    padding: 4rem 0;
}

.error-page h1 {
    font-size: 6rem;
    color: #2563eb;
    margin-bottom: 1rem;
}

.error-page h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-page p {
    color: #6b7280;
    margin-bottom: 2rem;
}

/* 联系表单 */
.contact-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.contact-info {
    margin-bottom: 3rem;
}

.contact-info a {
    transition: all 0.2s ease;
}

.contact-info a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.contact-form-wrapper {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.contact-form {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    margin: 0;
}

@media (max-width: 768px) {
    .contact-page {
        padding: 1rem 0;
    }
    
    .contact-form-wrapper {
        padding: 1.5rem;
    }
    
    .contact-info {
        padding: 1.5rem !important;
    }
}

/* 代码文本区域 */
.code-textarea {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* SEO信息 */
.seo-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.seo-info p {
    margin-bottom: 0.5rem;
}

.seo-info code {
    background: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* 表单帮助文本 */
.form-help {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* 警告提示 */
.alert {
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 2px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    animation: slideIn 0.3s ease;
}

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

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-color: #6ee7b7;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-color: #fca5a5;
}

/* 用户表单 */
.user-form {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    max-width: 600px;
}

.user-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    background: #fff;
}

.user-form select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 分析统计样式 */
.analytics-filters {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.filter-form .form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

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

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.analytics-section {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.analytics-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

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

/* 响应式 */
/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    position: relative;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #4b5563;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        padding: 0.75rem 0;
    }
    
    .header-content {
        flex-wrap: nowrap;
        gap: 0.75rem;
    }
    
    .header-left {
        flex: 1;
        min-width: 0;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .header-right {
        gap: 0.5rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        margin-top: 0.5rem;
        padding: 0.5rem 0;
        border-top: 1px solid rgba(229, 231, 235, 0.6);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        border-radius: 0 0 12px 12px;
        z-index: 99;
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav-link {
        padding: 0.875rem 1.5rem;
        border-radius: 0;
        text-align: left;
    }
    
    .nav-link::before {
        display: none;
    }
    
    .nav-link:hover {
        background: rgba(37, 99, 235, 0.08);
    }
    
    .user-trigger {
        padding: 0.375rem 0.625rem;
    }
    
    .user-name {
        display: none;
    }
    
    .user-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 16px 16px 0 0;
        max-height: 50vh;
        overflow-y: auto;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    }
    
    .auth-links {
        gap: 0.5rem;
    }
    
    .auth-links .btn-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .auth-links .btn-primary {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .hero {
        padding: 3rem 0 4rem;
        margin-bottom: 3rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .post-header h1 {
        font-size: 2rem;
    }
    
    .post-detail {
        padding: 2rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .legal-page {
        padding: 1rem 0;
    }
    
    .legal-page h1 {
        font-size: 2rem;
    }
    
    .share-buttons-inline {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .share-btn-inline {
        width: 100%;
        justify-content: center;
    }
    
    .category-filter {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .category-tag {
        font-size: 0.8125rem;
        padding: 0.5rem 1rem;
    }
    
    .comment-form {
        padding: 1.5rem;
    }
    
    .comment-item {
        padding: 1.5rem;
    }
    
    .post-share {
        padding: 2rem 0;
    }
    
    .post-share h3 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .tags {
        gap: 0.375rem;
    }
    
    .tag {
        font-size: 0.8125rem;
        padding: 0.375rem 1rem;
    }
    
    /* 表格响应式 */
    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table thead,
    .data-table tbody,
    .data-table tr {
        display: block;
    }
    
    .data-table thead {
        display: none;
    }
    
    .data-table tr {
        margin-bottom: 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 1rem;
        background: #fff;
    }
    
    .data-table td {
        display: block;
        text-align: right;
        padding: 0.5rem 0;
        border: none;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .data-table td:last-child {
        border-bottom: none;
    }
    
    .data-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: #6b7280;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1rem 0;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .post-card {
        padding: 1.25rem;
    }
    
    .post-card h3 {
        font-size: 1.125rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .post-header h1 {
        font-size: 1.75rem;
    }
    
    .post-detail {
        padding: 1.5rem 1rem;
    }
    
    .excerpt {
        font-size: 1.125rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
    }
    
    .post-content h3 {
        font-size: 1.25rem;
    }
    
    .cover-image {
        margin: 2rem 0;
    }
    
    .btn-primary {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .auth-box {
        padding: 2rem 1.5rem;
    }
    
    .auth-box h1 {
        font-size: 1.75rem;
    }
    
    .comment-form {
        padding: 1.25rem;
    }
    
    .comment-item {
        padding: 1.25rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-section {
        width: 100%;
    }
}

/* 管理后台筛选器 */
.admin-filters {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.filter-form {
    margin: 0;
}

.filter-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

.filter-group button,
.filter-group a {
    margin-right: 0.5rem;
}

.btn-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    display: inline-block;
}

.btn-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* 筛选标签页 */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.filter-tab:hover {
    color: #2563eb;
}

.filter-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 500;
}

/* 页面管理样式 */
.pages-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.page-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.page-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: #111827;
}

.page-info p {
    margin: 0 0 0.5rem 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.page-slug {
    color: #9ca3af;
    font-size: 0.875rem;
    font-family: monospace;
}

.page-actions {
    display: flex;
    gap: 0.5rem;
}

.settings-form .form-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-form .form-section h2 {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    color: #111827;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.content-editor {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

/* 广告样式 */
.ad-container {
    margin: 2rem 0;
    text-align: center;
    overflow: hidden;
}

.ad-banner {
    width: 100%;
    max-width: 100%;
    margin: 1.5rem 0;
}

.ad-sidebar {
    margin: 1.5rem 0;
}

.ad-inline {
    margin: 2rem auto;
    max-width: 100%;
}

.ad-footer {
    margin: 2rem 0 0;
    padding: 1.5rem 0;
    border-top: 1px solid #e5e7eb;
}

.ad-container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.ad-container a {
    display: inline-block;
    text-decoration: none;
}

/* 广告标签 */
.ad-label {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    text-align: center;
}

.badge-info {
    background: #3b82f6;
    color: #fff;
}

.badge-warning {
    background: #f59e0b;
    color: #fff;
}

/* 主题管理样式 */
.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.theme-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.theme-card:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

.theme-card.active {
    border-color: #2563eb;
    border-width: 3px;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.theme-preview {
    background: #f9fafb;
    padding: 1rem;
    height: 200px;
    display: flex;
    flex-direction: column;
}

.theme-preview-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.theme-preview-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d1d5db;
}

.theme-preview-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.theme-preview-title {
    height: 20px;
    background: #e5e7eb;
    border-radius: 4px;
    width: 70%;
}

.theme-preview-text {
    height: 12px;
    background: #f3f4f6;
    border-radius: 4px;
    width: 100%;
}

.theme-preview-text.short {
    width: 60%;
}

.theme-info {
    padding: 1.5rem;
}

.theme-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #111827;
}

.theme-info p {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.theme-preview-text-small {
    color: #9ca3af;
    font-size: 0.75rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.theme-radio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    transition: background 0.2s;
}

.theme-radio:hover {
    background: #f3f4f6;
}

.theme-radio input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.theme-radio span {
    color: #374151;
    font-weight: 500;
    font-size: 0.875rem;
}

.theme-card.active .theme-radio {
    background: #eff6ff;
    color: #2563eb;
}

.theme-card.active .theme-radio span {
    color: #2563eb;
    font-weight: 600;
}

.theme-form .form-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

/* Classic主题侧边栏布局已在classic.css中定义 */

/* 通知提示 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    min-width: 300px;
    max-width: 500px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid #3b82f6;
}

.notification-success {
    border-left-color: #10b981;
}

.notification-error {
    border-left-color: #ef4444;
}

.notification-warning {
    border-left-color: #f59e0b;
}

.notification-info {
    border-left-color: #3b82f6;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
}

.notification-message {
    flex: 1;
    color: #111827;
    font-size: 0.875rem;
    line-height: 1.5;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    margin-left: 1rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.notification-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.notification-hide {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 加载状态 */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 0.5rem;
}

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

/* 按钮禁用状态 */
button:disabled,
input[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 表单验证提示 */
.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.form-group input:valid:not(:placeholder-shown),
.form-group textarea:valid:not(:placeholder-shown) {
    border-color: #10b981;
}

/* 响应式通知 */
@media (max-width: 768px) {
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
}

