/* ============================================
   论坛系统样式表
   ============================================ */

/* 基础变量 */
:root {
    --primary-color: #4a90d9;
    --primary-hover: #357abd;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --body-bg: #f5f7fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-muted: #6c757d;
    --border-color: #e1e4e8;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--body-bg);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

/* 容器 */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   头部导航
   ============================================ */
.header {
    background-color: var(--dark-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: bold;
    color: white;
}

.logo i {
    font-size: 28px;
    color: white;
}

/* 导航菜单 */
.nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav a {
    color: white;
    font-weight: 500;
    padding: 12px 0;
    position: relative;
    font-size: 16px;
}

.nav a.recharge {
    color: var(--danger-color);
    font-weight: 600;
}

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

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav a:hover::after {
    width: 100%;
}

/* 下拉菜单 */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-toggle i {
    font-size: 12px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.category-item {
    padding: 8px 15px;
}

.category-name {
    display: block;
    font-weight: bold;
    color: var(--text-muted);
    font-size: 12px;
}

/* 用户菜单样式 */
.user-dropdown {
    position: relative;
}

.user-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: var(--radius);
    transition: background-color 0.2s ease;
    color: white;
}

.user-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-menu {
    min-width: 220px;
    background: #343a40;
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0;
    left: auto;
    right: 0;
}

.user-menu-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-menu-header span:first-child {
    display: block;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.user-uid {
    display: block;
    color: #adb5bd;
    font-size: 12px;
}

.user-gold {
    display: block;
    color: #ffd700;
    font-size: 14px;
    font-weight: bold;
    margin-top: 5px;
}

.user-menu a {
    color: #dee2e6;
    padding: 10px 15px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.user-menu .divider {
    background-color: rgba(255, 255, 255, 0.1);
    margin: 5px 0;
    height: 1px;
}

.category-item a {
    display: block;
    padding: 5px 10px;
    border-radius: 4px;
}

.category-item a:hover {
    background-color: var(--light-color);
}

/* 搜索框 */
.search-box form {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 5px 15px;
    width: 250px;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    padding: 5px;
    color: white;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-box button {
    border: none;
    background: none;
    color: white;
    cursor: pointer;
}

/* 用户操作区 */
.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-btn {
    position: relative;
    color: white;
    font-size: 18px;
}

.notification-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
}

/* ============================================
   按钮样式
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

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

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

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

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

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.btn-link {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 0;
    font-size: 12px;
}

/* ============================================
   主要内容区
   ============================================ */
.main {
    padding: 30px 0;
    min-height: calc(100vh - 60px - 200px);
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

.breadcrumb a {
    color: var(--text-muted);
}

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

.breadcrumb .separator {
    color: var(--border-color);
}

.breadcrumb .current {
    color: var(--text-color);
}

/* ============================================
   首页布局
   ============================================ */
.home-layout {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 15px;
}

.main-content {
    min-width: 0;
}

.home-layout .sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 80px;
    align-self: flex-start;
    margin-top: 88px !important; /* 调整上边距，使用!important确保生效 */
}

/* 欢迎横幅 */
.welcome-banner {
    background: linear-gradient(135deg, var(--primary-color), #6ab0ff);
    color: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
    text-align: center;
}

.welcome-banner h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.welcome-banner p {
    font-size: 18px;
    opacity: 0.95;
    font-weight: 500;
    letter-spacing: 1px;
}

/* 区块样式 */
.section {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 30px;
    overflow: hidden;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-bottom: none;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px !important;
    background-color: #f5f7fa !important;
    border-radius: 8px !important;
}

.section-header h2 i {
    color: var(--primary-color);
}

.view-more {
    font-size: 13px;
    color: var(--text-muted);
}

.view-more:hover {
    color: var(--primary-color);
}

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

.post-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.post-item:hover {
    background-color: var(--light-color);
}

.post-item.pinned {
    background-color: #fff8e1;
}

.post-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-color);
    border-radius: var(--radius);
    color: var(--primary-color);
    font-size: 18px;
    flex-shrink: 0;
}

.post-item.pinned .post-icon {
    background-color: var(--warning-color);
    color: white;
}

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

.post-title {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    color: var(--text-muted);
}

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

/* 徽章 */
.badge-pinned,
.badge-essence {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    margin-right: 5px;
}

.badge-pinned {
    background-color: var(--warning-color);
    color: white;
}

.badge-essence {
    background-color: var(--success-color);
    color: white;
}

/* 板块网格 */
.board-grid {
    padding: 20px;
}

.category-section {
    margin-bottom: 25px;
}

.category-section:last-child {
    margin-bottom: 0;
}

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

.category-icon {
    font-size: 20px;
}

.category-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.category-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

.board-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.board-card {
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 15px;
    transition: var(--transition);
}

.board-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.board-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.board-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.board-stats {
    font-size: 12px;
    color: var(--text-muted);
}

/* 侧边栏小部件 */
.widget {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.widget-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.widget-header h3 {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-header h3 i {
    color: var(--primary-color);
}

.widget-content {
    padding: 20px;
}

/* 统计项 */
.stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* 精华列表 */
.essence-list {
    list-style: none;
}

.essence-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.essence-list li:last-child {
    border-bottom: none;
}

.essence-list a {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.essence-title {
    font-size: 13px;
    color: var(--text-color);
}

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

.essence-author {
    font-size: 12px;
    color: var(--text-muted);
}

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

.quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background-color: var(--light-color);
    border-radius: var(--radius);
    color: var(--text-color);
    transition: var(--transition);
}

.quick-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.quick-link i {
    color: var(--primary-color);
}

.quick-link:hover i {
    color: white;
}

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

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #ccc;
}

.empty-state p {
    font-size: 15px;
}

/* ============================================
   帖子详情页
   ============================================ */
.post-detail {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    overflow: hidden;
}

.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 15px;
}

.post-header h1 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
}

.post-actions {
    display: flex;
    gap: 10px;
}

.inline-form {
    display: inline;
}

.post-main {
    display: flex;
}

.author-sidebar {
    width: 200px;
    padding: 20px;
    background-color: var(--light-color);
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
}

.author-card {
    text-align: center;
}

.author-card.compact {
    text-align: left;
}

.author-avatar {
    margin-bottom: 15px;
}

.avatar-placeholder {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), #6ab0ff);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto;
}

.avatar-placeholder.large {
    width: 100px;
    height: 100px;
    font-size: 40px;
}

.avatar-placeholder.xlarge {
    width: 120px;
    height: 120px;
    font-size: 48px;
}

.author-card.compact .avatar-placeholder {
    width: 50px;
    height: 50px;
    font-size: 20px;
    margin: 0;
}

.author-name {
    font-weight: 600;
    margin-bottom: 10px;
}

.author-name a {
    color: var(--text-color);
}

.author-name a:hover {
    color: var(--primary-color);
}

.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
}

