body {
    background-color: #163160;
}

.BOX1 {
    height: 8%;
    background-color: #163160;
}

.nav {
    height: 60%;
    width: 100%;
    list-style: none;
    display: flex;
    margin-top: -15px;
    margin-left: 370px;
}

.nav-item {
    margin: 10px;
    color: #ffffff;
    text-decoration: none;
    display: block;
    padding: 0px 0px;
    margin-bottom: 0px;
    display: flex;
}

.nav-link1 {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    padding: 4px 6px;
    display: inline-block;
    background-color: #031c47;

}

.nav-link2 {
    color: #ffffff;
    text-decoration: none;
    display: block;
    padding: 4px 6px;
}

.nav-link3 {
    color: #ffffff;
    text-decoration: none;
    display: block;
    padding: 4px 6px;
}

.nav-link2:hover {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    font-size: 17px;
    font-weight: 700;
    background-color: #163160;
}

.nav-link3:hover {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    font-size: 17px;
    font-weight: 700;
    background-color: #163160;
}

.BOX2 {
    height: 90%;
    margin-top: -17px;
    background-color: #163160
}

.BOX2-1 {
    height: 60%;
    width: 100%;
    display: flex;
}

.BOX2-1-1 {
    height: 100%;
    width: 30%;
}

.BOX2-1-1-1 {
    height: 40%;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0px 2px 10px #3c5b61;
    border-radius: 12px;
    display: flex;
}

#smokingBar {
    width: 100%;
    height: 230px;
    margin-left: -80px;
}

.chart-container {
    width: 100%;
    height: 220px;
    border-radius: 8px;
}

.BOX2-1-1-1 img {
    position: relative;
    width: 40px;
    height: 40px;
}

.BOX2-1-1-1 .a {
    top: -3px;
    left: -1px;
}

.BOX2-1-1-1 .b {
    top: -8px;
    left: 295px;
}

.BOX2-1-1-1 .c {
    top: 182px;
    left: -81px;
}

.p1 {
    color: #e1dbdb;
    padding: 15px 15px;
    padding-bottom: 20px;
    margin-right: 10px;
    margin-bottom: 20px;
    margin-top: -40px;
}

.BOX2-1-1-2 {
    height: 60%;
    width: 96%;
    box-shadow: 0 2px 10px #3c5b61;
    border-radius: 12px;
    position: relative;
}

.BOX2-1-1-2 img {
    position: relative;
    width: 40px;
    height: 40px;
}

.BOX2-1-1-2 .a {
    top: -1px;
    left: -1px;
}

.BOX2-1-1-2 .b {
    top: -7px;
    left: 290px;
}

.BOX2-1-1-2 .c {
    top: 215px;
    left: -44px;
}

.BOX2-1-1-2 .d {
    top: 220px;
    left: 202px;
}

#miniProductionChart {
    width: 300px;
    height: 250px;
    border-radius: 12px;
    margin-top: -42px;
    margin-left: 10px;
}

#heatMapContainer {
    height: 100%;
    width: 40%;
    padding-top: 5px;
    margin: 10px 10px;
}

.lung-section {
  display: flex;
  gap: 20px; 
  width: 100%;
  max-width: 1200px; 
  margin: 0 auto;
}

.lung-card {
  width: 33.33%; 
  height: auto;
  padding: 10px;
  box-sizing: border-box;
  position: relative;
  margin-top: 30px;
  margin-bottom: 50px;
}

.lung-img {
  width: 100%; 
  height: auto; 
  transform-origin: center center; 
  max-width: 290px; 
}

.lung-img {
  animation: breath 4s ease-in-out infinite;
}

.lung-card:nth-child(2) .lung-img {
  animation-delay: 0.4s;
}
.lung-card:nth-child(3) .lung-img {
  animation-delay: 0.8s;
}

@keyframes breath {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.07); 
  }
  100% {
    transform: scale(1);
  }
}



.BOX2-1-2-2 {
    text-align: center;
    position: relative;
    padding-top: 130px;
    display: flex;
}

.BOX2-1-2-2 img {
    width: 35%;
    position: relative;
    left: 5px;
    top: -130px;
}

.stats {
    color: white;
    margin-bottom: 20px;
    font-size: 16px;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.cigarette {
    position: relative;
    width: 200px;
    height: 20px;
    background: linear-gradient(to right, #f5f5f5 20%, #d4a574 60%, #d4a574 85%, #8b4513 85%);
    border-radius: 10px;
    margin: 50px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.burning-tip {
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    background: radial-gradient(circle, #ff6b35, #ff4500, #8b0000);
    border-radius: 50%;
    animation: glow 1s infinite alternate;
    box-shadow: 0 0 10px #ff4500, 0 0 20px #ff4500;
}

@keyframes glow {
    0% {
        opacity: 0.7;
        transform: translateY(-50%) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateY(-50%) scale(1.1);
    }
}

.smoke-particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.smoke-particle:hover {
    opacity: 1;
    transform: scale(1.2);
    box-shadow: 0 0 10px currentColor;
}

.warning {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #ff6b35;
    font-size: 14px;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1000;
}

.BOX2-1-3 {
    height: 100%;
    width: 30%;
}

.BOX2-1-3-1 {
    padding-top: 15px;
}


#combinedChart {
    width: 350px;
    height: 250px;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 2px 10px #3c5b61;
}

.BOX2-1-3-2 {
    margin-top: 20px;
}

#smokingTrendChart {
    width: 335px;
    height: 220px;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 2px 10px #3c5b61;
}

.cartoon-character {
    position: absolute;
    width: 120px;
    height: auto;
    z-index: 10;
}

.character1 {
    top: 20px;
    right: 20px;
}

.character2 {
    bottom: 40px;
    left: 20px;
}

/* ============================================
   图片版肺部卡通人物
   ============================================ */

.global-lung-character {
    position: fixed;
    width: 85px;
    height: 85px;
    z-index: 9999;
    cursor: pointer;
    pointer-events: all;
    /* 左上角固定定位 */
    top: 20px;
    left: 20px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 图片样式 */
.character-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
}

.global-lung-character:hover .character-image {
    transform: scale(1.08);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* 飞行动画（无旋转） */
.global-lung-character.flying {
    animation: smoothFly 0.5s ease-in-out;
}

@keyframes smoothFly {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

.speech-bubble {
    position: absolute;
    top: 50%;
    left: 95px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #000000;
    border-radius: 15px;
    padding: 14px 18px;
    min-width: 200px;
    max-width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 0 #333333, 0 6px 8px rgba(0, 0, 0, 0.2);
}

.speech-bubble.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.bubble-arrow::before {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #ffffff;
    border: 3px solid #000000;
    border-right: none;
    border-bottom: none;
    transform: translateY(-50%) rotate(-45deg);
}

/* 提示文字 */
.bubble-text {
    margin: 0;
    font-size: 13px;
    color: #000000;
    line-height: 1.5;
    text-align: left;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.bubble-text strong {
    color: #0056b3;
    font-size: 14px;
    display: block;
    margin-bottom: 6px;
}

/* 空闲浮动动画 */
.global-lung-character.idle {
    animation: floatIdle 3s ease-in-out infinite;
}

@keyframes floatIdle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* 模块联动效果 */
[data-lung-character-bound="true"] {
    transition: all 0.3s ease;
    cursor: pointer;
}

[data-lung-character-bound="true"]:hover {
    box-shadow: 0 0 12px rgba(0, 123, 255, 0.3);
}