/* 开屏动画样式 */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

.splash-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    animation: logoPulse 2s ease-in-out infinite;
}

.splash-title {
    font-size: 2.5rem;
    color: white;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    margin: 0;
}

.splash-loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 开屏动画结束时的隐藏效果 */
.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

/* 开屏动画关键帧 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 全局样式重置 */
* {
    letter-spacing: 0.1em;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 隐藏滚动条 */
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* 全局过渡效果 */
    transition: all 0.3s ease;
}

/* 隐藏WebKit浏览器的滚动条 */
*::-webkit-scrollbar {
    display: none;
}

/* 隐藏IE/Edge浏览器的滚动条 */
*::-ms-scrollbar {
    display: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* 应用容器 */
.app-container {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* 导航栏 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand h1 {
    font-size: 1.5rem;
    color: #667eea;
    font-weight: 600;
}

.navbar-nav {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: #f0f0f0;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

/* 主要内容区域 */
.main-content {
    padding: 1.5rem;
}

/* 首页样式 */
.home-page h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #444;
    text-align: center;
}

.home-page .top-span {
    font-size: 0.8rem;
    color: #666;
    display: block;
    text-align: center;
    margin-bottom: 1rem;
}


/* 余额卡片 */
.balance-section {
    margin-bottom: 2rem;
}

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

.balance-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.balance-cards {
    display: flex;
    gap: 1rem;
}

.balance-cards .balance-card {
    flex: 1;
}

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

.balance-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
}

.balance-card.income .balance-amount {
    color: #28a745;
}

.balance-card.expense .balance-amount {
    color: #dc3545;
}

/* 快速操作按钮 */
.quick-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-btn {
    flex: 1;
    padding: 1.5rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.income-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.expense-btn {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
    color: white;
}

.action-icon {
    font-size: 2rem;
    font-weight: bold;
}

.action-text {
    font-size: 1rem;
    font-weight: 600;
}

/* 最近记录 */
.recent-records h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #555;
}

.records-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.record-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.record-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 记录卡片左右布局 */
.record-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: hidden;
    justify-content: space-between;
}

.record-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    margin-left: 1.5rem;
}

/* 记录描述 */
.record-description {
    font-size: 1.2rem;
    font-weight: 500;
    color: #333;
    line-height: 1.5;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 记录元信息 */
.record-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #666;
}

.record-date {
    color: #999;
}

/* 平台徽章样式 */
.platform-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
}

/* 金额样式 */
.record-amount {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.amount-symbol {
    font-size: 1.1rem;
    font-weight: 600;
    color: inherit;
}

.amount-value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: inherit;
}

.amount-currency {
    font-size: 1.1rem;
    font-weight: 600;
    color: inherit;
}

.record-amount.income {
    color: #28a745;
}

.record-amount.expense {
    color: #dc3545;
}

/* 日均价样式 */
.record-daily-average {
    font-size: 0.9rem;
    color: #999;
    margin-top: auto;
    text-align: right;
}

/* 记录卡片优化 */
.record-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: left;
}

/* 收支类型水印（右侧） */
.record-item::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -20px;
    transform: translateY(-50%) rotate(45deg);
    font-size: 4rem;
    font-weight: 800;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
    white-space: nowrap;
}

.record-item.income::before {
    content: '收入';
    color: #28a745;
}

.record-item.expense::before {
    content: '支出';
    color: #dc3545;
}

/* 分类微小水印（左侧） */
.record-item::after {
    content: attr(data-category);
    position: absolute;
    top: 10px;
    left: 10px;
    transform: rotate(-5deg);
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 收入分类水印颜色 */
.record-item.income::after {
    color: #28a745;
}

/* 支出分类水印颜色 */
.record-item.expense::after {
    color: #dc3545;
}

/* 卡片内容定位 */
.record-left,
.record-right {
    position: relative;
    z-index: 1;
}

/* 卡片文本对齐优化 */
.record-description {
    font-size: 1.2rem;
    font-weight: 500;
    color: #333;
    line-height: 1.5;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0;
}

.record-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.empty-records {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-style: italic;
}

/* 统计页面样式 */
.statistics-page h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #444;
    text-align: center;
}

