/**
 * HuBBS - 主样式文件
 * 响应式设计：支持电脑、平板、手机
 */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #1890ff;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

a:hover {
    color: #40a9ff;
}

/* 容器 - 响应式宽度 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部 */
.header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    height: 60px;
}

.logo {
    margin-right: 30px;
    flex-shrink: 0;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
}

.logo-icon {
    color: #333;
}

.logo-text {
    color: #ff6b6b;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    margin-left: auto;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    margin: 5px 0;
    transition: all 0.3s;
}

.nav {
    display: flex;
    flex: 1;
    gap: 25px;
    align-items: center;
}

.nav a.nav-link {
    color: #333 !important;
    font-size: 15px;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.nav a.nav-link:hover,
.nav a.nav-link.active {
    color: #ff6b6b !important;
    border-bottom-color: #ff6b6b;
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.user-nav a.nav-link,
.user-nav a.nav-link:link,
.user-nav a.nav-link:visited {
    color: #666 !important;
}

.user-nav a.nav-link:hover {
    color: #ff6b6b !important;
}

/* 消息通知铃铛 */
.notification-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 8px;
    color: #666;
    border-radius: 50%;
    transition: all 0.2s;
}

.notification-bell:hover {
    background: #fff2f0;
    color: #ff6b6b;
}

.notification-bell.has-unread {
    color: #ff6b6b;
}

.notification-bell.has-unread:hover {
    background: #fff2f0;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ff4d4f;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    border: 2px solid #fff;
    box-sizing: border-box;
    z-index: 10;
}

.user-name {
    color: #333;
    font-weight: 500;
}

.btn-small {
    background: #ff6b6b;
    color: #fff !important;
    padding: 6px 16px !important;
    border-radius: 4px;
    border: none !important;
}

.btn-small:hover {
    background: #ff5252;
}

/* 消息提示 */
.message {
    padding: 12px 0;
    text-align: center;
}

.message-success {
    background: #f6ffed;
    color: #52c41a;
    border-bottom: 1px solid #b7eb8f;
}

.message-error {
    background: #fff2f0;
    color: #ff4d4f;
    border-bottom: 1px solid #ffccc7;
}

/* 主体 */
.main {
    padding: 20px 0;
    min-height: calc(100vh - 140px);
}

/* 三栏布局 - 桌面端 */
.three-column {
    display: grid;
    grid-template-columns: 200px 1fr 280px;
    gap: 20px;
}

/* 侧边栏 */
.sidebar-left,
.sidebar-right {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 15px;
    overflow: hidden;
}

.card-header {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.card-body {
    padding: 15px;
}

/* 板块列表 */
.forum-list {
    list-style: none;
}

.forum-item {
    margin-bottom: 5px;
}

.forum-item a {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    color: #666;
    transition: all 0.3s;
}

.forum-item a:hover,
.forum-item.active a {
    background: #fff2f0;
    color: #ff6b6b;
}

.forum-icon {
    margin-right: 10px;
    font-size: 16px;
}

.forum-name {
    flex: 1;
}

.forum-count {
    background: #f0f0f0;
    color: #999;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}

.forum-item.active .forum-count {
    background: #ff6b6b;
    color: #fff;
}

/* 二级分类缩进 */
.forum-child {
    margin-bottom: 2px;
}

.forum-child a {
    padding-left: 32px;
    font-size: 13px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.forum-child .forum-name {
    color: #888;
}

.forum-child a:hover .forum-name,
.forum-child.active .forum-name {
    color: #ff6b6b;
}

/* 主内容区 */
.main-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 20px;
    min-width: 0;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 10px;
}

.content-header h2 {
    font-size: 18px;
    font-weight: 600;
}

/* 帖子列表 */
.post-list {
    min-height: 300px;
}

.post-item {
    display: flex;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.3s;
}

.post-item:hover {
    background: #fafafa;
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
}

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

.post-top {
    background: #fffbe6;
}

.post-essence {
    background: #f6ffed;
}

.post-avatar {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    flex-shrink: 0;
}

.post-avatar img,
.avatar-default {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-default {
    background: #ff6b6b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

.post-content {
    flex: 1;
    min-width: 0;
}

.post-title {
    font-size: 15px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.post-title a {
    color: #333;
    font-weight: 500;
    word-break: break-all;
}

.post-title a:hover {
    color: #ff6b6b;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: normal;
    flex-shrink: 0;
}

.badge-top {
    background: #ff6b6b;
    color: #fff;
}

.badge-essence {
    background: #52c41a;
    color: #fff;
}

.badge-locked {
    background: #999;
    color: #fff;
}

.post-meta {
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.post-author {
    color: #666;
}

.post-forum {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
}

.post-reply-info {
    color: #ff6b6b;
}

.post-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #999;
    font-size: 13px;
    min-width: 60px;
    text-align: right;
}

.stat-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state p {
    margin-bottom: 20px;
}

/* 分页 */
.pagination-wrapper {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 4px;
    background: #fff;
    border: 1px solid #d9d9d9;
    color: #666;
    font-size: 14px;
    transition: all 0.3s;
    touch-action: manipulation;
}

.page-btn:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.page-btn.active {
    background: #ff6b6b;
    border-color: #ff6b6b;
    color: #fff;
}

.page-ellipsis {
    color: #999;
}

/* 右侧栏 */
.site-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.8;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    text-align: center;
}

.stat-box {
    padding: 10px;
    background: #fafafa;
    border-radius: 6px;
}

.stat-number {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #ff6b6b;
}

.stat-label {
    font-size: 12px;
    color: #999;
}

.user-avatars {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.user-avatar-item {
    width: 36px;
    height: 36px;
}

.user-avatar-item img,
.avatar-small {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-small {
    background: #1890ff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.link-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.link-list li {
    display: inline-block;
}

.link-list a {
    color: #666;
    font-size: 13px;
    white-space: nowrap;
}

.link-list a:hover {
    color: #ff6b6b;
}

/* 按钮 */
.btn-primary {
    display: inline-block;
    padding: 10px 24px;
    background: #ff6b6b;
    color: #fff;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    touch-action: manipulation;
    -webkit-appearance: none;
}

.btn-primary:hover {
    background: #ff5252;
    color: #fff;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    display: inline-block;
    padding: 10px 24px;
    background: #f0f0f0;
    color: #666;
    border-radius: 4px;
    margin-left: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* 表单 */
.form-container {
    max-width: 480px;
    margin: 40px auto;
    padding: 0 15px;
}

.form-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 40px;
}

.form-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    color: #333;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
    -webkit-appearance: none;
}

/* 排除复选框和单选按钮 */
.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto;
    padding: 0;
    border: none;
    -webkit-appearance: auto;
    appearance: auto;
}

/* 发帖页面专用样式 - 电脑端更宽 */
.post-create-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

.post-create-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 50px 60px;
}

.post-create-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 28px;
    color: #333;
    font-weight: 600;
}

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

.post-create-form .form-group label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-size: 15px;
    font-weight: 500;
}

.post-create-form .form-group select,
.post-create-form .form-group input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    background: #fafafa;
}

.post-create-form .form-group select:focus,
.post-create-form .form-group input[type="text"]:focus {
    outline: none;
    border-color: #ff6b6b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255,107,107,0.1);
}

.post-create-form .form-group textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.8;
    transition: all 0.3s;
    background: #fafafa;
    resize: vertical;
    min-height: 300px;
}

