/* 论坛页面样式 */
.forum-main {
    min-height: 100vh;
    padding-top: 100px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* 论坛头部 */
.forum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.forum-title h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.forum-title p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

/* 论坛统计 */
.forum-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-item i {
    font-size: 2rem;
    color: #667eea;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* 论坛分类 */
.forum-categories {
    margin-bottom: 40px;
}

.forum-categories h2 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.category-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

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

.category-icon {
    font-size: 2rem;
    color: #667eea;
}

.category-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #fff;
}

.category-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    line-height: 1.5;
}

.category-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.category-loading,
.posts-loading {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.7);
}

.category-loading i,
.posts-loading i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #667eea;
    animation: spin 1s linear infinite;
}

/* 帖子筛选 */
.forum-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.filter-tab {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-tab:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.filter-tab.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.filter-search {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-search input {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: #fff;
    font-size: 0.9rem;
    width: 250px;
}

.filter-search input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.filter-search button {
    padding: 10px 15px;
    background: #667eea;
    border: none;
    border-radius: 25px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-search button:hover {
    background: #5a6fd8;
}

/* 帖子列表 */
.forum-posts {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.posts-header h3 {
    color: #fff;
    font-size: 1.5rem;
}

.posts-header select {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
}

.post-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.post-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
    border-color: rgba(102, 126, 234, 0.3);
}

.post-item.pinned {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.post-item.pinned::before {
    content: "📌";
    margin-right: 10px;
}

.post-category {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 20px;
    font-size: 0.8rem;
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

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

.post-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.post-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.post-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-stat i {
    color: #667eea;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination button {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.pagination button.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: rgba(26, 26, 46, 0.95);
    border-radius: 20px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 30px;
}

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

.form-group label {
    display: block;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.char-count {
    text-align: right;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-top: 5px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .forum-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .forum-title h1 {
        font-size: 2rem;
    }

    .forum-filters {
        flex-direction: column;
        gap: 20px;
    }

    .filter-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }

    .filter-search input {
        width: 100%;
    }

    .post-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .post-stats {
        width: 100%;
        justify-content: space-between;
    }

    .posts-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .forum-stats {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .forum-main {
        padding-top: 80px;
    }

    .container {
        padding: 10px;
    }

    .forum-title h1 {
        font-size: 1.8rem;
    }

    .stat-item {
        padding: 15px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .filter-tab {
        padding: 8px 15px;
        font-size: 0.8rem;
    }

    .post-title {
        font-size: 1rem;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-header h3 {
        font-size: 1.3rem;
    }
} 

/* 帖子详情模态框样式 */
.post-detail {
    margin-bottom: 30px;
}

.post-detail .post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    flex-wrap: wrap;
}

.post-detail .post-meta span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.post-detail .post-meta i {
    margin-right: 5px;
    color: #4CAF50;
}

.post-detail .post-content {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.post-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.reply-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.reply-form textarea {
    width: 100%;
    min-height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 10px;
}

.reply-form textarea:focus {
    outline: none;
    border-color: #4CAF50;
    background: rgba(255, 255, 255, 0.15);
}

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

.replies-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.replies-section h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.reply-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 3px solid #4CAF50;
}

.reply-author {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.reply-author i {
    color: #4CAF50;
    margin-right: 5px;
}

.reply-date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

.reply-content {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

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

.btn-like {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-like:hover {
    color: #e91e63;
    background: rgba(233, 30, 99, 0.1);
}

.btn-like i {
    margin-right: 5px;
}

.no-replies {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    padding: 20px;
}

.error {
    color: #f44336;
    text-align: center;
    padding: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .post-detail .post-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .post-actions {
        flex-direction: column;
    }
    
    .reply-actions {
        justify-content: center;
    }
    
    .reply-author {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
} 