/* 清除浏览器默认边距 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 整个网页背景 */
body {
  width: 100%;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;

  background-image: url("images/bg.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* 背景上面的灰色透明遮罩 */
.page {
  width: 100%;
  min-height: 100vh;

  background: rgba(0, 0, 0, 0.35);

  position: relative;
}

/* 左侧整体毛玻璃导航栏 */
.side-nav {
  position: fixed;
  left: 45px;
  top: 50%;
  transform: translateY(-50%);

  width: 78px;
  padding: 16px 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;

  border-radius: 42px;

  background: rgba(130, 130, 130, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  border: 1px solid rgba(255, 255, 255, 0.28);

  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);

  z-index: 10;
}

/* 每一个按钮 */
.nav-btn {
  width: 58px;
  height: 58px;

  border: none;
  border-radius: 50%;

  background: transparent;
  color: rgba(255, 255, 255, 0.82);

  font-size: 30px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  line-height: 1;
  transition: 0.2s;
}

/* 鼠标放上去的效果 */
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* 当前选中的按钮 */
.nav-btn.active {
  background: rgba(255, 255, 255, 0.22);
}

/* SVG 图标大小 */
.nav-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  display: block;
}

/* 单独修正房子图标居中 */
.home-btn {
  font-size: 0;
  line-height: 1;
}

.home-btn::after {
  content: "⌂";

  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 42px;
  color: rgba(255, 255, 255, 0.82);

  transform: translateY(-4px);
}

/* 中间大毛玻璃面板 */
.dashboard {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: 83%;
  height: 86vh;

  padding: 48px 54px;

  border-radius: 50px;

  background: rgba(90, 90, 85, 0.38);

  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);

  border: 1px solid rgba(255, 255, 255, 0.25);

  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.18);

  color: white;
}

/* 大标题 */
.dashboard h1 {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
  transform: translateY(-20px);
}

/* 副标题 */
.dashboard > p {
  font-size: 18px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  transform: translateY(-20px);
}

/* 左上空气质量卡片 */
.air-card {
  margin-top: 26px;

  width: 600px;
  height: 600px;

  display: flex;
  align-items: center;
  gap: 34px;

  padding: 32px 38px;

  border-radius: 44px;

  background: rgba(90, 90, 88, 0.35);

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border: 1px solid rgba(255, 255, 255, 0.22);

  box-shadow:
    0 22px 55px rgba(0, 0, 0, 0.28),
    inset 0 1px 1px rgba(255, 255, 255, 0.14);

  transform: translateY(-20px);
}

/* 左侧圆形背景 */
.shell-circle {
  width: 500px;
  height: 500px;

  flex: 0 0 500px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0);

  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(10px, -10px);
}

/* 贝壳产品 PNG 图片 */
.shell-img {
  width: 600px;
  height: auto;
  display: block;
  object-fit: contain;
  transform: translate(30px, -40px);
}

/* 右侧信息区域 */
.air-info {
  flex: 1;
  padding-top: 4px;

  transform: translate(-525px, 150px);
}

.air-info .label {
  display: block;

  font-size: 13px;
  font-weight: 700;

  color: rgba(255, 255, 255, 0.45);

  margin-bottom: 8px;
}

.air-info h2 {
  font-size: 35px;
  font-weight: 800;

  color: rgba(255, 255, 255, 0.86);

  margin-bottom: 10px;
  transform: translateY(-3px);
}

.air-info .desc {
  font-size: 13px;
  font-weight: 700;

  color: rgba(255, 255, 255, 0.48);

  margin-bottom: 14px;
}

.co2-label {
  display: block;

  font-size: 12px;
  font-weight: 700;

  color: rgba(255, 255, 255, 0.48);

  margin-bottom: 8px;
  transform: translateY(-5px);
}

/* 720 数字 */
.co2-number {
  font-size: 75px;
  line-height: 0.95;
  font-weight: 900;

  color: #8cc63f;

  letter-spacing: -3px;
  transform: translateY(-13px);
}

/* ppm + 色条 + 刻度整体 */
.co2-bottom {
  transform: translateY(-18px);
}

/* ppm 小字 */
.ppm-text {
  display: block;

  font-size: 16px;
  font-weight: 800;

  color: #8cc63f;

  margin-bottom: 8px;
}

/* CO2 色条 */
.co2-bar {
  width: 210px;
  height: 5px;

  margin-top: 0;

  border-radius: 10px;

  background: linear-gradient(
    90deg,
    #6fd13e 0%,
    #9be23f 32%,
    #d6d94a 57%,
    #e0c94b 70%,
    #e34b42 100%
  );
}

.co2-scale {
  width: 220px;

  margin-top: 8px;

  display: flex;
  justify-content: space-between;

  font-size: 11px;
  font-weight: 700;

  color: rgba(255, 255, 255, 0.48);
}

/* 右侧整体区域 */
.right-info {
  position: absolute;
  top: 150px;
  right: 60px;
  bottom: 0;

  width: 650px;

  display: block;
}

