
/* 基础重置和全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #1a1a2e;
    color: #fff;
    overflow-x: hidden;
}

/* 背景效果 */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(135deg, #1a1a2e 0%, #2a1a3a 100%);
}

.lamp-light {
    position: fixed;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255,200,150,0.15) 0%, rgba(255,200,150,0) 70%);
    pointer-events: none;
    z-index: 2;
}

.content-wrapper {
    position: relative;
    z-index: 3;
    width: 100%;
}

/* 导航样式 */
nav {
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,200,150,0.5);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ff9776;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* 首页样式 */
#home {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 5%;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: #ff9776;
    animation: bounce 2s infinite;
    will-change: transform;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-30px); }
    60% { transform: translateY(-15px); }
}

/* 主要内容 */
.main-content {
    padding: 4rem 5%;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 0;
    position: relative;
}

.section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 2px;
    background: linear-gradient(to right, transparent, #ff9776, transparent);
}

/* 标题样式 */
.title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    font-weight: 700;
    background: linear-gradient(45deg, #ff69b4, #ff9776, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 300% 300%;
    animation: gradientShift 5s ease infinite;
    will-change: background-position;
}

h2.title {
    font-size: 3rem;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

/* 卡片样式 */
.card {
    width: 300px;
    background: rgba(255, 255, 255, 0.7);
    padding: 15px;
    display: inline-block;
    margin: 10px 8px 0 0;
    border: 2px solid transparent;
    border-radius: 15px 0px 15px 0px;
    overflow: hidden;
    padding: 5px;
    transition: all 0.5s ease;
    will-change: transform, box-shadow;
}

.card:hover {
    box-shadow: 0 10px 20px rgba(255, 151, 118, 0.2);
    transform: translateY(-15px);
}

.card:hover img {
    transform: scale(1.2);
    transition: all 0.5s ease;
    border-radius: 15px;
}

.card .imge {
    box-shadow: 0px 0px 10px #ff5858;
    padding: 5px;
    width: 290px;
    border-radius: 5px;
    overflow: hidden;
}

.card img {
    width: 100%;
    transition: all 0.5s ease;
    border-radius: 5px;
}

.card h5 {
    margin: 20px;
    color: #000000;
    font-size: 20px;
    text-align: center;
}

.card p {
    font-size: 15px;
    color: #616161;
    margin: 5px 0 15px 0;
    text-align: center;
}

/* CTA按钮 */
.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(45deg, #ff9776, #ff7676);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 151, 118, 0.3);
    will-change: transform, box-shadow;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 151, 118, 0.4);
}

/* 心形动画容器 */
.floating-hearts {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* 服务卡片容器 */
.JM-pol {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* 服务卡片 */
.service-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    will-change: transform, box-shadow;
    flex: 1 1 300px;
    max-width: 400px;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 151, 118, 0.2);
}

.service-icon {
    font-size: 2.5rem;
    color: #ff9776;
    margin-bottom: 1rem;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ff9776;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    will-change: opacity, visibility;
}

.back-to-top:hover {
    background: #ff7676;
}

/* 优化：添加show类代替直接修改样式 */
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* 加载屏幕 */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f0f1e;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    gap: 50px;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* 加载完成后的状态 */
#loading-screen.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* 心跳动画 */
.beating-heart {
    position: relative;
    width: 100px;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff9776'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") no-repeat center/contain;
    animation: heartBeat 1.2s infinite;
    will-change: transform;
}

.beating-heart::before,
.beating-heart::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff6b81'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") no-repeat center/contain;
    animation: orbit 3s linear infinite;
    will-change: transform, opacity;
}

.beating-heart::before {
    top: -30px;
    left: 40px;
    animation-delay: 0s;
}

.beating-heart::after {
    bottom: -30px;
    right: 40px;
    animation-delay: 1.5s;
}

.beating-heart span {
    position: absolute;
    width: 15px;
    height: 15px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2370a1ff'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") no-repeat center/contain;
    animation: orbit 4s linear infinite;
    will-change: transform, opacity;
}

.beating-heart span:nth-child(1) {
    top: 10px;
    left: -25px;
    animation-delay: 0.5s;
}

.beating-heart span:nth-child(2) {
    top: 10px;
    right: -25px;
    animation-delay: 2s;
}

