/* ==========================================
   UD贴吧 - 主样式文件
   ========================================== */

/* CSS变量 */
:root {
    --primary-color: #3b82f6;
    --secondary-color: #4f46e5;
    --accent-color: #7c3aed;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-color: #1e293b;
    --text-light: #475569;
    --text-muted: #94a3b8;
    --bg-color: #f1f5f9;
    --card-bg: #fff;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 1px 3px rgba(0, 0, 0, 0.08);
    --radius: 0;
    --radius-sm: 4px;
    --transition: all 0.2s ease;
}

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

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: var(--text-color);
    background: var(--bg-color);
    min-height: 100vh;
}

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

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

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: transparent;
    color: var(--primary-color);
}

.btn:hover {
    background: var(--primary-color);
    color: #fff;
}

.btn:active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 头部导航 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
}

.logo i {
    font-size: 24px;
    background: var(--primary-color);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-box {
    flex: 1;
    max-width: 400px;
    display: flex;
    background: var(--bg-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.search-box input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
}

.search-box button {
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 24px;
}

.nav-menu a {
    color: var(--text-light);
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid transparent;
}

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

.nav-menu a.active {
    background: var(--primary-color);
    color: #fff;
}

.user-area {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-btns {
    display: flex;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.notification-icon {
    position: relative;
    cursor: pointer;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 20px;
    color: var(--text-light);
}

.notification-icon:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.notification-icon .badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: var(--danger-color);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 10px;
    border: 1px solid transparent;
    border-radius: 20px;
    position: relative;
}

.user-dropdown:hover {
    border-color: var(--primary-color);
}

.user-dropdown .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-color);
}

.user-dropdown .username {
    font-weight: 500;
    color: var(--text-color);
}

.user-dropdown i {
    font-size: 12px;
    color: var(--text-muted);
    transition: var(--transition);
}

.user-dropdown:hover i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    min-width: 160px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

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

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text-color);
}

.dropdown-menu a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

/* 主内容区 */
.main-content {
    max-width: 1200px;
    margin: 80px auto 40px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

/* 卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.card-title i {
    color: var(--primary-color);
}

/* 中间内容区 */
.content-center {
    min-width: 0;
}

.sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 12px 20px;
    box-shadow: var(--shadow);
}

.sort-tabs {
    display: flex;
    gap: 12px;
}

.sort-tab {
    color: var(--text-light);
    font-weight: 500;
    padding: 6px 0;
    position: relative;
}

.sort-tab:hover,
.sort-tab.active {
    color: var(--primary-color);
}

.sort-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
}

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

.post-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.post-header .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-color);
}

.post-author {
    flex: 1;
}

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

.post-author .name:hover {
    color: var(--primary-color);
}

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

.post-forum {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: var(--bg-color);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-light);
}

.post-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

.post-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.post-images img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.post-images img:hover {
    opacity: 0.9;
}

.post-footer {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

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

.post-stat i {
    font-size: 14px;
}

.post-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 4px;
    margin-right: 8px;
}

.post-tag.top {
    background: rgba(255, 152, 0, 0.1);
    color: var(--warning-color);
}

.post-tag.essence {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
}

/* 右侧边栏 */
.sidebar-right {
    position: sticky;
    top: 80px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hot-forums {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hot-forum-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 20px;
}

.hot-forum-item:hover {
    background: var(--bg-color);
}

.hot-forum-item .rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    background: var(--bg-color);
}

.hot-forum-item:nth-child(1) .rank {
    background: #ff6b6b;
    color: #fff;
}

.hot-forum-item:nth-child(2) .rank {
    background: #ff8e53;
    color: #fff;
}

.hot-forum-item:nth-child(3) .rank {
    background: #4ecdc4;
    color: #fff;
}

.hot-forum-item .forum-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
}

.hot-forum-item .forum-info {
    flex: 1;
    min-width: 0;
}

.hot-forum-item .forum-name {
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    flex-shrink: 0;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.rejected {
    background: #f8d7da;
    color: #721c24;
}

.hot-forum-item .forum-count {
    font-size: 12px;
    color: var(--text-muted);
}

.my-forums {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.my-forum-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg-color);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-color);
}

