#tool {
  background: transparent;
  color: #332e29;
}

#tool .logo,
#tool .back-to-top,
#tool > section[style*="max-width: 800px"] {
  display: none !important;
}

#tool .container {
  max-width: none;
  padding: 28px;
}

#tool .header {
  justify-content: center;
  padding: 0;
  border-bottom: 0;
  margin-bottom: 24px;
}

#tool .nav {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #e6dfd4;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(51, 46, 41, 0.06);
}

#tool .nav-btn {
  min-width: 88px;
  padding: 10px 16px;
  border: 1px solid #ddd3c4;
  background: #faf7f1;
  color: #5f5549;
  border-radius: 14px;
  backdrop-filter: none;
}

#tool .nav-btn:hover,
#tool .nav-btn.active {
  background: linear-gradient(135deg, #9d2932 0%, #b6454e 100%);
  border-color: transparent;
  color: #ffffff;
  transform: none;
  box-shadow: none;
}

#tool .constellation-selector {
  margin-bottom: 24px;
  padding-bottom: 0;
}

#tool .section-title,
#tool .result-header h2,
#tool .card-header h3 {
  font-family: 'Noto Serif SC', serif;
  color: #332e29;
  background: none;
  -webkit-text-fill-color: initial;
}

#tool .section-title {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

#tool .zodiac-wheel {
  width: 600px;
  height: 600px;
  max-width: 100%;
  padding: 0;
  border: 3px solid rgba(255, 215, 0, 0.3);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.08) 25%, transparent 40%),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.02) 40%, transparent 65%),
    radial-gradient(circle at center, transparent 65%, rgba(255, 215, 0, 0.03) 80%, transparent 100%);
  box-shadow:
    0 0 40px rgba(255, 215, 0, 0.2),
    inset 0 0 60px rgba(255, 215, 0, 0.1);
  animation: wheelRotate 60s linear infinite, wheelGlow 4s ease-in-out infinite alternate;
}

#tool .zodiac-signs {
  position: relative;
  width: 100%;
  height: 100%;
}

#tool .zodiac-signs::before,
#tool .zodiac-signs::after,
#tool .wheel-center::before {
  display: block;
}

#tool .wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140px;
  height: 140px;
  margin: 0;
  padding: 0;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff9e6, #ffd700, #ff8c00, #ff6b47);
  box-shadow:
    0 0 40px rgba(255, 215, 0, 0.8),
    0 0 80px rgba(255, 215, 0, 0.4),
    inset 0 0 20px rgba(255, 255, 255, 0.3);
  animation: sunPulse 4s ease-in-out infinite, sunRotate 20s linear infinite;
  transform: translate(-50%, -50%);
  color: #333333;
}

#tool .wheel-center i,
#tool .wheel-center span {
  animation: iconGlow 3s ease-in-out infinite alternate;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

#tool .wheel-center i {
  color: #ff8c00;
}

#tool .wheel-center span {
  color: #333333;
}

#tool .zodiac-item {
  position: absolute;
  width: 100px;
  height: 130px;
  left: 50%;
  top: 50%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  transform-origin: 0 0;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-260px) rotate(calc(-1 * var(--angle)));
  animation: outerOrbitFloat 10s ease-in-out infinite;
  animation-delay: calc(var(--position) * 0.4s);
  z-index: 10;
}

#tool .zodiac-item:hover {
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-240px) rotate(calc(-1 * var(--angle))) scale(1.25);
  animation-play-state: paused;
  z-index: 25;
  border-color: transparent;
  background: transparent;
}

#tool .sign-icon {
  width: 75px;
  height: 75px;
  margin: 0 auto 12px;
  font-size: 2.2rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.15)),
    linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 107, 107, 0.15));
  border: 3px solid rgba(255, 215, 0, 0.5);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.25),
    0 0 30px rgba(255, 215, 0, 0.3),
    inset 0 2px 5px rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px);
}

#tool .sign-icon::before {
  display: block;
}

#tool .zodiac-item:hover .sign-icon,
#tool .zodiac-item.selected .sign-icon {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), rgba(255, 215, 0, 0.2)),
    linear-gradient(135deg, #ffd700, #ff8c00) !important;
  color: #ffffff;
  border-color: #ffd700 !important;
  box-shadow:
    0 6px 25px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(255, 215, 0, 0.6),
    inset 0 1px 5px rgba(255, 255, 255, 0.4) !important;
  transform: scale(1.05);
}

#tool .sign-name,
#tool .sign-date {
  transform: rotate(calc(-1 * var(--angle)));
}

#tool .sign-name {
  color: #ffffff;
}

#tool .sign-date {
  color: rgba(255, 255, 255, 0.82);
}

#tool .loading {
  padding: 22px;
}

#tool .loading.show {
  background: #ffffff;
  border: 1px solid #e6dfd4;
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(51, 46, 41, 0.08);
}

#tool .spinner {
  border-color: #efe5da;
  border-left-color: #9d2932;
}

#tool .fortune-result {
  margin-top: 20px;
  color: #5f5549;
}

#tool .result-header,
#tool .detail-card,
#tool .lucky-item,
#tool .todo-item {
  background: #ffffff;
  border: 1px solid #e6dfd4;
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(51, 46, 41, 0.08);
  backdrop-filter: none;
}

#tool .result-header {
  padding: 24px;
  margin-bottom: 20px;
}

#tool .result-header p,
#tool .result-header span,
#tool .index-item h4,
#tool .detail-card p,
#tool .lucky-item h4,
#tool .lucky-item span,
#tool .todo-item h4,
#tool .todo-item span {
  color: #5f5549;
  opacity: 1;
}

