/* ==========================================
   青龙论坛 - 全局样式表
   版本: 1.0.0
   更新日期: 2026-05-07
   ========================================== */

/* CSS变量定义 */
:root {
    --primary-color: #0d6efd;
    --primary-dark: #0b5ed7;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --body-bg: #f5f7fa;
    --card-bg: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --border-color: #e9ecef;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
    --border-radius: 12px;
    --border-radius-sm: 8px;
}

/* 全局重置与基础样式 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--body-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 76px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================
   导航栏样式
   ========================================== */
.main-header {
    position: relative;
    z-index: 1030;
}

.navbar {
    padding: 0.75rem 0;
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.navbar-brand i {
    font-size: 1.75rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255,255,255,0.15);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    padding: 0.5rem;
}

.dropdown-item {
    padding: 0.625rem 1rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: var(--light-color);
}

/* ==========================================
   面包屑导航
   ========================================== */
.breadcrumb-nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0.75rem 0;
    margin-bottom: 0;
}

.breadcrumb {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: rgba(255,255,255,0.85);
}

.breadcrumb-item a:hover {
    color: #fff;
}

.breadcrumb-item.active {
    color: #fff;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.6);
}

/* ==========================================
   英雄横幅区域
   ========================================== */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 5rem 0 6rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    position: relative;
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 600px;
    position: relative;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    position: relative;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.hero-actions {
    position: relative;
}

.hero-actions .btn {
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: none;
}

.hero-actions .btn-outline-primary {
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

.hero-actions .btn-outline-primary:hover {
    background-color: rgba(255,255,255,0.15);
    border-color: #fff;
    color: #fff;
}

.hero-image {
    position: relative;
    z-index: 1;
}

.hero-image img {
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* ==========================================
   区块通用样式
   ========================================== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================
   今日重点推荐
   ========================================== */
.featured-section {
    padding: 5rem 0;
    background-color: var(--body-bg);
}

.featured-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    position: relative;
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--warning-color);
    color: var(--dark-color);
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
}

.card-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-card:hover .card-image img {
    transform: scale(1.08);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.card-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.card-meta i {
    margin-right: 0.25rem;
    color: var(--primary-color);
}

/* ==========================================
   数据可视化区域
   ========================================== */
.data-viz-section {
    padding: 5rem 0;
    background-color: #fff;
}

.viz-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    height: 100%;
}

.viz-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 1rem;
}

.chart-legend {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.chart-stats {
    margin-top: 1rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9375rem;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-name {
    color: var(--text-secondary);
}

.stat-value {
    font-weight: 700;
    color: var(--primary-color);
}

/* 指标卡片 */
.metric-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
}

.metric-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.metric-info h4 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    display: block;
}

.metric-change {
    font-size: 0.875rem;
    font-weight: 600;
}

.metric-change.up {
    color: var(--success-color);
}

.metric-change.down {
    color: var(--danger-color);
}

/* ==========================================
   高手榜单
   ========================================== */
.experts-section {
    padding: 5rem 0;
    background-color: var(--body-bg);
}

.expert-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    height: 100%;
}

.expert-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.expert-rank {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(255, 170, 0, 0.4);
}

.expert-avatar {
    width: 96px;
    height: 96px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--border-color);
    transition: var(--transition);
}

.expert-card:hover .expert-avatar {
    border-color: var(--primary-color);
}

.expert-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.expert-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.expert-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.expert-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.expert-stats i {
    color: var(--warning-color);
    margin-right: 0.25rem;
}

/* ==========================================
   最新资讯
   ========================================== */
.news-section {
    padding: 5rem 0;
    background-color: #fff;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.news-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.news-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.news-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), #764ba2);
    color: #fff;
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
}