/* 年份月份切换控件样式 */
.stats-date-picker {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    align-items: center;
}

.date-picker-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.date-picker-item label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.25rem;
}

.date-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
}

.date-select:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.date-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.statistics-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stats-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* 可折叠卡片样式 */
.collapsible .stats-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: white;
    cursor: pointer;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.collapsible .stats-card-header:hover {
    background: #f8f9fa;
    border-bottom-color: #eee;
}

.collapsible .stats-card-header h3 {
    font-size: 1.2rem;
    color: #555;
    margin: 0;
}

.collapse-icon {
    font-size: 1rem;
    color: #999;
    transition: transform 0.3s ease;
}

.stats-card-body {
    padding: 1.5rem;
    border-top: 1px solid #eee;
}

/* 月度统计样式 */
.monthly-stats-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.monthly-stat-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.monthly-stat-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.monthly-stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.monthly-stat-month {
    font-weight: 600;
    font-size: 1.1rem;
    color: #444;
}

.monthly-stat-details {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    flex-wrap: wrap;
}

.monthly-stat-income {
    color: #28a745;
    font-weight: 600;
}

.monthly-stat-expense {
    color: #dc3545;
    font-weight: 600;
}

.monthly-stat-balance {
    color: #007bff;
    font-weight: 700;
}

.monthly-stat-separator {
    color: #666;
    font-weight: 500;
}

/* 页面底部提示 */
.page-footer {
    text-align: center;
    padding: 2rem 1.5rem;
    color: #999;
    font-size: 0.9rem;
    margin-top: auto;
}

/* 首页全部记录头部 */
.all-records {
    margin-top: 2rem;
}

.all-records-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    flex-wrap: nowrap;
    gap: 0.75rem;
    overflow: hidden;
}

.all-records-header h3 {
    font-size: 1.3rem;
    color: #444;
    margin: 0;
    flex-shrink: 0;
}

.record-actions {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    justify-content: flex-end;
    flex-shrink: 0;
    overflow: hidden;
}

.record-actions .btn {
    flex: 0 0 auto;
    min-width: auto;
    width: auto;
    height: auto;
    padding: 0.5rem 0.875rem;
    gap: 0.25rem;
    font-size: 0.8rem;
    border-radius: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-icon {
    font-size: 0.9rem;
    font-weight: bold;
}

.btn-text {
    font-size: 0.8rem;
}

/* 收入支出按钮颜色 */
.income-btn {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
}

.expense-btn {
    background: linear-gradient(135deg, #dc3545, #fd7e14) !important;
    color: white !important;
}

/* 响应式调整 */
@media (max-width: 480px) {
    /* 首页记录头部按钮 */
    .record-actions {
        gap: 0.375rem;
    }
    
    .record-actions .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
        height: 32px;
        min-width: 70px;
    }
    
    .btn-icon {
        font-size: 0.8rem;
    }
    
    .btn-text {
        font-size: 0.75rem;
    }
    
    /* 模态框底部按钮 - 确保同一行 */
    .modal-footer {
        padding: 1rem;
        gap: 0.625rem;
        min-height: auto;
    }
    
    .modal-footer .btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
        height: 36px;
        min-width: 80px;
        flex: 1;
    }
    
    /* 子页面头部 */
    .subpage-header {
        padding-bottom: 0.875rem;
        margin-bottom: 1.5rem;
        gap: 0.5rem;
    }
    
    .subpage-header h2 {
        font-size: 1.1rem;
    }
    
    .subpage-header .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
        height: 32px;
        min-width: auto;
        flex: 0 0 auto;
    }
    
    /* 记录卡片 */
    .record-item {
        padding: 1.25rem;
    }
    
    .record-amount {
        gap: 0.2rem;
    }
    
    .amount-value {
        font-size: 1.8rem;
    }
    
    /* 月度统计卡片 */
    .monthly-stat-item {
        padding: 1.25rem;
    }
    
    .monthly-stat-details {
        gap: 0.5rem;
        font-size: 0.9rem;
    }
}

.stats-overview {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

.stat-item {
    text-align: center;
    flex: 1;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
}

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

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-value.income {
    color: #28a745;
}

.stat-value.expense {
    color: #dc3545;
}

.stat-value.balance {
    color: #007bff;
}

/* 设置页面样式 */
.settings-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    text-align: center;
}

