/* ==================== 樱花主题 - 全局样式 ==================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=ZCOOL+XiaoWei&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #E8879A;
    --primary-light: #F2B5BE;
    --primary-dark: #D4677A;
    --accent: #C7A4D6;
    --bg: #FFF5F7;
    --card: #FFFFFF;
    --text: #4A3040;
    --text-light: #8B6B7E;
    --text-muted: #C9A8B8;
    --border: #F3D8DF;
    --success: #7DB88A;
    --warning: #E8B86D;
    --shadow: 0 2px 16px rgba(232, 135, 154, 0.1);
    --shadow-hover: 0 8px 32px rgba(232, 135, 154, 0.18);
    --radius: 14px;
    --radius-sm: 10px;
    --sakura-1: #FFB7C5;
    --sakura-2: #FF8FAB;
    --sakura-3: #FFD6E0;
    --sakura-4: #FFF0F3;
    --sakura-deep: #D4677A;
    --leaf: #A8C5A0;
    --bark: #8B6B5E;
    --sky: #E8F0F8;
}

body {
    font-family: 'Noto Serif SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* 樱花背景纹理 */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 10% 20%, rgba(255,183,197,0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 80%, rgba(199,164,214,0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255,214,224,0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

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

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

/* ==================== 飘落樱花花瓣动画 ==================== */
.sakura-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

.sakura-petal {
    position: absolute;
    top: -40px;
    opacity: 0;
    animation: sakuraFall linear infinite;
    pointer-events: none;
    will-change: transform;
}

.sakura-petal svg {
    filter: drop-shadow(0 1px 2px rgba(212,103,122,0.15));
}

@keyframes sakuraFall {
    0% {
        opacity: 0;
        transform: translateX(0) translateY(0) rotate(0deg) scale(0.8);
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: translateX(var(--drift)) translateY(105vh) rotate(var(--spin)) scale(0.5);
    }
}

@keyframes sakuraSway {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(15px); }
    75% { transform: translateX(-15px); }
}

/* ==================== 导航栏 ==================== */
.navbar {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 8px rgba(232, 135, 154, 0.08);
    gap: 12px;
}

.navbar .logo {
    font-size: 22px;
    font-weight: 700;
    font-family: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
    background: linear-gradient(135deg, var(--sakura-deep), 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;
    letter-spacing: 2px;
}

.navbar .logo span {
    font-size: 24px;
    -webkit-text-fill-color: initial;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

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

.navbar .nav-right .btn {
    padding: 8px 22px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-family: 'Noto Serif SC', serif;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--sakura-1) 0%, var(--sakura-2) 100%);
    color: #fff;
    box-shadow: 0 2px 12px rgba(232, 135, 154, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--sakura-2) 0%, var(--sakura-deep) 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 135, 154, 0.35);
}

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

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

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

.btn-ghost:hover {
    background: var(--sakura-4);
    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: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sakura-1), var(--accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid rgba(255,183,197,0.4);
    transition: all 0.3s ease;
    overflow: hidden;
}

.user-menu .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-menu .avatar:hover {
    border-color: var(--sakura-2);
    transform: scale(1.05);
}

/* ==================== 搜索栏 ==================== */
.search-bar {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 16px 28px;
}

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

.search-form .search-input {
    flex: 1;
    padding: 11px 18px;
    border: 1.5px solid var(--border);
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.8);
    font-family: 'Noto Serif SC', serif;
}

.search-form .search-input:focus {
    border-color: var(--primary-light);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(232,135,154,0.12);
}

.search-form select {
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    background: rgba(255,255,255,0.8);
    cursor: pointer;
    min-width: 120px;
    font-family: 'Noto Serif SC', serif;
}

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

.search-form button {
    padding: 11px 26px;
    background: linear-gradient(135deg, var(--sakura-1) 0%, var(--sakura-2) 100%);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'Noto Serif SC', serif;
    box-shadow: 0 2px 12px rgba(232,135,154,0.2);
}

.search-form button:hover {
    background: linear-gradient(135deg, var(--sakura-2) 0%, var(--sakura-deep) 100%);
    transform: translateY(-1px);
}

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

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

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

/* ==================== 分类导航 ==================== */
.category-nav {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,183,197,0.2);
}

.category-nav h3 {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    font-family: 'Noto Serif SC', serif;
}

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

.category-tag {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    background: var(--sakura-4);
    color: var(--text-light);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1.5px solid transparent;
    font-family: 'Noto Serif SC', serif;
}

