/* 论坛页面样式 */

/* 移除移动端白色触摸高亮，但保留其他点击反馈 */
* {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* CSS变量 - 确保与主页一致 */
:root {
    --primary-color: #2563eb;
    --primary-light: #3b82f6;
    --secondary-color: #10b981;
    --text-color: #374151;
    --secondary-text: #6b7280;
    --background-color: #ffffff;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --input-bg: #f9fafb;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
}

/* 论坛头部 */
.forum-header {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(16, 185, 129, 0.05));
    padding: 16px 24px;
    border-radius: 16px;
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.forum-header:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.forum-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.forum-header h1 i {
    color: var(--secondary-color);
    font-size: 20px;
}

.forum-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* 搜索框样式 */
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--background-color);
    padding: 8px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.search-input {
    border: none;
    outline: none;
    padding: 8px 12px;
    font-size: 14px;
    background-color: transparent;
    color: var(--text-color);
    width: 200px;
}

.search-input::placeholder {
    color: var(--secondary-text);
}

.search-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* 筛选样式 */
.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.filter-select:hover {
    border-color: var(--primary-color);
}

.filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 论坛列表 */
.posts-list {
    margin-bottom: 20px;
}

.post-item {
    display: block !important;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px !important;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.post-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.post-item:hover::before {
    opacity: 1;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.post-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    flex: 1;
    min-width: 0;
}

.post-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    line-height: 1.4;
    word-break: break-word;
}

.post-title a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* 论坛标签样式 */
.post-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.top-tag {
    background: linear-gradient(135deg, #ff5722, #f44336);
    box-shadow: 0 2px 4px rgba(255, 87, 34, 0.3);
}

.locked-tag {
    background: linear-gradient(135deg, #9e9e9e, #757575);
    box-shadow: 0 2px 4px rgba(158, 158, 158, 0.3);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--secondary-text);
    flex-wrap: wrap;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.3s ease;
}

.post-item:hover .post-meta span {
    color: var(--text-color);
}

.post-meta i {
    font-size: 14px;
    color: var(--primary-color);
}

.post-content {
    color: var(--secondary-text);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 8px;
    font-size: 14px;
    transition: color 0.3s ease;
}

.post-content p {
    margin: 8px 0;
}

.post-content ul,
.post-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.post-content li {
    margin: 4px 0;
    line-height: 1.4;
}

.post-item:hover .post-content {
    color: var(--text-color);
}

/* 论坛标签 */
.post-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    margin-right: 6px;
    margin-bottom: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.top-tag {
    background: linear-gradient(135deg, var(--danger-color), #ef4444);
}

.locked-tag {
    background: linear-gradient(135deg, var(--warning-color), #f59e0b);
}

.recommend-tag {
    background: linear-gradient(135deg, var(--secondary-color), #10b981);
}

.post-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(16, 185, 129, 0.05));
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pagination-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--card-bg);
    color: var(--text-color);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.page-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.page-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 错误状态 */
.error, .no-posts, .no-replies {
    text-align: center;
    padding: 60px 32px;
    color: var(--secondary-text);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(16, 185, 129, 0.05));
    border-radius: 16px;
    margin: 32px 0;
    border: 2px dashed var(--border-color);
    transition: all 0.3s ease;
}

.error:hover, .no-posts:hover, .no-replies:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(16, 185, 129, 0.08));
}

.error i, .no-posts i, .no-replies i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.error i {
    color: var(--danger-color);
}

.no-posts i, .no-replies i {
    color: var(--secondary-color);
}

.error h3, .no-posts h3, .no-replies h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
}

.error {
    color: var(--danger-color);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 1000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, var(--card-bg), rgba(255, 255, 255, 0.98));
    margin: auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 650px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
    overflow: hidden;
}

.modal-large {
    max-width: 950px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-60px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(16, 185, 129, 0.08));
    border-bottom: 2px solid rgba(37, 99, 235, 0.1);
}

.modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header h3 i {
    color: var(--secondary-color);
    font-size: 20px;
}

.close {
    font-size: 32px;
    font-weight: 300;
    color: var(--secondary-text);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: transparent;
}