.my-forum-item:hover {
    background: var(--primary-color);
    color: #fff;
}

/* 加载状态 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: var(--text-muted);
}

.loading i {
    font-size: 20px;
    color: var(--primary-color);
}

.load-more {
    text-align: center;
    padding: 20px;
}

.load-more button {
    min-width: 200px;
}

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

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

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

.text-muted {
    color: var(--text-muted);
    font-size: 14px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    color: var(--text-color);
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.pagination a:hover {
    background: var(--primary-color);
    color: #fff;
}

.pagination .current {
    background: var(--primary-color);
    color: #fff;
}

/* 底部 */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 30px 24px;
    margin-top: 40px;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-muted);
}

.footer-inner a {
    color: var(--text-light);
    margin: 0 12px;
}

.footer-inner a:hover {
    color: var(--primary-color);
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 80px;
    width: 44px;
    height: 44px;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-hover);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    z-index: 100;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-color);
    color: #fff;
}

/* 通知面板 */
.notification-panel {
    position: fixed;
    top: 60px;
    right: 24px;
    width: 360px;
    max-height: 480px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    overflow: hidden;
    z-index: 1001;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.notification-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.mark-read-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 13px;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 20px;
    margin: 4px 8px;
    cursor: pointer;
}

.notification-item:hover {
    background: var(--bg-color);
}

.notification-item.unread {
    background: rgba(59, 130, 246, 0.1);
}

.notification-item .icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    color: var(--primary-color);
}

.notification-item .content {
    flex: 1;
}

.notification-item .title {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 4px;
}

.notification-item .desc {
    font-size: 13px;
    color: var(--text-light);
}

.notification-item .time {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* 认证页面 */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-color);
    padding: 20px;
}

.auth-container {
    display: flex;
    width: 100%;
    max-width: 900px;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-card {
    flex: 1;
    padding: 50px 40px;
}

.auth-bg {
    flex: 1;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-bg-content {
    color: #fff;
    text-align: center;
}

.auth-bg-content h2 {
    font-size: 28px;
    margin-bottom: 12px;
}

.auth-bg-content p {
    opacity: 0.9;
    margin-bottom: 24px;
}

.auth-bg-content ul {
    list-style: none;
    text-align: left;
}

.auth-bg-content li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-bg-content i {
    opacity: 0.8;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header .logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 20px;
}

.auth-header .logo i {
    color: var(--primary-color);
}

.auth-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-light);
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.input-icon input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
}

.input-icon input:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
}

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

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group.remember {
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-light);
}

.checkbox-label input {
    width: auto;
}

.form-tip {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

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

.error-message {
    background: #ffebee;
    color: var(--danger-color);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-light);
}

/* 吧详情页 */
.forum-cover {
    background: var(--secondary-color);
    padding: 60px 24px 40px;
    margin-top: 60px;
}

.forum-cover-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    color: #fff;
}

.forum-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.forum-info {
    flex: 1;
}

.forum-info h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.forum-info p {
    opacity: 0.9;
    margin-bottom: 12px;
}

.forum-stats {
    display: flex;
    gap: 24px;
    font-size: 14px;
}

.forum-stats i {
    margin-right: 6px;
}

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

.forum-actions .btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    background: transparent;
}

.forum-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
    color: #fff;
}

/* 帖子详情页 */
.post-detail-page {
    grid-template-columns: 1fr 300px;
}

.post-detail {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.post-detail-header {
    margin-bottom: 20px;
}

.post-detail-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

.post-detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 13px;
}

.post-detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 24px;
}

.post-detail-content img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin: 16px 0;
}

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

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
}

.action-btn:hover,
.action-btn.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.action-btn.active {
    background: var(--primary-color);
    color: #fff;
}

.post-info {
    font-size: 13px;
}

.post-info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.post-info-item .label {
    color: var(--text-muted);
}

.post-info-item .value {
    color: var(--text-color);
    font-weight: 500;
}

/* 回复区域 */
.reply-section {
    max-width: 1100px;
    margin: 24px auto 0;
    padding: 0 24px 40px;
}

.reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.reply-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.reply-form {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.reply-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    resize: vertical;
    transition: var(--transition);
}

.reply-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.reply-tools {
    display: flex;
    gap: 8px;
}

