:root {
  --navy: #080f2d;
  --midnight: #0d1638;
  --panel: rgba(255, 255, 255, 0.04);
  --lavender: #c6b7ff;
  --gold: #f2dba6;
  --muted: #9fb0d6;
  --radius: 18px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 18% 10%, rgba(198, 183, 255, 0.12), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(242, 219, 166, 0.18), transparent 26%),
    linear-gradient(180deg, #060b22 0%, #0c1440 100%);
  color: #f8f9ff;
  min-height: 100vh;
  scroll-behavior: smooth;
}

a {
  color: inherit;
  text-decoration: none;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  background: rgba(5, 9, 26, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logo-text {
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 1.35rem;
  color: #fdfaff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link.active,
.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--lavender);
}

.language-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.lang-btn {
  background: transparent;
  border: none;
  color: #f5f7ff;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.lang-btn.active {
  color: var(--lavender);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  padding: 72px 32px 48px;
  align-items: center;
}

.brand-title {
  font-family: 'Prata', serif;
  font-size: 56px;
  margin: 0 0 12px;
}

.tagline {
  font-size: 20px;
  color: var(--gold);
  max-width: 520px;
  margin: 0 0 24px;
}

.intro {
  color: #dfe4ff;
  max-width: 640px;
  margin: 0 0 18px;
}

.eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lavender);
  font-weight: 700;
  font-size: 12px;
  margin: 0 0 8px;
}

.fortune-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px;
  border-radius: 16px;
  max-width: 540px;
}

.pill-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 12px;
}

.pill-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lavender);
}

.pill-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.cta-row {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}

.pill-link {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
  transition: border 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.pill-link.active,
.pill-link:hover {
  border-color: var(--lavender);
  color: var(--lavender);
  transform: translateY(-2px);
}

.hero-card {
  display: flex;
  justify-content: center;
}

.card-shell {
  width: 320px;
  height: 440px;
  border-radius: 20px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

/* Shared card back uses assets/meowtarot-back.png (uploaded manually). */
.card-back {
  background-image: url('../assets/meowtarot-back.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.card-back-hero {
  width: 100%;
  aspect-ratio: 2.7 / 4;
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.35);
}

button,
.primary,
.ghost {
  font-family: inherit;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.primary {
  background: linear-gradient(135deg, #c9b7ff, #8b7cff);
  color: #0b102b;
  box-shadow: 0 10px 28px rgba(140, 123, 255, 0.45);
}

.primary:hover:not(:disabled) {
  transform: translateY(-2px);
}

.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #f5f7ff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.large {
  width: 80%;
}

.section-block {
  padding: 64px 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  align-items: center;
}

.daily-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.daily-section .section-heading {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 12px;
}

.daily-section .board {
  max-width: 1200px;
  margin: 0 auto;
}

.daily-section .card-grid {
  margin-left: auto;
  margin-right: auto;
}

.section-block.alt {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-heading h2 {
  margin: 6px 0 10px;
  font-size: 32px;
}

.section-heading p {
  color: #dfe4ff;
}

.board {
  width: 100%;
}

.board-inner {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.board-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.6) 60%);
  z-index: 2;
}

.overlay-icon {
  font-size: 48px;
}

.board-controls {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.instruction {
  margin: 0;
  font-weight: 700;
  color: var(--gold);
}

.sub-instruction {
  margin: 4px 0 0;
  color: #dfe4ff;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin: 18px 0;
  min-height: 240px;
}

.card {
  position: relative;
  height: 180px;
  border-radius: 14px;
  transform-style: preserve-3d;
  transition: transform 0.4s ease, box-shadow 0.2s ease, outline 0.2s ease, opacity 0.3s ease;
  cursor: pointer;
}

.card .face {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  backface-visibility: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.card .back {
  background-color: #0b102b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.card .front {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #1b1f4a, #2b2f63);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #f3e7ff;
}

.card.revealed {
  transform: rotateY(180deg) scale(1.02);
}

.card.revealed .back {
  transform: rotateY(180deg);
}

.card.revealed .front {
  transform: rotateY(0deg);
}

.card .front .icon {
  font-size: 26px;
}

.card.selected {
  outline: 2px solid var(--lavender);
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 44px rgba(134, 119, 255, 0.5);
}

.card-grid.is-animating {
  pointer-events: none;
}

.card.is-shuffling-out {
  opacity: 0;
  transform: scale(0.85);
}

.card.is-shuffling-in {
  opacity: 0;
  transform: scale(0.85);
}

.continue-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hint {
  color: var(--muted);
}

.hint-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.count {
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-weight: 700;
}

.results {
  padding: 48px 32px 64px;
  display: none;
}

.results.show {
  display: block;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.result-card {
  padding: 14px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.result-card .label {
  color: var(--lavender);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 12px;
  text-transform: uppercase;
}

.result-card h5 {
  margin: 8px 0 6px;
  font-size: 18px;
}

.summary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px;
  border-radius: 14px;
}

.summary p {
  margin: 8px 0;
  color: #dfe5ff;
}

.result-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.share-group {
  display: flex;
  gap: 10px;
}

.site-footer {
  padding: 22px 32px 28px;
  text-align: center;
  color: #cbd4ff;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

.meaning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.sample-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 12px;
}

.sample-card h5 {
  margin: 6px 0;
}

@media (max-width: 768px) {
  .brand-title { font-size: 44px; }
  .card-shell { width: 100%; max-width: 320px; }
  .board-controls { align-items: flex-start; }
}

.is-hidden { display: none !important; }
