* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255, 255, 255, 0.2);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
}

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

.hero {
    text-align: center;
    padding: 3rem 0;
    background: white;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.hero h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.hero p {
    color: #666;
    font-size: 1.1rem;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.3rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.overview-section {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.overview-section h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.chart-container {
    height: 350px;
    position: relative;
}

.quick-links {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.quick-links h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.link-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.link-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
}

.link-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

.link-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.link-card p {
    color: #666;
    font-size: 0.9rem;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #666;
    margin-top: 3rem;
}

/* 支出分析页面样式 */
.expense-section {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.expense-section h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.expense-chart {
    height: 400px;
}

.category-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.category-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.category-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 1rem;
}

.category-info {
    flex: 1;
}

.category-name {
    font-weight: bold;
    color: #333;
}

.category-amount {
    color: #667eea;
}

/* 趋势分析页面样式 */
.trend-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.8rem 1.5rem;
    background: #f8f9fa;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab.active,
.tab:hover {
    background: #667eea;
    color: white;
}

.trend-chart {
    height: 400px;
}

.monthly-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

.monthly-table th,
.monthly-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.monthly-table th {
    background: #f8f9fa;
    font-weight: bold;
}

/* 年度对比页面样式 */
.year-selectors {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.year-selectors select {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.compare-btn {
    padding: 0.8rem 2rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.compare-btn:hover {
    background: #5a6fd6;
}

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

.compare-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.compare-card .label {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.compare-card .value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
}

.compare-card .change {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.compare-card .change.up {
    color: #dc3545;
}

.compare-card .change.down {
    color: #28a745;
}

/* 财务规划页面样式 */
.planning-section {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.planning-section h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.planning-section h3 {
    color: #667eea;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.planning-section p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.planning-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.planning-section li {
    color: #666;
    margin-bottom: 0.5rem;
}

.strategy-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
}

.strategy-card h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.strategy-card p {
    color: #666;
    font-size: 0.9rem;
}

.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.financial-table {
    width: 100%;
    border-collapse: collapse;
}

.financial-table th,
.financial-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.financial-table th {
    background: #f8f9fa;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #667eea;
        padding: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .link-cards {
        grid-template-columns: 1fr;
    }
}