/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}
body {
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}
a {
    text-decoration: none;
    color: #ff6b6b;
}
a:hover {
    color: #ff4949;
}

/* 头部导航 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 0;
    margin-bottom: 20px;
}
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 20px;
    font-weight: bold;
    color: #ff6b6b;
}
.nav-menu a {
    margin-left: 20px;
}

/* 表单样式 */
.form-box {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    max-width: 500px;
    margin: 0 auto;
}
.form-title {
    text-align: center;
    margin-bottom: 20px;
    color: #ff6b6b;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}
.form-control:focus {
    outline: none;
    border-color: #ff6b6b;
}
.btn {
    display: inline-block;
    width: 100%;
    padding: 12px;
    background: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}
.btn:hover {
    background: #ff4949;
}
.tips {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}
.error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}
.success {
    color: #28a745;
    font-size: 14px;
    text-align: center;
    margin-bottom: 15px;
}

/* 日历样式 */
.calendar-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: 20px;
}
.calendar-header {
    text-align: center;
    margin-bottom: 15px;
}
.calendar-header p {
    color: #ff6b6b;
    font-size: 14px;
    margin-top: 5px;
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin: 10px 0;
}
.calendar-day {
    padding: 8px 3px; /* 减少内边距 */
    text-align: center;
    border: 1px solid #eee;
    border-radius: 4px;
    min-height: 50px; /* 日期块高度从60px缩到50px，适配小文字 */
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.day-label {
    background: #ff6b6b;
    color: white;
    font-weight: bold;
    font-size: 12px; /* 星期标签也略小 */
}
.date-item {
    cursor: pointer;
    transition: all 0.2s;
}
.date-item.today {
    border: 2px solid #ff6b6b;
    font-weight: bold;
}
.date-item:hover {
    background: #f5f5f5;
}
.recorded {
    background: #ffecec;
    color: #d9534f;
    font-weight: 500;
}
.predict-period {
    background: #fff8e6;
    border-color: #ffcc00;
}
.predict-ovulation {
    background: #f3e5f5;
    border-color: #9c27b0;
}
.today {
    border: 2px solid #ff6b6b;
}
.tip-tag {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    padding: 1px 3px;
    border-radius: 3px;
}
.period-tag {
    color: #ff9800;
    font-size: 10px; /* 从12px缩到10px */
    margin-top: 3px; /* 间距从5px缩到3px */
    display: block;
    line-height: 1.2;
}
.ovulation-tag {
    color: #9c27b0;
    font-size: 10px; /* 从12px缩到10px */
    margin-top: 3px; /* 间距从5px缩到3px */
    display: block;
    line-height: 1.2;
}
.calendar-tips {
    margin-top: 15px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* 图表样式 */
.chart-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: 20px;
}

/* 原有样式保留，新增/修改这行 */
.month-switch {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 5px; /* 新增：按钮之间的间距 */
}
/* 可选：调整当前年月的字体大小，避免遮挡 */
.current-month {
    font-size: 16px; /* 从18px改为16px，更紧凑 */
    font-weight: 500;
    color: #ff6b6b;
    min-width: 100px; /* 新增：固定宽度，防止布局跳动 */
    text-align: center;
}