.post-create-form .form-group textarea:focus {
    outline: none;
    border-color: #ff6b6b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255,107,107,0.1);
}

.post-create-form .form-actions {
    margin-top: 35px;
    display: flex;
    gap: 20px;
    justify-content: flex-start;
}

.post-create-form .btn-primary {
    padding: 12px 40px;
    font-size: 15px;
    border-radius: 6px;
    min-width: 120px;
}

.post-create-form .btn-secondary {
    padding: 12px 32px;
    font-size: 15px;
    border-radius: 6px;
    margin-left: 0;
    min-width: 100px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b6b;
}

.form-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-checkbox input {
    width: auto;
}

.form-actions {
    margin-top: 25px;
}

.form-actions .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

.form-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.form-links a {
    color: #ff6b6b;
}

.alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fff2f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

/* ==================== 帖子列表（V2EX风格） ==================== */

.post-list-v2ex {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
}

.post-item-v2ex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s ease;
}

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

.post-item-v2ex:hover {
    background: #fafafa;
}

.post-item-v2ex.post-top {
    background: #fffbe6;
}

.post-item-v2ex.post-top:hover {
    background: #fff7d6;
}

.post-item-v2ex.post-essence {
    background: #f6ffed;
}

.post-item-v2ex.post-essence:hover {
    background: #e6f7d9;
}

