/* 日历页面样式 */

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9e7; /* 米黄色背景 */
    height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.main-content {
    flex: 1;
    overflow-y: auto;
}

/* 顶部日期导航 */
.date-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px;
    position: relative;
}

.date-display {
    margin: 0 auto;
    font-size: 18px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
}

.back-btn {
    position: absolute;
    left: 16px;
    color: #333;
    font-size: 20px;
}

/* 日期大数字显示 */
.date-number {
    font-size: 120px;
    font-weight: 300;
    color: #333;
    text-align: center;
    line-height: 1;
    margin: 0;
    padding: 0;
}

/* 农历日期显示 */
.lunar-date {
    text-align: center;
    color: #333;
    font-size: 16px;
    margin-top: -10px;
    letter-spacing: 2px;
}

/* 宜忌区域 */
.yi-ji-container {
    margin: 20px 16px;
    border: 1px solid #e0d8c0;
    border-radius: 12px;
    background-color: white;
    position: relative;
}

.yi-ji-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background-image: url('../images/calendar/corner-tl.png');
    background-size: contain;
    background-repeat: no-repeat;
}

.yi-ji-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background-image: url('../images/calendar/corner-tr.png');
    background-size: contain;
    background-repeat: no-repeat;
    transform: rotate(90deg);
}

.corner-bl {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background-image: url('../images/calendar/corner-bl.png');
    background-size: contain;
    background-repeat: no-repeat;
    transform: rotate(-90deg);
}

.corner-br {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background-image: url('../images/calendar/corner-br.png');
    background-size: contain;
    background-repeat: no-repeat;
    transform: rotate(180deg);
}

.yi-item, .ji-item {
    display: flex;
    align-items: center;
    padding: 10px 10px;
}

.yi-circle, .ji-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.yi-circle {
    background-color: #43793e; /* 绿色 */
}

.ji-circle {
    background-color: #b1301e; /* 红色 */
}

.divider {
    height: 1px;
    background-color: #e0d8c0;
    margin: 0 16px;
}

/* 信息表格 */
.info-table {
    margin: 20px 16px;
    border-collapse: collapse;
    width: calc(100% - 32px);
    border: 1px solid #e0d8c0;
    background-color: white;
}

.info-table td {
    border: 1px solid #e0d8c0;
    padding: 10px;
    text-align: center;
}

.info-table .header {
    color: #b1301e;
    font-weight: bold;
    border-bottom: 1px solid #e0d8c0;
}

.info-table .content {
    padding: 8px 4px;
}

/* 时辰吉凶表 */
.shichen-table {
    margin: 20px 16px;
    border-collapse: collapse;
    width: calc(100% - 32px);
    border: 1px solid #e0d8c0;
    background-color: white;
    table-layout: fixed;
}

.shichen-table td {
    border: 1px solid #e0d8c0;
    text-align: center;
    padding: 8px 0;
    font-size: 14px;
    white-space: nowrap;
}

.shichen-table .shichen {
    writing-mode: vertical-lr;
    text-orientation: upright;
    padding: 8px 0;
    font-size: 12px;
    letter-spacing: 2px;
}

.shichen-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #43793e; /* 绿色为吉 */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 12px;
}

.shichen-icon.bad {
    background-color: #b1301e; /* 红色为凶 */
}

/* 月历区域 */
.calendar-container {
    padding: 0 16px;
}

.weekday-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.weekday {
    width: 14.28%;
    text-align: center;
    color: #777;
    font-size: 14px;
}

.dates-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 0;
}

.date-cell {
    width: 14.28%;
    text-align: center;
    padding: 4px 0;
    position: relative;
}

.date-cell .date-number {
    font-size: 18px;
    color: #333;
    font-weight: normal;
    margin-bottom: 2px;
}

.date-cell .lunar-day {
    font-size: 10px;
    color: #777;
}

.date-cell .festival {
    font-size: 10px;
    color: #b1301e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.date-cell.current {
    position: relative;
}

.date-cell.current .date-number {
    background-color: #b1301e;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto 2px;
}

.date-cell.prev-month .date-number,
.date-cell.prev-month .lunar-day {
    color: #ccc;
}

/* 底部按钮 */
.bottom-buttons {
    display: flex;
    gap: 16px;
    padding: 16px;
    margin-top: 8px;
    margin-bottom: 20px;
}

.bottom-button {
    flex: 1;
    background-color: #b1301e;
    color: white;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
}

/* 响应式调整 */
@media screen and (max-width: 375px) {
    .date-number {
        font-size: 100px;
    }
    
    .date-cell .festival {
        font-size: 9px;
    }
    
    .shichen-table td {
        font-size: 12px;
    }
} 