.category-tag:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: #FFF0F3;
    transform: translateY(-1px);
}

.category-tag.active {
    background: linear-gradient(135deg, var(--sakura-1), var(--sakura-2));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(232,135,154,0.25);
}

/* ==================== 排序栏 ==================== */
.sort-bar {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 12px 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,183,197,0.15);
}

.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 16px;
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-light);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Serif SC', serif;
}

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

.sort-bar .sort-btn.active {
    background: linear-gradient(135deg, var(--sakura-3), var(--sakura-4));
    color: var(--primary-dark);
    font-weight: 600;
}

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

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

.post-card {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    border: 1px solid rgba(255,183,197,0.15);
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--sakura-1), var(--accent));
    transition: height 0.35s ease;
    border-radius: 0 0 4px 0;
}

.post-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: rgba(255,183,197,0.35);
    transform: translateY(-3px);
}

.post-card:hover::before {
    height: 100%;
}

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

.post-card .post-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sakura-1), var(--accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    border: 2px solid rgba(255,183,197,0.3);
    overflow: hidden;
}

.post-card .post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.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: 4px 12px;
    border-radius: 14px;
    font-size: 12px;
    background: var(--sakura-4);
    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.5;
    transition: color 0.3s ease;
}

.post-card .post-title:hover {
    color: var(--primary-dark);
}

.post-card .post-summary {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 14px;
    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;
    transition: color 0.2s;
}

.post-card .post-footer .stat:hover {
    color: var(--primary);
}

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

.post-card.is-top {
    border-left: 3px solid var(--warning);
    background: rgba(255,255,255,0.95);
}

/* ==================== 侧边栏卡片 ==================== */
.sidebar-card {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,183,197,0.15);
}

.sidebar-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Noto Serif SC', serif;
}

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

.hot-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--sakura-4);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: all 0.2s;
}

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

.hot-list li:hover {
    background: var(--sakura-4);
    border-radius: 8px;
    padding-left: 6px;
}

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

.hot-list li:nth-child(1) .rank { background: linear-gradient(135deg, var(--sakura-2), var(--sakura-deep)); color: #fff; }
.hot-list li:nth-child(2) .rank { background: linear-gradient(135deg, var(--sakura-1), var(--accent)); color: #fff; }
.hot-list li:nth-child(3) .rank { background: linear-gradient(135deg, var(--sakura-3), var(--sakura-1)); color: var(--primary-dark); }

.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: rgba(255,255,255,0.9);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.pagination a:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: var(--sakura-4);
}

.pagination .current {
    background: linear-gradient(135deg, var(--sakura-1), var(--sakura-2));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(232,135,154,0.25);
}

/* ==================== 帖子详情 ==================== */
.post-detail {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: 1px solid rgba(255,183,197,0.15);
}

.post-detail .post-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 18px;
    line-height: 1.5;
    font-family: 'Noto Serif SC', serif;
}

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

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

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

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

.post-detail .post-content img {
    max-width: 600px;
    max-height: 600px;
    width: auto;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 14px 0;
    cursor: zoom-in;
    transition: all 0.3s ease;
    object-fit: contain;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.post-detail .post-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}

.post-detail .post-content .video-wrapper {
    position: relative;
    width: 100%;
    margin: 24px auto;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    background: #000;
}
.post-detail .post-content .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

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

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

.post-detail .action-btn {
    padding: 8px 22px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    border: 1.5px solid var(--border);
    background: rgba(255,255,255,0.8);
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    font-family: 'Noto Serif SC', serif;
}

.post-detail .action-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: var(--sakura-4);
    transform: translateY(-1px);
}

.post-detail .action-btn.liked {
    border-color: var(--sakura-2);
    color: var(--sakura-deep);
    background: var(--sakura-4);
}

/* ==================== 帖子详情标签栏 ==================== */
.post-tab-bar {
    display: flex;
    gap: 0;
    background: rgba(255,255,255,0.9);
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 0;
    border: 1px solid rgba(255,183,197,0.15);
    border-bottom: none;
}

.post-tab {
    flex: 1;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-light);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
    font-family: 'Noto Serif SC', serif;
}

.post-tab:hover {
    color: var(--primary);
    background: var(--sakura-4);
}

.post-tab.active {
    color: var(--primary-dark);
    background: rgba(255,255,255,0.95);
}

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

/* ==================== 评论区 ==================== */
.comment-section {
    background: rgba(255,255,255,0.9);
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,183,197,0.15);
    border-top: none;
}

