/* ========== 全局变量 ========== */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --success-color: #2ecc71;
    --success-dark: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --text-color: #2c3e50;
    --light-text: #7f8c8d;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --border-radius: 12px;
    --box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ========== 主内容区域 ========== */
.main-content {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-top: 20px;
}

.content-wrapper {
    padding: 30px;
}

/* ========== 卡片样式 ========== */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header i {
    font-size: 20px;
}

.card-header h3 {
    margin: 0;
    font-size: 18px;
}

.card-body {
    padding: 20px;
}

/* ========== 表单样式 ========== */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.form-group {
    flex: 1 1 300px;
    padding: 0 10px;
    margin-bottom: 20px;
}

.form-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
    height: 100%;
}

.form-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.required::after {
    content: " *";
    color: var(--danger-color);
}

input[type="number"], select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: var(--transition);
    background-color: white;
}

input[type="number"]:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-text);
}

.input-hint {
    font-size: 12px;
    color: var(--light-text);
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ========== 按钮样式 ========== */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--success-color), var(--success-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.btn-secondary {
    background: #3498DB !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    border: none;
    padding: 12px 24px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: #2980B9 !important;  /* 鼠标悬停时稍微深一点 */
    box-shadow: 0 6px 18px rgba(52, 152, 219, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* ========== 提示框 ========== */
.tip-box {
    background-color: #fff8e1;
    border-left: 4px solid var(--warning-color);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.tip-box i {
    color: var(--warning-color);
    font-size: 20px;
}

.info-box {
    background: linear-gradient(135deg, #e8f4fd, #d4e6f1);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    border-left: 4px solid var(--primary-color);
}

.info-box h3 {
    margin-top: 0;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.info-box ul {
    margin: 0;
    padding-left: 20px;
}

.info-box li {
    margin-bottom: 8px;
}

/* ========== 养生日历 ========== */
.health-calendar {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-top: 4px solid var(--primary-color);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.solar-term {
    background-color: #f1f8e9;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 3px solid var(--success-color);
}

.solar-term h4 {
    margin: 0 0 5px 0;
    color: var(--success-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========== 天气卡片 ========== */
.weather-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.weather-temp {
    font-size: 48px;
    font-weight: bold;
}

.weather-info-row {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.cloth-suggest {
    background-color: rgba(255,255,255,0.2);
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
}

/* ========== 调理方案 ========== */
.plan-card {
    background: #f8f9fa;
    border-left: 4px solid;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.plan-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 15px;
}

.scene-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.scene-btn {
    padding: 8px 20px;
    background: #f0f0f0;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scene-btn.active {
    background: var(--primary-color);
    color: white;
}

/* ========== 结果展示 ========== */
.result-highlight {
    background-color: rgba(46, 204, 113, 0.1);
    border-left: 4px solid var(--success-color);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.result-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.result-stat-item {
    flex: 1 1 150px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.result-stat-label {
    font-size: 14px;
    color: var(--light-text);
    margin-bottom: 5px;
}

.result-stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.food-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.food-tag {
    background-color: #f1f8e9;
    color: var(--success-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
}

/* ========== 历史记录 ========== */
.history-list {
    margin-top: 20px;
}

.history-item {
    background-color: white;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 3px solid var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s ease;
}

.history-item:hover {
    transform: translateX(5px);
}

.history-info {
    flex: 1;
}

.history-date {
    color: var(--light-text);
    font-size: 13px;
    margin-bottom: 5px;
}

.history-type {
    font-weight: 600;
    color: var(--primary-dark);
}

.history-actions {
    margin-left: 15px;
    display: flex;
    gap: 10px;
}

.history-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.history-btn:hover {
    color: var(--primary-dark);
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

.badge-balanced {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.badge-imbalanced {
    background-color: #fff3e0;
    color: #e65100;
}

/* ========== 体质知识卡片 ========== */
.constitution-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.constitution-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: var(--transition);
    cursor: pointer;
}

.constitution-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.constitution-card-header {
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.constitution-card-body {
    padding: 15px;
}

.constitution-card-body p {
    margin-bottom: 10px;
    font-size: 14px;
}

/* ========== 传感器指南 ========== */
.sensor-image {
    width: 100%;
    border-radius: 6px;
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.sensor-image:hover {
    transform: scale(1.02);
}

.sensor-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sensor-table th {
    background-color: var(--primary-color);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.sensor-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.sensor-table tr:hover {
    background-color: #f9f9f9;
}

/* ========== 弹窗样式 ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--light-text);
    cursor: pointer;
}

.modal-close:hover {
    color: var(--danger-color);
}

.modal-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.modal-title {
    font-size: 24px;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

/* ========== 动画 ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .content-wrapper {
        padding: 20px;
    }

    .form-group {
        flex: 1 1 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .scene-buttons {
        justify-content: center;
    }

    .history-item {
        flex-direction: column;
        text-align: center;
    }

    .history-actions {
        margin-left: 0;
        margin-top: 10px;
        justify-content: center;
    }

    .result-stats {
        flex-direction: column;
    }

    .constitution-cards {
        grid-template-columns: 1fr;
    }
}
/* ========== 天气模块样式 ========== */

/* 天气卡片主容器 */
.weather-main {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 20px;
}

/* 天气头部区域 */
.weather-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eef2f6;
}

.weather-city {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.weather-temp-large {
    font-size: 48px;
    font-weight: 600;
    color: #2c3e50;
    margin: 10px 0;
}

.weather-temp-large .temp-unit {
    font-size: 20px;
    font-weight: 400;
    color: #7f8c8d;
}

.weather-condition {
    font-size: 16px;
    color: #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* 天气详情网格 */
.weather-details {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 15px 0;
    background: #f8f9fa;
    border-radius: 10px;
}

.weather-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.weather-detail-item i {
    font-size: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.detail-label {
    font-size: 11px;
    color: #95a5a6;
}

.detail-value {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

/* 穿衣建议区域放大 */
.cloth-suggestion {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
}

.suggestion-header {
    font-size: 20px !important;  /* 标题放大 */
    font-weight: bold;
    margin-bottom: 10px;
    color: #e67e22 !important;
}

.suggestion-content {
    font-size: 20px !important;  /* 内容放大 */
    line-height: 1.5 !important;  /* 行高增加，更易读 */
    color: #2c3e50 !important;
}
/* 天气主区域的文字也适当放大 */
.weather-main {
    font-size: 20px;
}

.weather-temp-large .temp-value {
    font-size: 50px;  /* 温度数字保持大号 */
}

.weather-detail-item .detail-label {
    font-size: 18px;
}

.weather-detail-item .detail-value {
    font-size: 20px;
    font-weight: bold;
}
/* 错误状态 */
.weather-error {
    text-align: center;
    padding: 30px;
    color: #e74c3c;
}

.weather-error i {
    font-size: 40px;
    margin-bottom: 10px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .weather-details {
        flex-direction: column;
        gap: 12px;
    }

    .weather-detail-item {
        justify-content: center;
    }

    .weather-temp-large {
        font-size: 36px;
    }
}
/* 香薰区域样式优化 */
.scent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.scent-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 0;
}

.scent-card strong {
    font-size: 16px;
    color: #2c6e2c;
}

.scent-card .effect-tag {
    font-size: 13px;
    color: #e67e22;
    background: #fff3e0;
    padding: 2px 10px;
    border-radius: 20px;
}

.scent-card p {
    font-size: 15px !important;
    color: #444;
    line-height: 1.6 !important;
    margin-top: 8px;
    margin-bottom: 0;
}
