﻿
/* 基础皮肤与排版 */
body {
    font-family: -apple-system, sans-serif;
    background-color: #f9f9fa;
    margin: 0;
    padding: 15px;
    color: #333;
    padding-bottom: 300px; /* 底部留多点空间给变高的卡片 */
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 400px;
    margin: 0 auto 15px;
}

button.nav-btn {
    border: none;
    background: #ececec;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    color: #555;
}

    button.nav-btn:hover {
        background: #dedede;
    }

/* 日历网格 */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    max-width: 400px;
    margin: 0 auto 15px;
}

.day-header {
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.day-cell {
    background: white;
    border-radius: 8px;
    padding: 10px 0;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    box-sizing: border-box;
    cursor: pointer;
    border: 2px solid transparent;
    border-bottom: 4px solid transparent;
    transition: all 0.2s;
}

/* 五大周期视觉规范 */
.history-period {
    background-color: #ffdde4;
    color: #d9385e;
    border-bottom: 4px solid transparent;
}

.predict-period {
    background-color: rgba(255, 221, 228, 0.4);
    color: #d9385e;
    border-bottom: 4px solid rgba(217, 56, 94, 0.4);
}

.history-follicular {
    border-bottom: 4px solid #8cc63f;
}

.predict-follicular {
    border-bottom: 4px solid rgba(140, 198, 63, 0.4);
}

.history-ovulation {
    border-bottom: 4px solid #9b59b6;
}

.predict-ovulation {
    border-bottom: 4px solid rgba(155, 89, 182, 0.4);
}

.history-luteal {
    border-bottom: 4px solid #f1c40f;
}

.predict-luteal {
    border-bottom: 4px solid rgba(241, 196, 15, 0.4);
}

.history-pms {
    border-bottom: 4px solid #d35400;
}

.predict-pms {
    border-bottom: 4px solid rgba(211, 84, 0, 0.4);
}

.pms-overlay {
    border-bottom: 4px solid #d35400 !important;
}

/* 图例 */
.legend-container {
    display: flex;
    justify-content: space-between;
    max-width: 400px;
    margin: 0 auto 15px;
    font-size: 11px;
    color: #666;
}

.legend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.legend-cell {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 12px;
}

/* 交互状态 */
.today {
    border: 2px solid #333 !important;
}

.selected {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 10;
    border-color: #666;
}

/* 底部详情面板 */
.detail-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
    padding: 15px 20px 25px 20px; /* 底部多加点内边距防遮挡 */
    max-width: 400px;
    margin: 0 auto;
    box-sizing: border-box;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.detail-date {
    font-size: 18px;
    font-weight: bold;
    color: #1a1a1a;
}

/* 动作按钮组 */
.action-group {
    display: flex;
    gap: 10px;
}

.btn-toggle {
    flex: 1;
    border: none;
    padding: 12px 0;
    border-radius: 12px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-on-red {
    background: #fff5f5;
    color: #e53e3e;
    border: 1px solid #fed7d7;
}

.btn-on-orange {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.btn-off {
    background: #f0f0f0;
    color: #888;
}

.btn-toggle:active {
    opacity: 0.8;
}

/* ========== 新增 UI 卡片排版样式 ========== */
.detail-advice-container {
    margin-bottom: 15px;
}

.ui-status-block {
    background-color: #fff9f5;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid #ffeadd;
}

.ui-status-title {
    font-size: 15px;
    font-weight: bold;
    color: #c05621;
    display: block;
    margin-bottom: 4px;
}

.ui-status-desc {
    font-size: 13px;
    color: #4a5568;
    display: block;
}

.ui-metrics-block {
    padding: 0 4px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #4a5568;
}

.ui-advice-box {
    background-color: #f4f7f6;
    border-left: 4px solid #319795;
    border-radius: 4px 10px 10px 4px;
    padding: 10px 12px;
}

.ui-advice-header {
    font-size: 14px;
    font-weight: bold;
    color: #234e52;
    display: block;
    margin-bottom: 4px;
}

.ui-advice-body {
    font-size: 13px;
    color: #2d3748;
    display: block;
    line-height: 1.5;
}

.ui-advice-warning {
    font-size: 12px;
    color: #dd6b20;
    display: block;
    line-height: 1.5;
    font-weight: bold;
    margin-top: 6px;
}

.ui-overlay-warning {
    margin-top: 10px;
    background-color: #fff5f5;
    border-left: 4px solid #e53e3e;
    border-radius: 4px 10px 10px 4px;
    padding: 10px 12px;
}
/* ========================================== */



