/* 清爽大气论坛样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-lg: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

/* 容器 */
.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav a {
    color: var(--gray-600);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav a:hover, .nav a.active {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

.user-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.user-dropdown {
    position: relative;
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    padding: 10px;
    display: none;
    z-index: 1000;
}

.user-dropdown:hover .user-dropdown-menu {
    display: block;
}

.user-dropdown-menu a {
    display: block;
    padding: 10px 15px;
    border-radius: 8px;
    color: var(--gray-700);
}

.user-dropdown-menu a:hover {
    background: var(--gray-100);
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* 搜索框 */
.search-box {
    display: flex;
    align-items: center;
    background: var(--gray-100);
    border-radius: 25px;
    padding: 8px 20px;
    gap: 10px;
    width: 300px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    font-size: 14px;
}

/* 主内容区 */
.main {
    padding: 30px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 25px;
}

/* 卡片 */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-100);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 首页Banner */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    border-radius: var(--radius-lg);
    padding: 50px;
    color: white;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 15px;
}

.hero p {
    opacity: 0.9;
    font-size: 18px;
}

/* 分类列表 */
.category-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.category-item {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    gap: 15px;
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.category-item:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
}

.category-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--gray-800);
}

.category-desc {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.category-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--gray-400);
}

/* 帖子列表 */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.post-item {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    gap: 15px;
    transition: all 0.2s;
    border: 1px solid var(--gray-200);
}

.post-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.post-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
}

.post-content {
    flex: 1;
    min-width: 0;
}

.post-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-title a {
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-title a:hover {
    color: var(--primary);
}

.post-badges {
    display: flex;
    gap: 5px;
}

.badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.badge-top {
    background: #fef3c7;
    color: #d97706;
}

.badge-jing {
    background: #fce7f3;
    color: #db2777;
}

.badge-new {
    background: #dbeafe;
    color: #2563eb;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: var(--gray-500);
}

.post-author {
    color: var(--primary);
    font-weight: 500;
}

.post-stats {
    display: flex;
    gap: 15px;
}

.post-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-excerpt {
    font-size: 14px;
    color: var(--gray-600);
    margin-top: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 帖子内容页 */
.post-detail {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
}

.post-detail-header {
    border-bottom: 2px solid var(--gray-100);
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.post-detail-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
}

.post-detail-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--gray-500);
    font-size: 14px;
}

.post-detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--gray-700);
}

.post-content-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 25px 30px;
    font-size: 16px;
    line-height: 1.9;
    color: var(--gray-700);
    margin: 0 0 20px 0;
}

.post-content-box p {
    margin-bottom: 15px;
}

.post-content-box p:last-child {
    margin-bottom: 0;
}

.post-content-box pre {
    background: var(--gray-800);
    color: #e5e7eb;
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 15px 0;
    font-size: 14px;
}

.post-content-box code {
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9em;
    color: var(--danger);
}

.post-content-box pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* 回复内容版块 - 与主帖风格统一 */
.reply-item .post-detail-content {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px 20px;
    line-height: 1.8;
}