.news-date .day {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.news-date .month {
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-top: 0.125rem;
}

.news-content h4 {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.news-content h4 a {
    color: var(--text-primary);
}

.news-content h4 a:hover {
    color: var(--primary-color);
}

.news-content p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* 公告卡片 */
.announcement-card {
    background: linear-gradient(135deg, #fff5f5, #fff);
    border: 1px solid #fecaca;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    height: 100%;
}

.announcement-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--danger-color);
}

.announcement-item {
    display: flex;
    gap: 0.875rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid #fecaca;
}

.announcement-item:last-child {
    border-bottom: none;
}

.announcement-item .badge {
    flex-shrink: 0;
    height: fit-content;
}

.announcement-item p {
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin-bottom: 0;
    line-height: 1.5;
}

/* ==========================================
   用户反馈
   ========================================== */
.feedback-section {
    padding: 5rem 0;
    background-color: var(--body-bg);
}

.feedback-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    height: 100%;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.feedback-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feedback-rating {
    color: var(--warning-color);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.feedback-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.feedback-author {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.feedback-author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.feedback-author h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.125rem;
    color: var(--text-primary);
}

.feedback-author span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ==========================================
   功能特色
   ========================================== */
.features-section {
    padding: 5rem 0;
    background-color: #fff;
}

.feature-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary-color), #764ba2);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: rotateY(360deg);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.875rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0;
}

/* ==========================================
   合作伙伴
   ========================================== */
.partners-section {
    padding: 4rem 0;
    background-color: var(--body-bg);
}

.partners-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.partner-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    transition: var(--transition);
    padding: 1rem;
}

.partner-logo:hover {
    color: var(--primary-color);
    transform: scale(1.05);
}

.partner-logo i {
    font-size: 2.5rem;
}

.partner-logo span {
    font-size: 0.875rem;
    font-weight: 600;
}

/* ==========================================
   页脚
   ========================================== */
.main-footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 4rem 0 0;
}

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links h4 {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #fff;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 0.625rem;
}

.footer-links ul li a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9375rem;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: #fff;
    padding-left: 0.25rem;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.9375rem;
}

.contact-info i {
    color: var(--primary-color);
    font-size: 1rem;
}

.footer-bottom {
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* ==========================================
   回到顶部按钮
   ========================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), #764ba2);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ==========================================
   响应式设计
   ========================================== */
@media (max-width: 1199.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 991.98px) {
    .hero-section {
        padding: 3rem 0 4rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .hero-image {
        margin-top: 2rem;
    }
    
    .featured-section,
    .data-viz-section,
    .experts-section,
    .news-section,
    .feedback-section,
    .features-section {
        padding: 3rem 0;
    }
}

@media (max-width: 767.98px) {
    body {
        padding-top: 66px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .stat-item {
        flex: 1 1 calc(50% - 1rem);
        min-width: 120px;
    }
    
    .hero-actions .btn {
        width: 100%;
        margin-bottom: 0.75rem;
    }
    
    .hero-actions .btn:last-child {
        margin-bottom: 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .news-item {
        flex-direction: column;
    }
    
    .news-date {
        width: 64px;
    }
    
    .partners-logos {
        gap: 2rem;
    }
    
    .footer-brand {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .footer-brand p {
        max-width: 100%;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-links {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .contact-info li {
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        padding: 2rem 0 3rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .stat-item {
        flex: 1 1 100%;
    }
    
    .expert-card {
        padding: 1.5rem 1rem;
    }
    
    .feedback-card {
        padding: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem 1rem;
    }
}

/* ==========================================
   动画效果
   ========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

/* 滚动显示动画 */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   辅助类
   ========================================== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), #764ba2);
}

/* 加载占位 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 打印样式 */
@media print {
    .main-header,
    .breadcrumb-nav,
    .back-to-top,
    .main-footer {
        display: none !important;
    }
    
    body {
        padding-top: 0;
    }
    
    .hero-section {
        padding: 2rem 0;
        color: #000;
        background: #fff;
    }
    
    .hero-section::before {
        display: none;
    }
}
