:root {
  --bg-1: #07070d;
  --bg-2: #12101d;
  --card: rgba(20, 18, 33, 0.84);
  --card-strong: rgba(28, 24, 43, 0.94);
  --text: #f8efd9;
  --muted: #c8bfae;
  --soft: #9d927f;
  --gold: #d7b56d;
  --gold-2: #f0d58b;
  --purple: #8d66ff;
  --purple-2: #c7a8ff;
  --danger: #ff8f8f;
  --success: #9ee6bd;
  --border: rgba(240, 213, 139, 0.22);
  --border-soft: rgba(255, 255, 255, 0.08);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  --radius-xl: 28px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(141, 102, 255, 0.22), transparent 34%),
    radial-gradient(circle at 85% 20%, rgba(215, 181, 109, 0.16), transparent 32%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2) 55%, #090812);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.2px),
    radial-gradient(circle, rgba(215, 181, 109, 0.28) 0 1px, transparent 1.2px);
  background-size: 72px 72px, 116px 116px;
  background-position: 0 0, 32px 48px;
  opacity: 0.22;
  z-index: -3;
}

.astro-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -2;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.55;
}

.orb-1 {
  width: 260px;
  height: 260px;
  left: -80px;
  top: 120px;
  background: radial-gradient(circle, rgba(141, 102, 255, 0.42), transparent 68%);
}

.orb-2 {
  width: 320px;
  height: 320px;
  right: -120px;
  top: 20px;
  background: radial-gradient(circle, rgba(215, 181, 109, 0.3), transparent 68%);
}

.orb-3 {
  width: 220px;
  height: 220px;
  left: 55%;
  bottom: -90px;
  background: radial-gradient(circle, rgba(199, 168, 255, 0.26), transparent 70%);
}

.astro-topbar {
  width: min(1120px, calc(100% - 32px));
  margin: 22px auto 0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.top-link,
.btn-primary,
.btn-secondary {
  appearance: none;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  font: inherit;
  font-weight: 700;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
}

.top-link-muted {
  color: var(--muted);
}

.top-link:hover,
.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
}

.astro-shell {
  width: min(980px, calc(100% - 32px));
  margin: 46px auto 60px;
}

.astro-hero {
  text-align: center;
  margin-bottom: 28px;
}

.astro-badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 800;
}

.astro-badge {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(215, 181, 109, 0.08);
  box-shadow: 0 0 42px rgba(215, 181, 109, 0.12);
}

h1,
h2 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1.06;
  margin: 0;
}

h1 {
  margin-top: 18px;
  font-size: clamp(2.35rem, 7vw, 5.2rem);
  letter-spacing: -0.045em;
  color: #fff7e5;
  text-shadow: 0 10px 38px rgba(0, 0, 0, 0.45);
}

.astro-subtitle {
  width: min(760px, 100%);
  margin: 18px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.18rem);
  line-height: 1.75;
}

.astro-card,
.result-card,
.astro-guide {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.astro-card {
  padding: clamp(20px, 4vw, 34px);
}

.astro-card-head {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  margin-bottom: 24px;
}

.astro-card h2,
.result-card h2,
.astro-guide h2 {
  margin-top: 8px;
  color: #fff3d2;
  font-size: clamp(1.55rem, 4vw, 2.45rem);
}

.moon-mark {
  width: 74px;
  height: 74px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(240, 213, 139, 0.28);
  color: var(--gold-2);
  background:
    radial-gradient(circle at 30% 30%, rgba(240, 213, 139, 0.28), transparent 42%),
    rgba(255, 255, 255, 0.04);
  font-size: 2.6rem;
  box-shadow: 0 0 45px rgba(215, 181, 109, 0.13);
}

.astro-form {
  display: grid;
  gap: 12px;
}

label {
  color: #fff1d0;
  font-weight: 800;
  font-size: 0.94rem;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border-soft);
  outline: none;
  color: var(--text);
  background: rgba(5, 5, 12, 0.56);
  border-radius: var(--radius-lg);
  padding: 15px 16px;
  font: inherit;
  line-height: 1.5;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

textarea {
  min-height: 170px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: rgba(200, 191, 174, 0.62);
}

input:focus,
textarea:focus {
  border-color: rgba(240, 213, 139, 0.62);
  box-shadow:
    0 0 0 4px rgba(215, 181, 109, 0.12),
    inset 0 0 0 1px rgba(240, 213, 139, 0.1);
}

.form-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--soft);
  font-size: 0.88rem;
  margin-top: 2px;
}

