@tailwind base;
@tailwind components;
@tailwind utilities;

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #061225;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: rgba(243, 248, 255, 0.92);
  background:
    radial-gradient(circle at 18% 8%, rgba(85, 72, 255, 0.35), transparent 34rem),
    radial-gradient(circle at 82% 2%, rgba(54, 230, 255, 0.22), transparent 27rem),
    linear-gradient(180deg, #07152d 0%, #050b1a 48%, #071523 100%);
}

button,
input {
  font: inherit;
}

::selection {
  color: #061225;
  background: #63f0d4;
}

.aurora-grid {
  background-image:
    linear-gradient(rgba(99, 240, 212, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 240, 212, 0.075) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.star-field {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(99, 240, 212, 0.9) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(247, 217, 139, 0.85) 0 1px, transparent 1.4px);
  background-position:
    12px 22px,
    90px 54px,
    145px 18px;
  background-size:
    180px 130px,
    240px 180px,
    210px 160px;
  animation: starDrift 18s linear infinite;
}

.glass-panel {
  border: 1px solid rgba(179, 236, 255, 0.16);
  background:
    linear-gradient(145deg, rgba(19, 35, 72, 0.78), rgba(9, 17, 38, 0.58)),
    rgba(8, 19, 42, 0.76);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(22px);
}

.thin-panel {
  border: 1px solid rgba(150, 220, 255, 0.14);
  background: rgba(9, 22, 48, 0.58);
  backdrop-filter: blur(18px);
}

.sea-line {
  background:
    linear-gradient(90deg, transparent, rgba(99, 240, 212, 0.92), transparent),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(95, 176, 255, 0.18) 22px 23px, transparent 23px 44px);
  animation: routeFlow 8s linear infinite;
}

.wave {
  background: linear-gradient(90deg, rgba(57, 245, 255, 0.04), rgba(99, 240, 212, 0.18), rgba(114, 87, 255, 0.08));
  clip-path: polygon(0 44%, 8% 40%, 18% 54%, 29% 42%, 42% 56%, 55% 42%, 69% 54%, 82% 40%, 100% 52%, 100% 100%, 0 100%);
  animation: waveSway 9s ease-in-out infinite;
}

.hero-shell {
  background:
    radial-gradient(circle at 82% 18%, rgba(114, 87, 255, 0.22), transparent 30rem),
    radial-gradient(circle at 12% 30%, rgba(57, 245, 255, 0.12), transparent 24rem),
    linear-gradient(180deg, rgba(10, 20, 43, 0.24) 0%, rgba(7, 18, 39, 0.18) 46%, rgba(5, 13, 27, 0.36) 100%);
}

.hero-bg-soft {
  background:
    linear-gradient(180deg, rgba(8, 17, 31, 0) 0%, rgba(11, 22, 53, 0.2) 40%, rgba(8, 17, 31, 0.72) 100%),
    radial-gradient(ellipse at 50% 60%, rgba(33, 82, 132, 0.16), transparent 45rem);
}

.hero-mobile-blend {
  background: linear-gradient(180deg, rgba(8, 17, 31, 0) 0%, rgba(8, 17, 31, 0.5) 45%, rgba(8, 17, 31, 0.9) 100%);
}

@media (max-width: 767px) {
  body {
    background:
      radial-gradient(circle at 50% 0%, rgba(85, 72, 255, 0.28), transparent 30rem),
      radial-gradient(circle at 90% 28%, rgba(54, 230, 255, 0.14), transparent 22rem),
      linear-gradient(180deg, #07152d 0%, #071225 38%, #06111f 68%, #071523 100%);
  }

  .hero-shell {
    background:
      radial-gradient(circle at 78% 4%, rgba(114, 87, 255, 0.24), transparent 22rem),
      radial-gradient(circle at 18% 36%, rgba(57, 245, 255, 0.14), transparent 22rem),
      linear-gradient(180deg, rgba(9, 18, 38, 0.12) 0%, rgba(10, 23, 49, 0.22) 42%, rgba(6, 17, 31, 0.82) 72%, rgba(6, 17, 31, 0.96) 100%);
  }

  .hero-mobile-blend {
    height: 72%;
    background:
      linear-gradient(180deg, rgba(8, 17, 31, 0) 0%, rgba(8, 17, 31, 0.34) 34%, rgba(8, 17, 31, 0.82) 66%, rgba(8, 17, 31, 0.98) 100%);
  }
}

.cruise-body {
  clip-path: polygon(7% 18%, 78% 18%, 95% 43%, 83% 75%, 18% 75%);
}

.scrollbar-soft::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.scrollbar-soft::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(99, 240, 212, 0.28);
}