.role-badge.admin {
    background-color: var(--danger-color);
    color: white;
}

.author-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.author-stats .stat {
    text-align: center;
}

.author-stats .value {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-color);
}

.author-stats .label {
    font-size: 12px;
    color: var(--text-muted);
}

.author-signature {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

.post-content-wrapper {
    flex: 1;
    padding: 20px;
}

.post-meta-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.post-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-color);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 回复区域 */
.replies-section {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    overflow: hidden;
}

.replies-list {
    padding: 10px 0;
}

.reply-item {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

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

.reply-item .author-sidebar {
    width: 150px;
    padding: 15px;
}

.reply-content-wrapper {
    flex: 1;
    padding: 15px 20px;
}

.reply-meta-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.floor {
    color: var(--primary-color);
    font-weight: bold;
}

.reply-content {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-color);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 回复表单 */
.reply-form-section {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.reply-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    resize: vertical;
    min-height: 120px;
}

.reply-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-actions {
    margin-top: 15px;
}

.login-prompt {
    text-align: center;
    padding: 30px;
    background-color: var(--light-color);
    border-radius: var(--radius);
}

/* 侧边栏素材筛选 */
.material-filter-sidebar {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--radius);
    color: var(--text-color);
    transition: var(--transition);
}

.filter-item:hover,
.filter-item.active {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.filter-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-count {
    background-color: var(--light-color);
    color: var(--text-muted);
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

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

/* ============================================
   表单样式
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-muted);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

/* ============================================
   认证页面
   ============================================ */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 60px - 200px);
    padding: 40px 20px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.auth-header h1 i {
    color: var(--primary-color);
}

.auth-header p {
    color: var(--text-muted);
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-form label i {
    color: var(--text-muted);
}

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

.forgot-link {
    font-size: 13px;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 25px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--border-color);
}

.auth-divider span {
    position: relative;
    background-color: var(--card-bg);
    padding: 0 15px;
    color: var(--text-muted);
    font-size: 13px;
}

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

.page-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-color);
    background-color: var(--light-color);
    transition: var(--transition);
}