.settings-header {
    margin-bottom: 3rem;
}

.app-name {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
    font-weight: 700;
}

.app-slogan {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.app-version {
    font-size: 0.9rem;
    color: #999;
}

/* 设置导航 */
.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 400px;
    margin-bottom: 3rem;
}

.settings-nav-item {
    background: white;
    border-radius: 16px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* 添加右侧箭头 */
.settings-nav-item::after {
    content: '＞';
    position: absolute;
    right: 1.5rem;
    font-size: 1.2rem;
    color: #999;
    font-weight: 600;
    transition: all 0.3s ease;
}

.settings-nav-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.12);
}

.settings-nav-item:hover::after {
    transform: translateX(5px);
    color: #667eea;
}

.nav-item-icon {
    font-size: 2rem;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: linear-gradient(135deg, #667eea, #764ba2); */
    color: white;
    border-radius: 12px;
}

.nav-item-text {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
    /* flex: 1; */
}

/* 设置页脚 */
.settings-footer {
    margin-top: auto;
    color: #999;
    font-size: 0.9rem;
}

/* 设置二级页面样式 */
.settings-subpage {
    padding: 1.5rem;
}

.subpage-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.back-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.subpage-content {
    max-width: 600px;
    margin: 0 auto;
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.settings-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #555;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 操作按钮样式优化 */
.category-actions,
.platform-actions {
    display: flex;
    gap: 0.5rem;
}

/* 设置页面卡片间距优化 */
.settings-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 设置页面添加按钮样式 */
.btn-primary {
    margin-top: 1rem;
}

/* 美化分类卡片 */
.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.category-item:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #e0e0e0;
}

/* 收入分类水印 */
.category-item:nth-child(odd)::before {
    content: '收入';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%) rotate(15deg);
    font-size: 3rem;
    font-weight: 900;
    color: rgba(40, 167, 69, 0.08);
    z-index: 0;
    pointer-events: none;
    white-space: nowrap;
}

/* 支出分类水印 */
.category-item:nth-child(even)::before {
    content: '支出';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%) rotate(15deg);
    font-size: 3rem;
    font-weight: 900;
    color: rgba(220, 53, 69, 0.08);
    z-index: 0;
    pointer-events: none;
    white-space: nowrap;
}

.category-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    position: relative;
    z-index: 1;
}

.category-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}



.category-type {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.1rem;
    font-weight: 500;
    opacity: 0.8;
}

/* 美化平台卡片 */
.platform-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid #f0f0f0;
}

.platform-item:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #e0e0e0;
}

.platform-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.platform-color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.platform-item:hover .platform-color {
    transform: scale(1.2);
}

.platform-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.data-management {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 按钮样式 */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    background: #c82333;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h3 {
    font-size: 1.2rem;
    color: #444;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 模态框底部按钮布局 - 严格按照flex row布局，不换行 */
.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 0.875rem;
    justify-content: space-between;
    background: white;
    position: sticky;
    bottom: 0;
    z-index: 10;
    flex-wrap: nowrap;
    min-height: 64px;
    overflow: hidden;
}

/* 所有模态框底部按钮统一样式 - 确保所有弹窗样式一致 */
.modal-footer .btn {
    flex: 1;
    margin: 0;
    min-width: 100px;
    max-width: none;
    flex-basis: 0;
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
    height: 48px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: auto;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* 确保所有按钮样式一致，无论类型 */
#app .modal-footer .btn-primary,
#app .modal-footer .btn-secondary,
#app .modal-footer .btn-danger {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    margin-left: 0;
    margin-right: 0;
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
    height: 48px;
}

/* 按钮悬停效果 */
.modal-footer .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

/* 按钮激活效果 */
.modal-footer .btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

/* 子页面头部样式 */
.subpage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    gap: 0.75rem;
}