#tool .fortune-index {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

#tool .index-item {
  padding: 18px 14px;
  background: #ffffff;
  border: 1px solid #e6dfd4;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(51, 46, 41, 0.06);
}

#tool .index-circle {
  width: 96px;
  height: 96px;
  margin-bottom: 12px;
  background: conic-gradient(from 0deg, #e6dfd4 0deg, #e6dfd4 var(--progress, 0deg), transparent var(--progress, 0deg));
}

#tool .index-circle::before {
  inset: 10px;
  background: #ffffff;
}

#tool .index-value {
  color: #332e29;
}

#tool .index-circle[data-type="all"] {
  background: conic-gradient(from 0deg, #e6dfd4 0deg, #9d2932 var(--progress, 0deg), #e6dfd4 var(--progress, 0deg));
}

#tool .index-circle[data-type="love"] {
  background: conic-gradient(from 0deg, #e6dfd4 0deg, #d05b68 var(--progress, 0deg), #e6dfd4 var(--progress, 0deg));
}

#tool .index-circle[data-type="money"] {
  background: conic-gradient(from 0deg, #e6dfd4 0deg, #2f8f72 var(--progress, 0deg), #e6dfd4 var(--progress, 0deg));
}

#tool .index-circle[data-type="work"] {
  background: conic-gradient(from 0deg, #e6dfd4 0deg, #3d6d96 var(--progress, 0deg), #e6dfd4 var(--progress, 0deg));
}

#tool .index-circle[data-type="health"] {
  background: conic-gradient(from 0deg, #e6dfd4 0deg, #7f9f58 var(--progress, 0deg), #e6dfd4 var(--progress, 0deg));
}

#tool .fortune-details,
#tool .lucky-info,
#tool .todo-info {
  gap: 14px;
  margin-bottom: 20px;
}

#tool .detail-card,
#tool .lucky-item,
#tool .todo-item {
  padding: 20px;
}

#tool .detail-card:hover,
#tool .lucky-item:hover,
#tool .todo-item:hover {
  transform: none;
  box-shadow: 0 18px 40px rgba(51, 46, 41, 0.08);
  background: #ffffff;
}

#tool .card-header i,
#tool .lucky-item i,
#tool .todo-item.yi i,
#tool .todo-item.ji i {
  color: #9d2932;
}

#tool .lucky-item span {
  color: #9d2932;
}

#tool .todo-item.yi,
#tool .todo-item.ji {
  border-left-width: 1px;
}

.error-message > div {
  background: #fff3f1 !important;
  border-color: #d05b68 !important;
  backdrop-filter: none !important;
}

.error-message p {
  color: #8f2c35 !important;
}

.error-message i {
  color: #8f2c35 !important;
}

@media (max-width: 900px) {
  #tool .container {
    padding: 18px;
  }

  #tool .zodiac-wheel {
    width: 420px;
    height: 420px;
  }

  #tool .wheel-center {
    width: 100px;
    height: 100px;
    font-size: 0.8rem;
  }

  #tool .zodiac-signs::before {
    width: 360px;
    height: 360px;
  }

  #tool .zodiac-signs::after {
    width: 360px;
    height: 360px;
    mask: radial-gradient(circle, transparent 170px, black 180px, black 190px, transparent 200px);
    -webkit-mask: radial-gradient(circle, transparent 170px, black 180px, black 190px, transparent 200px);
  }

  #tool .zodiac-item {
    width: 70px;
    height: 90px;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-180px) rotate(calc(-1 * var(--angle)));
  }

  #tool .zodiac-item:hover {
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-165px) rotate(calc(-1 * var(--angle))) scale(1.15);
  }

  #tool .sign-icon {
    width: 55px;
    height: 55px;
    font-size: 1.6rem;
  }

  #tool .sign-name {
    font-size: 0.7rem;
  }

  #tool .sign-date {
    font-size: 0.5rem;
  }

  #tool .fortune-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #tool .nav {
    width: 100%;
  }

  #tool .nav-btn {
    flex: 1 1 calc(50% - 10px);
    min-width: 0;
  }

  #tool .zodiac-wheel,
  #tool .result-header,
  #tool .detail-card,
  #tool .lucky-item,
  #tool .todo-item,
  #tool .loading.show {
    padding: 18px;
    border-radius: 20px;
  }

  #tool .zodiac-wheel {
    width: 340px;
    height: 340px;
    padding: 0;
    border-radius: 50%;
  }

  #tool .wheel-center {
    width: 80px;
    height: 80px;
    font-size: 0.7rem;
  }

  #tool .zodiac-signs::before {
    width: 280px;
    height: 280px;
  }

  #tool .zodiac-signs::after {
    width: 280px;
    height: 280px;
    mask: radial-gradient(circle, transparent 130px, black 140px, black 150px, transparent 160px);
    -webkit-mask: radial-gradient(circle, transparent 130px, black 140px, black 150px, transparent 160px);
  }

  #tool .zodiac-item {
    width: 55px;
    height: 75px;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-140px) rotate(calc(-1 * var(--angle)));
  }

  #tool .zodiac-item:hover {
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-125px) rotate(calc(-1 * var(--angle))) scale(1.1);
  }

  #tool .sign-icon {
    width: 45px;
    height: 45px;
    font-size: 1.4rem;
  }

  #tool .fortune-index,
  #tool .lucky-info,
  #tool .todo-info {
    grid-template-columns: 1fr;
  }
}
