/* 富甲天下网 - 主论坛资料大全汇总中心 样式表 */

/* CSS变量定义 */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--light-color);
    min-height: 100vh;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.header-top {
    background: var(--dark-color);
    padding: 8px 0;
    font-size: 14px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-date .date-icon {
    width: 16px;
    height: 16px;
}

.header-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: var(--transition);
}

.header-links a:hover {
    color: white;
}

/* 导航栏 */
.navbar {
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: var(--transition);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

.nav-actions {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background: white;
    color: var(--primary-color);
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

/* 主内容区 */
.main {
    padding: 40px 0;
}

/* 今日重点推荐区域 */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.section-title h2 {
    font-size: 26px;
    color: var(--dark-color);
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

.section-badge {
    background: var(--danger-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.featured-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.featured-card-image {
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.featured-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-card-image .tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent-color);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.featured-card-content {
    padding: 20px;
}

.featured-card-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--dark-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-card-content p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.card-meta .source {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-meta .time {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 内容分类区域 */
.category-section {
    margin-bottom: 50px;
}

.category-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 10px 20px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: var(--text-secondary);
}

.category-tab:hover,
.category-tab.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #eff6ff;
}

.info-list {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.info-item {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 20px;
    transition: var(--transition);
    cursor: pointer;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item:hover {
    background: #f9fafb;
}

.info-item-image {
    width: 120px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
}

.info-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-item-content {
    flex: 1;
}

.info-item-content h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.info-item-content p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.info-item-meta {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* 热门推荐 */
.hot-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

.hot-main {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.hot-main-item {
    display: flex;
    gap: 20px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.hot-main-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.hot-main-item .number {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.hot-sidebar {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.hot-sidebar h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.sidebar-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-item:last-child {
    border-bottom: none;
}

.sidebar-item .rank {
    width: 24px;
    height: 24px;
    background: var(--accent-color);
    color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.sidebar-item .rank.gold { background: #f59e0b; }
.sidebar-item .rank.silver { background: #9ca3af; }
.sidebar-item .rank.bronze { background: #cd7f32; }

.sidebar-item-content h4 {
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--dark-color);
}

.sidebar-item-content span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 用户卡片区域 */
.user-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 50px;
    box-shadow: var(--shadow-sm);
}

.user-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.user-card {
    text-align: center;
    padding: 20px;
    border-radius: var(--radius-md);
    background: #f9fafb;
    transition: var(--transition);
}

.user-card:hover {
    background: #eff6ff;
    transform: translateY(-4px);
}

.user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 12px;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-card h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.user-card span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 统计区域 */
.stats-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 40px 0;
    margin: 50px 0;
    border-radius: var(--radius-lg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item h3 {
    font-size: 36px;
    margin-bottom: 8px;
}

.stat-item p {
    opacity: 0.9;
    font-size: 14px;
}

/* 底部 */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about h3 {
    font-size: 22px;
    margin-bottom: 16px;
}

.footer-about p {
    color: #9ca3af;
    line-height: 1.8;
    font-size: 14px;
}

.footer-links h4 {
    font-size: 16px;
    margin-bottom: 16px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: var(--transition);
    font-size: 14px;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

/* 表单样式 */
.form-container {
    max-width: 480px;
    margin: 60px auto;
    padding: 40px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.form-title {
    text-align: center;
    margin-bottom: 30px;
}

.form-title h1 {
    font-size: 28px;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.form-title p {
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group .error {
    color: var(--danger-color);
    font-size: 12px;
    margin-top: 4px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.form-options a {
    color: var(--primary-color);
    text-decoration: none;
}

.form-options a:hover {
    text-decoration: underline;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input {
    width: auto;
}

/* 用户中心 */
.user-center {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

.user-sidebar {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

.user-profile {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.user-profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 16px;
    overflow: hidden;
}

.user-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-profile h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

.user-profile p {
    color: var(--text-secondary);
    font-size: 14px;
}

.user-menu {
    list-style: none;
}

.user-menu li {
    margin-bottom: 4px;
}

.user-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.user-menu a:hover,
.user-menu a.active {
    background: #eff6ff;
    color: var(--primary-color);
}

.user-menu .icon {
    width: 20px;
    height: 20px;
}

.user-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.user-content h2 {
    font-size: 22px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: #f9fafb;
    font-weight: 600;
    color: var(--dark-color);
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.data-table .status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.data-table .status.active {
    background: #d1fae5;
    color: #065f46;
}

.data-table .status.pending {
    background: #fef3c7;
    color: #92400e;
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    color: var(--text-secondary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-top {
        display: none;
    }

    .nav-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-actions {
        display: none;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .hot-section {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .user-center {
        grid-template-columns: 1fr;
    }

    .info-item {
        flex-direction: column;
    }

    .info-item-image {
        width: 100%;
        height: 160px;
    }

    .form-container {
        margin: 20px;
        padding: 24px;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 提示消息 */
.toast {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 500;
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: var(--success-color);
}

.toast.error {
    background: var(--danger-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--dark-color);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination a {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.pagination a:hover,
.pagination a.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.badge-new {
    background: #ef4444;
    color: white;
}

.badge-hot {
    background: #f59e0b;
    color: white;
}

.badge-recommend {
    background: #10b981;
    color: white;
}