.subpage-header h2 {
    font-size: 1.3rem;
    color: #444;
    margin: 0;
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.subpage-header .btn {
    flex: 0 0 auto;
    min-width: auto;
    width: auto;
    height: auto;
    padding: 10px 20px;
    font-size: 0.875rem;
    border-radius: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.subpage-header .btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
}

/* 数据管理页面样式 */
.data-management {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.data-management .data-card {
    margin-bottom: 0;
    margin: 0;
    padding: 1.5rem;
}

.data-management .btn {
    width: 100%;
    max-width: none;
    height: auto;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    border-radius: 12px;
    margin: 0;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.data-management .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.data-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
}

.data-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #dee2e6;
}

.data-card.danger {
    border-color: #ffcccc;
    background: #fff8f8;
}

.data-card h4 {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.data-card h4::before {
    content: "📊";
    font-size: 1.2rem;
}

.data-card:nth-child(2) h4::before {
    content: "📤";
}

.data-card:nth-child(3) h4::before {
    content: "📥";
}

.data-card.danger h4::before {
    content: "⚠️";
}

.data-card p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* 统一按钮样式 */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: 180px;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    margin-top: 0;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: #5a6268;
}

.btn-danger:hover {
    transform: translateY(-2px);
    background: #c82333;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    height: 36px;
    max-width: 120px;
    border-radius: 8px;
}

/* 导航按钮样式统一 */
.nav-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: #f0f0f0;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: 120px;
}

.nav-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

/* 快速操作按钮样式统一 */
.action-btn {
    flex: 1;
    padding: 1.5rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: 120px;
    justify-content: center;
}

.action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* 年度统计样式 */
.annual-stats-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.annual-stat-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.annual-stat-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.annual-stat-header h4 {
    font-size: 1.2rem;
    color: #444;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.annual-stat-details {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.annual-stat-value {
    font-weight: 600;
    font-size: 1rem;
}

/* 月度统计样式 */
.monthly-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.monthly-stat-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.monthly-stat-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.monthly-stat-month {
    font-weight: 600;
    color: #444;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.monthly-stat-income {
    color: #28a745;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.monthly-stat-expense {
    color: #dc3545;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.monthly-stat-balance {
    color: #007bff;
    font-weight: 600;
    font-size: 0.9rem;
}

/* 分类统计样式 */
.category-stats-section {
    margin-bottom: 1.5rem;
}

.category-stats-section h4 {
    font-size: 1rem;
    color: #555;
    margin-bottom: 1rem;
    font-weight: 600;
}

.category-stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.category-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.category-stat-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.category-stat-name {
    font-weight: 500;
    color: #333;
    flex: 1;
}

.category-stat-amount {
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 1rem;
}

.category-stat-count {
    font-size: 0.8rem;
    color: #666;
}

.empty-stats {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-style: italic;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* 记录详情样式 - 与分享票据完全一致 */
.record-detail-body {
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    background: #f8f9fa;
    max-height: 70vh;
    overflow-y: auto;
}

/* 记录详情使用与分享票据完全相同的样式 */
.record-detail-body .share-ticket {
    width: 100%;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: 2px solid #f0f0f0;
    margin: 0 auto;
    max-width: 400px;
}

.record-detail-body .share-ticket-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.record-detail-body .share-ticket-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.record-detail-body .share-ticket-content {
    padding: 2rem;
    background: white;
}

.record-detail-body .share-ticket-amount {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px dashed #eee;
}

.record-detail-body .share-ticket-amount.income {
    color: #28a745;
}

.record-detail-body .share-ticket-amount.expense {
    color: #dc3545;
}

.record-detail-body .share-amount-symbol {
    font-size: 2rem;
    font-weight: 700;
}

.record-detail-body .share-amount-value {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.record-detail-body .share-ticket-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.record-detail-body .share-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.record-detail-body .share-detail-item:hover {
    background: #e9ecef;
}

.record-detail-body .share-detail-label {
    font-weight: 600;
    color: #666;
}

.record-detail-body .share-detail-value {
    color: #333;
    font-weight: 500;
}

.record-detail-body .share-ticket-footer {
    background: #f8f9fa;
    padding: 1.5rem;
    text-align: center;
    border-top: 2px dashed #eee;
}

.record-detail-body .share-ticket-footer p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* 水印样式 - 严格按照分享票据样式一比一复刻 */
.record-detail-body .share-watermark-type {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-size: 8rem;
    font-weight: 900;
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
    white-space: nowrap;
}

.record-detail-body .share-watermark-type.income {
    color: #28a745;
}

.record-detail-body .share-watermark-type.expense {
    color: #dc3545;
}

.record-detail-body .share-watermark-date {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.1;
    transform: rotate(15deg);
    z-index: 0;
    pointer-events: none;
    color: #666;
}

.record-detail-body .share-watermark-time {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.1;
    transform: rotate(-15deg);
    z-index: 0;
    pointer-events: none;
    color: #666;
    white-space: nowrap;
}

/* 确保水印容器与分享记录完全一致 */
.record-detail-body .share-ticket {
    position: relative;
    overflow: hidden;
}

/* 确保内容在水印上方显示 */
.record-detail-body .share-ticket > * {
    position: relative;
    z-index: 1;
}

/* 分享预览容器 */
#share-image-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.share-preview-container {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    width: 500px;
}

.share-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.share-preview-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #444;
}

