/**
 * 社区页面样式
 * MysticThemes - 与整体风格一致的深色主题
 */

/* 社区头部 */
.community-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.community-header .page-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.community-header .page-title i {
    color: var(--accent-purple);
}

/* 社区统计 */
.community-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.community-stats .stat-item {
    background: var(--card-bg);
    border: 1px solid rgba(107, 43, 217, 0.2);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.community-stats .stat-item:hover {
    border-color: rgba(107, 43, 217, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(107, 43, 217, 0.2);
}

.community-stats .stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-teal));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
}

.community-stats .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.community-stats .stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 主内容区布局 */
.community-main {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
}

/* 侧边栏 */
.community-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-section {
    background: var(--card-bg);
    border: 1px solid rgba(107, 43, 217, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(107, 43, 217, 0.2);
}

/* 板块列表 */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-secondary);
}

.category-item:hover {
    background: rgba(107, 43, 217, 0.1);
    color: var(--text-primary);
}

.category-item.active {
    background: linear-gradient(135deg, rgba(107, 43, 217, 0.3), rgba(43, 217, 197, 0.1));
    color: var(--text-primary);
    border: 1px solid rgba(107, 43, 217, 0.3);
}

.category-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.category-item .category-name {
    flex: 1;
    font-size: 0.95rem;
}

.category-item .category-count {
    font-size: 0.8rem;
    background: rgba(107, 43, 217, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
}

/* 快捷链接 */
.quick-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.quick-link:hover {
    background: rgba(107, 43, 217, 0.1);
    color: var(--accent-teal);
}

.quick-link i {
    width: 18px;
    text-align: center;
}

/* 筛选栏 */
.topic-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-tabs {
    display: flex;
    gap: 5px;
    background: rgba(26, 26, 58, 0.5);
    padding: 5px;
    border-radius: 10px;
}

.filter-tab {
    padding: 8px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-tab:hover {
    color: var(--text-primary);
}

.filter-tab.active {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    color: white;
}

.filter-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-search {
    display: flex;
    gap: 0;
}

.filter-search .search-input {
    width: 180px;
    padding: 8px 14px;
    background: rgba(26, 26, 58, 0.8);
    border: 1px solid rgba(107, 43, 217, 0.2);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: all 0.3s ease;
}

.filter-search .search-input:focus {
    border-color: var(--accent-purple);
}

.filter-search .search-btn {
    padding: 8px 12px;
    background: rgba(107, 43, 217, 0.3);
    border: 1px solid rgba(107, 43, 217, 0.2);
    border-left: none;
    border-radius: 0 8px 8px 0;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-search .search-btn:hover {
    background: rgba(107, 43, 217, 0.5);
    color: white;
}

/* 发帖按钮 - 筛选栏位置 */
.btn-new-topic {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-teal));
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(107, 43, 217, 0.3);
    white-space: nowrap;
}

.btn-new-topic:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(107, 43, 217, 0.4);
}

.btn-new-topic:active {
    transform: translateY(0);
}

.btn-new-topic i,
.btn-new-topic span {
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

.btn-new-topic i {
    font-size: 0.85rem;
}

/* 话题列表 */
.topic-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 话题卡片 */
.topic-card {
    background: var(--card-bg);
    border: 1px solid rgba(107, 43, 217, 0.2);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.topic-card:hover {
    border-color: rgba(107, 43, 217, 0.5);
    box-shadow: 0 5px 20px rgba(107, 43, 217, 0.15);
}

.topic-card.pinned {
    border-color: rgba(107, 43, 217, 0.4);
    background: linear-gradient(135deg, rgba(107, 43, 217, 0.08), transparent);
}

.topic-card.featured {
    border-color: rgba(107, 43, 217, 0.4);
}

.topic-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 12px;
}

.topic-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(107, 43, 217, 0.3);
}

.topic-meta {
    flex: 1;
}

.topic-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topic-title .badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.badge-pinned {
    background: linear-gradient(135deg, var(--accent-gold), #e67e22);
    color: white;
}

.badge-featured {
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
    color: white;
}

/* 最佳回复标签 */
.badge-best {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #1ac8f1;
    background: transparent;
    border: 1px solid rgba(43, 217, 197, 0.3);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.badge-best::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(26, 200, 241, 0.3), transparent);
    animation: badgeShine 2.5s ease-in-out infinite;
}