.post-actions {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

/* 回复列表 */
.reply-list {
    margin-top: 30px;
}

.reply-item {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid var(--gray-100);
}

.reply-item:last-child {
    border-bottom: none;
}

.reply-content {
    flex: 1;
}

.reply-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.reply-author {
    font-weight: 600;
    color: var(--primary);
}

.reply-time {
    color: var(--gray-400);
    font-size: 13px;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
}

.sidebar-title {
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 用户中心 */
.user-profile {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: white;
    border-radius: var(--radius-lg);
    margin-bottom: 25px;
}

.user-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 36px;
}

.user-info h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

.user-info p {
    color: var(--gray-500);
}

.user-stats {
    display: flex;
    gap: 30px;
    margin-top: 15px;
}

.user-stat {
    text-align: center;
}

.user-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.user-stat-label {
    font-size: 13px;
    color: var(--gray-500);
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--gray-700);
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

textarea.form-input {
    min-height: 150px;
    resize: vertical;
}

.form-hint {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 5px;
}

/* 标签页 */
.tabs {
    display: flex;
    gap: 5px;
    border-bottom: 2px solid var(--gray-100);
    margin-bottom: 25px;
}

.tab {
    padding: 12px 20px;
    color: var(--gray-500);
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab:hover {
    color: var(--gray-700);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 说说 */
.moment-item {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.moment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.moment-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.moment-author {
    font-weight: 600;
}

.moment-time {
    font-size: 12px;
    color: var(--gray-400);
}

.moment-content {
    font-size: 15px;
    line-height: 1.7;
    color: var(--gray-700);
    margin-bottom: 15px;
}

.moment-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.moment-image {
    aspect-ratio: 1;
    background: var(--gray-100);
    border-radius: 8px;
    overflow: hidden;
}

.moment-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.moment-actions {
    display: flex;
    gap: 20px;
    padding-top: 10px;
    border-top: 1px solid var(--gray-100);
}

.moment-action {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-500);
    cursor: pointer;
    transition: color 0.2s;
}

.moment-action:hover {
    color: var(--primary);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 8px;
    background: white;
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
    font-size: 14px;
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 后台管理 */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 70px);
}

.admin-sidebar {
    width: 240px;
    background: white;
    padding: 20px 0;
    border-right: 1px solid var(--gray-200);
}

.admin-menu {
    list-style: none;
}

.admin-menu-item {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-600);
    transition: all 0.2s;
}

.admin-menu-item:hover, .admin-menu-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.admin-menu-item i {
    font-size: 18px;
}

.admin-content {
    flex: 1;
    padding: 25px;
    background: var(--gray-100);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.admin-title {
    font-size: 24px;
    font-weight: 600;
}

/* 数据表格 */
.data-table {
    width: 100%;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
}

.data-table th, .data-table td {
    padding: 15px 20px;
    text-align: left;
}

.data-table th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--gray-700);
}

.data-table tr {
    border-bottom: 1px solid var(--gray-100);
}

.data-table tr:last-child {
    border-bottom: none;
}

.data-table tr:hover {
    background: var(--gray-50);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 提示消息 */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    display: none;
    animation: slideIn 0.3s ease;
}

.toast.show {
    display: block;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 页脚 */
.footer {
    background: white;
    padding: 30px 0;
    margin-top: 50px;
    border-top: 1px solid var(--gray-200);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray-500);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

/* 移动端快捷操作栏 */
.mobile-post-actions {
    display: none;
}

/* 帖子详情页移动端优化 */
@media (max-width: 768px) {
    .mobile-post-actions {
        display: flex;
    }
}

/* 响应式 - 移动端优化 */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 35px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .category-list {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .admin-layout {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
        padding: 10px 0;
    }
    
    .admin-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        padding: 0 10px;
    }
    
    .admin-menu-item {
        padding: 8px 12px;
        flex: 0 0 auto;
    }
    
    .admin-menu-item span {
        display: inline !important;
    }
}