.close:hover {
    color: var(--danger-color);
    background-color: rgba(239, 68, 68, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    padding: 32px;
    background-color: var(--card-bg);
}

/* 表单样式 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group:focus-within label {
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 16px 24px;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(10px);
}

.form-control:hover {
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.12);
    background-color: var(--background-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 180px;
    font-family: inherit;
    line-height: 1.6;
    padding: 20px 24px;
}

/* 优化输入框占位符样式 */
.form-control::placeholder {
    color: var(--secondary-text);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.form-control:focus::placeholder {
    opacity: 0.5;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
    padding-top: 28px;
    border-top: 2px solid rgba(37, 99, 235, 0.1);
    background: linear-gradient(180deg, transparent, rgba(37, 99, 235, 0.03));
    border-radius: 0 0 16px 16px;
    padding-bottom: 12px;
}

.form-actions button {
    min-width: 120px;
    height: 50px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 14px;
    padding: 14px 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-actions button:first-child {
    margin-right: 8px;
}

/* 论坛详情 */
.post-detail {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.post-detail:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.post-content-full {
    margin: 12px 0;
    padding: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(16, 185, 129, 0.05));
    border-radius: 8px;
    line-height: 1.4;
    white-space: pre-wrap;
    font-size: 14px;
    color: var(--text-color);
    border-left: 4px solid var(--primary-color);
}

.post-content-full p {
    margin: 8px 0;
}

.post-content-full ul,
.post-content-full ol {
    margin: 8px 0;
    padding-left: 20px;
}

.post-content-full li {
    margin: 4px 0;
    line-height: 1.4;
}

.post-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid rgba(37, 99, 235, 0.1);
    flex-wrap: wrap;
}

/* 回复区域 */
.replies-section {
    border-top: 2px solid rgba(37, 99, 235, 0.1);
    padding-top: 8px;
}

.replies-section h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.replies-section h4 i {
    color: var(--secondary-color);
    font-size: 16px;
}

.reply-form-container {
    margin-bottom: 8px;
    background-color: var(--card-bg);
    padding: 6px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.reply-form-container:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.reply-form-container textarea {
    width: 100%;
    padding: 6px 10px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    min-height: 60px;
    max-height: 180px;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: var(--bg-color);
    color: var(--text-color);
    box-sizing: border-box;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.reply-form-container textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}

.reply-form-container textarea::placeholder {
    color: var(--text-color-secondary);
    font-style: italic;
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
}

.form-actions button {
    width: auto;
    min-width: 120px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0 auto;
}

/* 优化输入框样式 */
.reply-form-container textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font-family);
    min-height: 80px;
    resize: vertical;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

.reply-form-container textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}

.reply-form-container textarea::placeholder {
    color: var(--text-color-secondary);
    font-style: italic;
    font-size: 13px;
}

/* 优化表单容器 */
.reply-form-container {
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 12px;
    background-color: #f8fafc;
    border: 1px solid var(--light-color);
    transition: all 0.3s ease;
}

.reply-form-container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--border-color);
}

/* 自定义验证错误样式 */
.custom-validation-error {
    display: none;
    position: absolute;
    bottom: -24px;
    left: 0;
    color: #e53e3e;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    background-color: rgba(229, 62, 62, 0.05);
    border-radius: 4px;
    border: 1px solid rgba(229, 62, 62, 0.2);
    z-index: 10;
    animation: fadeIn 0.3s ease;
}

.custom-validation-error i {
    margin-right: 4px;
    font-size: 11px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 确保表单组有足够的空间显示错误提示 */
.form-group {
    position: relative;
    margin-bottom: 24px !important;
}

/* 移除浏览器默认的验证样式 */
input:required:invalid, input:focus:invalid,
textarea:required:invalid, textarea:focus:invalid {
    box-shadow: none;
    outline: none;
}

/* 自定义焦点样式 */
.reply-form-container textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}

/* 自定义错误状态样式 */
.reply-form-container textarea.error {
    border-color: #e53e3e !important;
    box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.15) !important;
}

