:root {
    --primary-color: #306692;
    --text-color: #333;
    --white: #fff;
    --border-color: #ddd;
    --item-hover: #f5f5f5;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f8f8f8;
    -webkit-tap-highlight-color: transparent;
}

.top-nav {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 15px 0;
    font-size: 18px;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 100;
}

.content {
    flex: 1;
    padding-bottom: 60px;
}

/* 日期选择器 */
.date-selector {
    display: flex;
    background-color: var(--primary-color);
    padding: 15px 0;
    position: relative;
    overflow: hidden;
}

.date-picker {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    height: 120px;
}

.date-picker::before, .date-picker::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 45px;
    background: linear-gradient(to bottom, 
        rgba(48, 102, 146, 1) 0%, 
        rgba(48, 102, 146, 0.7) 50%, 
        rgba(48, 102, 146, 0) 100%);
    z-index: 2;
    pointer-events: none;
}

.date-picker::before {
    top: 0;
    transform: rotate(180deg);
}

.date-picker::after {
    bottom: 0;
}

.date-picker ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
}

.date-picker ul::-webkit-scrollbar {
    display: none;
}

.date-picker li {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 17px;
    transition: all 0.2s;
}

.date-picker li.selected {
    color: var(--white);
    font-size: 18px;
    font-weight: bold;
}

.date-picker-highlight {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 40px;
    transform: translateY(-50%);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

/* 账单列表 */
.bill-list {
    padding: 15px;
}

.bill-day {
    margin-bottom: 20px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
}

.day-header {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    background-color: #f0f0f0;
    font-weight: bold;
}

.day-total {
    color: var(--primary-color);
}

.bill-item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    transition: background-color 0.2s;
}

.bill-item:last-child {
    border-bottom: none;
}

.bill-item:hover {
    background-color: var(--item-hover);
}

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e6f2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--primary-color);
    font-size: 18px;
}

.bill-info {
    flex: 1;
}

.bill-title {
    font-weight: 500;
    margin-bottom: 3px;
}

.bill-time {
    font-size: 14px;
    color: #888;
}

.bill-amount {
    font-weight: bold;
    color: #e74c3c;
}

.bill-amount.income {
    color: #2ecc71;
}

.no-bills {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 16px;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: var(--white);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    min-width: 60px;
    text-align: center;
}

.nav-item.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 3px;
}
/* 选中日期的账单样式 */
.selected-day {
    background-color: #f8fafc;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

/* 历史账单容器 */
.history-bills {
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* 无账单提示样式 */
.no-bills-content {
    text-align: center;
    padding: 20px;
    color: #888;
}

.no-bills-content i {
    font-size: 40px;
    color: #ddd;
    margin-bottom: 10px;
}

.no-history {
    text-align: center;
    padding: 20px;
    color: #888;
}


/* 响应式调整 */
@media (min-width: 768px) {
    body {
        max-width: 500px;
        margin: 0 auto;
        box-shadow: 0 0 20px rgba(0,0,0,0.1);
    }
    
    .bottom-nav {
        max-width: 500px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .content {
        overflow-y: auto;
        max-height: calc(100vh - 60px);
    }
}
