* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

:root {
    --primary-color: #22c55e;
    --secondary-color: #16a34a;
    --accent-color: #10b981;
    --orange-color: #f9941a;
    --dark-color: #111827;
    --light-color: #f9fafb;
    --gray-color: #6b7280;
    --green-light: #dcfce7;
    --green-dark: #059669;
    --border-radius: 12px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 头部样式 */
.health-header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 0 auto;
}

.back-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--dark-color);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.header-content h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.header-right {
    width: 40px;
}

/* 主内容区 */
.health-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* 介绍区域 */
.intro-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.intro-content {
    max-width: 800px;
    margin: 0 auto;
}

.intro-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
}

.intro-description {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
}

/* 区域标题 */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 20px;
    padding: 20px 20px 0;
}

.section-title i {
    color: var(--primary-color);
    font-size: 20px;
}

/* 服务项目 */
.services-section {
    background-color: white;
    padding: 15px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.service-item {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
    border-color: var(--primary-color);
}

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin: 0 auto 15px;
    transition: all 0.3s ease;
}

.service-item:hover .service-icon {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.service-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.service-desc {
    font-size: 14px;
    color: var(--gray-color);
    margin-bottom: 15px;
    line-height: 1.5;
    min-height: 45px;
}

.service-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

/* 游戏/计算器卡片网格 */
.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* 确保在移动设备上也是2列布局 */
@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* 游戏/计算器卡片 */
.game-card {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.game-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: all 0.3s ease;
}

.game-card:hover .game-icon {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.game-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.game-card p {
    font-size: 14px;
    color: var(--gray-color);
    margin: 0;
    line-height: 1.4;
}

/* 健康资讯 */
.news-section {
    background-color: var(--light-color);
    padding: 0 20px 30px;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    gap: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.news-image {
    width: 120px;
    height: 100%;
    flex-shrink: 0;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-excerpt {
    font-size: 13px;
    color: var(--gray-color);
    line-height: 1.5;
    margin-bottom: auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--gray-color);
}

.news-date,
.news-category {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 预约咨询 */
.contact-section {
    background-color: white;
    padding: 0 20px 30px;
}

.contact-content {
    background-color: var(--green-light);
    border-radius: var(--border-radius);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--dark-color);
}

.contact-item i {
    color: var(--primary-color);
    font-size: 18px;
}

.contact-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
}

/* 模态框 */
.modal, .game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 200;
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal.show, .game-modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray-color);
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--dark-color);
}

.modal-body {
    padding: 20px;
}

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

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

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
}

/* 结果等级样式 */
.result-level {
    transition: all 0.3s ease;
}

.level-excellent {
    background: #e8f5e9;
    color: #2e7d32;
}

.level-good {
    background: #e3f2fd;
    color: #1565c0;
}

.level-fair {
    background: #fff3e0;
    color: #ef6c00;
}

.level-poor {
    background: #ffebee;
    color: #c62828;
}

/* 优先级样式 */
.priority {
    font-weight: 500;
}

.priority-high {
    background: #ffcdd2;
    color: #c62828;
}

.priority-medium {
    background: #ffe0b2;
    color: #ef6c00;
}

.priority-low {
    background: #c8e6c9;
    color: #2e7d32;
}

/* 心血管风险等级样式 */
.risk-low {
    background: #d5edda;
    color: #155724;
}

.risk-moderate {
    background: #fff3cd;
    color: #856404;
}

.risk-high {
    background: #f8d7da;
    color: #721c24;
}

.risk-very-high {
    background: #721c24;
    color: white;
}

/* 颈椎放松操样式 */
.neck-exercise-container {
    text-align: center;
    margin-bottom: 25px;
}

.neck-exercise-image {
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    background: white;
}

.neck-exercise-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.exercise-dot {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.exercise-dot:hover {
    transform: scale(1.3) !important;
}

.neck-exercise-image-loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(0.98);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.02);
    }
}

.neck-exercise-tips {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    display: inline-block;
    margin: 8px 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .health-main {
        padding: 0;
    }

    .intro-section {
        padding: 30px 15px;
    }

    .intro-title {
        font-size: 20px;
    }

    .intro-description {
        font-size: 13px;
    }

    .section-title {
        padding: 20px 15px 0;
        font-size: 16px;
    }

    .services-section,
    .news-section,
    .contact-section {
        padding:15px;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

    .service-item {
        padding: 20px 15px;
    }

    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .service-name {
        font-size: 16px;
    }

    .service-desc {
        font-size: 13px;
    }

    .service-price {
        font-size: 18px;
    }

    .news-item {
        flex-direction: column;
    }

    .news-image {
        width: 100%;
        height: 150px;
    }

    .contact-content {
        padding: 20px;
    }

    .contact-item {
        font-size: 13px;
    }

    .modal-content {
        width: 95%;
        margin: 10px;
    }
}

@media (max-width: 480px) {

    .section-title {
        font-size: 15px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .service-item {
        padding: 15px 10px;
    }

    .service-name {
        font-size: 14px;
    }

    .service-desc {
        font-size: 12px;
        min-height: 40px;
    }

    .service-price {
        font-size: 16px;
    }

    .news-title {
        font-size: 14px;
    }

    .news-excerpt {
        font-size: 12px;
    }

    .news-meta {
        font-size: 11px;
        gap: 10px;
    }

    .contact-btn {
        font-size: 14px;
        padding: 10px 25px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
        font-size: 13px;
    }

    .submit-btn {
        padding: 12px;
        font-size: 14px;
    }
}
