:root {
  color-scheme: dark;
  --bg: #08111f;
  --bg-soft: #101b30;
  --panel: rgba(12, 20, 36, 0.82);
  --panel-strong: #121d33;
  --line: rgba(173, 198, 255, 0.16);
  --text: #f3f6ff;
  --muted: #afbbd4;
  --accent: #e0b56d;
  --accent-2: #74d0ff;
  --danger: #ff8f8f;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(224, 181, 109, 0.24), transparent 26%),
    radial-gradient(circle at 85% 15%, rgba(116, 208, 255, 0.2), transparent 24%),
    linear-gradient(160deg, #050b15 0%, #08111f 50%, #0d1730 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(circle at center, black 25%, transparent 100%);
  opacity: 0.45;
}

a {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.shell-login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
  padding: 32px 0;
}

.shell-reading {
  padding: 32px 0 56px;
}

.hero-panel,
.form-panel,
.card,
.status-bar {
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 27, 48, 0.9), rgba(8, 17, 31, 0.82));
  box-shadow: var(--shadow);
  border-radius: 24px;
}

.hero-panel {
  padding: 40px;
}

.eyebrow {
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.74rem;
  color: var(--accent);
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  line-height: 0.95;
}

.hero-panel h1 {
  font-size: clamp(3.4rem, 8vw, 6.4rem);
  max-width: 9ch;
}

.hero-copy {
  margin: 18px 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.hero-meta,
.status-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.hero-meta {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.94rem;
}

.hero-meta span,
.status-bar > div {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.form-panel {
  padding: 16px;
}

.login-card,
.spread-panel {
  padding: 24px;
}

.login-card h2,
.spread-head h2 {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
}

.login-card p,
.spread-note,
.reading-summary,
.status-label,
.helper-text {
  color: var(--muted);
}

.alert {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 143, 143, 0.14);
  border: 1px solid rgba(255, 143, 143, 0.28);
  color: #ffd4d4;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.login-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.login-form span,
.status-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

.login-form input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
}

.login-form input:focus {
  outline: 2px solid rgba(224, 181, 109, 0.5);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #f8d79e);
  color: #1d1506;
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.helper-text,
.helper-links {
  margin: 14px 0 0;
  font-size: 0.94rem;
}

.helper-links a {
  color: var(--accent-2);
}

.reading-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 20px;
}

.reading-hero h1 {
  font-size: clamp(3rem, 8vw, 5.2rem);
}

.reading-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.status-bar {
  padding: 18px;
  margin-bottom: 22px;
}

.status-bar strong {
  display: block;
  margin-top: 4px;
  font-size: 1.05rem;
}

.spread-panel {
  overflow: hidden;
}

.spread-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 22px;
}

.spread {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.tarot-card {
  position: relative;
  min-height: 420px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    radial-gradient(circle at top, rgba(224, 181, 109, 0.16), transparent 50%),
    rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform-style: preserve-3d;
  animation: rise 0.7s ease both;
}

.tarot-card:nth-child(2) {
  animation-delay: 0.08s;
}

.tarot-card:nth-child(3) {
  animation-delay: 0.16s;
}

.card-top,
.card-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.card-symbol {
  display: grid;
  place-items: center;
  min-height: 172px;
  margin: 20px 0;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(224, 181, 109, 0.14), rgba(116, 208, 255, 0.08));
  font-size: 4.5rem;
}

.card-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  line-height: 1;
  margin: 0 0 8px;
}

.card-meaning {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.8rem;
}

.reading-summary {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  line-height: 1.75;
}

.reading-summary strong {
  color: var(--text);
}

.card-empty {
  min-height: 240px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 960px) {
  .shell-login,
  .reading-hero,
  .spread-head,
  .hero-meta,
  .status-bar,
  .spread {
    grid-template-columns: 1fr;
  }

  .shell-login,
  .reading-hero,
  .spread-head {
    display: grid;
  }

  .hero-panel {
    padding: 28px;
  }

  .tarot-card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1180px);
  }

  .hero-panel,
  .login-card,
  .spread-panel,
  .status-bar {
    border-radius: 20px;
  }

  .tarot-card {
    padding: 16px;
  }

  .card-symbol {
    min-height: 140px;
    font-size: 3.6rem;
  }
}