/* 论坛社区样式 */

.forum-hero {
    text-align: center;
    padding: 50px 40px;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    border-radius: 20px;
    margin-bottom: 40px;
    border: 1px solid #dbeafe;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    position: relative;
}

.forum-hero h2 {
    font-size: 36px;
    color: #1e40af;
    margin-bottom: 12px;
    font-weight: 800;
}

.forum-hero p {
    font-size: 16px;
    color: #64748b;
    line-height: 1.8;
}

/* 登录注册入口 - 右上角 */
.auth-bar {
    position: absolute;
    top: 20px;
    right: 25px;
    display: flex;
    gap: 10px;
}

.auth-btn {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .3s;
    cursor: pointer;
    border: none;
}

.auth-btn-login {
    background: #fff;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.auth-btn-login:hover {
    background: #eff6ff;
}

.auth-btn-register {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59,130,246,.3);
}

.auth-btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59,130,246,.4);
}

/* 已登录状态 */
.user-bar {
    position: absolute;
    top: 20px;
    right: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

.user-name-small {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

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

.user-menu a {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none;
    font-weight: 600;
}

.user-menu .profile {
    background: #f0fdf4;
    color: #059669;
}

.user-menu .logout {
    background: #fef2f2;
    color: #dc2626;
}

.breadcrumb {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 15px;
}

.breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
}

.board-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 50px;
}

.board-card {
    background: #fff;
    border-radius: 16px;
    padding: 35px 30px;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    transition: all .3s;
    display: block;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.board-card:hover {
    border-color: #3b82f6;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

.board-card.strategy { border-left: 4px solid #f59e0b; }
.board-card.community { border-left: 4px solid #10b981; }

.board-icon { font-size: 42px; margin-bottom: 15px; }

.board-card h3 { font-size: 22px; color: #1e293b; margin-bottom: 10px; font-weight: 700; }
.board-card p { color: #64748b; font-size: 14px; margin-bottom: 20px; line-height: 1.6; }

.board-stats { display: flex; gap: 25px; }
.board-stat { text-align: center; }
.board-stat .num { font-size: 24px; font-weight: 800; color: #3b82f6; }
.board-stat .label { font-size: 12px; color: #94a3b8; }

.board-badge {
    position: absolute; top: 15px; right: 15px;
    background: #eff6ff; color: #3b82f6;
    padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.board-card.strategy .board-badge { background: #fffbeb; color: #d97706; }
.board-card.community .board-badge { background: #ecfdf5; color: #059669; }

.forum-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.forum-header h3 { font-size: 22px; color: #1e293b; font-weight: 700; }

.post-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff; text-decoration: none; border-radius: 10px; font-size: 14px; font-weight: 600;
    transition: all .3s; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}
.post-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4); }

.topic-list {
    background: #fff; border-radius: 16px; border: 1px solid #e2e8f0;
    overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.topic-item {
    display: grid; grid-template-columns: auto 1fr auto; gap: 15px;
    align-items: center; padding: 18px 24px; border-bottom: 1px solid #f1f5f9;
    text-decoration: none; color: inherit; transition: background .2s;
}
.topic-item:last-child { border-bottom: none; }
.topic-item:hover { background: #f8fafc; }
.topic-item.pinned { background: #fffbeb; }

.topic-icon { font-size: 28px; width: 40px; text-align: center; }

.topic-title { font-size: 15px; font-weight: 600; color: #1e293b; margin-bottom: 6px; line-height: 1.5; }
.topic-title .pin-tag { display: inline-block; background: #f59e0b; color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 11px; margin-right: 6px; font-weight: 700; }
.topic-title .locked-tag { display: inline-block; background: #94a3b8; color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 11px; margin-right: 6px; font-weight: 700; }

.topic-meta { font-size: 13px; color: #94a3b8; }
.topic-meta span { margin-right: 12px; }

.topic-stats { text-align: right; min-width: 60px; }
.topic-stats .replies { font-size: 22px; font-weight: 700; color: #3b82f6; }
.topic-stats .label { font-size: 12px; color: #94a3b8; }

.strategy-price-tag {
    display: inline-flex; align-items: center;
    background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
    padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
    margin-left: 8px; letter-spacing: .3px; box-shadow: 0 2px 6px rgba(59,130,246,.3);
}
.strategy-price-tag.free-tag-sm {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 2px 6px rgba(16,185,129,.3);
}

.empty-state { text-align: center; padding: 60px 20px; color: #94a3b8; }
.empty-state .icon { font-size: 60px; margin-bottom: 15px; }
.empty-state p { font-size: 16px; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 30px; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: 10px 16px; border-radius: 10px; font-size: 14px; text-decoration: none; border: 1px solid #e2e8f0; transition: all .2s;
}
.pagination a { color: #3b82f6; background: #fff; }
.pagination a:hover { background: #eff6ff; border-color: #3b82f6; }
.pagination span { background: #3b82f6; color: #fff; border-color: #3b82f6; font-weight: 700; }

/* 登录弹窗 */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 1000; justify-content: center; align-items: center;
}
.modal-overlay.active { display: flex; }

.auth-modal {
    background: #fff; border-radius: 20px; padding: 40px; width: 90%; max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); position: relative;
}

.modal-close {
    position: absolute; top: 15px; right: 20px; font-size: 28px; color: #94a3b8;
    cursor: pointer; border: none; background: none;
}
.modal-close:hover { color: #1e293b; }

.auth-modal h3 {
    font-size: 24px; color: #1e40af; margin-bottom: 8px; text-align: center; font-weight: 800;
}
.auth-modal .subtitle { text-align: center; color: #64748b; font-size: 14px; margin-bottom: 28px; }

.auth-form .form-group { margin-bottom: 20px; }
.auth-form label { display: block; font-size: 14px; font-weight: 600; color: #374151; margin-bottom: 8px; }
.auth-form input {
    width: 100%; padding: 14px 16px; border: 2px solid #e2e8f0; border-radius: 10px;
    font-size: 15px; transition: border-color .2s;
}
.auth-form input:focus { outline: none; border-color: #3b82f6; }

.auth-form .submit-btn {
    width: 100%; padding: 14px; background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff; border: none; border-radius: 10px; font-size: 16px; font-weight: 700;
    cursor: pointer; transition: all .3s; margin-top: 10px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}
.auth-form .submit-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4); }

.auth-switch { text-align: center; margin-top: 20px; font-size: 14px; color: #64748b; }
.auth-switch a { color: #3b82f6; font-weight: 600; cursor: pointer; text-decoration: none; }

.error-msg { color: #dc2626; font-size: 13px; margin-top: 6px; display: none; }

@media (max-width: 768px) {
    .board-cards { grid-template-columns: 1fr; }
    .topic-item { grid-template-columns: 1fr auto; }
    .topic-icon { display: none; }
    .forum-hero h2 { font-size: 28px; }
    .auth-bar { position: static; margin-top: 20px; justify-content: center; }
    .user-bar { position: static; margin-top: 20px; justify-content: center; }
}