/* 左侧主要内容区 */
.post-main-v2ex {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 12px;
}

/* 头像 */
.post-avatar-v2ex img,
.post-avatar-v2ex .avatar-v2ex-default {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.post-avatar-v2ex .avatar-v2ex-default {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 500;
}

/* 内容区 */
.post-content-v2ex {
    flex: 1;
    min-width: 0;
}

/* 标题 */
.post-title-v2ex {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.post-title-v2ex a {
    color: #333;
    text-decoration: none;
    word-break: break-all;
}

.post-title-v2ex a:hover {
    color: #ff6b6b;
    text-decoration: underline;
}

.post-title-v2ex .badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: normal;
    flex-shrink: 0;
}

/* 元信息 */
.post-meta-v2ex {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #999;
    flex-wrap: wrap;
}

.meta-author {
    color: #666;
    font-weight: 500;
}

.meta-forum {
    color: #778087;
}

.meta-time {
    color: #999;
}

.meta-reply {
    color: #ff6b6b;
}

.meta-dot {
    color: #ccc;
    margin: 0 2px;
}

/* 右侧统计区 */
.post-stats-v2ex {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: 16px;
    flex-shrink: 0;
}

.stat-count,
.stat-replies {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #999;
}

.stat-count svg,
.stat-replies svg {
    opacity: 0.5;
}

.stat-replies.has-replies {
    color: #ff6b6b;
    font-weight: 500;
}

.stat-replies.has-replies svg {
    opacity: 0.8;
    stroke: #ff6b6b;
}

.stat-replies.no-replies {
    color: #ccc;
}

/* ==================== 帖子详情页（V2EX风格） ==================== */

/* 布局容器 */
.post-detail-container {
    padding: 20px 0;
    background: #f6f6f6;
    min-height: calc(100vh - 60px);
}

.post-detail-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

/* 主内容区 */
.post-main {
    min-width: 0;
}

/* 帖子头部 */
.post-header-box {
    background: #fff;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.post-breadcrumb {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
}

.post-breadcrumb a {
    color: #778087;
}

.post-breadcrumb a:hover {
    color: #ff6b6b;
    text-decoration: underline;
}

.post-breadcrumb .sep {
    margin: 0 6px;
    color: #ccc;
}

.post-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin-bottom: 12px;
    word-break: break-all;
}

.post-title .badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.meta-label {
    color: #999;
}

.meta-value {
    color: #666;
}

.meta-value.author-name {
    color: #ff6b6b;
    font-weight: 500;
}

