
:root {
    --primary-color: #667eea;
    --primary-dark: #764ba2;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --text-dark: #2c3e50;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --border-color: #e9ecef;
}

body {
    font-family: 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
    color: #2c3e50;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 主内容区域 */
.main-content {
    flex: 1;
}

/* 导航栏 */
.bg-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-dark .navbar-nav .nav-link {
    transition: all 0.3s;
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
}

.navbar-dark .navbar-nav .nav-link:hover {
    transform: translateY(-2px);
    color: #fff !important;
}

.navbar-brand {
    font-size: 1.5rem;
    color: #fff !important;
}

/* Hero Section - 重点修复 */
.hero-section {
    min-height: 500px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-section * {
    position: relative;
    z-index: 1;
}

/* Hero 文字颜色 - 强制白色 */
.hero-section h1,
.hero-section .display-4 {
    color: #ffffff !important;
}

.hero-section p,
.hero-section .lead {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Hero 按钮样式 - 重点修复 */
.hero-section .btn-light {
    background: #ffffff !important;
    color: #667eea !important;
    border: none !important;
    font-weight: 600;
}

.hero-section .btn-light:hover {
    background: #f8f9fa !important;
    color: #764ba2 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255,255,255,0.3);
}

.hero-section .btn-outline-light {
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
    background: transparent !important;
    font-weight: 600;
}

.hero-section .btn-outline-light:hover {
    background: #ffffff !important;
    color: #667eea !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255,255,255,0.3);
}

/* 分类导航 */
.categories-section {
    background: #fff;
}

.categories-section h3 {
    color: var(--text-dark) !important;
    font-weight: 700;
    margin-bottom: 2rem;
}

/* 分类卡片 */
.category-card {
    display: block;
    text-decoration: none;
}

.category-card .card {
    border: 2px solid var(--border-color);
    transition: all 0.3s;
    background: #fff;
    height: 100%;
}

.category-card .card:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.category-card .card-title {
    color: var(--text-dark) !important;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category-card i {
    color: var(--primary-color);
}

/* 推荐作品/最新作品区域 */
.recommend-section {
    background: var(--bg-light);
}

.latest-section {
    background: #fff;
}

.recommend-section h3,
.latest-section h3 {
    color: var(--text-dark) !important;
    font-weight: 700;
}

/* "查看更多"按钮 */
.btn-outline-primary {
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background: var(--primary-color) !important;
    color: #fff !important;
}

/* 卡片悬停效果 */
.hover-card {
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15) !important;
    border-color: var(--primary-color);
}

/* 作品卡片 */
.work-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    height: 100%;
}

.work-card img {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
    width: 100%;
    background: #f8f9fa;
}

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

.work-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark) !important;
    margin-bottom: 0.5rem;
}

.work-card .card-body {
    padding: 1rem;
    background: #fff;
}

.work-card .card-footer {
    background: transparent;
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
}

.work-card .card-footer small {
    color: var(--text-muted) !important;
}

/* 价格显示 */
.text-primary.fw-bold {
    color: var(--primary-color) !important;
    font-size: 1.1rem;
}

/* 文本截断 */
.text-truncate-2 {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.text-truncate-3 {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* 按钮样式 */
.btn {
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff !important;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

/* 表单样式 */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* 评分星星 */
.rating {
    display: flex;
    gap: 10px;
}

.rating label {
    cursor: pointer;
    transition: transform 0.2s;
}

.rating label:hover {
    transform: scale(1.2);
}

/* 作品详情 */
.work-description {
    line-height: 1.8;
    font-size: 1rem;
    color: #555;
}

.info-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

/* 回复区域 */
.reply-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 1rem;
}

/* 分页样式 */
.pagination {
    margin-top: 2rem;
}

.pagination .page-link {
    color: var(--primary-color);
    border-radius: 5px;
    margin: 0 5px;
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* 底部 */
.footer {
    margin-top: auto;
    background: #2c3e50 !important;
}

.footer h5,
.footer h6 {
    color: #fff !important;
    font-weight: 600;
}

.footer .text-muted {
    color: rgba(255,255,255,0.6) !important;
}

.footer a.text-muted:hover {
    color: rgba(255,255,255,0.9) !important;
}

/* 统计卡片 - 重点修复 */
.stats-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.stat-item {
    padding: 2rem;
}

.stat-item h2 {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #fff !important;
}

.stat-item p {
    color: rgba(255,255,255,0.95) !important;
    margin-bottom: 0;
}

/* 论坛图标 */
.forum-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 10px;
}

/* 徽章 */
.badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
}

.badge.bg-success {
    background: var(--success-color) !important;
}

/* 文本颜色工具类 */
.text-muted {
    color: var(--text-muted) !important;
}

.text-white {
    color: #ffffff !important;
}

/* 响应式 */
@media (max-width: 768px) {
    .hero-section {
        min-height: 400px;
        text-align: center;
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem !important;
    }

    .hero-section .lead {
        font-size: 1rem;
    }

    .hero-section .d-flex {
        flex-direction: column;
        gap: 1rem !important;
    }

    .hero-section .btn {
        width: 100%;
    }
    
    .work-card img {
        height: 150px;
    }
    
    .stat-item {
        padding: 1.5rem;
    }

    .stat-item h2 {
        font-size: 2rem;
    }

    .stat-item p {
        font-size: 1rem;
    }
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* 帖子内容样式 */
.post-content {
    line-height: 1.8;
    font-size: 1rem;
    color: var(--text-dark);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1rem 0;
}

/* 侧边栏用户菜单 */
.list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 表格样式优化 */
.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 用户头像 */
.rounded-circle {
    border: 2px solid rgba(255,255,255,0.3);
}

/* 下拉菜单 */
.dropdown-menu {
    border: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 5px;
    padding: 0.5rem 1rem;
    color: var(--text-dark);
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: var(--primary-color);
}

/* 确保所有标题可见 */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
}

/* 链接样式 */
a {
    text-decoration: none;
    transition: all 0.3s;
}

a:hover {
    opacity: 0.8;
}

/* section 标题装饰 */
section h3 {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 2px;
}

/* 确保小图标颜色正确 */
small.text-muted {
    color: var(--text-muted) !important;
}

small.text-muted i {
    color: var(--text-muted);
}

/* 论坛相关样式 */
.forum-section-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.forum-section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2) !important;
    border-color: #667eea;
}

.forum-icon-large {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 15px;
}

.category-icon {
    transition: transform 0.3s;
}

.hover-card:hover .category-icon {
    transform: scale(1.1);
}

/* 作品卡片优化 */
.work-card {
    transition: all 0.3s ease;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15) !important;
}

/* 评论区域优化 */
.comment-item {
    transition: all 0.2s;
}

.comment-item:hover {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem !important;
    margin-left: -1rem;
    margin-right: -1rem;
}

/* 回复区域优化 */
.reply-item {
    transition: all 0.2s;
}

.reply-item:hover {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem !important;
    margin-left: -1rem;
    margin-right: -1rem;
}