.replies-list {
    margin-top: 16px;
    max-width: 100%;
    overflow-x: hidden;
}

.reply-item {
    padding: 12px 16px;
    border: none;
    transition: all 0.3s ease;
    background-color: white;
    margin-bottom: 12px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    max-width: 100%;
    overflow: hidden;
    position: relative;
}

.reply-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    flex-shrink: 0;
}

.reply-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
}

.reply-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.reply-item:hover::before {
    opacity: 1;
    display: none;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 6px;
}

/* 确保评论内容和三点菜单正确对齐 */
.reply-content-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.reply-author {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    gap: 8px;
    flex-wrap: wrap;
}

.reply-author i {
    font-size: 12px;
    color: var(--secondary-color);
}

.reply-time {
    font-size: 11px;
    color: var(--secondary-text);
}

.reply-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reply-author-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.reply-author-role {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 8px;
    display: inline-block;
    font-weight: 500;
}
.reply-actions {
    position: relative;
    display: inline-flex;
    gap: 0;
    margin: 0;
    padding: 0;
    border: none;
    align-self: flex-start;
    flex-shrink: 0;
    margin-left: 12px;
}

.reply-actions-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    width: 24px;
    z-index: 1000;
    margin-top: -4px;
}

.btn-icon.actions-toggle {
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.actions-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    min-width: 120px;
    z-index: 9999;
    margin-top: 4px;
    overflow: hidden;
    display: none;
    padding: 4px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-color);
    gap: 8px;
}

.dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

.btn-icon {
    padding: 4px 8px;
    background: none;
    border: none;
    color: var(--secondary-text);
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-icon.actions-toggle {
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.btn-icon:hover {
    background-color: var(--light-gray);
    color: var(--primary-text);
}



.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    color: var(--primary-text);
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--light-gray);
}

.dropdown-item i {
    font-size: 12px;
    color: var(--secondary-color);
}

.dropdown-item.delete-reply-btn {
    color: var(--danger-color);
}

.dropdown-item.delete-reply-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