.page-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.page-link.current {
    background-color: var(--primary-color);
    color: white;
}

.page-link.ellipsis {
    background: none;
    cursor: default;
}

/* ============================================
   提示消息
   ============================================ */
.flash-messages {
    margin-bottom: 20px;
}

.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert .close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.5;
}

.alert .close:hover {
    opacity: 1;
}

/* ============================================   页脚   ============================================ */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 10px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 5px;
    align-items: start;
}

.footer-section {
    padding: 0;
}

.footer-section h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: white;
    font-weight: 600;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    line-height: 1.5;
    margin: 0 0 8px 0;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    padding: 4px 0;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 5px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-info {
    margin-bottom: 4px;
}

.footer-info a {
    display: inline-block;
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    padding: 0;
    transition: color 0.3s;
}

.footer-info a:hover {
    color: white;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

/* 响应式布局调整 */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 15px 0 8px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .footer-section h4 {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .footer-section p,
    .footer-section a {
        font-size: 11px;
    }
    
    .footer-bottom {
        padding-top: 8px;
    }
    
    .footer-info a {
        display: block;
        margin: 5px 0;
        font-size: 11px;
    }
    
    .footer-copyright {
        font-size: 11px;
    }
}

/* ============================================
   传奇素材样式
   ============================================ */

/* 素材分类页面 */
.materials-index .section-header {
    text-align: center;
    margin-bottom: 30px;
}

.materials-index .section-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.materials-index .section-header p {
    font-size: 16px;
    color: var(--text-muted);
}

/* 二级分类筛选按钮 */
.materials-filter.user-section {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 30px;
}

/* 收藏页面样式 */
.collection-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.collection-header h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.collection-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.collection-tabs {
    margin-bottom: 20px;
}

.collection-tabs .tabs-nav {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
}

.collection-tabs .tab-item {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.collection-tabs .tab-item:hover {
    color: var(--primary-color);
}

.collection-tabs .tab-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.collection-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.collection-card {
    position: relative;
    overflow: hidden;
}

.collection-card .material-cover {
    height: 150px;
}

.collection-card .material-info {
    padding: 10px;
}

.collection-card .material-title {
    font-size: 14px;
    margin-bottom: 5px;
}

.collection-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.select-all {
    display: flex;
    align-items: center;
    gap: 5px;
}

.select-all input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.select-all label {
    cursor: pointer;
}

.material-card {
    position: relative;
    overflow: hidden;
}

.material-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    transform: scale(1.2);
}

.material-cover {
    position: relative;
    width: 100%;
    padding-top: 100%;
    height: 0;
    overflow: visible;
    background: #000;
}

.material-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.material-card:hover .material-cover img {
    transform: scale(1.05);
}

.unfavorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.material-card:hover .unfavorite-btn {
    opacity: 1;
}

.unfavorite-btn:hover {
    background: #ff4757;
    color: white;
    transform: scale(1.1);
}

.unfavorite-btn i {
    font-size: 16px;
    color: #ffd700;
}

.unfavorite-btn:hover i {
    color: white;
}

.filter-header {
    margin-bottom: 15px;
}

.filter-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-title i {
    color: var(--primary-color);
}

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

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-color);
    transition: var(--transition);
    cursor: pointer;
}