/* 右上建议卡片 */
.advice-card {
  width: 100%;
  height: 250px;

  display: flex;
  align-items: center;
  gap: 34px;

  padding: 28px 34px;

  border-radius: 44px;

  background: rgba(90, 90, 88, 0.35);

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border: 1px solid rgba(255, 255, 255, 0.22);

  box-shadow:
    0 22px 55px rgba(0, 0, 0, 0.28),
    inset 0 1px 1px rgba(255, 255, 255, 0.14);
}

/* 窗户图形 */
.window-graphic {
  width: 210px;
  height: 150px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.window-graphic svg {
  width: 180px;
  height: 140px;
  transform: translate(-13px);
}

/* 建议文字 */
.advice-text {
  flex: 1;
}

.advice-text span {
  display: block;

  font-size: 12px;
  font-weight: 700;

  color: rgba(255, 255, 255, 0.45);

  margin-bottom: 14px;
}

.advice-text h2 {
  font-size: 28px;
  font-weight: 800;

  color: rgba(255, 255, 255, 0.88);

  margin-bottom: 18px;
}

.advice-text p {
  font-size: 12px;
  line-height: 1.25;
  font-weight: 700;

  color: rgba(255, 255, 255, 0.52);

  margin-bottom: 22px;
}

.advice-text button {
  width: 210px;
  height: 45px;

  border: none;
  border-radius: 28px;

  background: #8cc63f;
  color: white;

  font-size: 15px;
  font-weight: 800;

  cursor: pointer;
}

/* 当前环境卡片 */
.env-card {
  width: 100%;
  height: 100px;

  margin-top: 14px;

  padding: 14px 28px;

  border-radius: 30px;

  background: rgba(90, 90, 88, 0.35);

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border: 1px solid rgba(255, 255, 255, 0.22);

  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.22),
    inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

.env-card h3 {
  font-size: 16px;
  font-weight: 800;

  color: rgba(255, 255, 255, 0.78);

  margin-bottom: 10px;
}

.env-items {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.env-pill {
  width: 180px;
  height: 40px;

  border-radius: 20px;

  background: rgba(255, 255, 255, 0.25);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.env-pill strong {
  font-size: 11px;
  line-height: 1;
  font-weight: 800;

  color: rgba(255, 255, 255, 0.9);
}

.env-pill span {
  font-size: 10px;
  line-height: 1;
  font-weight: 700;

  color: rgba(255, 255, 255, 0.85);

  margin-top: 2px;
}

/* 右下角 CO2 记录卡片 */
.co2-week-card {
  position: absolute;
  left: 0;
  right: 0;
  top: 378px;
  bottom: 50px;

  padding: 18px 24px 22px;

  border-radius: 34px;

  background: rgba(90, 90, 88, 0.35);

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border: 1px solid rgba(255, 255, 255, 0.22);

  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.22),
    inset 0 1px 1px rgba(255, 255, 255, 0.12);

  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 图表顶部 */
.co2-week-top {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 8px;
}

.co2-week-top h3 {
  font-size: 15px;
  font-weight: 900;

  color: rgba(255, 255, 255, 0.9);
  transform: translateY(-5px)
}

/* 7 giorni / 30 giorni */
.co2-tabs {
  display: flex;
  align-items: center;
  gap: 5px;

  padding: 5px;

  border-radius: 50px;

  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-5px)
}

.co2-tabs button {
  width: 86px;
  height: 20px;

  border: none;
  border-radius: 18px;

  background: transparent;
  color: rgba(255, 255, 255, 0.68);

  font-size: 14px;
  font-weight: 800;

  cursor: pointer;
}

.co2-tabs button.active {
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.95);

  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

/* 图表区域 */
.co2-chart-box {
  position: relative;

  width: 100%;
  flex: 1;

  min-height: 175px;

  margin-top: 8px;
}

.co2-week-chart {
  width: 100%;
  height: 100%;

  display: block;
  transform: translate(0px,-30px)
}

/* 虚线网格 */
.co2-grid-line {
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

/* ppm 文字 */
.co2-axis-text {
  fill: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  font-weight: 700;
}

/* 绿色折线 */
.co2-week-line {
  fill: none;

  stroke: #d8ff55;
  stroke-width: 4;

  stroke-linecap: round;
  stroke-linejoin: round;

  filter: drop-shadow(0 0 8px rgba(216, 255, 85, 0.35));
}

/* 绿色点 */
.co2-week-point {
  fill: #d8ff55;
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 4;

  cursor: pointer;
}

/* 透明 hover 区域 */
.co2-hover-point {
  fill: transparent;
  cursor: pointer;
}

/* 底部星期文字 */
.co2-day-label {
  fill: rgba(255, 255, 255, 0.75);

  font-size: 13px;
  font-weight: 800;
}

/* 鼠标悬浮提示 */
.co2-tooltip {
  position: absolute;

  left: 0;
  top: 0;

  min-width: 118px;

  padding: 8px 12px;

  border-radius: 14px;

  background: rgba(80, 80, 78, 0.88);

  border: 1px solid rgba(255, 255, 255, 0.35);

  color: white;

  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;

  opacity: 0;
  pointer-events: none;

  transform: translate(-50%, -120%);

  transition: opacity 0.18s;

  z-index: 20;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.co2-tooltip.show {
  opacity: 1;
}

.co2-tooltip strong {
  color: #d8ff55;
  font-size: 17px;
}