/* ==========================================
   爆发富论坛 - 主样式表
   版本: 1.0.0
   日期: 2026-05-08
   ========================================== */

/* CSS变量定义 */
:root {
    --primary-color: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --secondary-color: #34a853;
    --accent-color: #fbbc04;
    --danger-color: #ea4335;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-muted: #80868b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-dark: #202124;
    --border-color: #dadce0;
    --shadow-sm: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
    --shadow-md: 0 1px 2px 0 rgba(60,64,67,0.3), 0 2px 6px 2px rgba(60,64,67,0.15);
    --shadow-lg: 0 1px 3px 0 rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --container-max: 1200px;
    --header-height: 70px;
}

/* 重置样式 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* 容器 */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部 */
.main-header {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--bg-dark);
    color: #fff;
    padding: 8px 0;
    font-size: 0.875rem;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.current-date {
    color: var(--accent-color);
    font-weight: 500;
}

.update-info {
    background: var(--secondary-color);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.btn-login, .btn-register {
    color: #fff;
    padding: 4px 16px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
    font-size: 0.875rem;
}

.btn-login:hover, .btn-register:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.btn-register {
    background: var(--primary-color);
}

.btn-register:hover {
    background: var(--primary-dark);
}

/* 主导航 */
.main-nav {
    padding: 12px 0;
}

.main-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    flex-shrink: 0;
}

.logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.nav-menu a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
    background: var(--primary-light);
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 4px 4px 4px 16px;
    border: 1px solid var(--border-color);
    transition: border-color var(--transition-fast);
    flex-shrink: 0;
}

.search-box:focus-within {
    border-color: var(--primary-color);
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    width: 180px;
    color: var(--text-primary);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.search-box button:hover {
    background: var(--primary-dark);
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: background var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: transform var(--transition-fast);
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    top: 7px;
}

/* 主要内容区 */
main {
    min-height: calc(100vh - var(--header-height));
}

/* 英雄区 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    padding: 80px 0;
    text-align: center;
    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 xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></svg>');
    background-size: 60px 60px;
    opacity: 0.5;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-desc {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* 区块标题 */
.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.section-title i {
    color: var(--primary-color);
}

.update-time {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: auto;
}

/* 今日推荐 */
.today-recommend {
    padding: 60px 0;
}

.recommend-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.recommend-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    position: relative;
}

.recommend-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.recommend-card.featured {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
}

.card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--danger-color);
    color: #fff;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.recommend-card.featured .card-image {
    aspect-ratio: 16/9;
    flex: 1;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.recommend-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
}

.recommend-card.featured .card-content {
    padding: 24px;
}

.card-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-primary);
}

.recommend-card.featured .card-content h3 {
    font-size: 1.375rem;
}

.card-content p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.card-meta i {
    margin-right: 4px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9375rem;
}

.read-more i {
    transition: transform var(--transition-fast);
}

.read-more:hover i {
    transform: translateX(4px);
}

/* 数据可视化 */
.data-visualization {
    padding: 60px 0;
    background: var(--bg-primary);
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.chart-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.chart-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.chart-card canvas {
    max-height: 300px;
}

/* 高手榜 */
.expert-section {
    padding: 60px 0;
}

.expert-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.expert-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    position: relative;
}

.expert-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.rank-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

.rank-1 .rank-badge {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
}

.rank-2 .rank-badge {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
}

.rank-3 .rank-badge {
    background: linear-gradient(135deg, #cd7f32, #b87333);
}

.expert-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    border: 4px solid var(--primary-light);
}

.expert-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.expert-title {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.expert-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.btn-outline {
    display: inline-block;
    padding: 8px 24px;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-sm);
    color: var(--primary-color);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

/* 论坛预览 */
.forum-preview {
    padding: 60px 0;
    background: var(--bg-primary);
}

.topic-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.topic-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.topic-item:hover {
    background: var(--primary-light);
}

.topic-item.hot {
    border-left: 4px solid var(--danger-color);
}

.topic-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.topic-item.hot .topic-icon {
    background: var(--danger-color);
}

.topic-content {
    flex: 1;
    min-width: 0;
}

.topic-content h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.topic-content h3 a {
    color: var(--text-primary);
}

.topic-content h3 a:hover {
    color: var(--primary-color);
}

.topic-content p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topic-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.topic-meta i {
    margin-right: 4px;
}

/* 用户反馈 */
.testimonials {
    padding: 60px 0;
}

.testimonial-slider {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-item {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform var(--transition-normal);
}

.testimonial-item:hover {
    transform: translateY(-4px);
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 4px solid var(--primary-light);
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-content p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    margin-bottom: 12px;
}

.testimonial-author strong {
    display: block;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.testimonial-author span {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.testimonial-rating {
    color: var(--accent-color);
    font-size: 1rem;
}

/* 多平台同步 */
.platform-sync {
    padding: 60px 0;
    background: var(--bg-primary);
}

.sync-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.sync-item {
    text-align: center;
    padding: 40px 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.sync-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.sync-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.sync-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.sync-item p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* 数据来源 */
.data-source {
    padding: 60px 0;
}

.source-content {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.source-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
}

.source-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tag {
    padding: 6px 16px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* 按钮 */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: var(--primary-color);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
}

.text-center {
    text-align: center;
}

/* 页脚 */
.main-footer {
    background: var(--bg-dark);
    color: #fff;
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
}

.footer-section p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

.footer-section ul a:hover {
    color: #fff;
}

.social-links {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background var(--transition-fast);
}

.social-links a:hover {
    background: var(--primary-color);
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 24px 0;
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.5);
}

.footer-bottom a {
    color: rgba(255,255,255,0.7);
}

.footer-bottom a:hover {
    color: #fff;
}

/* 回到顶部 */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
