/* ===== 全局基础样式 ===== */
:root {
  --bg: #f4f6fb;
  --card: rgba(255, 255, 255, 0.88);
  --ink: #202331;
  --muted: #727789;
  --line: #e7e9f1;
  --purple: #6956e8;
  --purple-dark: #5542d1;
  --purple-soft: #eeebff;
  --lime: #c9f36b;
  --coral: #ff7d6b;
  --shadow: 0 20px 60px rgba(45, 41, 80, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 5%, rgba(201, 243, 107, 0.28), transparent 25rem),
    radial-gradient(circle at 90% 30%, rgba(105, 86, 232, 0.13), transparent 30rem),
    var(--bg);
  font-family: "Noto Sans SC", system-ui, sans-serif;
}

button {
  font: inherit;
}

.background-shape {
  position: fixed;
  z-index: -1;
  border: 1px solid rgba(105, 86, 232, 0.15);
  border-radius: 32px;
  transform: rotate(18deg);
  pointer-events: none;
}

.shape-one {
  width: 180px;
  height: 180px;
  top: 12%;
  left: -90px;
}

.shape-two {
  width: 240px;
  height: 240px;
  right: -120px;
  bottom: 8%;
  transform: rotate(35deg);
}

.page-shell {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 68px 0 28px;
}

/* ===== 页面头部 ===== */
.hero {
  position: relative;
  margin-bottom: 34px;
  text-align: center;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  color: white;
  background: var(--purple);
  border-radius: 15px;
  box-shadow: 5px 5px 0 var(--lime);
  font-size: 22px;
  font-weight: 800;
  place-items: center;
  transform: rotate(-5deg);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--purple);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 8vw, 58px);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1.15;
}

.intro {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* ===== 选择控制区域 ===== */
.control-card,
.result-card {
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.control-card {
  padding: 28px;
  border-radius: 28px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.step-number {
  display: grid;
  width: 28px;
  height: 28px;
  color: var(--purple);
  background: var(--purple-soft);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  place-items: center;
}

.section-title h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-chip {
  padding: 10px 15px;
  color: #54596c;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 13px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: 0.2s ease;
}

.choice-chip:hover {
  border-color: #c7c0f8;
  color: var(--purple);
  transform: translateY(-2px);
}

.choice-chip.active {
  color: white;
  border-color: var(--purple);
  background: var(--purple);
  box-shadow: 0 8px 18px rgba(105, 86, 232, 0.22);
}

.divider {
  height: 1px;
  margin: 24px 0;
  background: var(--line);
}

.draw-button {
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: 28px;
  padding: 16px 18px;
  color: white;
  border: 0;
  background: var(--ink);
  border-radius: 16px;
  cursor: pointer;
  font-weight: 700;
  transition: 0.2s ease;
}

.draw-button:hover {
  background: var(--purple);
  box-shadow: 0 10px 24px rgba(105, 86, 232, 0.24);
  transform: translateY(-2px);
}

.draw-button:active {
  transform: translateY(0) scale(0.99);
}

.draw-button-icon {
  margin-right: 10px;
  color: var(--lime);
}

.draw-button-arrow {
  margin-left: auto;
  font-size: 20px;
}

/* ===== 抽签结果区域 ===== */
.result-card {
  position: relative;
  margin-top: 22px;
  padding: 28px;
  overflow: hidden;
  border-radius: 28px;
  animation: result-in 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.result-card::before {
  position: absolute;
  width: 150px;
  height: 150px;
  top: -70px;
  right: -45px;
  background: var(--lime);
  border-radius: 50%;
  content: "";
  opacity: 0.45;
}

@keyframes result-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.result-topline,
.fortune-heading,
.result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.result-topline {
  position: relative;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.result-tags {
  color: var(--purple);
}

.fortune-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.fortune-heading h2 {
  margin: 0;
  font-size: clamp(25px, 5vw, 34px);
  letter-spacing: -0.04em;
}

.fortune-level {
  flex: 0 0 auto;
  padding: 9px 13px;
  color: var(--purple-dark);
  background: var(--lime);
  border-radius: 99px;
  font-size: 13px;
  font-weight: 800;
  transform: rotate(3deg);
}

.fortune-meaning {
  margin: 16px 0 24px;
  padding-left: 13px;
  color: #5a6072;
  border-left: 3px solid var(--purple);
  font-size: 14px;
  line-height: 1.8;
}

.action-grid {
  display: grid;
  gap: 10px;
}

.action-item {
  display: flex;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 16px;
}

.action-primary {
  border-color: rgba(105, 86, 232, 0.16);
  background: var(--purple-soft);
}

.taboo-item {
  background: #fff8f6;
}

.action-icon {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  color: var(--purple);
  background: white;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  place-items: center;
}

.taboo-item .action-icon {
  color: var(--coral);
}

.action-item h3 {
  margin: 0 0 5px;
  font-size: 13px;
}

.action-item p {
  margin: 0;
  color: #606578;
  font-size: 13px;
  line-height: 1.65;
}

.result-footer {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px dashed #d9dce7;
}

.result-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.copy-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  color: var(--purple);
  border: 1px solid #dcd6ff;
  background: white;
  border-radius: 11px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: 0.2s ease;
}

.copy-button:hover {
  color: white;
  background: var(--purple);
  border-color: var(--purple);
}

footer {
  padding-top: 26px;
  color: #989cab;
  text-align: center;
  font-size: 11px;
}

.toast {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 26px;
  padding: 11px 16px;
  color: white;
  background: var(--ink);
  border-radius: 99px;
  box-shadow: 0 10px 30px rgba(32, 35, 49, 0.22);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 15px);
  transition: 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ===== 手机端适配 ===== */
@media (max-width: 600px) {
  .page-shell {
    width: min(100% - 20px, 760px);
    padding-top: 42px;
  }

  .hero {
    margin-bottom: 24px;
  }

  .control-card,
  .result-card {
    padding: 20px;
    border-radius: 22px;
  }

  .choice-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .choice-chip {
    padding: 10px 8px;
  }

  .result-topline,
  .result-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .copy-button {
    justify-content: center;
    width: 100%;
  }
}

/* 用户系统设置为“减少动画”时，关闭页面动效 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
