/* 永春论坛 - 精美样式 */

/* 论坛头部 */
.community-header {
    background: var(--gradient-primary);
    color: white;
    padding: 50px 0;
    position: relative;
    overflow: hidden;
}

.community-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.community-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.community-brand .back-link {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.community-brand .back-link:hover {
    color: white;
    gap: 10px;
}

.community-brand h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.community-brand p {
    opacity: 0.9;
    font-size: 16px;
    font-weight: 300;
}

.community-stats {
    display: flex;
    gap: 50px;
}

.community-stats .stat {
    text-align: center;
    padding: 20px 30px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    transition: var(--transition);
}

.community-stats .stat:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-3px);
}

.community-stats .number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 4px;
}

.community-stats .label {
    font-size: 14px;
    opacity: 0.85;
}

/* 论坛导航 */
.community-nav {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: var(--shadow-sm);
}

.community-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.community-nav .nav-menu {
    display: flex;
}

.community-nav .nav-menu li a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 18px 24px;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.community-nav .nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
    transition: var(--transition);
}

.community-nav .nav-menu li a:hover,
.community-nav .nav-menu li.active a {
    color: var(--primary);
}

.community-nav .nav-menu li a:hover::after,
.community-nav .nav-menu li.active a::after {
    width: 50%;
}

.btn-post {
    padding: 12px 28px;
    background: var(--gradient-warm);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(199, 91, 57, 0.3);
}

.btn-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(199, 91, 57, 0.4);
}

/* 论坛主体 */
.community-main {
    padding: 40px 0;
    background: var(--bg);
    min-height: calc(100vh - 300px);
}

.community-layout {
    display: grid;
    grid-template-columns: 260px 1fr 300px;
    gap: 24px;
}

/* 左侧栏 */
.community-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.user-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.user-card:hover {
    box-shadow: var(--shadow-lg);
}

.user-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    box-shadow: var(--shadow);
}

.user-card .tip {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 20px;
}

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

.user-actions button {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-login {
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(26, 95, 42, 0.25);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 95, 42, 0.35);
}

.btn-register {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-register:hover {
    background: var(--primary);
    color: white;
}

/* 板块列表 */
.board-list,
.hot-tags {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.board-list h3,
.hot-tags h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.board-list ul li {
    margin-bottom: 4px;
}

.board-list ul li a {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    transition: var(--transition);
}

.board-list ul li a:hover,
.board-list ul li.active a {
    background: rgba(26, 95, 42, 0.08);
    color: var(--primary);
}

.board-list .icon {
    margin-right: 12px;
    font-size: 18px;
}

.board-list .name {
    flex: 1;
    font-weight: 500;
}

.board-list .count {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg);
    padding: 4px 10px;
    border-radius: 12px;
}

/* 热门标签 */
.hot-tags .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hot-tags .tag {
    padding: 8px 14px;
    background: var(--bg);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text);
    transition: var(--transition);
    border: 1px solid transparent;
}

.hot-tags .tag:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* 中间内容区 */
.community-content {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tabs span {
    cursor: pointer;
    font-size: 14px;
    color: var(--text-light);
    padding: 10px 20px;
    border-radius: 20px;
    transition: var(--transition);
    font-weight: 500;
}

.filter-tabs span.active,
.filter-tabs span:hover {
    color: white;
    background: var(--primary);
}

.filter-options select {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

.filter-options select:focus {
    outline: none;
    border-color: var(--primary);
}

/* 帖子列表 */
.post-list {
    padding: 0;
}

.post-item {
    display: flex;
    align-items: flex-start;
    padding: 24px;
    border-bottom: 1px solid var(--border);
    position: relative;
    transition: var(--transition);
}

.post-item:hover {
    background: rgba(26, 95, 42, 0.02);
}

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

.post-pin,
.post-hot {
    position: absolute;
    left: 0;
    top: 24px;
    padding: 4px 10px;
    border-radius: 0 4px 4px 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-pin {
    background: var(--gradient-primary);
    color: white;
}

.post-hot {
    background: var(--gradient-warm);
    color: white;
}

.post-item.pinned,
.post-item.hot {
    padding-left: 70px;
}

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

.post-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-title a {
    color: var(--text);
    transition: var(--transition);
}

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

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

.post-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.post-meta .author {
    color: var(--primary);
    font-weight: 500;
}

.post-meta .board {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-left: 20px;
    text-align: right;
}

.post-stats span {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 30px;
    border-top: 1px solid var(--border);
}

.pagination a,
.pagination span {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.pagination a {
    color: var(--text);
    background: var(--bg);
}

.pagination a:hover,
.pagination a.active {
    background: var(--primary);
    color: white;
}

/* 右侧栏 */
.community-rightbar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.quick-post,
.hot-users,
.hot-topics,
.wechat-groups {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.btn-big-post {
    width: 100%;
    padding: 20px;
    background: var(--gradient-warm);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(199, 91, 57, 0.3);
}

.btn-big-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(199, 91, 57, 0.4);
}

.btn-big-post .icon {
    font-size: 24px;
}

/* 活跃达人 */
.hot-users h3,
.hot-topics h3,
.wechat-groups h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hot-users ul li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

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

.hot-users ul li:hover {
    padding-left: 8px;
}

.hot-users .rank {
    width: 24px;
    text-align: center;
    font-weight: 700;
    color: var(--accent);
    font-size: 14px;
}

.hot-users .avatar {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.hot-users .name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.hot-users .level {
    font-size: 11px;
    color: var(--primary);
    background: rgba(26, 95, 42, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

/* 推荐话题 */
.hot-topics ul li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

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

.hot-topics ul li:hover {
    padding-left: 8px;
}

.hot-topics a {
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
}

.hot-topics span {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg);
    padding: 4px 10px;
    border-radius: 12px;
}

/* 微信群 */
.group-list {
    margin-bottom: 16px;
}

.group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    transition: var(--transition);
}

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

.group-item:hover {
    padding-left: 8px;
}

.group-item .name {
    font-weight: 500;
    color: var(--text);
}

.group-item .members {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg);
    padding: 4px 10px;
    border-radius: 12px;
}

.wechat-groups .tip {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

/* 发帖弹窗 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-hover);
    animation: modalSlideIn 0.3s ease;
}

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

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

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

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

.modal-body {
    padding: 24px;
}

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

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

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 95, 42, 0.1);
}

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

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

.form-actions button {
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-cancel {
    background: var(--bg);
    border: none;
    color: var(--text);
}

.btn-cancel:hover {
    background: var(--border);
}

.btn-submit {
    background: var(--gradient-primary);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(26, 95, 42, 0.25);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 95, 42, 0.35);
}

/* 响应式 */
@media (max-width: 1200px) {
    .community-layout {
        grid-template-columns: 220px 1fr;
    }
    
    .community-rightbar {
        display: none;
    }
}

@media (max-width: 992px) {
    .community-layout {
        grid-template-columns: 1fr;
    }
    
    .community-sidebar {
        display: none;
    }
    
    .community-header .container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .community-brand h1 {
        font-size: 32px;
    }
    
    .community-stats {
        gap: 20px;
    }
    
    .community-stats .stat {
        padding: 16px 24px;
    }
}

@media (max-width: 768px) {
    .community-nav .nav-menu {
        display: none;
    }
    
    .filter-bar {
        flex-direction: column;
        gap: 16px;
    }
    
    .post-item {
        flex-direction: column;
    }
    
    .post-stats {
        margin-left: 0;
        margin-top: 16px;
        flex-direction: row;
        justify-content: flex-start;
    }
}
