/* ============================================================================
   工具页 + 在线小空调
   ============================================================================ */

.tools-page,
.ac-page {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.tools-hero,
.ac-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    radial-gradient(circle at 16% 12%, rgba(117, 211, 255, 0.28), transparent 28%),
    radial-gradient(circle at 92% 0%, rgba(234, 111, 90, 0.16), transparent 30%),
    linear-gradient(135deg, var(--bg-elev), var(--bg-soft));
  box-shadow: var(--shadow);
}

.tools-hero {
  padding: 34px;
  margin-bottom: 22px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.tools-hero h1,
.ac-copy h1 {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.05;
  margin-bottom: 12px;
}

.tools-hero p,
.ac-copy p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
  max-width: 620px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.tool-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  color: var(--text-main);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary), var(--border) 45%);
  box-shadow: var(--shadow-strong);
}

.tool-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #55c9ff, #69a7ff);
  font-size: 24px;
}
.tool-icon.icon-heart {
  background: linear-gradient(135deg, #ff8aa1, #ff5d8f);
}

.tool-meta {
  display: grid;
  gap: 5px;
}

.tool-meta strong { font-size: 17px; }
.tool-meta em {
  color: var(--text-secondary);
  font-style: normal;
  font-size: 13px;
  line-height: 1.6;
}
.tool-arrow {
  color: var(--text-tertiary);
  font-size: 28px;
}

/* ---------- 小空调页面 ---------- */

.ac-page {
  --cold: #58c7ff;
  --cold-2: #7de7ff;
  --cold-3: #e9fbff;
}

.ac-stage {
  min-height: 620px;
  padding: 38px 28px 30px;
}

.ac-copy {
  text-align: center;
  margin: 0 auto 28px;
}

.air-wrap {
  --wind-opacity: 0;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 230px;
  align-items: center;
  gap: 28px;
  max-width: 820px;
  margin: 0 auto;
}

.aircon {
  position: relative;
  min-height: 310px;
  padding: 14px 18px 28px;
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(239, 248, 252, 0.94)),
    var(--bg-elev);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow:
    0 28px 80px rgba(44, 119, 155, 0.20),
    inset 0 1px 0 rgba(255,255,255,0.9);
  transition: transform 0.25s ease, filter 0.25s ease;
}

[data-mode="dark"] .aircon,
[data-theme="dark"] .aircon {
  background: linear-gradient(180deg, #f7fbff, #dbe8ef);
  color: #1f2b33;
  border-color: rgba(255,255,255,0.38);
}

.aircon.is-on {
  filter: drop-shadow(0 0 26px rgba(88, 199, 255, 0.28));
}
.aircon.is-eco::after {
  content: "ECO";
  position: absolute;
  right: 22px;
  top: 20px;
  font-size: 11px;
  font-weight: 800;
  color: #21a36a;
  letter-spacing: 0.08em;
}

.aircon-top {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}
.aircon-top span {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: rgba(75, 110, 130, 0.12);
}

.aircon-body {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 16px;
  padding: 16px 18px 18px;
  border-radius: 24px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(102, 147, 171, 0.16);
}

.brand {
  grid-column: 1 / -1;
  color: #7c97a6;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.screen {
  min-width: 150px;
  padding: 13px 16px;
  border-radius: 18px;
  color: #c7f3ff;
  background: linear-gradient(145deg, #17252f, #0e1820);
  box-shadow: inset 0 0 18px rgba(88, 199, 255, 0.14);
}
.screen strong {
  display: block;
  color: #e8fbff;
  font-size: 42px;
  line-height: 1;
  margin: 4px 0;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(125, 231, 255, 0.48);
}
.screen-mode,
.screen-speed {
  display: block;
  color: #7de7ff;
  font-size: 12px;
}

.power-led {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f3f6f8;
  box-shadow: inset 0 -3px 8px rgba(47, 80, 98, 0.12), 0 6px 18px rgba(29, 73, 95, 0.15);
  cursor: pointer;
}
.power-led span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 4px solid #9fb2bf;
  border-top-color: transparent;
  position: relative;
}
.power-led span::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -12px;
  width: 4px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #9fb2bf;
}
.power-led[aria-pressed="true"] span {
  border-color: #3bd87d;
  border-top-color: transparent;
  filter: drop-shadow(0 0 7px rgba(59, 216, 125, 0.8));
}
.power-led[aria-pressed="true"] span::before { background: #3bd87d; }

.vent {
  position: relative;
  display: grid;
  gap: 8px;
  margin: 22px 22px 0;
  padding: 18px 18px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #d9e6ed, #bfcfd7);
  box-shadow: inset 0 4px 8px rgba(64, 91, 106, 0.15);
  transform-origin: center top;
}
.vent span {
  height: 5px;
  border-radius: 999px;
  background: rgba(66, 100, 116, 0.42);
}
.aircon.is-swing .vent {
  animation: ventSwing 2.6s ease-in-out infinite;
}

.wind {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 78%;
  height: 150px;
  pointer-events: none;
  opacity: var(--wind-opacity);
}
.wind i {
  position: absolute;
  top: 0;
  width: 12%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(88,199,255,0.34), rgba(88,199,255,0));
  filter: blur(1px);
  transform-origin: top center;
  animation: windFlow 1.8s linear infinite;
}
.wind i:nth-child(1) { left: 5%; animation-delay: -0.2s; transform: rotate(7deg); }
.wind i:nth-child(2) { left: 25%; animation-delay: -0.7s; transform: rotate(-4deg); }
.wind i:nth-child(3) { left: 45%; animation-delay: -1.1s; transform: rotate(2deg); }
.wind i:nth-child(4) { left: 65%; animation-delay: -0.4s; transform: rotate(-7deg); }
.wind i:nth-child(5) { left: 83%; animation-delay: -1.4s; transform: rotate(4deg); }
.wind.speed-1 i { animation-duration: 2.5s; }
.wind.speed-2 i { animation-duration: 1.8s; }
.wind.speed-3 i { animation-duration: 1.1s; }