/* 平板设备 (768px - 1024px) */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
    
    .header-inner {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 0;
    }
    
    .nav {
        order: 3;
        width: 100%;
        display: none;
        flex-direction: column;
        gap: 8px;
        padding: 15px 0;
        border-top: 1px solid var(--gray-200);
        margin-top: 10px;
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav a {
        padding: 12px 16px;
        width: 100%;
        text-align: center;
    }
    
    .search-box {
        width: 100%;
        order: 4;
        padding: 10px 15px;
    }
    
    .user-area {
        gap: 10px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .btn {
        padding: 12px 18px;
        font-size: 15px;
    }
    
    .btn-outline {
        padding: 10px 16px;
    }
    
    .card {
        padding: 16px;
        margin-bottom: 15px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .hero {
        padding: 25px;
        margin-bottom: 20px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .hero p {
        font-size: 15px;
    }
    
    .post-detail {
        padding: 20px;
    }
    
    .post-detail-title {
        font-size: 22px;
    }
    
    .post-detail-meta {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 13px;
    }
    
    .post-item {
        flex-direction: column;
        gap: 12px;
    }
    
    .post-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .post-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .post-stats {
        gap: 10px;
    }
    
    .post-content-box {
        padding: 16px 20px;
        font-size: 15px;
    }
    
    .author-card {
        flex-direction: column;
        text-align: center;
    }
    
    .user-profile {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .user-stats {
        justify-content: center;
    }
    
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab {
        white-space: nowrap;
        padding: 10px 16px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table th, .data-table td {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    .moment-images {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pagination a, .pagination span {
        padding: 10px 14px;
    }
}

/* 手机设备 (320px - 480px) */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0 12px;
    }
    
    .header {
        padding: 0;
    }
    
    .header-inner {
        padding: 10px 12px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .logo span {
        display: none;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
    }
    
    .nav {
        padding: 12px;
        margin: 0;
    }
    
    .search-box {
        display: none;
    }
    
    .mobile-search-toggle {
        display: flex;
    }
    
    .mobile-search-box {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 15px;
        box-shadow: var(--shadow-lg);
        z-index: 1001;
        display: none;
    }
    
    .mobile-search-box.active {
        display: block;
    }
    
    .mobile-search-box input {
        width: 100%;
        padding: 12px 15px;
        border: 2px solid var(--gray-200);
        border-radius: 25px;
        font-size: 15px;
    }
    
    .user-area .btn {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .btn-primary {
        padding: 10px 16px;
    }
    
    .main {
        padding: 15px 0;
    }
    
    .hero {
        padding: 20px;
        border-radius: 12px;
    }
    
    .hero h1 {
        font-size: 20px;
    }
    
    .hero::before {
        display: none;
    }
    
    .category-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .category-item {
        padding: 15px;
    }
    
    .category-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    
    .category-name {
        font-size: 15px;
    }
    
    .category-desc {
        font-size: 12px;
    }
    
    .post-list {
        gap: 10px;
    }
    
    .post-item {
        padding: 15px;
    }
    
    .post-title {
        font-size: 15px;
    }
    
    .post-badges {
        flex-wrap: wrap;
    }
    
    .badge {
        padding: 3px 8px;
        font-size: 10px;
    }
    
    .post-meta {
        font-size: 12px;
        gap: 8px;
    }
    
    .post-excerpt {
        font-size: 13px;
        -webkit-line-clamp: 3;
    }
    
    .post-detail {
        padding: 16px;
        border-radius: 12px;
    }
    
    .post-detail-title {
        font-size: 18px;
    }
    
    .post-detail-meta {
        font-size: 12px;
        gap: 8px;
    }
    
    .post-content-box {
        padding: 14px 16px;
        font-size: 14px;
        border-radius: 10px;
    }
    
    .post-content-box pre {
        padding: 12px;
        font-size: 13px;
        border-radius: 8px;
        margin: 10px 0;
    }
    
    .post-actions {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .post-actions .btn {
        flex: 1;
        min-width: calc(50% - 5px);
        justify-content: center;
    }
    
    .author-card {
        padding: 15px;
    }
    
    .author-card .post-avatar {
        width: 50px;
        height: 50px;
    }
    
    .reply-item {
        padding: 15px 0;
    }
    
    .reply-item .post-avatar {
        width: 36px;
        height: 36px;
    }
    
    .reply-header {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .reply-author {
        font-size: 14px;
    }
    
    .user-profile {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .user-avatar-large {
        width: 80px;
        height: 80px;
        font-size: 28px;
    }
    
    .user-info h2 {
        font-size: 20px;
    }
    
    .user-stats {
        gap: 20px;
    }
    
    .user-stat-value {
        font-size: 20px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-input {
        padding: 14px 12px;
        font-size: 15px;
    }
    
    textarea.form-input {
        min-height: 120px;
    }
    
    .tabs {
        padding: 0;
    }
    
    .tab {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .moment-item {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    .moment-avatar {
        width: 40px;
        height: 40px;
    }
    
    .moment-content {
        font-size: 14px;
    }
    
    .moment-actions {
        gap: 15px;
    }
    
    .pagination {
        gap: 5px;
        margin-top: 20px;
    }
    
    .pagination a, .pagination span {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .modal-content {
        padding: 20px;
        border-radius: 12px;
    }
    
    .attachment-section {
        padding: 15px;
    }
    
    .attachment-card {
        padding: 12px 14px;
    }
    
    .attachment-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .attachment-icon-wrapper {
        width: 40px;
        height: 40px;
    }
    
    .attachment-details {
        width: 100%;
    }
    
    .attachment-name {
        max-width: 100%;
    }
    
    .attachment-action {
        width: 100%;
        margin-left: 0;
    }
    
    .btn-download {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
    }
    
    .content-link-card {
        flex-direction: column;
    }
    
    .content-link-img {
        width: 100%;
        height: 120px;
    }
    
    .admin-content {
        padding: 15px;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .admin-title {
        font-size: 20px;
    }
    
    .breadcrumb {
        font-size: 12px;
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .empty-state {
        padding: 40px 15px;
    }
    
    .empty-state-icon {
        font-size: 48px;
    }
    
    .empty-state h3 {
        font-size: 16px;
    }
    
    #page-flash {
        min-width: auto !important;
        width: 90% !important;
        padding: 16px 20px !important;
        font-size: 14px !important;
    }
    
    .toast {
        left: 15px;
        right: 15px;
        top: 70px;
    }
}

/* 超小屏幕优化 (小于 320px) */
@media (max-width: 320px) {
    body {
        font-size: 13px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .header-inner {
        padding: 8px 10px;
    }
    
    .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .btn {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .hero h1 {
        font-size: 18px;
    }
    
    .post-detail-title {
        font-size: 16px;
    }
    
    .user-avatar-large {
        width: 70px;
        height: 70px;
        font-size: 24px;
    }
}

/* 移动端触摸优化 */
@media (hover: none) and (pointer: coarse) {
    .btn, .tab, .nav a, .admin-menu-item, .pagination a {
        min-height: 44px;
        min-width: 44px;
    }
    
    .form-input, textarea.form-input {
        min-height: 48px;
    }
    
    input[type="checkbox"], input[type="radio"] {
        width: 24px;
        height: 24px;
    }
    
    select.form-input {
        min-height: 48px;
    }
    
    .post-title a {
        min-height: 24px;
        display: block;
    }
    
    .category-item, .post-item, .moment-item {
        cursor: default;
    }
    
    a, button {
        -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1);
    }
    
    a:active, button:active {
        opacity: 0.8;
    }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        position: relative;
    }
    
    .hero {
        padding: 20px;
    }
    
    .hero h1 {
        font-size: 20px;
    }
    
    .modal-content {
        max-height: 90vh;
    }
    
    .post-detail {
        max-height: none;
    }
}

/* 安全区域适配 (iPhone X 及以上) */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .footer {
        padding-bottom: calc(30px + env(safe-area-inset-bottom));
    }
    
    .header {
        padding-top: env(safe-area-inset-top);
    }
    
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* 高对比度模式优化 */
@media (prefers-contrast: high) {
    .card, .post-item, .category-item {
        border: 2px solid var(--gray-400);
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .form-input {
        border-width: 3px;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    /* 如需暗色模式，可在此添加 */
}

/* 打印样式优化 */
@media print {
    .header, .sidebar, .post-actions, .reply-list, .modal, .toast {
        display: none !important;
    }
    
    .content-wrapper {
        display: block;
    }
    
    .post-detail {
        box-shadow: none;
        border: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* 滚动条样式 (仅支持 WebKit) */
@media (hover: hover) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
    
    ::-webkit-scrollbar-track {
        background: var(--gray-100);
    }
    
    ::-webkit-scrollbar-thumb {
        background: var(--gray-300);
        border-radius: 4px;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: var(--gray-400);
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--gray-700);
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 富文本编辑器 */
.editor-toolbar {
    display: flex;
    gap: 5px;
    padding: 10px;
    background: var(--gray-100);
    border-radius: 8px 8px 0 0;
    border: 2px solid var(--gray-200);
    border-bottom: none;
}

.editor-toolbar button {
    padding: 6px 12px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.editor-toolbar button:hover {
    background: var(--gray-200);
}

.editor-content {
    min-height: 200px;
    padding: 15px;
    border: 2px solid var(--gray-200);
    border-radius: 0 0 8px 8px;
    outline: none;
}

.editor-content:focus {
    border-color: var(--primary);
}

/* 状态标签 */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.success {
    background: #d1fae5;
    color: #059669;
}

.status-badge.warning {
    background: #fef3c7;
    color: #d97706;
}

.status-badge.danger {
    background: #fee2e2;
    color: #dc2626;
}

/* 用户信息卡片 */
.author-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--primary);
}

.author-signature {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 5px;
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--gray-500);
}

.breadcrumb a {
    color: var(--gray-500);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span {
    color: var(--gray-300);
}