.astro-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
  border-radius: 999px;
}

.btn-primary {
  color: #160f06;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 12px 34px rgba(215, 181, 109, 0.22);
}

.btn-secondary {
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.055);
}

button:disabled,
input:disabled,
textarea:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

button:disabled:hover {
  transform: none;
}

.astro-status {
  min-height: 24px;
  margin-top: 18px;
  color: var(--muted);
  font-weight: 600;
}

.astro-status.is-loading {
  color: var(--gold-2);
}

.astro-status.is-error {
  color: var(--danger);
}

.astro-status.is-success {
  color: var(--success);
}

.astro-result {
  margin-top: 28px;
}

.result-card {
  padding: clamp(20px, 4vw, 34px);
  background:
    linear-gradient(145deg, rgba(215, 181, 109, 0.08), rgba(141, 102, 255, 0.06)),
    var(--card-strong);
}

.result-head {
  margin-bottom: 18px;
}

.result-content {
  color: #f4ead4;
  line-height: 1.86;
  font-size: 1.02rem;
}

.result-content p {
  margin: 0 0 16px;
}

.result-content p:last-child {
  margin-bottom: 0;
}

.astro-guide {
  margin-top: 28px;
  padding: clamp(20px, 4vw, 34px);
}

.astro-guide p {
  color: var(--muted);
  line-height: 1.82;
  font-size: 1rem;
}

.astro-footer {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto 34px;
  text-align: center;
  color: var(--soft);
  font-size: 0.92rem;
}

@media (max-width: 640px) {
  .astro-topbar {
    justify-content: center;
    flex-wrap: wrap;
  }

  .astro-shell {
    margin-top: 32px;
  }

  .astro-card-head {
    align-items: flex-start;
  }

  .moon-mark {
    width: 58px;
    height: 58px;
    font-size: 2rem;
  }

  .form-meta {
    flex-direction: column;
    gap: 4px;
  }

  .astro-actions,
  .result-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}
.astro-inline-loader {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid rgba(240, 213, 139, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 20% 20%, rgba(240, 213, 139, 0.13), transparent 36%),
    rgba(255, 255, 255, 0.05);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
}

.astro-inline-loader[hidden] {
  display: none !important;
}
.astro-hourglass {
  width: 34px;
  height: 44px;
  position: relative;
  flex: 0 0 auto;
  border-top: 3px solid var(--gold-2);
  border-bottom: 3px solid var(--gold-2);
  border-radius: 8px;
  animation: astroHourglassSpin 1.25s linear infinite;
}

.astro-hourglass::before,
.astro-hourglass::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 24px;
  height: 20px;
  transform: translateX(-50%);
  border-left: 2px solid rgba(240, 213, 139, 0.72);
  border-right: 2px solid rgba(240, 213, 139, 0.72);
}

.astro-hourglass::before {
  top: 2px;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.astro-hourglass::after {
  bottom: 2px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.sand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold-2);
  box-shadow: 0 0 12px rgba(240, 213, 139, 0.55);
}

.sand-top {
  top: 8px;
  width: 16px;
  height: 10px;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  animation: astroSandTop 1.25s ease-in-out infinite;
}

.sand-bottom {
  bottom: 8px;
  width: 16px;
  height: 10px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  animation: astroSandBottom 1.25s ease-in-out infinite;
}

.astro-loader-text {
  display: grid;
  gap: 3px;
}

.astro-loader-text strong {
  color: var(--gold-2);
  font-size: 0.98rem;
}

.astro-loader-text span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

@keyframes astroHourglassSpin {
  0% {
    transform: rotate(0deg);
  }

  82% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(180deg);
  }
}

@keyframes astroSandTop {
  0% {
    opacity: 1;
    height: 12px;
  }

  70% {
    opacity: 0.25;
    height: 2px;
  }

  100% {
    opacity: 1;
    height: 12px;
  }
}

@keyframes astroSandBottom {
  0% {
    opacity: 0.35;
    height: 2px;
  }

  70% {
    opacity: 1;
    height: 12px;
  }

  100% {
    opacity: 0.35;
    height: 2px;
  }
}