.remote {
  padding: 18px;
  border-radius: 28px;
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow: 0 18px 46px rgba(33, 98, 130, 0.16);
  backdrop-filter: blur(10px);
}
[data-mode="dark"] .remote,
[data-theme="dark"] .remote {
  background: rgba(31, 31, 35, 0.72);
  border-color: rgba(255,255,255,0.08);
}

.remote button {
  border: 0;
  border-radius: 14px;
  color: var(--text-main);
  background: var(--bg);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.remote button:hover { transform: translateY(-1px); }
.remote button:active { transform: translateY(1px); }
.remote button.active {
  color: #fff;
  background: linear-gradient(135deg, #44bfff, #6f9eff);
}

.remote-power {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-weight: 700;
}
.temp-pad {
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.temp-pad button {
  height: 46px;
  font-size: 22px;
}
.temp-pad strong {
  text-align: center;
  font-size: 28px;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.remote-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.remote-grid button {
  min-height: 42px;
  padding: 9px 8px;
  font-size: 13px;
}

.ac-tip {
  min-height: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 28px;
}

.tool-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}
.btn-home,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.btn-home {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--primary), transparent 70%);
}
.btn-home:hover { background: var(--primary-hover); }
.btn-ghost {
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--bg);
}
.btn-ghost:hover { color: var(--primary); border-color: var(--primary); }

.tool-comments {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}
.tool-comments h2 {
  font-size: 22px;
  margin-bottom: 6px;
}
.tool-comments > p,
.tool-comments-hint {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 18px;
}

@keyframes ventSwing {
  0%, 100% { transform: rotateX(0deg); }
  50% { transform: rotateX(18deg); }
}

@keyframes windFlow {
  0% { opacity: 0; transform: translateY(-12px) scaleY(0.35); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(82px) scaleY(1); }
}

@media (max-width: 820px) {
  .tools-page,
  .ac-page {
    padding: 18px 14px 36px;
  }
  .tools-hero {
    padding: 24px 20px;
    border-radius: 18px;
  }
  .ac-stage {
    padding: 28px 16px 24px;
    min-height: auto;
    border-radius: 18px;
  }
  .air-wrap {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
  .remote {
    max-width: 360px;
    width: 100%;
    margin: 0 auto;
  }
  .wind {
    height: 100px;
  }
}

@media (max-width: 520px) {
  .aircon {
    min-height: 270px;
    border-radius: 26px;
    padding: 12px 12px 24px;
  }
  .aircon-body {
    grid-template-columns: 1fr;
    padding: 14px;
    border-radius: 20px;
  }
  .screen {
    width: 100%;
  }
  .power-led {
    position: absolute;
    right: 26px;
    top: 54px;
    width: 46px;
    height: 46px;
  }
  .vent {
    margin: 18px 10px 0;
  }
  .remote-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