@keyframes badgeShine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

.topic-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.topic-info .username {
    color: var(--accent-teal);
}

.topic-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    background: rgba(107, 43, 217, 0.2);
}

.topic-preview {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topic-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(107, 43, 217, 0.1);
}

.topic-stats {
    display: flex;
    gap: 20px;
}

.topic-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.topic-stat i {
    font-size: 0.9rem;
}

.topic-last-reply {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.topic-last-reply .reply-user {
    color: var(--accent-purple);
}

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

.pagination .page-btn {
    padding: 8px 15px;
    background: var(--card-bg);
    border: 1px solid rgba(107, 43, 217, 0.2);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination .page-btn:hover {
    border-color: var(--accent-purple);
    color: var(--text-primary);
}

.pagination .page-btn.active {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    border-color: transparent;
    color: white;
}

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

.empty-state .empty-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, rgba(107, 43, 217, 0.2), rgba(43, 217, 197, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state .empty-icon i {
    font-size: 2.5rem;
    color: var(--accent-purple);
}

.empty-state h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 25px;
}


/* 模态框样式 */
.community-modal .modal-content {
    background: linear-gradient(135deg, rgba(26, 26, 58, 0.98), rgba(42, 42, 74, 0.98));
    border: 2px solid rgba(107, 43, 217, 0.3);
    border-radius: 20px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.community-modal .modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(107, 43, 217, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.community-modal .modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
}

.community-modal .modal-header h3 i {
    color: var(--accent-teal);
}

.community-modal .modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.community-modal .modal-close:hover {
    color: var(--accent-teal);
}

.community-modal .modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.community-modal .modal-footer {
    padding: 15px 25px;
    border-top: 1px solid rgba(107, 43, 217, 0.2);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.community-modal .modal-footer .footer-left {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.community-modal .modal-footer .footer-left .char-count {
    color: var(--accent-teal);
}

.community-modal .modal-footer .footer-right {
    display: flex;
    gap: 12px;
}

/* 表单组 */
.community-modal .form-group {
    margin-bottom: 20px;
}

.community-modal .form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--accent-teal);
    font-size: 0.9rem;
    font-weight: 500;
}

/* 输入框样式 */
.community-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(26, 26, 58, 0.8);
    border: 1px solid rgba(107, 43, 217, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.community-input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(107, 43, 217, 0.15);
}

.community-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* 原生选择框样式 */
.community-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(26, 26, 58, 0.8);
    border: 1px solid rgba(107, 43, 217, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232bd9c5' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.community-select:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(107, 43, 217, 0.15);
}

.community-select option {
    background: rgba(26, 26, 58, 0.98);
    color: var(--text-primary);
    padding: 10px;
}

/* 必填标记 */
.form-label .required {
    color: #e74c3c;
    margin-left: 2px;
}

/* 选择框样式 - 自定义下拉框 */
.category-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(26, 26, 58, 0.8);
    border: 1px solid rgba(107, 43, 217, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropdown-selected:hover {
    border-color: rgba(107, 43, 217, 0.5);
}

.category-dropdown.open .dropdown-selected {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(107, 43, 217, 0.15);
    border-radius: 10px 10px 0 0;
}

.selected-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.selected-icon {
    width: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.selected-text {
    color: var(--text-secondary);
}

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

.dropdown-arrow {
    color: var(--accent-teal);
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.category-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26, 26, 58, 0.98);
    border: 1px solid rgba(107, 43, 217, 0.3);
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.category-dropdown.open .dropdown-options {
    display: block;
}

.dropdown-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(107, 43, 217, 0.1);
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background: rgba(107, 43, 217, 0.2);
}

.dropdown-option.selected {
    background: rgba(107, 43, 217, 0.3);
}

.dropdown-option .option-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.dropdown-option .option-info {
    flex: 1;
}

.dropdown-option .option-name {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.dropdown-option .option-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.dropdown-option .option-count {
    font-size: 0.75rem;
    padding: 2px 8px;
    background: rgba(107, 43, 217, 0.2);
    border-radius: 10px;
    color: var(--text-secondary);
}

/* 编辑器工具栏 */
.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    background: rgba(26, 26, 58, 0.9);
    border: 1px solid rgba(107, 43, 217, 0.3);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.toolbar-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.toolbar-btn:hover {
    background: rgba(107, 43, 217, 0.3);
    color: var(--accent-teal);
}

.toolbar-btn:active {
    background: rgba(107, 43, 217, 0.5);
}

.toolbar-divider {
    width: 1px;
    height: 20px;
    background: rgba(107, 43, 217, 0.3);
    margin: 0 6px;
}

/* 颜色选择器 */
.color-picker-wrapper,
.emoji-picker-wrapper {
    position: relative;
}

.color-picker-dropdown,
.emoji-picker-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: rgba(26, 26, 58, 0.98);
    border: 1px solid rgba(107, 43, 217, 0.4);
    border-radius: 12px;
    padding: 12px;
    z-index: 9999;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.color-picker-dropdown.show,
.emoji-picker-dropdown.show {
    display: block;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.color-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.color-btn:hover {
    transform: scale(1.15);
}

.custom-color {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(107, 43, 217, 0.3);
}

.custom-color input[type="color"] {
    width: 32px;
    height: 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
}

.custom-color span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* 表情选择器 */
.emoji-picker-dropdown {
    width: 280px;
    right: 0;
    left: auto;
    top: 100%;
    bottom: auto;
    margin-top: 8px;
    margin-bottom: 0;
}

.emoji-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(107, 43, 217, 0.3);
}

.emoji-tab {
    flex: 1;
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emoji-tab:hover {
    background: rgba(107, 43, 217, 0.2);
}

.emoji-tab.active {
    background: rgba(107, 43, 217, 0.3);
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    max-height: 180px;
    overflow-y: auto;
}

.emoji-btn {
    padding: 6px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.emoji-btn:hover {
    background: rgba(107, 43, 217, 0.3);
    transform: scale(1.2);
}

/* 回复区编辑器工具栏 */
.reply-toolbar {
    border-radius: 10px 10px 0 0;
    margin-bottom: 0;
    border-bottom: none;
}

.reply-form .reply-input-wrapper {
    margin-top: 0;
}

.reply-form .reply-input-wrapper .reply-textarea {
    border-radius: 0 0 10px 10px;
    border-top: none;
}

/* 文本域样式 */
.community-textarea {
    width: 100%;
    padding: 15px 16px;
    background: rgba(26, 26, 58, 0.8);
    border: 1px solid rgba(107, 43, 217, 0.3);
    border-top: none;
    border-radius: 0 0 10px 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1.6;
    outline: none;
    resize: vertical;
    min-height: 200px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.community-textarea:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(107, 43, 217, 0.15);
}

.community-textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* 编辑器底部 */
.editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.char-count {
    color: var(--accent-teal);
}

.editor-tip {
    display: flex;
    align-items: center;
    gap: 5px;
}

.editor-tip i {
    font-size: 0.75rem;
}

/* 模态框按钮 */
.btn-modal-cancel {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid rgba(107, 43, 217, 0.4);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-modal-cancel:hover {
    border-color: var(--accent-teal);
    color: var(--accent-teal);
}

.btn-modal-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-modal-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(107, 43, 217, 0.4);
}

.btn-modal-submit i {
    font-size: 0.85rem;
}

/* 话题详情模态框 */
.topic-detail-content {
    max-width: 800px !important;
}

/* 话题详情内容 */
.topic-detail-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(107, 43, 217, 0.2);
}

.topic-detail-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

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

.topic-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topic-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(107, 43, 217, 0.3);
}

.topic-author-info .author-name {
    color: var(--accent-teal);
    font-weight: 500;
}

.topic-author-info .author-stats {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.topic-detail-stats {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.topic-detail-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.topic-detail-content {
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.topic-detail-content p {
    margin-bottom: 15px;
}

/* 话题详情底部统计 */
.topic-detail-footer {
    padding: 15px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(107, 43, 217, 0.2);
}

.topic-detail-footer .topic-detail-stats {
    display: flex;
    gap: 25px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.topic-detail-footer .topic-detail-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.topic-detail-footer .topic-detail-stats i {
    color: var(--accent-purple);
}

.topic-detail-actions {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-top: 1px solid rgba(107, 43, 217, 0.2);
    border-bottom: 1px solid rgba(107, 43, 217, 0.2);
    margin-bottom: 25px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(107, 43, 217, 0.1);
    border: 1px solid rgba(107, 43, 217, 0.2);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(107, 43, 217, 0.2);
    color: var(--text-primary);
}

.action-btn.active {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    border-color: transparent;
    color: white;
}

.action-btn.edit-btn {
    background: rgba(43, 217, 197, 0.1);
    border-color: rgba(43, 217, 197, 0.3);
}

.action-btn.edit-btn:hover {
    background: rgba(43, 217, 197, 0.2);
    color: var(--accent-teal);
}

/* 回复区域 */
.replies-section {
    margin-top: 25px;
}

.replies-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.replies-header h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.reply-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.reply-item {
    background: rgba(26, 26, 58, 0.5);
    border: 1px solid rgba(107, 43, 217, 0.15);
    border-radius: 12px;
    padding: 15px;
}

.reply-item.best-reply {
    border-color: #583bd9;
    background: linear-gradient(135deg, rgba(88, 59, 217, 0.08), transparent);
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.reply-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reply-author img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
}

.reply-author-name {
    color: var(--accent-teal);
    font-weight: 500;
}

.reply-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.reply-content {
    color: var(--text-primary);
    line-height: 1.6;
}

.reply-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

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

.reply-action {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
}

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

.reply-action.liked {
    color: var(--accent-purple);
}

/* 回复输入框 */
.reply-form {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(107, 43, 217, 0.2);
}

.reply-form h4 {
    margin-bottom: 15px;
    font-size: 1rem;
    color: var(--text-primary);
}

.reply-input-wrapper {
    display: flex;
    gap: 15px;
}

.reply-textarea {
    flex: 1;
    padding: 12px 15px;
    background: rgba(26, 26, 58, 0.8);
    border: 1px solid rgba(107, 43, 217, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    resize: vertical;
    min-height: 80px;
    outline: none;
    transition: all 0.3s ease;
}

.reply-textarea:focus {
    border-color: var(--accent-purple);
}

/* 关闭回复提示 */
.closed-notice {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
    padding: 20px 25px;
    background: linear-gradient(135deg, rgba(107, 43, 217, 0.1), rgba(43, 95, 217, 0.1));
    border: 1px dashed rgba(107, 43, 217, 0.3);
    border-radius: 12px;
}

.closed-notice-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(107, 43, 217, 0.2);
    border-radius: 50%;
    color: var(--accent-purple);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.closed-notice-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.closed-notice .closed-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.closed-notice .closed-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 自定义输入弹窗 */
.custom-prompt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.custom-prompt-box {
    background: linear-gradient(135deg, rgba(26, 26, 58, 0.98), rgba(42, 42, 74, 0.98));
    border: 1px solid rgba(107, 43, 217, 0.4);
    border-radius: 15px;
    padding: 25px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

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

.custom-prompt-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-prompt-title i {
    color: var(--accent-teal);
}

.custom-prompt-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(10, 10, 26, 0.6);
    border: 1px solid rgba(107, 43, 217, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.custom-prompt-input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(107, 43, 217, 0.15);
}

.custom-prompt-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.custom-prompt-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.custom-prompt-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.custom-prompt-btn.cancel {
    background: rgba(107, 43, 217, 0.1);
    border: 1px solid rgba(107, 43, 217, 0.3);
    color: var(--text-secondary);
}

.custom-prompt-btn.cancel:hover {
    background: rgba(107, 43, 217, 0.2);
    color: var(--text-primary);
}

.custom-prompt-btn.confirm {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    color: white;
}

.custom-prompt-btn.confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(107, 43, 217, 0.4);
}

/* 响应式 */
@media (max-width: 992px) {
    .community-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .community-main {
        grid-template-columns: 1fr;
    }
    
    .community-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .sidebar-section {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .community-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .community-stats .stat-item {
        padding: 15px;
    }
    
    .community-sidebar {
        grid-template-columns: 1fr;
    }
    
    .topic-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-right {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-search {
        width: 100%;
    }
    
    .filter-search .search-input {
        flex: 1;
        width: auto;
    }
    
    .btn-new-topic {
        width: 100%;
        justify-content: center;
    }
    
    .topic-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .topic-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .community-modal .modal-content {
        width: 95%;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .community-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .community-stats .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .community-stats .stat-value {
        font-size: 1.2rem;
    }
}