@keyframes heartBeat {
    0% { transform: scale(0.95); }
    5% { transform: scale(1.1); }
    39% { transform: scale(0.85); }
    45% { transform: scale(1); }
    60% { transform: scale(0.95); }
    100% { transform: scale(0.9); }
}

@keyframes orbit {
    0% {
        transform: rotate(0deg) translateX(50px) rotate(0deg);
        opacity: 0.7;
    }
    50% { opacity: 1; }
    100% {
        transform: rotate(360deg) translateX(50px) rotate(-360deg);
        opacity: 0.7;
    }
}

/* ECG进度条 */
.ecg-progress-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
}

.ecg-progress {
    width: 350px;
    height: 70px;
    position: relative;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ff9776;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(255, 151, 118, 0.3);
    overflow: hidden;
}

.ecg-container {
    width: 300px;
    height: 40px;
    position: relative;
    overflow: hidden;
}

.ecg-line {
    width: 100%;
    height: 2px;
    background: #ff9776;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
}

.ecg-wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,151,118,0) 0%, rgba(255,151,118,1) 50%, rgba(255,151,118,0) 100%);
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='40' viewBox='0 0 600 40'%3E%3Cpath d='M0,20 L50,20 L55,5 L60,20 L65,35 L70,20 L120,20 L125,15 L130,20 L135,25 L140,20 L190,20 L195,5 L200,20 L205,35 L210,20 L260,20 L265,15 L270,20 L275,25 L280,20 L330,20 L335,5 L340,20 L345,35 L350,20 L400,20 L405,15 L410,20 L415,25 L420,20 L470,20 L475,5 L480,20 L485,35 L490,20 L540,20 L545,15 L550,20 L555,25 L560,20 L600,20' stroke='white' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    mask-size: 600px 40px;
    mask-repeat: repeat-x;
    animation: ecgWaveMove 1.5s linear infinite;
    will-change: background-position;
}

.ecg-container span {
    position: absolute;
    width: 3px;
    background: #ff9776;
    opacity: 0.8;
    animation: ecgSpike 1.5s ease-in-out infinite;
    will-change: height, opacity;
}

.ecg-container span:nth-child(1) {
    left: 40px;
    top: 50%;
    height: 30px;
    transform: translateY(-50%);
    animation-delay: 0s;
}

.ecg-container span:nth-child(2) {
    left: 190px;
    top: 50%;
    height: 30px;
    transform: translateY(-50%);
    animation-delay: 0.75s;
}

.ecg-container span:nth-child(3) {
    left: 340px;
    top: 50%;
    height: 30px;
    transform: translateY(-50%);
    animation-delay: 1.5s;
}

.progress-text {
    color: #ff9776;
    font-size: 14px;
    margin-top: 5px;
    letter-spacing: 2px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes ecgWaveMove {
    0% { background-position: -300px 0; }
    100% { background-position: 0 0; }
}

@keyframes ecgSpike {
    0%, 100% { height: 0; opacity: 0; }
    25% { height: 30px; opacity: 1; }
    75% { height: 10px; opacity: 0.5; }
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* 统计部分 */
#stats {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 3rem 0;
    margin-top: 2rem;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    transition: all 0.3s ease;
    will-change: transform;
}

.stat-item:hover {
    transform: translateY(-10px);
}

.stat-icon {
    font-size: 3rem;
    color: #ff9776;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.chart-container {
    width: 100%;
    max-width: 600px;
    margin: 2rem auto 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(26, 26, 46, 0.95);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        clip-path: circle(0% at 100% 0);
        transition: all 0.5s ease-out;
        will-change: clip-path;
    }

    .nav-links.active {
        clip-path: circle(150% at 100% 0);
    }

    .hamburger {
        display: block;
    }

    .title {
        font-size: 3rem;
    }
    
    .JM-pol {
        flex-direction: column;
        align-items: center;
    }
    
    .service-card {
        max-width: 100%;
    }
}

/* 添加心形动画样式 */
.heart {
    position: fixed;
    bottom: -50px;
    width: 20px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff9776'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") no-repeat center/contain;
    pointer-events: none;
    z-index: 9999;
    will-change: transform, opacity;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}