/* 断食记录页面专用样式 */

.fasting-main {
    max-width: 800px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fasting-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.fasting-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #e65100; /* 使用橙色调 */
    border-left: 4px solid #ff9800;
    padding-left: 10px;
}

/* 输入表单样式 */
.fasting-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: bold;
    color: #555;
}

.form-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

/* 统计卡片样式 */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    background: #fff3e0;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.stat-item .label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-item .value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e65100;
}

/* 历史列表样式 */
.fasting-logs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fasting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #fff;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.fasting-item:hover {
    background-color: #fafafa;
}

.fasting-info {
    flex: 1;
}

.fasting-time {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 4px;
}

.fasting-duration {
    font-weight: bold;
    color: #e65100;
}

.fasting-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.btn-icon:hover {
    opacity: 1;
}

.empty-tip {
    text-align: center;
    color: #999;
    padding: 20px;
}

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

.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* 按钮样式 */
.btn-start {
    background-color: #ef6c00;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-start:hover {
    background-color: #e65100;
}

.btn-save {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    flex: 1;
}

.btn-save:hover {
    background-color: #43a047;
}

.btn-cancel {
    background-color: #9e9e9e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    flex: 1;
}

.btn-cancel:hover {
    background-color: #757575;
}
