/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4ade80;
    --primary-light: #86efac;
    --primary-dark: #16a34a;
    --secondary-color: #f0fdf4;
    --accent-color: #dcfce7;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --background: #ffffff;
    --surface: #f9fafb;
    --border: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-light: rgba(0, 0, 0, 0.05);
}

/* 暗色模式变量 */
body.dark-mode {
    --primary-color: #10b981;
    --primary-light: #34d399;
    --primary-dark: #059669;
    --secondary-color: #064e3b;
    --accent-color: #065f46;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-light: #9ca3af;
    --background: #111827;
    --surface: #1f2937;
    --border: #374151;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-light: rgba(0, 0, 0, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 导航栏 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
    transition: all 0.3s ease;
}

body.dark-mode .navbar {
    background: rgba(31, 41, 55, 0.95);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

/* 首页横幅 */
.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, rgba(220, 252, 231, 0.6) 100%);
    padding: 4rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 50px;
    box-shadow: 0 4px 20px var(--shadow-light);
    overflow: hidden;
    border: 2px solid var(--accent-color);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 4px 30px rgba(74, 222, 128, 0.2);
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
}

.search-box button {
    padding: 1rem 1.5rem;
    background: var(--primary-color);
    border: none;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background: var(--primary-dark);
}

/* 工具区域 */
.tools-section {
    padding: 4rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.category {
    margin-bottom: 4rem;
}

.category h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-color);
}

.category h3 svg {
    color: var(--primary-color);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px var(--shadow);
    border-color: var(--primary-light);
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.tool-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    border-radius: 8px;
    color: var(--primary-dark);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.tool-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.tool-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.tool-link:hover {
    background: var(--primary-dark);
    transform: translateX(2px);
}

/* 页脚 */
footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr 0.3fr;
    gap: 3rem;
}

.footer-section h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    color: var(--primary-dark);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.author-info {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
    color: var(--text-light);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-logo h1 {
        font-size: 1.25rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .hero {
        padding: 3rem 1rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category h3 {
        font-size: 1.5rem;
    }
    
    .footer-content {
        padding: 0 1rem;
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card {
    animation: fadeInUp 0.6s ease forwards;
}

.tool-card:nth-child(n) {
    animation-delay: calc(0.1s * var(--i, 0));
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 搜索结果高亮 */
.highlight {
    background: linear-gradient(120deg, rgba(74, 222, 128, 0.2) 0%, rgba(74, 222, 128, 0.1) 100%);
    border-color: var(--primary-color) !important;
}

/* 无结果状态 */
.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 3rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
}

/* 分类过滤器 */
.category-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--accent-color);
    color: var(--primary-dark);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 暗色模式切换按钮 */
.dark-mode-toggle {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--shadow);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.dark-mode-toggle:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px var(--shadow);
}

.dark-mode-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

/* 暗色模式下的特殊样式 */
body.dark-mode .hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, rgba(6, 78, 59, 0.6) 100%);
}

body.dark-mode .search-box {
    background: var(--surface);
    border-color: var(--border);
}

body.dark-mode .tool-card {
    background: var(--surface);
    border-color: var(--border);
}

body.dark-mode .tool-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px var(--shadow);
}

body.dark-mode .tool-icon {
    background: var(--accent-color);
    color: var(--primary-light);
}

/* 生财精华帖页面样式 */
.insights-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    text-align: center;
    padding: 6rem 2rem 4rem;
}

.insights-hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.insights-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.insights-section {
    padding: 4rem 0;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.insight-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.insight-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.15);
}

.insight-card.featured {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.05), rgba(134, 239, 172, 0.05));
}

.insight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.insight-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.insight-category {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.insight-card h3 {
    color: var(--text-primary);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.insight-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.insight-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
}

.tags-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.insight-tags .tag {
    background: rgba(74, 222, 128, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.visit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-left: 1rem;
    flex-shrink: 0;
}

.visit-btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
    color: white;
}

.visit-btn i {
    font-size: 0.8rem;
}

.insights-cta {
    text-align: center;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 3rem 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.insights-cta h3 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.insights-cta p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

/* 生财精华帖移动端适配 */
@media (max-width: 768px) {
    .insights-hero h2 {
        font-size: 2rem;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .insight-card {
        padding: 1.5rem;
    }
    
    .insights-cta {
        padding: 2rem 1rem;
    }
} 