.reply-actions button {
    background: none;
    border: none;
    color: var(--secondary-text);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.reply-actions button:hover {
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.reply-content {
    line-height: 1.6;
    color: var(--text-color);
    font-size: 14px;
    background-color: rgba(249, 250, 251, 0.8);
    padding: 12px 16px;
    border-radius: 8px;
    border: none;
    white-space: normal;
    word-wrap: break-word;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin: 8px 0;
    max-width: 100%;
    overflow: visible;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}

.reply-content-text {
    flex: 1;
    margin-right: 16px;
    word-break: break-word;
    position: relative;
    z-index: 1;
}



/* 内容链接框样式 */
.content-link-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    margin: 12px 0;
    background-color: #1e293b;
    border: 2px solid #334155;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.content-link-box:hover {
    border-color: var(--primary-color);
    background-color: #334155;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.content-link-box .link-icon {
    color: var(--primary-color);
    font-size: 16px;
    flex-shrink: 0;
}

.content-link-box .link-text {
    flex: 1;
    color: #e2e8f0;
    text-decoration: none;
    word-break: break-all;
    white-space: normal;
}

.content-link-box .copy-hint {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.content-link-box:hover .copy-hint {
    opacity: 1;
}

/* 管理员标签样式 */
.user-role {
    display: inline-block;
    margin-left: 8px;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
    vertical-align: middle;
}

.user-role.admin {
    background-color: #ef4444;
    color: white;
}

/* 帖子详情页管理员标签样式 */
.post-detail-author .author-role {
    display: inline-block;
    margin-top: -8px;
    margin-left: -12px;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
    color: white;
    background-color: #ef4444;
    vertical-align: middle;
    position: relative;
    z-index: 1;
}

/* 链接复制图标居中 */
.content-link-box i.fa-copy {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: auto;
    font-size: 12px;
    color: #94a3b8;
    transition: color 0.3s ease;
}

.content-link-box:hover i.fa-copy {
    color: var(--primary-color);
}

/* 内容代码框样式 */
.content-code-box {
    margin: 16px 0;
    border-radius: 12px;
    overflow: hidden;
    background-color: #1e293b;
    color: #e2e8f0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #334155;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.content-code-box:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.content-code-box .code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #334155;
    border-bottom: 1px solid #475569;
    font-size: 12px;
}

.content-code-box .code-language {
    color: #94a3b8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.content-code-box pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
    background-color: transparent;
    color: inherit;
    border: none;
    white-space: pre;
}

.content-code-box code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

/* 行内代码样式 */
.inline-code {
    background-color: #f1f5f9;
    color: #ef4444;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    margin: 0 2px;
}

/* 复制成功提示 */
.copy-tooltip {
    position: absolute;
    top: -35px;
    right: 12px;
    background-color: var(--secondary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

.copy-tooltip.show {
    opacity: 1;
}

/* 按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background-color: #059669;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.15);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-danger:hover {
    background-color: #dc2626;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.15);
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-sm:hover {
    transform: translateY(-1px);
    color: var(--text-color);
    background-color: rgba(37, 99, 235, 0.1);
}

/* 超小按钮样式 */
.btn-xs {
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 4px;
    min-height: 24px;
}

.btn-xs:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 超小主要按钮样式 */
.btn-primary.btn-xs {
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 4px;
    min-height: 24px;
    gap: 4px;
}

.btn-primary.btn-xs:hover {
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 4px;
    min-height: 24px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--secondary-text);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: none;
}

.btn-link:hover {
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
    box-shadow: none;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-outline:hover {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
}

.btn-outline:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .forum-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .forum-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
    
    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .post-meta {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .modal-content {
        margin: 20px auto;
        width: 96%;
    }
    
    .modal-body {
        padding: 24px;
    }
    
    .post-detail {
        padding: 24px;
    }
    
    .post-content-full {
        padding: 16px;
    }
    
    /* 在小屏幕上保持模态框的按钮水平排列 */
    .modal .form-actions {
        flex-direction: row;
    }
    
    /* 其他场景的按钮垂直排列保持不变 */
    .reply-form-container .form-actions {
        flex-direction: column;
    }
    
    .reply-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .pagination-nav {
        gap: 8px;
    }
    
    .page-link {
        min-width: 36px;
        height: 36px;
        padding: 0 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .post-title {
        font-size: 18px;
    }
    
    .post-meta {
        font-size: 12px;
    }
    
    .post-content {
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .modal-header {
        padding: 20px 24px;
    }
    
    .modal-header h3 {
        font-size: 20px;
    }
    
    .reply-item {
        padding: 16px;
    }
}

/* 评论状态提示 */
.comment-status-notice {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 28px 32px;
    margin: 24px 0;
    background: #f8fafc;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.comment-status-notice::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    opacity: .05;
    pointer-events: none;
}

.notice-icon-wrap {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notice-icon-wrap svg {
    color: #64748b;
}

.notice-content {
    flex: 1;
    min-width: 0;
}

.notice-content .comment-status-text {
    font-size: 16px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 6px 0;
}

.notice-content .comment-status-desc {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
}

.comment-status-notice.locked {
    background: #fffbf5;
}

.comment-status-notice.locked::after {
    background: #f59e0b;
}

.comment-status-notice.locked .notice-icon-wrap {
    background: #fef3c7;
}

.comment-status-notice.locked .notice-icon-wrap svg {
    color: #d97706;
}

.comment-status-notice.locked .notice-content .comment-status-text {
    color: #92400e;
}

.comment-status-notice.locked .notice-content .comment-status-desc {
    color: #a16207;
}

.comment-status-notice.hidden {
    background: #f5f3ff;
}

.comment-status-notice.hidden::after {
    background: #8b5cf6;
}

.comment-status-notice.hidden .notice-icon-wrap {
    background: #ede9fe;
}

.comment-status-notice.hidden .notice-icon-wrap svg {
    color: #7c3aed;
}

.comment-status-notice.hidden .notice-content .comment-status-text {
    color: #5b21b6;
}

.comment-status-notice.hidden .notice-content .comment-status-desc {
    color: #7c3aed;
}