/* 帖子内容区 */
.post-content-box {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.content-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.author-avatar img,
.avatar-default-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-default-large {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 500;
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.author-time {
    font-size: 12px;
    color: #999;
}

.content-body {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    word-break: break-all;
    overflow-wrap: break-word;
}

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

.content-body p:last-child {
    margin-bottom: 0;
}

/* 引用块样式 */
.content-body blockquote {
    margin: 12px 0;
    padding: 12px 16px;
    border-left: 4px solid #1890ff;
    background: #f6f8fa;
    color: #666;
    font-style: italic;
}

.content-body blockquote p {
    margin-bottom: 8px;
}

.content-body blockquote p:last-child {
    margin-bottom: 0;
}

/* 字体大小样式 */
.content-body font[size="1"] {
    font-size: 10px;
}

.content-body font[size="2"] {
    font-size: 13px;
}

.content-body font[size="3"] {
    font-size: 16px;
}

.content-body font[size="4"] {
    font-size: 18px;
}

.content-body font[size="5"] {
    font-size: 24px;
}

.content-body font[size="6"] {
    font-size: 32px;
}

.content-body font[size="7"] {
    font-size: 48px;
}

/* 文字对齐样式 */
.content-body [style*="text-align: left"],
.content-body [align="left"] {
    text-align: left;
}

.content-body [style*="text-align: center"],
.content-body [align="center"] {
    text-align: center;
}

.content-body [style*="text-align: right"],
.content-body [align="right"] {
    text-align: right;
}

.content-body [style*="text-align: justify"],
.content-body [align="justify"] {
    text-align: justify;
}

/* 限制内容区域图片最大宽度 */
.content-body img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 回复头部 */
.replies-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: #f0f0f0;
    border-radius: 8px 8px 0 0;
    font-size: 13px;
}

.replies-count {
    color: #666;
    font-weight: 500;
}

.replies-sort {
    color: #999;
}

/* 回复列表 */
.replies-list {
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 15px;
}

.reply-item {
    display: flex;
    padding: 20px 24px;
    border-bottom: 1px solid #f5f5f5;
}

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

.reply-author {
    width: 60px;
    flex-shrink: 0;
    text-align: center;
    margin-right: 16px;
}

.reply-author .author-avatar img,
.reply-author .avatar-default {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 6px;
}

.reply-author .avatar-default {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 500;
    margin: 0 auto 6px;
}

.reply-author .author-name {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reply-author .author-time {
    font-size: 11px;
    color: #bbb;
}

.reply-floor {
    font-size: 11px;
    color: #ccc;
    margin-top: 4px;
}

.reply-content {
    flex: 1;
    min-width: 0;
}

.reply-body {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    word-break: break-all;
    overflow-wrap: break-word;
    margin-bottom: 10px;
}

.reply-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.action-btn:hover {
    color: #ff6b6b;
    background: #fff2f0;
}

.action-btn svg {
    opacity: 0.7;
}

/* 楼中楼 */
.reply-comments {
    margin-top: 12px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
}

.comment-item {
    display: flex;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

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

.comment-avatar img,
.comment-avatar .avatar-tiny {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
}

.comment-avatar .avatar-tiny {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

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

.comment-author {
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.comment-reply-to {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: #999;
}

.comment-reply-to svg {
    color: #ccc;
}

.comment-time {
    font-size: 11px;
    color: #bbb;
    margin-left: auto;
}

.comment-body {
    font-size: 13px;
    line-height: 1.6;
    color: #555;
    word-break: break-all;
}

.comment-reply-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 8px;
    margin-left: 8px;
    opacity: 1;
    transition: all 0.2s;
}

.comment-reply-btn:hover {
    color: #ff6b6b;
}

/* 楼中楼展开/收起 */
.comments-expand {
    text-align: center;
    padding-top: 8px;
    border-top: 1px dashed #e0e0e0;
    margin-top: 8px;
}

.expand-btn,
.collapse-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 4px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.expand-btn:hover,
.collapse-btn:hover {
    color: #ff6b6b;
    background: #fff2f0;
}

.expand-btn svg {
    transition: transform 0.2s;
}

.comment-collapsed {
    display: none !important;
}

.comment-expanded {
    display: flex !important;
    animation: slideDown 0.3s ease;
}

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

/* 楼中楼回复表单 */
.reply-comment-form-wrapper {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e0e0e0;
}

.reply-comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reply-input-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px 12px;
}

.reply-target {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
}

.reply-input-box textarea {
    width: 100%;
    border: none;
    resize: vertical;
    min-height: 50px;
    font-size: 13px;
    line-height: 1.6;
    background: transparent;
}

.reply-input-box textarea:focus {
    outline: none;
}

.reply-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-cancel {
    padding: 6px 16px;
    font-size: 13px;
    color: #666;
    background: #f0f0f0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

.btn-submit {
    padding: 6px 16px;
    font-size: 13px;
    color: #fff;
    background: #ff6b6b;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit:hover {
    background: #ff5252;
}

/* 底部主回复表单 */
.main-reply-form {
    background: #fff;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.reply-form-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.current-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.current-user img,
.current-user .avatar-tiny {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.current-user .avatar-tiny {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.reply-tip {
    font-size: 13px;
    color: #999;
}

.main-reply-form .reply-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    transition: all 0.2s;
}

.main-reply-form .reply-form textarea:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255,107,107,0.1);
}

.main-reply-form .form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.shortcut-tip {
    font-size: 12px;
    color: #999;
}

.main-reply-form .btn-primary {
    padding: 10px 28px;
    font-size: 14px;
}

/* 锁定提示 */
.locked-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    color: #999;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.locked-notice svg {
    color: #ff6b6b;
}

/* 登录提示 */
.login-notice {
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.login-notice a {
    color: #ff6b6b;
    font-weight: 500;
}

/* 右侧边栏 */
.post-sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.sidebar-card {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
}

.card-header {
    padding: 14px 18px;
    background: #f9f9f9;
    border-bottom: 1px solid #f0f0f0;
}

.card-title {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-body {
    padding: 18px;
}

/* 楼主卡片 */
.author-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-avatar {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.profile-avatar img,
.profile-avatar .avatar-default-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.profile-avatar .avatar-default-large {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 500;
}

.profile-name {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

/* 主题和回复统计区域 - 美化 */
.profile-stats {
    display: flex;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.profile-stats .stat-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.profile-stats .stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.profile-stats .stat-box:hover {
    background: linear-gradient(135deg, #fff2f0 0%, #fff 100%);
    border-color: #ffccc7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,107,107,0.15);
}

.profile-stats .stat-box:hover::before {
    transform: scaleX(1);
}

.profile-stats .stat-num {
    font-size: 20px;
    font-weight: 700;
    color: #ff6b6b;
    line-height: 1.2;
    margin-bottom: 4px;
}

.profile-stats .stat-label {
    font-size: 12px;
    color: #999;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 帖子信息卡片 */
.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

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

.info-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #999;
}

.info-label svg {
    opacity: 0.6;
}

.info-label.like-label {
    color: #ff6b6b;
}

.info-label.like-label svg {
    opacity: 1;
}

.info-label.favorite-label {
    color: #ffa726;
}

.info-label.favorite-label svg {
    opacity: 1;
}

.info-value {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* 回到顶部 */
.back-to-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.back-to-top:hover {
    color: #ff6b6b;
    background: #fff2f0;
}

.back-to-top svg {
    color: #999;
}

/* 旧版样式兼容 - 隐藏 */
.post-detail,
.replies-section,
.reply-form-section,
.login-to-reply {
    display: none;
}

.reply-comments-list {
    margin-bottom: 12px;
}

.reply-comment-item {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #e8e8e8;
}

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

.reply-comment-avatar {
    width: 28px;
    height: 28px;
    margin-right: 10px;
    flex-shrink: 0;
}

.reply-comment-avatar img,
.reply-comment-avatar .avatar-tiny-default {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.reply-comment-content {
    flex: 1;
    min-width: 0;
}

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

.reply-comment-author {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.reply-comment-to {
    display: flex;
    align-items: center;
    gap: 4px;
}

.reply-arrow {
    color: #999;
    font-size: 12px;
}

.reply-comment-target {
    font-size: 13px;
    color: #1890ff;
    background: #e6f7ff;
    padding: 2px 6px;
    border-radius: 4px;
}

.reply-comment-time {
    font-size: 12px;
    color: #999;
    margin-left: auto;
}

.reply-comment-body {
    font-size: 13px;
    line-height: 1.6;
    color: #555;
    word-break: break-all;
}

.reply-comment-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 8px;
    margin-left: 8px;
    flex-shrink: 0;
    transition: color 0.3s;
}

.reply-comment-btn:hover {
    color: #ff6b6b;
}

.reply-comment-form-wrapper {
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

.reply-comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reply-comment-input-wrapper {
    position: relative;
}

.reply-comment-placeholder {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

.reply-comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 13px;
    resize: vertical;
    min-height: 60px;
    background: #fff;
}

.reply-comment-form textarea:focus {
    outline: none;
    border-color: #ff6b6b;
}

.reply-comment-actions {
    display: flex;
    justify-content: flex-end;
}

.reply-comment-actions .btn-small {
    padding: 6px 16px;
    font-size: 13px;
    background: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.reply-comment-actions .btn-small:hover {
    background: #ff5252;
}

/* 楼中楼展开/收起按钮 */
.reply-comments-expand,
.reply-comments-collapse {
    text-align: center;
    padding: 10px 0;
    border-top: 1px dashed #ddd;
    margin-top: 8px;
}

.expand-btn,
.collapse-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 16px;
    border-radius: 4px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.expand-btn:hover,
.collapse-btn:hover {
    color: #ff6b6b;
    background: #fff2f0;
}

.expand-icon,
.collapse-icon {
    font-size: 10px;
}

.comment-collapsed {
    display: none !important;
}

.comment-expanded {
    display: flex !important;
    animation: fadeIn 0.3s ease;
}

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

/* 个人中心 */
.profile-container {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 40px;
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.profile-avatar img,
.avatar-large {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.avatar-large {
    background: #ff6b6b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
}

.profile-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.profile-email {
    color: #666;
    margin-bottom: 5px;
}

.profile-joined {
    color: #999;
    font-size: 13px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-card {
    text-align: center;
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #ff6b6b;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    font-size: 14px;
    color: #666;
}

/* 页脚 */
.footer {
    background: #fff;
    border-top: 1px solid #f0f0f0;
    padding: 30px 15px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.footer p {
    margin-bottom: 5px;
}

/* 友情链接 */
.friend-links {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e8e8e8;
    font-size: 13px;
    line-height: 1.8;
}

.friend-links .links-label {
    color: #666;
    font-weight: 500;
    margin-right: 8px;
}

.friend-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.friend-links a:hover {
    color: #ff6b6b;
    text-decoration: underline;
}

.friend-links .link-separator {
    color: #ddd;
    margin: 0 8px;
}

@media (max-width: 768px) {
    .friend-links {
        font-size: 12px;
    }
    
    .friend-links .links-label {
        display: block;
        margin-bottom: 8px;
    }
}

/* ==================== 响应式设计 ==================== */

/* 大屏平板 (1024px - 1200px) */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
    }
}

/* 平板 (768px - 1024px) */
@media (max-width: 1024px) {
    .three-column {
        grid-template-columns: 180px 1fr 240px;
        gap: 15px;
    }
    
    .sidebar-left,
    .sidebar-right {
        position: static;
    }
}

/* 小平板和大手机 (640px - 768px) */
@media (max-width: 768px) {
    html {
        font-size: 13px;
    }
    
    .header .container {
        height: auto;
        padding: 10px 15px;
        flex-wrap: wrap;
    }
    
    .logo {
        margin-right: auto;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav {
        display: none;
        order: 3;
        width: 100%;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #f0f0f0;
        flex-direction: column;
        gap: 0;
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav-link {
        padding: 12px 0;
        border-bottom: 1px solid #f5f5f5;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .user-nav {
        gap: 10px;
    }
    
    .user-name {
        display: none;
    }
    
    .three-column {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .sidebar-left,
    .sidebar-right {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .sidebar-left .card,
    .sidebar-right .card {
        margin-bottom: 0;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .post-item {
        flex-wrap: wrap;
        padding: 12px 0;
    }
    
    .post-item:hover {
        margin: 0 -15px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .post-stats {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        margin-top: 10px;
        padding-left: 52px;
        gap: 15px;
    }
    
    .post-detail {
        padding: 20px;
    }
    
    .post-detail-title {
        font-size: 18px;
    }
    
    .reply-item {
        padding: 15px 0;
    }
    
    .reply-avatar {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    
    .form-box {
        padding: 25px 20px;
    }
    
    .profile-container {
        padding: 25px 20px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-avatar {
        margin-right: 0;
    }
}

/* 帖子列表响应式 */
@media (max-width: 768px) {
    .post-item-v2ex {
        padding: 12px 15px;
    }
    
    .post-avatar-v2ex img,
    .post-avatar-v2ex .avatar-v2ex-default {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .post-title-v2ex {
        font-size: 14px;
    }
    
    .post-meta-v2ex {
        font-size: 11px;
    }
    
    .post-stats-v2ex {
        gap: 12px;
        margin-left: 12px;
    }
    
    .stat-count,
    .stat-replies {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .post-item-v2ex {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 15px;
    }
    
    .post-main-v2ex {
        width: 100%;
    }
    
    .post-stats-v2ex {
        margin-left: 52px;
        width: calc(100% - 52px);
        justify-content: flex-start;
        gap: 20px;
    }
    
    .post-title-v2ex {
        font-size: 14px;
    }
}

/* 帖子详情页响应式 */
@media (max-width: 1024px) {
    .post-detail-layout {
        grid-template-columns: 1fr;
    }
    
    .post-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .post-sidebar .sidebar-card {
        margin-bottom: 0;
    }
    
    .back-to-top {
        display: none;
    }
}

@media (max-width: 768px) {
    .post-detail-container {
        padding: 10px 0;
    }
    
    .post-header-box {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .post-title {
        font-size: 17px;
    }
    
    .post-meta {
        gap: 12px;
    }
    
    .post-content-box {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .content-author {
        margin-bottom: 12px;
        padding-bottom: 12px;
    }
    
    .author-avatar img,
    .avatar-default-large {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .content-body {
        font-size: 14px;
    }
    
    .replies-header {
        padding: 10px 15px;
    }
    
    .reply-item {
        padding: 15px;
    }
    
    .reply-author {
        width: 50px;
        margin-right: 12px;
    }
    
    .reply-author .author-avatar img,
    .reply-author .avatar-default {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .reply-author .author-name {
        font-size: 11px;
    }
    
    .reply-body {
        font-size: 13px;
    }
    
    .reply-comments {
        padding: 10px;
    }
    
    .comment-item {
        padding: 6px 0;
    }
    
    .comment-avatar img,
    .comment-avatar .avatar-tiny {
        width: 22px;
        height: 22px;
    }
    
    .comment-author,
    .comment-reply-to {
        font-size: 11px;
    }
    
    .comment-body {
        font-size: 12px;
    }
    
    .comment-reply-btn {
        opacity: 1;
        font-size: 10px;
    }
    
    .main-reply-form {
        padding: 15px;
    }
    
    .reply-form-header {
        margin-bottom: 12px;
        padding-bottom: 12px;
    }
    
    .main-reply-form .form-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .shortcut-tip {
        text-align: center;
        order: 2;
    }
    
    .main-reply-form .btn-primary {
        width: 100%;
        order: 1;
    }
    
    .post-sidebar {
        grid-template-columns: 1fr;
    }
    
    .sidebar-card .card-body {
        padding: 15px;
    }
    
    .profile-avatar img,
    .profile-avatar .avatar-default-large {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .profile-name {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .post-title {
        font-size: 16px;
    }
    
    .meta-item {
        font-size: 12px;
    }
    
    .reply-item {
        flex-direction: column;
    }
    
    .reply-author {
        display: flex;
        align-items: center;
        width: 100%;
        text-align: left;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .reply-author .author-avatar img,
    .reply-author .avatar-default {
        margin-bottom: 0;
        margin-right: 10px;
    }
    
    .reply-author .avatar-default {
        margin: 0 10px 0 0;
    }
    
    .reply-author .author-info {
        flex: 1;
    }
    
    .reply-author .author-name {
        white-space: normal;
        font-size: 13px;
    }
    
    .reply-floor {
        margin-top: 0;
        font-size: 12px;
        color: #999;
    }
    
    .reply-comment-form-wrapper {
        margin-left: 0;
    }
}

/* 手机 (480px - 640px) */
@media (max-width: 640px) {
    .sidebar-left,
    .sidebar-right {
        grid-template-columns: 1fr;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .content-header .btn-primary {
        width: 100%;
        text-align: center;
    }
    
    .post-meta {
        gap: 8px;
        font-size: 12px;
    }
    
    .post-forum {
        display: none;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .page-btn {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 13px;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
    }
}

/* 发帖页面响应式 - 平板 */
@media (max-width: 1024px) {
    .post-create-container {
        max-width: 100%;
        margin: 20px auto;
        padding: 0 15px;
    }
    
    .post-create-box {
        padding: 35px 40px;
    }
    
    .post-create-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
}

/* 发帖页面响应式 - 手机 */
@media (max-width: 768px) {
    .post-create-container {
        margin: 15px auto;
        padding: 0;
    }
    
    .post-create-box {
        padding: 25px 20px;
        border-radius: 0;
        box-shadow: none;
    }
    
    .post-create-title {
        font-size: 20px;
        margin-bottom: 25px;
    }
    
    .post-create-form .form-group {
        margin-bottom: 20px;
    }
    
    .post-create-form .form-group textarea {
        min-height: 200px;
    }
    
    .post-create-form .form-actions {
        flex-direction: row;
        gap: 12px;
        justify-content: center;
    }
    
    .post-create-form .btn-primary {
        padding: 10px 28px;
        font-size: 14px;
        min-width: 100px;
    }
    
    .post-create-form .btn-secondary {
        padding: 10px 24px;
        font-size: 14px;
        min-width: 80px;
    }
}

/* 小手机 (< 480px) */
@media (max-width: 480px) {
    html {
        font-size: 12px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .main {
        padding: 10px 0;
    }
    
    .logo a {
        font-size: 20px;
    }
    
    .post-avatar {
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }
    
    .post-title {
        font-size: 14px;
    }
    
    .post-stats {
        padding-left: 46px;
        font-size: 12px;
    }
    
    .post-detail {
        padding: 15px;
    }
    
    .post-detail-title {
        font-size: 16px;
    }
    
    .post-detail-meta {
        gap: 10px;
    }
    
    .reply-avatar {
        width: 36px;
        height: 36px;
    }
    
    .reply-header {
        gap: 6px;
    }
    
    .form-box {
        padding: 20px 15px;
        border-radius: 0;
        box-shadow: none;
    }
    
    .form-container {
        margin: 0;
        padding: 0;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .form-actions .btn-primary {
        padding: 14px;
    }
    
    .avatar-large {
        font-size: 28px;
    }
    
    /* 楼中楼响应式 */
    .reply-comments-section {
        padding: 10px;
        margin-top: 10px;
    }
    
    .reply-comment-item {
        padding: 8px 0;
    }
    
    .reply-comment-avatar {
        width: 24px;
        height: 24px;
        margin-right: 8px;
    }
    
    .reply-comment-author,
    .reply-comment-target {
        font-size: 12px;
    }
    
    .reply-comment-body {
        font-size: 12px;
    }
    
    .reply-comment-time {
        font-size: 11px;
    }
}

/* ==================== 点赞和收藏按钮样式 ==================== */

/* 帖子操作栏 */
.post-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 15px;
}

.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* 点赞和收藏按钮基础样式 */
.action-btn.like-btn,
.action-btn.favorite-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.action-btn.like-btn:hover,
.action-btn.favorite-btn:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}

/* 点赞按钮激活状态 */
.action-btn.like-btn.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    border-color: #ff6b6b;
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.35);
}

.action-btn.like-btn.active:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff7a7a 100%);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.45);
}

/* 收藏按钮激活状态 */
.action-btn.favorite-btn.active {
    background: linear-gradient(135deg, #ffa726 0%, #ffcc80 100%);
    border-color: #ffa726;
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 167, 38, 0.35);
}

.action-btn.favorite-btn.active:hover {
    background: linear-gradient(135deg, #ff9800 0%, #ffb74d 100%);
    box-shadow: 0 6px 20px rgba(255, 167, 38, 0.45);
}

/* 按钮图标 */
.action-btn svg {
    transition: all 0.3s ease;
}

.action-btn.like-btn.active svg {
    animation: heartBeat 0.6s ease;
}

.action-btn.favorite-btn.active svg {
    animation: starSpin 0.6s ease;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(0.95); }
    75% { transform: scale(1.1); }
}

@keyframes starSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

/* 数字徽章 */
.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    margin-left: 4px;
    transition: all 0.3s ease;
}

.action-btn.like-btn.active .count-badge,
.action-btn.favorite-btn.active .count-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* 数字更新动画 */
.count-update {
    animation: countPulse 0.3s ease;
}

@keyframes countPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* 按钮弹出动画 */
.animate-pop {
    animation: popEffect 0.3s ease;
}

@keyframes popEffect {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 加载状态 */
.action-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.action-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 帖子统计信息 */
.post-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.post-stats .stat-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #999;
}

.post-stats .stat-item svg {
    opacity: 0.6;
}

/* Toast 提示 */
.toast-notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    color: #333;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-notification.toast-success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

.toast-notification.toast-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #ff4d4f;
}

.toast-notification.toast-info {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    color: #1890ff;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .post-actions-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: flex-start;
    }
    
    .action-btn.like-btn,
    .action-btn.favorite-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .post-stats {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .action-buttons {
        gap: 8px;
    }
    
    .action-btn.like-btn,
    .action-btn.favorite-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .action-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .count-badge {
        min-width: 16px;
        height: 16px;
        font-size: 11px;
    }
}

/* 触摸设备优化 */
@media (hover: none) {
    .post-item:hover {
        background: transparent;
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }
    
    .post-item:active {
        background: #fafafa;
    }
    
    .page-btn {
        min-height: 44px;
    }
    
    .btn-primary,
    .btn-secondary,
    .nav-link,
    .forum-item a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* 横屏手机 */
@media (max-height: 480px) and (orientation: landscape) {
    .header {
        position: relative;
    }
    
    .main {
        min-height: auto;
    }
}

/* 打印样式 */
@media print {
    .header,
    .sidebar-left,
    .sidebar-right,
    .footer,
    .pagination-wrapper,
    .reply-form-section {
        display: none !important;
    }
    
    .main-content,
    .post-detail {
        box-shadow: none;
        padding: 0;
    }
    
    .three-column {
        display: block;
    }
}