.xuanji-picker-column {
  scroll-snap-type: y mandatory;
  scroll-padding-block: 4.5rem;
  overscroll-behavior: contain;
  mask-image: linear-gradient(to bottom, transparent 0%, black 22%, black 78%, transparent 100%);
}

.xuanji-picker-option {
  scroll-snap-align: center;
}

.master-answer {
  max-width: 68ch;
  font-size: 0.95rem;
  line-height: 1.95;
  color: rgba(226, 232, 240, 0.94);
}

.master-answer p {
  margin: 0;
}

.master-answer p + p {
  margin-top: 0.9rem;
}

.master-answer-followup {
  margin-top: 1rem !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.85rem;
  color: rgba(165, 243, 252, 0.92);
}

.fatemind-report-reader {
  border: 1px solid rgba(103, 232, 249, 0.14);
  border-radius: 28px;
  background:
    radial-gradient(circle at 16% 0%, rgba(103, 232, 249, 0.12), transparent 22rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.58), rgba(8, 17, 31, 0.32));
  padding: clamp(1.15rem, 2vw, 2rem);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

.fatemind-report-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.fatemind-report-header h3 {
  margin: 0;
  max-width: 18ch;
  color: rgba(248, 250, 252, 0.98);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.2;
  font-weight: 760;
  letter-spacing: 0;
}

.fatemind-report-meta {
  margin-bottom: 0.45rem;
  color: rgba(103, 232, 249, 0.78);
  font-size: 0.78rem;
  font-weight: 700;
}

.fatemind-report-summary {
  margin-bottom: 1.35rem;
  border-left: 3px solid rgba(103, 232, 249, 0.5);
  padding: 0.25rem 0 0.25rem 1rem;
}

.fatemind-report-sections {
  display: grid;
  gap: 1rem;
}

.fatemind-report-section {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
  padding: clamp(1rem, 1.5vw, 1.45rem);
}

.fatemind-report-section h3 {
  margin: 0 0 0.85rem;
  color: rgba(207, 250, 254, 0.96);
  font-size: clamp(1.08rem, 1.8vw, 1.35rem);
  line-height: 1.35;
  font-weight: 720;
  letter-spacing: 0;
}

.fatemind-report-prose {
  max-width: 76ch;
  color: rgba(226, 232, 240, 0.93);
  font-size: clamp(0.98rem, 1.15vw, 1.08rem);
  line-height: 2.05;
}

.fatemind-report-prose p {
  margin: 0;
}

.fatemind-report-prose p + p,
.fatemind-report-prose p + h4,
.fatemind-report-prose ul + p,
.fatemind-report-prose blockquote + p {
  margin-top: 1rem;
}

.fatemind-report-prose h4 {
  margin: 1.15rem 0 0.5rem;
  color: rgba(248, 250, 252, 0.98);
  font-size: 1.05rem;
  line-height: 1.55;
  font-weight: 760;
}

.fatemind-report-prose ul {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.fatemind-report-prose li {
  position: relative;
  margin-top: 0.45rem;
  padding-left: 1.2rem;
}

.fatemind-report-prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.9em;
  width: 0.36rem;
  height: 0.36rem;
  border-radius: 999px;
  background: rgba(103, 232, 249, 0.82);
}

.fatemind-report-prose blockquote {
  margin: 0.8rem 0 0;
  border-left: 3px solid rgba(148, 163, 184, 0.45);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.28);
  padding: 0.9rem 1rem;
  color: rgba(241, 245, 249, 0.92);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  line-height: 1.75;
}

@keyframes starDrift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(42px);
  }
}

@keyframes routeFlow {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 260px 0, 220px 0;
  }
}

@keyframes waveSway {
  0%,
  100% {
    transform: translateX(-2%) translateY(0);
  }
  50% {
    transform: translateX(2%) translateY(8px);
  }
}

@keyframes pickerConfirm {
  0% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1.05);
  }
}

.animate-picker-confirm {
  animation: pickerConfirm 220ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