/* ==================== 相似帖子面板 ==================== */
.similar-posts-panel {
    background: rgba(255,255,255,0.9);
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,183,197,0.15);
    border-top: none;
}

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

.similar-post-item:hover {
    background: var(--sakura-4);
    border-color: var(--primary-light);
    transform: translateX(6px);
}

.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: 22px;
    color: var(--text);
    font-family: 'Noto Serif SC', serif;
}

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

.comment-form textarea {
    width: 100%;
    padding: 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    resize: vertical;
    min-height: 85px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Noto Serif SC', serif;
    background: rgba(255,255,255,0.8);
}

.comment-form textarea:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(232,135,154,0.1);
}

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

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

.comment-item {
    display: flex;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--sakura-4);
}

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

.comment-item .comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sakura-3), var(--accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    border: 2px solid rgba(255,183,197,0.25);
    overflow: hidden;
}

.comment-item .comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

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

.comment-item .comment-author {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

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

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

.comment-item .comment-actions {
    margin-top: 10px;
    display: flex;
    gap: 14px;
}

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

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

/* 回复 */
.reply-list {
    margin-left: 52px;
    margin-top: 14px;
    padding-left: 18px;
    border-left: 2px solid var(--sakura-3);
}

.reply-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--sakura-4);
}

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

.reply-item .reply-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

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

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

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

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

.form-card {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 40px rgba(232,135,154,0.12);
    border: 1px solid rgba(255,183,197,0.2);
    position: relative;
    overflow: hidden;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--sakura-3), var(--sakura-1), var(--accent), var(--sakura-1), var(--sakura-3));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.form-card h2 {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 30px;
    font-family: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
    letter-spacing: 3px;
}

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

.form-card .form-group label {
    display: block;
    margin-bottom: 8px;
    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 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Noto Serif SC', serif;
    background: rgba(255,255,255,0.7);
}

.form-card .form-group input:focus,
.form-card .form-group select:focus,
.form-card .form-group textarea:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(232,135,154,0.1);
    background: #fff;
}

.form-card .btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--sakura-1) 0%, var(--sakura-2) 100%);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    font-family: 'Noto Serif SC', serif;
    letter-spacing: 2px;
    box-shadow: 0 4px 16px rgba(232,135,154,0.3);
}

.form-card .btn-submit:hover {
    background: linear-gradient(135deg, var(--sakura-2) 0%, var(--sakura-deep) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(232,135,154,0.4);
}

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

.form-card .form-footer a {
    color: var(--primary);
    font-weight: 600;
    position: relative;
}

.form-card .form-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--primary-light);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.form-card .form-footer a:hover::after {
    transform: scaleX(1);
}

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

.create-post-card {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,183,197,0.15);
}

.create-post-card h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 26px;
    color: var(--text);
    font-family: 'Noto Serif SC', serif;
}

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

.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 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Noto Serif SC', serif;
    background: rgba(255,255,255,0.7);
}

.create-post-card input:focus,
.create-post-card select:focus,
.create-post-card textarea:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(232,135,154,0.1);
}

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

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

.profile-card {
    background: rgba(255,255,255,0.88);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,183,197,0.15);
}

.profile-card h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 22px;
    color: var(--text);
    font-family: 'Noto Serif SC', serif;
}

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

.profile-info .info-item {
    padding: 14px;
    background: var(--sakura-4);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.profile-info .info-item:hover {
    background: var(--sakura-3);
    transform: translateY(-1px);
}

.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: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    font-size: 14px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.alert-success {
    background: rgba(125,184,138,0.12);
    color: #4A8B5C;
    border: 1px solid rgba(125,184,138,0.3);
}

.alert-error {
    background: rgba(232,135,154,0.12);
    color: var(--sakura-deep);
    border: 1px solid rgba(232,135,154,0.3);
}

.alert-info {
    background: rgba(199,164,214,0.12);
    color: #7B5E8A;
    border: 1px solid rgba(199,164,214,0.3);
}

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

.empty-state .icon {
    font-size: 52px;
    margin-bottom: 18px;
    animation: emptyFloat 3s ease-in-out infinite;
}

@keyframes emptyFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.empty-state p {
    font-size: 15px;
    font-family: 'Noto Serif SC', serif;
}

/* ==================== 页脚 ==================== */
.footer {
    text-align: center;
    padding: 36px 24px;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 40px;
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    background: rgba(255,255,255,0.5);
}

.footer::before {
    content: '🌸';
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
    opacity: 0.6;
}

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

.btn-delete:hover {
    background: linear-gradient(135deg, var(--sakura-deep), #C45068);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(232,135,154,0.3);
}

/* ==================== 个人中心帖子卡片 ==================== */
.profile-post-item {
    background: rgba(255,255,255,0.9);
    border-radius: var(--radius-sm);
    padding: 18px;
    margin-bottom: 12px;
    border: 1px solid rgba(255,183,197,0.15);
    transition: all 0.3s ease;
}

.profile-post-item:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 16px rgba(232,135,154,0.12);
    transform: translateY(-2px);
}

.profile-comment-item {
    background: rgba(255,255,255,0.9);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(255,183,197,0.15);
    transition: all 0.3s ease;
}

.profile-comment-item:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 16px rgba(232,135,154,0.12);
}