.filter-tab:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-tab.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-tab .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background-color: var(--text-muted);
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.filter-tab:hover .count,
.filter-tab.active .count {
    background-color: rgba(255, 255, 255, 0.3);
}

.category-section {
    margin-bottom: 40px;
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.category-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.category-header .category-icon {
    font-size: 24px;
    margin-right: 10px;
}

.category-header h2 {
    display: flex;
    align-items: center;
    font-size: 20px;
    margin-bottom: 5px;
}

.category-description {
    color: var(--text-muted);
    font-size: 14px;
}

/* 分类详情页面 */
.material-category-page .section-header {
    text-align: center;
    margin-bottom: 30px;
}

.material-category-page .section-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.category-info-bar {
    margin-bottom: 20px;
    padding: 15px 20px;
    background-color: var(--light-color);
    border-radius: var(--radius);
}

.category-stats {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.category-header .category-icon {
    font-size: 24px;
    margin-right: 10px;
}

.category-header h2 {
    display: flex;
    align-items: center;
    font-size: 20px;
    margin: 0;
}

.category-header .view-more {
    font-size: 14px;
    color: var(--primary-color);
}

/* 素材网格 - 🔥 强制固定 4 列 */
.materials-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 18px !important;
    margin-bottom: 20px !important;
    padding: 0 !important;
}

.material-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
    display: block;
    color: var(--text-color);
    overflow: hidden;
}

.material-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.material-info {
    padding: 15px;
}

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

.material-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.material-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.material-size {
    margin-top: 10px;
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 500;
}

.category-footer {
    text-align: center;
    margin-top: 20px;
}

/* 素材详情页 */
.material-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.material-header h1 {
    font-size: 24px;
    margin-bottom: 15px;
}

.material-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.material-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-bottom: 40px;
}

.material-gallery {
    background-color: var(--light-color);
    padding: 20px;
    border-radius: var(--radius);
}

.main-image {
    margin-bottom: 20px;
    text-align: center;
}

.main-image img {
    max-width: 100%;
    max-height: 600px;
    border-radius: var(--radius);
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
}

