/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #9B59B6;
    --primary-light: #BE7CE6;
    --primary-dark: #7D3C98;
    --accent: #E74C8B;
    --bg: #F8F0F6;
    --card: #FFFFFF;
    --text: #2C1A3D;
    --text-light: #7D6B8A;
    --text-muted: #B8A5C4;
    --border: #E8D8EE;
    --success: #27AE60;
    --warning: #F39C12;
    --shadow: 0 2px 12px rgba(155, 89, 182, 0.08);
    --shadow-hover: 0 8px 30px rgba(155, 89, 182, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

/* ==================== 导航栏 ==================== */
.navbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    gap: 12px;
}

.navbar .logo {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.navbar .logo span {
    font-size: 24px;
}

.navbar .nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex-shrink: 1;
}

.navbar .nav-right .btn {
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #C73E7A 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-outline:hover {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border-color: transparent;
}

.btn-ghost {
    background: transparent;
    color: var(--text-light);
}

.btn-ghost:hover {
    background: var(--bg);
    color: var(--text);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex-shrink: 1;
}

.user-menu .username {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.user-menu .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #BE7CE6, var(--accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

/* ==================== 搜索栏 ==================== */
.search-bar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
}

.search-form {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-form .search-input {
    flex: 1;
    padding: 10px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: var(--bg);
}

.search-form .search-input:focus {
    border-color: var(--primary);
    background: #fff;
}

.search-form select {
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    background: var(--bg);
    cursor: pointer;
    min-width: 120px;
}

.search-form select:focus {
    border-color: var(--primary);
}

.search-form button {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.search-form button:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #C73E7A 100%);
}

/* ==================== 主布局 ==================== */
.main-container {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
}

.content-area {
    min-width: 0;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ==================== 分类导航 ==================== */
.category-nav {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.category-nav h3 {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    background: var(--bg);
    color: var(--text-light);
    transition: all 0.2s;
    cursor: pointer;
    border: 1.5px solid transparent;
}

.category-tag:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: #F3E8FA;
}

.category-tag.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ==================== 排序栏 ==================== */
.sort-bar {
    background: var(--card);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
}

.sort-bar .sort-label {
    font-size: 13px;
    color: var(--text-light);
    white-space: nowrap;
}

.sort-bar .sort-options {
    display: flex;
    gap: 4px;
}

.sort-bar .sort-btn {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-light);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-bar .sort-btn:hover {
    background: var(--bg);
    color: var(--text);
}

.sort-bar .sort-btn.active {
    background: #F3E8FA;
    color: var(--primary);
    font-weight: 500;
}

.sort-bar .sort-right {
    margin-left: auto;
    font-size: 13px;
    color: var(--text-muted);
}

/* ==================== 帖子列表 ==================== */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.post-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: #D7A8E8;
    transform: translateY(-2px);
}

.post-card .post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.post-card .post-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.post-card .post-meta {
    flex: 1;
}

.post-card .post-author {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.post-card .post-time {
    font-size: 12px;
    color: var(--text-muted);
}

.post-card .post-category-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    background: #EBF2FC;
    color: var(--primary);
    font-weight: 500;
}

.post-card .post-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.post-card .post-title:hover {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-card .post-summary {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card .post-footer {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.post-card .post-footer .stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-card .post-footer .stat .icon {
    font-size: 15px;
}

.post-card.is-top {
    border-left: 3px solid var(--warning);
}

/* ==================== 侧边栏卡片 ==================== */
.sidebar-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.sidebar-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 6px;
}

.hot-list {
    list-style: none;
}

.hot-list li {
    padding: 10px 0;
    border-bottom: 1px solid #F5F5F5;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

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

.hot-list .rank {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--bg);
    color: var(--text-muted);
}

.hot-list li:nth-child(1) .rank { background: linear-gradient(135deg, #9B59B6, #E74C8B); color: #fff; }
.hot-list li:nth-child(2) .rank { background: linear-gradient(135deg, #AF7AC5, #F1948A); color: #fff; }
.hot-list li:nth-child(3) .rank { background: linear-gradient(135deg, #C39BD3, #F5B7B1); color: #fff; }

.hot-list .hot-title {
    flex: 1;
    font-size: 13px;
    color: var(--text);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hot-list .hot-title:hover {
    color: var(--primary);
}

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    padding: 16px 0;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-light);
    background: var(--card);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .current {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border-color: var(--primary);
}

/* ==================== 帖子详情 ==================== */
.post-detail {
    background: var(--card);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.post-detail .post-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.4;
}

.post-detail .post-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-light);
}

.post-detail .post-info .author {
    font-weight: 600;
    color: var(--text);
}

.post-detail .post-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 24px;
    white-space: pre-wrap;
    word-break: break-word;
}

.post-detail .post-content p {
    margin-bottom: 12px;
}

.post-detail .post-content img {
    max-width: 600px;
    max-height: 600px;
    width: auto;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 12px 0;
    cursor: zoom-in;
    transition: transform 0.2s;
    object-fit: contain;
}

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

.post-detail .post-content .video-wrapper {
    position: relative;
    width: 100%;
    margin: 20px auto;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    background: #000;
}
.post-detail .post-content .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .post-detail .post-content .video-wrapper {
        margin: 12px 0;
        border-radius: 6px;
    }
    .post-detail .post-content .video-wrapper iframe {
        border-radius: 6px;
    }
}

.post-detail .post-actions {
    display: flex;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.post-detail .action-btn {
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.post-detail .action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #F3E8FA;
}

.post-detail .action-btn.liked {
    border-color: var(--accent);
    color: var(--accent);
    background: #FDF2F8;
}

/* ==================== 帖子详情标签栏 ==================== */
.post-tab-bar {
    display: flex;
    gap: 0;
    background: var(--card);
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 0;
}

.post-tab {
    flex: 1;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-light);
    background: var(--card);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    text-align: center;
}

.post-tab:hover {
    color: var(--primary);
    background: #F8F0F6;
}

.post-tab.active {
    color: var(--primary);
    background: var(--card);
}

.post-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 3px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 3px 3px 0 0;
}

/* ==================== 评论区 ==================== */
.comment-section {
    background: var(--card);
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

/* ==================== 相似帖子面板 ==================== */
.similar-posts-panel {
    background: var(--card);
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.similar-post-item {
    display: block;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    border: 1px solid transparent;
    margin-bottom: 8px;
    text-decoration: none;
    color: var(--text);
}

.similar-post-item:hover {
    background: var(--bg);
    border-color: #D7A8E8;
    transform: translateX(4px);
}

.similar-post-item:last-child {
    margin-bottom: 0;
}

.similar-post-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.similar-post-item:hover .similar-post-title {
    color: var(--primary);
}

.similar-post-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

/* 评论淡入动画 */
@keyframes commentFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.comment-section h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text);
}

.comment-form {
    margin-bottom: 24px;
}

.comment-form textarea {
    width: 100%;
    padding: 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.comment-form textarea:focus {
    border-color: var(--primary);
}

.comment-form .form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #F5F5F5;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-item .comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C39BD3, #E77FB0);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.comment-item .comment-body {
    flex: 1;
}

.comment-item .comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.comment-item .comment-author {
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.comment-item .comment-time {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-item .comment-content {
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
}

.comment-item .comment-actions {
    margin-top: 8px;
    display: flex;
    gap: 12px;
}

.comment-item .comment-actions a {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-item .comment-actions a:hover {
    color: var(--primary);
}

/* 回复 */
.reply-list {
    margin-left: 48px;
    margin-top: 12px;
    padding-left: 16px;
    border-left: 2px solid #E8D8EE;
}

.reply-item {
    padding: 10px 0;
    border-bottom: 1px solid #F8F8F8;
}

.reply-item:last-child {
    border-bottom: none;
}

.reply-item .reply-author {
    font-size: 13px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reply-item .reply-to {
    color: var(--text-muted);
    font-size: 13px;
}

.reply-item .reply-content {
    font-size: 14px;
    color: var(--text);
    margin: 4px 0;
}

.reply-item .reply-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==================== 表单页面 ==================== */
.form-page {
    max-width: 480px;
    margin: 60px auto;
    padding: 0 24px;
}

.form-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
}

.form-card h2 {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 28px;
}

.form-card .form-group {
    margin-bottom: 18px;
}

.form-card .form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.form-card .form-group input,
.form-card .form-group select,
.form-card .form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-card .form-group input:focus,
.form-card .form-group select:focus,
.form-card .form-group textarea:focus {
    border-color: var(--primary);
}

.form-card .btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.form-card .btn-submit:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #C73E7A 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.3);
}

.form-card .form-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: var(--text-light);
}

.form-card .form-footer a {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 500;
}

/* ==================== 发帖页面 ==================== */
.create-post-page {
    max-width: 800px;
    margin: 24px auto;
    padding: 0 24px;
}

.create-post-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.create-post-card h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text);
}

.create-post-card .form-group {
    margin-bottom: 20px;
}

.create-post-card .form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.create-post-card input[type="text"],
.create-post-card select,
.create-post-card textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.create-post-card input:focus,
.create-post-card select:focus,
.create-post-card textarea:focus {
    border-color: var(--primary);
}

.create-post-card textarea {
    min-height: 300px;
    resize: vertical;
    line-height: 1.8;
}

/* ==================== 个人中心 ==================== */
.profile-page {
    max-width: 800px;
    margin: 24px auto;
    padding: 0 24px;
}

.profile-card {
    background: rgba(255,255,255,0.8);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.profile-card h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

.profile-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.profile-info .info-item {
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.profile-info .info-item .label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.profile-info .info-item .value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

/* ==================== 消息提示 ==================== */
.messages {
    max-width: 800px;
    margin: 16px auto;
    padding: 0 24px;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 14px;
}

.alert-success {
    background: #D5F5E3;
    color: #1E8449;
    border: 1px solid #A9DFBF;
}

.alert-error {
    background: #FADBD8;
    color: #922B21;
    border: 1px solid #F1948A;
}

.alert-info {
    background: #D6EAF8;
    color: #21618C;
    border: 1px solid #AED6F1;
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 15px;
}

/* ==================== 页脚 ==================== */
.footer {
    text-align: center;
    padding: 32px 24px;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 40px;
}

/* ==================== 删除按钮美化 ==================== */
.btn-delete {
    padding: 6px 16px;
    background: linear-gradient(135deg, #E74C8B, #FF6B6B);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #C73E7A, #E74C3C);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 139, 0.3);
}

/* ==================== 个人中心帖子卡片 ==================== */
.profile-post-item {
    background: var(--card);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.profile-post-item:hover {
    border-color: #D7A8E8;
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.1);
}

.profile-comment-item {
    background: var(--card);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.profile-comment-item:hover {
    border-color: #D7A8E8;
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.1);
}

/* ==================== 响应式 - 平板 ==================== */
@media (max-width: 900px) {
    .main-container {
        grid-template-columns: 1fr;
        padding: 0 12px;
        gap: 16px;
        margin: 16px auto;
    }
    .sidebar {
        order: -1;
    }
    .search-form {
        flex-wrap: wrap;
        gap: 8px;
    }
    .search-form select {
        width: 100%;
        min-width: 0;
    }
    .profile-info {
        grid-template-columns: 1fr;
    }
}

/* ==================== 响应式 - 手机 ==================== */
@media (max-width: 640px) {
    /* 全局 */
    body {
        font-size: 14px;
    }

    /* 导航栏 */
    .navbar {
        padding: 0 10px;
        height: 48px;
        gap: 8px;
    }
    .navbar .logo {
        font-size: 15px;
        flex-shrink: 0;
    }
    .navbar .logo span {
        font-size: 16px;
    }
    .navbar .nav-right {
        gap: 4px;
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
    }
    .navbar .nav-right .btn {
        padding: 4px 8px;
        font-size: 12px;
        white-space: nowrap;
    }
    .navbar .nav-right .btn.btn-primary {
        padding: 4px 8px;
    }
    .user-menu {
        gap: 6px;
        min-width: 0;
    }
    .user-menu .username {
        display: none !important;
    }
    .user-menu .avatar {
        width: 28px;
        height: 28px;
        font-size: 11px;
        flex-shrink: 0;
    }
    .user-menu .btn-ghost {
        padding: 4px 6px;
        font-size: 12px;
        white-space: nowrap;
    }

    /* 搜索栏 */
    .search-bar {
        padding: 10px 12px;
    }
    .search-form {
        gap: 8px;
    }
    .search-form .search-input {
        padding: 8px 12px;
        font-size: 14px;
    }
    .search-form select {
        padding: 8px 10px;
        font-size: 13px;
    }
    .search-form button {
        padding: 8px 16px;
        font-size: 13px;
    }

    /* 主布局 */
    .main-container {
        padding: 0 10px;
        gap: 12px;
        margin: 12px auto;
    }

    /* 分类导航 */
    .category-nav {
        padding: 12px;
    }
    .category-tag {
        padding: 5px 10px;
        font-size: 12px;
    }

    /* 排序栏 */
    .sort-bar {
        padding: 10px 12px;
        gap: 8px;
        flex-wrap: wrap;
    }
    .sort-bar .sort-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    .sort-bar .sort-right {
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
    }

    /* 帖子卡片 */
    .post-card {
        padding: 12px;
    }
    .post-card .post-header {
        gap: 8px;
        margin-bottom: 6px;
    }
    .post-card .post-avatar {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    .post-card .post-author {
        font-size: 12px;
    }
    .post-card .post-time {
        font-size: 10px;
    }
    .post-card .post-category-badge {
        padding: 2px 6px;
        font-size: 10px;
    }
    .post-card .post-title {
        font-size: 14px;
        margin-bottom: 6px;
    }
    .post-card .post-summary {
        font-size: 12px;
        -webkit-line-clamp: 2;
        margin-bottom: 8px;
    }
    .post-card .post-footer {
        gap: 10px;
        font-size: 11px;
        flex-wrap: wrap;
    }
    .post-card .post-footer .stat .icon {
        font-size: 13px;
    }

    /* 侧边栏 */
    .sidebar-card {
        padding: 14px;
    }
    .sidebar-card h3 {
        font-size: 14px;
        margin-bottom: 12px;
    }
    .hot-list li {
        padding: 8px 0;
    }
    .hot-list .hot-title {
        font-size: 12px;
    }

    /* 分页 */
    .pagination {
        gap: 4px;
        margin-top: 16px;
        padding: 12px 0;
        flex-wrap: wrap;
    }
    .pagination a, .pagination span {
        padding: 6px 10px;
        font-size: 13px;
    }

    /* 帖子详情 */
    .post-detail {
        padding: 16px;
        margin-bottom: 12px;
    }
    .post-detail .post-title {
        font-size: 18px;
        margin-bottom: 12px;
    }
    .post-detail .post-info {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 13px;
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
    .post-detail .post-content {
        font-size: 14px;
        line-height: 1.7;
    }
    .post-detail .post-content img {
        max-width: 100%;
        max-height: 400px;
    }
    .post-detail .post-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    .post-detail .action-btn {
        padding: 6px 14px;
        font-size: 13px;
    }

    /* 标签栏 */
    .post-tab-bar {
        border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    }
    .post-tab {
        padding: 10px 12px;
        font-size: 14px;
    }

    /* 评论区 */
    .comment-section {
        padding: 14px;
        border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    }
    .comment-section h3 {
        font-size: 15px;
        margin-bottom: 14px;
    }

    /* 相似帖子 */
    .similar-posts-panel {
        padding: 12px;
        border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    }
    .similar-post-item {
        padding: 10px 12px;
    }
    .similar-post-title {
        font-size: 14px;
    }
    .similar-post-meta {
        font-size: 11px;
        gap: 8px;
    }
    .comment-form textarea {
        padding: 10px;
        font-size: 14px;
        min-height: 70px;
    }
    .comment-item {
        gap: 8px;
    }
    .comment-item .comment-avatar {
        width: 30px;
        height: 30px;
        font-size: 11px;
    }
    .comment-item .comment-header {
        gap: 6px;
    }
    .comment-item .comment-author {
        font-size: 13px;
    }
    .comment-item .comment-time {
        font-size: 11px;
    }
    .comment-item .comment-content {
        font-size: 13px;
    }

    /* 回复 - 缩进减小 */
    .reply-list {
        margin-left: 24px;
        padding-left: 10px;
    }

    /* 表单页面 */
    .form-page {
        margin: 30px auto;
        padding: 0 12px;
    }
    .form-card {
        padding: 24px 16px;
    }
    .form-card h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    .form-card .form-group input,
    .form-card .form-group select,
    .form-card .form-group textarea {
        padding: 10px 12px;
        font-size: 14px;
    }
    .form-card .btn-submit {
        padding: 12px;
        font-size: 14px;
    }

    /* 发帖页面 */
    .create-post-page {
        padding: 0 12px;
        margin: 12px auto;
    }
    .create-post-card {
        padding: 20px 14px;
    }
    .create-post-card h2 {
        font-size: 18px;
        margin-bottom: 16px;
    }
    .create-post-card textarea {
        min-height: 200px;
    }

    /* 个人中心 */
    .profile-page {
        padding: 0 12px;
        margin: 12px auto;
    }
    .profile-card {
        padding: 20px 14px;
        margin-bottom: 12px;
    }
    .profile-card h2 {
        font-size: 16px;
        margin-bottom: 14px;
    }

    /* 页脚 */
    .footer {
        padding: 20px 12px;
        font-size: 12px;
        margin-top: 24px;
        line-height: 1.8;
    }
    .footer img {
        display: block;
        margin: 6px auto;
    }

    /* 空状态 */
    .empty-state {
        padding: 40px 16px;
    }
    .empty-state .icon {
        font-size: 36px;
    }
    .empty-state p {
        font-size: 14px;
    }

    /* 消息提示 */
    .alert {
        padding: 10px 12px;
        font-size: 13px;
    }
}