.share-preview-content {
    padding: 1.5rem;
    overflow-y: auto;
    background: #f8f9fa;
    flex: 1;
}

.share-preview-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid #eee;
    background: white;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.share-preview-footer .btn {
    flex: 1;
    max-width: 180px;
}

/* 分享票据样式 */
.share-ticket {
    width: 100%;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: 2px solid #f0f0f0;
    margin: 0 auto;
    max-width: 400px;
}

.share-ticket-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.share-ticket-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.share-ticket-content {
    padding: 2rem;
    background: white;
}

.share-ticket-amount {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px dashed #eee;
}

.share-ticket-amount.income {
    color: #28a745;
}

.share-ticket-amount.expense {
    color: #dc3545;
}

.share-amount-symbol {
    font-size: 2rem;
    font-weight: 700;
}

.share-amount-value {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.share-ticket-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.share-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.share-detail-item:hover {
    background: #e9ecef;
}

.share-detail-label {
    font-weight: 600;
    color: #666;
    flex-shrink: 0;
}

.share-detail-value {
    color: #333;
    font-weight: 500;
    text-align: right;
    flex: 1;
    margin-left: 1rem;
    word-break: break-word;
}

.share-ticket-footer {
    background: #f8f9fa;
    padding: 1.5rem;
    text-align: center;
    border-top: 2px dashed #eee;
}

.share-ticket-footer p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* 水印样式 */
.share-watermark-type {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-size: 8rem;
    font-weight: 900;
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
    white-space: nowrap;
}

.share-watermark-type.income {
    color: #28a745;
}

.share-watermark-type.expense {
    color: #dc3545;
}

.share-watermark-date {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.1;
    transform: rotate(15deg);
    z-index: 0;
    pointer-events: none;
    color: #666;
}

.share-watermark-time {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.1;
    transform: rotate(-15deg);
    z-index: 0;
    pointer-events: none;
    color: #666;
    white-space: nowrap;
}

/* 日均价样式 */
.record-daily-average {
    font-size: 0.8rem;
    color: #999;
}

/* 平台管理样式 */
.platforms-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.platform-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.platform-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.platform-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.platform-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.platform-name {
    font-weight: 500;
    color: #333;
}

/* 平台徽章样式 */
.platform-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
}

/* 颜色选择器样式 */
.color-picker {
    display: flex;
    align-items: center;
}

.color-picker input[type="color"] {
    width: 50px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* 记录头部样式 */
.record-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .app-container {
        max-width: 100%;
    }

    .navbar {
        padding: 1rem;
    }

    .navbar-nav {
        gap: 0.5rem;
    }

    .nav-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .main-content {
        padding: 1rem;
    }

    .balance-amount {
        font-size: 1.5rem;
    }

    /* 保持首页统计卡片在移动端和PC端一致的布局 */
    .balance-cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    /* 确保统计卡片在移动端也能正常显示 */
    .balance-card {
        min-height: auto;
    }

    .quick-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .stats-overview {
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .record-detail-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-label {
        width: auto;
        margin-bottom: 0.25rem;
    }

    .detail-value {
        text-align: left;
    }

    .record-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    /* 调整月度统计在移动端的显示 */
    .monthly-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}