.tool-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
}

.tool-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 回复列表 */
.reply-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.reply-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

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

.reply-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.reply-author {
    flex: 1;
}

.reply-author .name {
    font-weight: 600;
    color: var(--text-color);
}

.reply-author .name.author {
    color: var(--primary-color);
}

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

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

.reply-content {
    padding-left: 52px;
    margin-bottom: 12px;
}

.reply-text {
    color: var(--text-color);
    line-height: 1.7;
}

.reply-images {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.reply-images img {
    max-width: 200px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.reply-footer {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-left: 52px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 12px;
}

.reply-action {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
}

.reply-action:hover {
    color: var(--primary-color);
}

/* 楼中楼 */
.sub-replies {
    margin-left: 52px;
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
}

.sub-reply-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.sub-reply-content {
    font-size: 13px;
}

.sub-reply-content .name {
    color: var(--primary-color);
    font-weight: 500;
}

.sub-reply-content .reply-to {
    color: var(--text-muted);
}

.sub-reply-content .text {
    color: var(--text-color);
}

/* 用户页面 */
.user-cover {
    background: var(--secondary-color);
    padding: 60px 24px 40px;
    margin-top: 60px;
}

.user-cover-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    color: #fff;
}

.user-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

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

.user-page {
    grid-template-columns: 1fr;
}

.user-tabs {
    display: flex;
    gap: 24px;
    background: var(--card-bg);
    padding: 16px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.user-tab {
    color: var(--text-light);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.user-tab:hover,
.user-tab.active {
    color: var(--primary-color);
}

.user-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.forum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.forum-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.forum-card .icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: #fff;
    font-size: 24px;
}

.forum-card .name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

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

/* 发帖页面 */
.create-post-page {
    grid-template-columns: 1fr;
}

.create-post-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    min-width: 600px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    margin-bottom: 24px;
    color: var(--text-color);
}

.page-title i {
    color: var(--primary-color);
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.editor-toolbar {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.toolbar-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.toolbar-btn:hover {
    background: #fff;
    color: var(--primary-color);
}

.toolbar-divider {
    width: 1px;
    background: var(--border-color);
    margin: 4px 8px;
}

.editor-toolbar + textarea {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.image-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
}

.image-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.image-preview-item .remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--danger-color);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.upload-btn:hover {
    background: rgba(59, 130, 246, 0.1);
}

.upload-btn i {
    font-size: 24px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.upload-btn span {
    font-size: 12px;
    color: var(--text-muted);
}

/* 吧选择器 */
.forum-select {
    position: relative;
}

.selected-forum {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.selected-forum:hover {
    border-color: var(--primary-color);
}

.selected-forum span {
    color: var(--text-muted);
}

.selected-forum.has-value span {
    color: var(--text-color);
}

.forum-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-hover);
    max-height: 300px;
    overflow: hidden;
    display: none;
    z-index: 100;
}

.forum-dropdown.show {
    display: block;
}

.forum-dropdown input {
    width: 100%;
    padding: 12px;
    border: none;
    border-bottom: 1px solid var(--border-color);
    outline: none;
}

.forum-options {
    max-height: 240px;
    overflow-y: auto;
}

.forum-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 4px 8px;
    border-radius: 20px;
    cursor: pointer;
}

.forum-option:hover {
    background: var(--bg-color);
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-body {
    padding: 24px;
}

.avatar-upload {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar-upload img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-color);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .sidebar-right {
        display: none;
    }

    .post-detail-page {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-inner {
        gap: 12px;
    }

    .search-box {
        display: none;
    }

    .nav-menu {
        display: none;
    }

    .main-content {
        grid-template-columns: 1fr;
        margin-top: 70px;
    }

    .auth-container {
        flex-direction: column;
    }
    
    .auth-bg {
        display: none;
    }
    
    .auth-card {
        padding: 40px 24px;
    }
    
    .forum-cover-content {
        flex-direction: column;
        text-align: center;
    }
    
    .forum-actions {
        justify-content: center;
    }
    
    .user-cover-content {
        flex-direction: column;
        text-align: center;
    }
    
    .post-detail-title {
        font-size: 20px;
    }
}
