/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 基础按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* 顶部导航栏 */
.top-nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: 48px;
}

.nav-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.nav-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

.app-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: white;
    text-align: center;
}

.menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.menu-toggle:hover {
    background-color: rgba(255,255,255,0.1);
}

.back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    text-decoration: none;
}

.back-btn:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
}

.quick-add-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 12px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.quick-add-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

/* 侧边菜单 */
.menu-overlay {
    position: fixed;
    top: 64px; /* 从顶部导航栏下方开始 */
    left: 0;
    width: 100%;
    height: calc(100% - 64px); /* 减去顶部导航栏高度 */
    background: rgba(0,0,0,0.5);
    z-index: 998; /* 低于顶部导航栏的z-index */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-menu {
    position: fixed;
    top: 64px; /* 从顶部导航栏下方开始 */
    left: -280px;
    width: 280px;
    height: calc(100% - 64px); /* 减去顶部导航栏高度 */
    background: white;
    z-index: 999; /* 低于顶部导航栏的z-index */
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.side-menu.active {
    left: 0;
}

.menu-nav {
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.menu-item:hover {
    background-color: #f8f9fa;
    color: #667eea;
}

.menu-item i {
    width: 20px;
    margin-right: 12px;
    font-size: 16px;
}

/* 主内容区域 */
.main-content {
    padding: 20px 16px;
    max-width: 100%;
    margin: 0 auto;
    margin-top: 64px; /* 为固定的顶部导航栏留出空间 */
}

/* 月度概览 */
.month-overview {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.month-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.month-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.month-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.current-month {
    text-align: center;
}

.month-year {
    font-size: 18px;
    font-weight: 600;
}

.month-stats {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.stat-amount {
    font-size: 24px;
    font-weight: 700;
}

.stat-amount.income {
    color: #4CAF50;
}

.stat-amount.expense {
    color: #FF5722;
}

/* 快捷操作卡片 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.action-card {
    background: white;
    border-radius: 12px;
    padding: 16px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.action-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    color: white;
    font-size: 18px;
}

.action-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* 最近交易 */
.recent-transactions {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tab {
    background: none;
    border: none;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab.active {
    background: #667eea;
    color: white;
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
    color: white;
}

.transaction-icon.income {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.transaction-icon.expense {
    background: linear-gradient(135deg, #FF5722, #e64a19);
}

.transaction-info {
    flex: 1;
}

.transaction-desc {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.transaction-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #666;
}

.transaction-amount {
    font-size: 16px;
    font-weight: 600;
}

.transaction-amount.income {
    color: #4CAF50;
}

.transaction-amount.expense {
    color: #FF5722;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-icon {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

.empty-state h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 20px;
}

.start-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

/* 快速添加模态框 */
.quick-add-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.quick-add-modal.active {
    opacity: 1;
    visibility: visible;
}

.quick-add-content {
    background: white;
    border-radius: 20px;
    padding: 0;
    width: 90%;
    max-width: 420px;
    max-height: 85vh;
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.quick-add-modal.active .quick-add-content {
    transform: translateY(0) scale(1);
}

.quick-add-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 24px 24px 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.quick-add-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin: 0;
}

.quick-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.quick-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.quick-type-selector {
    display: flex;
    gap: 12px;
    margin: 24px;
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 6px;
    border-radius: 16px;
}

.quick-type-btn {
    flex: 1;
    padding: 14px 16px;
    border: none;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.quick-type-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.quick-type-btn i {
    font-size: 16px;
}

.quick-form-group {
    margin: 0 24px 20px 24px;
}

.quick-form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.quick-form-input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafbfc;
    box-sizing: border-box;
}

.quick-form-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.quick-amount-input {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.quick-submit-btn {
    width: calc(100% - 48px);
    margin: 20px 24px 24px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

.quick-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.quick-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 分类页面样式 */
.categories-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.add-category-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.add-category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.category-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.income-stat .stat-icon {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.expense-stat .stat-icon {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
}

.category-section {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.section-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.income-header {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.expense-header {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.category-list {
    padding: 0;
}

.category-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
}

.category-item:last-child {
    border-bottom: none;
}

.category-item:hover {
    background-color: #f8f9fa;
}

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    margin-right: 16px;
}

.income-item .category-icon {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.expense-item .category-icon {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.category-info {
    flex: 1;
}

.category-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.category-count {
    font-size: 14px;
    color: #666;
}

.category-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.edit-btn {
    background: #e3f2fd;
    color: #1976d2;
}

.edit-btn:hover {
    background: #bbdefb;
    transform: scale(1.1);
}

.delete-btn {
    background: #ffebee;
    color: #d32f2f;
}

.delete-btn:hover {
    background: #ffcdd2;
    transform: scale(1.1);
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 36px;
    color: white;
}

.empty-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.empty-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 32px;
}

.empty-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.empty-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .categories-container {
        padding: 16px;
    }
    
    .page-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .page-title {
        font-size: 24px;
        text-align: center;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .category-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .category-item {
        padding: 12px 16px;
    }
    
    .section-header {
        padding: 16px 20px;
        font-size: 16px;
    }
}

/* 警告消息 */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
}

.btn-close:hover {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        padding: 16px 12px;
    }
    
    .month-overview {
        padding: 16px;
    }
    
    .month-stats {
        gap: 16px;
    }
    
    .stat-amount {
        font-size: 20px;
    }
    
    .quick-actions {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
    
    .action-card {
        padding: 12px 6px;
    }
    
    .action-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .action-label {
        font-size: 11px;
    }
    
    .recent-transactions {
        padding: 16px;
    }
    
    .transaction-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* 移动端优化 */
@media (max-width: 768px) {
    /* 主内容区域优化 */
    .main-content {
        padding: 8px;
        margin-top: 0;
    }
    
    .container {
        padding: 0 8px;
    }
    
    /* 卡片优化 */
    .card {
        margin-bottom: 12px;
        border-radius: 8px;
    }
    
    .card-header {
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .card-body {
        padding: 16px;
    }
    
    /* 按钮优化 */
    .btn {
        padding: 12px 16px;
        font-size: 16px;
        min-height: 44px;
        border-radius: 8px;
    }
    
    /* 表格优化 */
    .table-responsive {
        font-size: 14px;
    }
    
    .table td, .table th {
        padding: 8px 4px;
        vertical-align: middle;
    }
    
    /* 表单优化 */
    .form-control {
        font-size: 16px;
        padding: 12px;
        min-height: 44px;
    }
    
    .form-label {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 6px;
    }
    
    /* 快捷操作卡片优化 */
    .action-cards {
        gap: 8px;
    }
    
    .action-card {
        padding: 16px 12px;
        min-height: 80px;
    }
    
    .action-card i {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .action-card span {
        font-size: 12px;
    }
    
    /* 月度概览优化 */
    .month-overview {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .month-selector {
        margin-bottom: 16px;
    }
    
    .month-nav-btn {
        padding: 8px 12px;
        font-size: 16px;
    }
    
    .current-month {
        font-size: 18px;
        font-weight: 600;
    }
    
    .overview-stats {
        gap: 12px;
    }
    
    .stat-item {
        padding: 12px;
        text-align: center;
    }
    
    .stat-value {
        font-size: 18px;
        font-weight: 700;
    }
    
    .stat-label {
        font-size: 12px;
        margin-top: 4px;
    }
    
    /* 最近交易优化 */
    .recent-transactions {
        padding: 16px;
    }
    
    .recent-transactions h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .transaction-item {
        padding: 12px 0;
        border-bottom: 1px solid #eee;
    }
    
    .transaction-item:last-child {
        border-bottom: none;
    }
    
    /* 侧边菜单移动端优化 */
    .side-menu {
        width: 280px;
    }
    
    .menu-item {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .menu-item i {
        width: 24px;
        font-size: 18px;
    }
    
    /* 页面标题优化 */
    h1, h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }
    
    h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    /* 间距优化 */
    .mb-4 {
        margin-bottom: 16px !important;
    }
    
    .mb-3 {
        margin-bottom: 12px !important;
    }
    
    .p-4 {
        padding: 16px !important;
    }
    
    .p-3 {
        padding: 12px !important;
    }
}
    
    .transaction-desc {
        font-size: 13px;
    }
    
    .transaction-amount {
        font-size: 14px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .app-title {
        font-size: 16px;
    }
    
    .quick-add-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .month-year {
        font-size: 16px;
    }
    
    .stat-amount {
        font-size: 18px;
    }
    
    .action-label {
        font-size: 10px;
    }
}

/* 账单页面样式 */
.bills-header {
    background: white;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.bills-tabs {
    display: flex;
    background: #f8f9fa;
}

.bills-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    background: white;
}

.bills-tab:hover {
    color: #667eea;
    text-decoration: none;
    background: #f8f9fa;
}

.bills-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
    font-weight: 600;
}

.bills-tab i {
    font-size: 20px;
    margin-bottom: 8px;
}

.bills-tab span {
    font-size: 14px;
    font-weight: 500;
}

/* 账单内容区域 */
.bills-content {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* 添加分类页面样式 */
.add-category-container {
    padding: 20px 16px;
    margin-top: 64px;
    max-width: 100%;
}

.add-category-form {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 16px;
    border: 2px solid #d1d1d6;
    border-radius: 12px;
    font-size: 16px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-hint {
    font-size: 14px;
    color: #8e8e93;
    margin-top: 6px;
}

.radio-group {
    display: flex;
    gap: 16px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    background: #f8f9fa;
}

.radio-option:hover {
    border-color: #667eea;
    background: white;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d1d6;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: #667eea;
    background: #667eea;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.radio-text {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-text i {
    font-size: 18px;
}

.radio-option input[type="radio"]:checked ~ .radio-text {
    color: #667eea;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.suggestions-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.suggestions-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggestions-title i {
    color: #ffa726;
}

.suggestions-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.suggestion-group-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-tag {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.suggestion-tag.income {
    background: #e8f5e8;
    color: #2e7d32;
}

.suggestion-tag.income:hover {
    background: #c8e6c9;
    border-color: #4caf50;
}

.suggestion-tag.expense {
    background: #ffebee;
    color: #c62828;
}

.suggestion-tag.expense:hover {
    background: #ffcdd2;
    border-color: #f44336;
}

/* 可点击标题样式 */
.clickable-title {
    transition: opacity 0.2s ease, transform 0.1s ease;
}

.clickable-title:hover {
    opacity: 0.8;
    transform: scale(0.98);
}

.clickable-title:active {
    transform: scale(0.95);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .add-category-container {
        padding: 16px;
    }
    
    .add-category-form {
        padding: 20px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .suggestions-content {
        gap: 16px;
    }
    
    .suggestion-tags {
        gap: 6px;
    }
    
    .suggestion-tag {
        padding: 6px 12px;
        font-size: 13px;
    }
}