.thumb-item {
    flex: 0 0 100px;
    height: 100px;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.thumb-item:hover {
    border-color: var(--primary-color);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.material-info-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background-color: var(--light-color);
    padding: 20px;
    border-radius: var(--radius);
}

.info-card h3 {
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-list {
    list-style: none;
}

.info-list li {
    display: flex;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.info-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-list .label {
    width: 80px;
    font-weight: 500;
    color: var(--text-muted);
}

.info-list .value {
    flex: 1;
}

.action-card {
    background-color: var(--light-color);
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
}

.download-hint {
    margin-top: 15px;
    font-size: 12px;
    color: var(--text-muted);
}

.material-description {
    background-color: var(--light-color);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 40px;
}

.material-description h3 {
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.description-content {
    font-size: 15px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.comments-section {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.comment-form {
    margin-bottom: 30px;
}

.comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.comments-list {
    margin-top: 20px;
}

.comment-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.author-avatar {
    flex-shrink: 0;
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 600;
    font-size: 14px;
}

.comment-time {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-content {
    font-size: 14px;
    line-height: 1.6;
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 992px) {
    .home-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
    
    .post-main {
        flex-direction: column;
    }
    
    .author-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .reply-item {
        flex-direction: column;
    }
    
    .reply-item .author-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .materials-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .material-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 20px;
    }
    
    .nav {
        display: none;
    }
    
    .search-box form {
        width: 150px;
    }
    
    .welcome-banner {
        padding: 30px 20px;
    }
    
    .welcome-banner h1 {
        font-size: 22px;
    }
    
    .board-list {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .auth-container {
        padding: 30px 20px;
    }
    
    .materials-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .material-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* ============================================
   新板块导航样式
   ============================================ */

.board-grid-new {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.category-section-new {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.category-header-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.category-header-new h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    margin: 0;
}

.category-header-new .category-icon {
    font-size: 20px;
}

.category-header-new .category-desc {
    font-size: 14px;
    color: var(--text-muted);
}

.board-list-new {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.board-card-new {
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
}

.board-card-new:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.board-card-new .board-name {
    font-size: 16px;
    margin-bottom: 8px;
}

.board-card-new .board-desc {
    margin-bottom: 12px;
}

.board-card-new .board-stats {
    font-size: 13px;
}
/* 收藏星星按钮 - 主页隐藏，详情页正常显示 */
.collect-star {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: none !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 详情页下方的收藏按钮保持显示 */
.material-actions .collect-star {
    position: static;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 4px;
    background: #343a40;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
    box-shadow: none;
    width: auto;
    height: auto;
}

.collect-star:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.collect-star i {
    font-size: 18px;
    color: #ccc;
    transition: all 0.3s ease;
}

.collect-star.collected i {
    color: #ffd700;
}

.collect-star:hover i {
    color: #ffd700;
}

.material-actions .collect-star:hover {
    background: #23272b;
    transform: translateY(-1px);
    box-shadow: none;
}

.material-actions .collect-star i {
    font-size: 14px;
    color: #fff;
}

.material-actions .collect-star.collected i {
    color: #ffd700;
}

.material-actions .collect-star:hover i {
    color: #ffd700;
}

/* 卡片悬停时显示收藏按钮 */
.material-card:hover .collect-star,
.card:hover .collect-star,
.search-result-item:hover .collect-star {
    display: flex !important;
}

/* ============================================
   素材详情标签页样式
   ============================================ */

/* 标签页导航 */
.material-tabs {
    margin: 30px 0;
    background-color: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.tabs-nav {
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    list-style: none;
    margin: 0;
    padding: 0;
    width: auto;
    display: inline-flex;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
    min-width: 100px;
}

.tab-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
}

.tab-item.active {
    background-color: var(--primary-color);
    color: white;
}

/* 标签页内容 */
.tab-content {
    padding: 20px;
    display: none;
    width: 100%;
    max-width: none;
}

.tab-content.active {
    display: block;
}

/* 素材预览区域 */
.material-gallery {
    margin-bottom: 30px;
    width: 100%;
    max-width: none;
    margin-left: 0;
}

.main-image {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    object-position: left center;
}

.main-image:hover img {
    transform: scale(1.02);
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.thumb-item {
    flex: 0 0 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumb-item:hover {
    border-color: #007bff;
    transform: translateY(-2px);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 素材操作按钮 */
.material-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.action-form {
    margin: 0;
    display: inline;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #343a40;
    color: #fff;
    min-width: 60px;
    text-align: center;
}

.action-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* 分享按钮 */
.share-btn {
    background: #343a40;
}

.share-btn:hover {
    background: #23272b;
}

/* 收藏按钮 */
.favorite-btn {
    background: #343a40;
}

.favorite-btn:hover {
    background: #23272b;
}

.favorite-btn.active {
    background: #ffc107;
    color: #343a40;
}

/* 点赞按钮 */
.like-btn {
    background: #343a40;
}

.like-btn:hover {
    background: #23272b;
}

.like-btn.active {
    background: #dc3545;
    color: #fff;
}

.action-btn i {
    font-size: 14px;
}

/* 分享成功提示框 */
.share-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.share-toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* 下载部分 */
.download-section {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.download-info {
    flex: 1;
}

.download-details {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.download-details li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.download-details .label {
    width: 100px;
    color: var(--text-muted);
    font-weight: 500;
}

.download-details .value {
    flex: 1;
    color: var(--text-color);
}

.download-action {
    width: 250px;
    flex-shrink: 0;
}

/* 相关素材 */
.related-materials h3 {
    margin-bottom: 20px;
    color: var(--text-color);
}

/* 相关素材网格 */
.related-materials .materials-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.related-materials .material-card {
    min-width: 150px;
}

.related-materials .material-cover {
    height: 120px;
}

.related-materials .material-title {
    font-size: 14px;
    margin-bottom: 5px;
}

.related-materials .material-meta {
    font-size: 12px;
}

.related-materials .material-info {
    padding: 10px;
}
/* 真正解决：右侧侧边栏不溢出、不穿透页脚 */
.sidebar {
    contain: layout !important;
    max-height: 100% !important;
    overflow: visible !important;
    position: sticky;
    top: 80px;
}