/* ==================== 樱花装饰元素 ==================== */
.sakura-deco {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    opacity: 0.08;
}

.sakura-deco-1 {
    top: 15%;
    left: -30px;
    font-size: 120px;
    transform: rotate(-15deg);
}

.sakura-deco-2 {
    bottom: 20%;
    right: -20px;
    font-size: 100px;
    transform: rotate(20deg);
}

/* ==================== 响应式 - 平板 ==================== */
@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 12px;
        height: 50px;
        gap: 8px;
    }
    .navbar .logo {
        font-size: 16px;
        flex-shrink: 0;
    }
    .navbar .logo span {
        font-size: 18px;
    }
    .navbar .nav-right {
        gap: 4px;
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
    }
    .navbar .nav-right .btn {
        padding: 5px 10px;
        font-size: 12px;
        white-space: nowrap;
    }
    .navbar .nav-right .btn.btn-primary {
        padding: 5px 10px;
    }
    .user-menu {
        gap: 6px;
        min-width: 0;
    }
    .user-menu .username {
        display: none !important;
    }
    .user-menu .avatar {
        width: 30px;
        height: 30px;
        font-size: 11px;
        flex-shrink: 0;
    }
    .user-menu .btn-ghost {
        padding: 4px 8px;
        font-size: 12px;
        white-space: nowrap;
    }

    /* 搜索栏 */
    .search-bar {
        padding: 10px 12px;
    }
    .search-form {
        gap: 8px;
    }
    .search-form .search-input {
        padding: 9px 14px;
        font-size: 14px;
    }
    .search-form select {
        padding: 9px 10px;
        font-size: 13px;
    }
    .search-form button {
        padding: 9px 18px;
        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: 14px;
    }
    .post-card .post-header {
        gap: 8px;
        margin-bottom: 8px;
    }
    .post-card .post-avatar {
        width: 30px;
        height: 30px;
        font-size: 11px;
    }
    .post-card .post-author {
        font-size: 12px;
    }
    .post-card .post-time {
        font-size: 10px;
    }
    .post-card .post-category-badge {
        padding: 2px 8px;
        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: 10px;
    }
    .post-card .post-footer {
        gap: 12px;
        font-size: 11px;
        flex-wrap: wrap;
    }
    .post-card .post-footer .stat .icon {
        font-size: 13px;
    }

    /* 侧边栏 */
    .sidebar-card {
        padding: 16px;
    }
    .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: 18px;
        margin-bottom: 12px;
    }
    .post-detail .post-title {
        font-size: 18px;
        margin-bottom: 14px;
    }
    .post-detail .post-info {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 13px;
        margin-bottom: 18px;
        padding-bottom: 14px;
    }
    .post-detail .post-content {
        font-size: 14px;
        line-height: 1.8;
    }
    .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 16px;
        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: 16px;
        border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    }
    .comment-section h3 {
        font-size: 15px;
        margin-bottom: 16px;
    }

    /* 相似帖子 */
    .similar-posts-panel {
        padding: 14px;
        border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    }
    .similar-post-item {
        padding: 12px 14px;
    }
    .similar-post-title {
        font-size: 14px;
    }
    .similar-post-meta {
        font-size: 11px;
        gap: 8px;
    }
    .comment-form textarea {
        padding: 12px;
        font-size: 14px;
        min-height: 72px;
    }
    .comment-item {
        gap: 10px;
    }
    .comment-item .comment-avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    .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: 28px;
        padding-left: 12px;
    }

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

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

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

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

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

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

    /* 樱花装饰隐藏 */
    .sakura-deco {
        display: none;
    }
}
