:root {
  --bg-gradient: linear-gradient(135deg, #1e0f3f 0%, #120a2a 40%, #03061b 100%);
  --card-bg: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 215, 0, 0.4);
  --text-light: #f7f4ff;
  --accent: #d4af37;
  --accent-strong: #f6d87a;
  --transition-fast: 0.2s ease;
  --shadow-soft: 0 20px 40px rgba(5, 5, 28, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: "Poppins", "Noto Sans Thai", sans-serif;
  color: var(--text-light);
  background: #03061b;
}

body.gradient-bg {
  background: var(--bg-gradient);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 1.5rem 2rem;
}

.reading-header {
  justify-content: space-between;
}

.back-link {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color var(--transition-fast);
}

.back-link:hover {
  color: #ffffff;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-light);
  font-family: inherit;
  cursor: pointer;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

.lang-btn.active,
.lang-btn:hover {
  color: var(--accent-strong);
  text-shadow: 0 0 6px rgba(246, 216, 122, 0.5);
}

.lang-divider {
  opacity: 0.6;
}

.hero {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  text-align: center;
}

.hero-content {
  max-width: 560px;
  background: rgba(3, 6, 27, 0.35);
  padding: 3rem 2.5rem;
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(212, 175, 55, 0.2);
  backdrop-filter: blur(10px);
}

.subtitle {
  margin-top: 0.75rem;
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0.85;
}

.cta-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2.5rem;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.04em;
  background: rgba(212, 175, 55, 0.08);
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.btn:hover:not([disabled]) {
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(246, 216, 122, 0.6);
  background: rgba(212, 175, 55, 0.18);
}

.btn:disabled,
.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
  border-style: dashed;
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.05);
}

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

.btn.primary {
  margin: 2rem auto 0;
}

.reading {
  width: min(960px, 90%);
  margin: 0 auto;
  text-align: center;
  padding-bottom: 4rem;
  flex: 1;
}

.reading-title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-top: 1rem;
}

.reading-subtitle {
  margin-top: 0.5rem;
  font-size: 1rem;
  opacity: 0.85;
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s forwards;
}

.position-badge {
  align-self: flex-start;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--accent-strong);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card h3 {
  font-size: 1.2rem;
  margin: 0;
}

.card .orientation {
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.card .meaning {
  line-height: 1.65;
  font-size: 0.96rem;
  opacity: 0.92;
}

.conclusion {
  margin-top: 2.5rem;
  font-size: 1.05rem;
  line-height: 1.7;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.7s forwards;
}

.site-footer {
  text-align: center;
  padding: 1.5rem 0 2rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  opacity: 0.75;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 1.25rem 1.5rem;
  }

  .hero-content {
    padding: 2.5rem 1.75rem;
  }

  .cta-group {
    gap: 0.75rem;
  }

  .btn {
    width: 100%;
  }

  .cards-container {
    grid-template-columns: 1fr;
  }
}
