/* ── RESET & TOKENS ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0712;
  --surface: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.12);
  --text: #e8dff5;
  --muted: rgba(232, 223, 245, 0.55);
  --accent1: #c084fc;
  --accent2: #f472b6;
  --accent3: #67e8f9;
  --radius: 20px;
  --font-body: 'Padauk', system-ui, sans-serif;
  --font-hero: 'Cinzel Decorative', serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1.5rem 1rem 4rem;
  position: relative;
  overflow-x: hidden;
}

/* ── STARFIELD ── */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, .7) 0, transparent 100%),
    radial-gradient(1px 1px at 78% 8%, rgba(255, 255, 255, .5) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 45% 55%, rgba(200, 170, 255, .8) 0, transparent 100%),
    radial-gradient(1px 1px at 91% 72%, rgba(255, 255, 255, .6) 0, transparent 100%),
    radial-gradient(1px 1px at 33% 88%, rgba(255, 255, 255, .4) 0, transparent 100%),
    radial-gradient(2px 2px at 68% 35%, rgba(103, 232, 249, .6) 0, transparent 100%),
    radial-gradient(1px 1px at 5% 60%, rgba(255, 255, 255, .5) 0, transparent 100%),
    radial-gradient(1px 1px at 85% 45%, rgba(244, 114, 182, .5) 0, transparent 100%);
}

.nebula {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(88, 28, 135, .35) 0, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(190, 18, 60, .2) 0, transparent 55%),
    radial-gradient(ellipse 50% 60% at 50% 50%, rgba(15, 23, 42, 1) 0, transparent 70%);
}

main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
}

/* ── UTILITIES ── */
.hidden {
  display: none !important;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 700;
  transition: transform .15s, box-shadow .2s, opacity .2s;
  color: #fff;
}

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

.btn:active {
  transform: translateY(0) scale(.97);
}

.btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  box-shadow: 0 0 24px rgba(168, 85, 247, .35);
}

.btn-primary:hover {
  box-shadow: 0 0 36px rgba(168, 85, 247, .55);
}

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, .1);
}

/* ── HERO ── */
#hero {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
}

.orb {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  margin: 0 auto 1.75rem;
  background: conic-gradient(from 0deg, #a855f7, #ec4899, #67e8f9, #a855f7);
  animation: spin 8s linear infinite;
  box-shadow: 0 0 60px rgba(168, 85, 247, .6), 0 0 100px rgba(236, 72, 153, .3);
  position: relative;
}

.orb::after {
  content: '🔮';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 7, 18, .85) 60%, transparent);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#hero h1 {
  font-family: var(--font-hero);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1.2;
  background: linear-gradient(135deg, #e879f9, #c084fc, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

#hero p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto 2rem;
}

.hero-meta {
  font-size: .8rem;
  color: var(--muted);
  margin-top: 1.25rem;
}

/* ── QUIZ ── */
#quizSection {
  padding: 1.75rem;
}

.progress-wrap {
  margin-bottom: 1.5rem;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: .5rem;
}

.progress-track {
  height: 5px;
  background: rgba(255, 255, 255, .1);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
}

#questionText {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.options {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin-bottom: 1.5rem;
}

.opt-btn {
  width: 100%;
  text-align: left;
  padding: .9rem 1.1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .75rem;
  transition: border-color .2s, background .2s, transform .15s;
}

.opt-btn:hover {
  border-color: rgba(168, 85, 247, .5);
  background: rgba(168, 85, 247, .08);
}

.opt-btn.active {
  border-color: var(--accent1);
  background: rgba(168, 85, 247, .18);
}

.opt-btn .emoji {
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: transform .2s;
}

.opt-btn:hover .emoji,
.opt-btn.active .emoji {
  transform: scale(1.15);
}

/* ── RESULTS ── */
#resultsSection {
  animation: fadeUp .6s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.aura-orb-wrap {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

.aura-orb {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  box-shadow: 0 0 60px var(--orb-color, rgba(168, 85, 247, .6)),
    0 0 120px var(--orb-glow, rgba(168, 85, 247, .2));
  animation: pulse-orb 3s ease-in-out infinite;
  transition: background .8s;
}

@keyframes pulse-orb {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 60px var(--orb-color), 0 0 100px var(--orb-glow);
  }

  50% {
    transform: scale(1.04);
    box-shadow: 0 0 80px var(--orb-color), 0 0 140px var(--orb-glow);
  }
}

.primary-name {
  font-family: var(--font-hero);
  font-size: 1.7rem;
  margin-bottom: .35rem;
}

.secondary-name {
  color: var(--muted);
  font-size: .9rem;
}

.energy-badge {
  display: inline-block;
  margin-top: .75rem;
  padding: .35rem 1.1rem;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  border-radius: 99px;
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
}

/* stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  margin: 1rem 0;
}

.stat-card {
  padding: 1rem .75rem;
  text-align: center;
  border-radius: 16px;
}

.stat-card .icon {
  font-size: 1.4rem;
  margin-bottom: .25rem;
}

.stat-card .val {
  font-size: 1.3rem;
  font-weight: 700;
}

.stat-card .lbl {
  font-size: .7rem;
  color: var(--muted);
  margin-top: .15rem;
}

/* breakdown bars */
.breakdown {
  padding: 1.5rem;
}

.breakdown h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .7rem;
  font-size: .8rem;
}

.bar-label {
  width: 90px;
  flex-shrink: 0;
}

.bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, .08);
  border-radius: 99px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 99px;
  width: 0;
  transition: width 1s cubic-bezier(.4, 0, .2, 1);
}

.bar-pct {
  width: 36px;
  text-align: right;
  font-weight: 700;
  color: var(--muted);
}

/* tabs */
.tabs-wrap {
  padding: 1.5rem;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.tab-btn {
  padding: .45rem 1rem;
  border-radius: 99px;
  font-size: .8rem;
  font-weight: 700;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text);
  font-family: var(--font-body);
  transition: background .2s, border-color .2s;
}

.tab-btn.active {
  background: var(--accent1);
  border-color: var(--accent1);
  color: #fff;
}

.tab-panel {
  display: none;
  animation: fadeUp .3s ease both;
}

.tab-panel.active {
  display: block;
}

.info-block {
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin-bottom: .75rem;
  border: 1px solid;
}

.info-block h4 {
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.info-block p,
.info-block li {
  font-size: .88rem;
  line-height: 1.6;
}

.info-block ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.info-block li::before {
  content: '✦ ';
  opacity: .7;
}

.block-purple {
  background: rgba(139, 92, 246, .1);
  border-color: rgba(139, 92, 246, .3);
}

.block-blue {
  background: rgba(59, 130, 246, .08);
  border-color: rgba(59, 130, 246, .25);
}

.block-green {
  background: rgba(34, 197, 94, .08);
  border-color: rgba(34, 197, 94, .25);
}

.block-yellow {
  background: rgba(234, 179, 8, .08);
  border-color: rgba(234, 179, 8, .25);
}

.block-orange {
  background: rgba(249, 115, 22, .08);
  border-color: rgba(249, 115, 22, .25);
}

.block-red {
  background: rgba(239, 68, 68, .08);
  border-color: rgba(239, 68, 68, .25);
}

.block-pink {
  background: rgba(244, 114, 182, .1);
  border-color: rgba(244, 114, 182, .3);
}

.block-indigo {
  background: rgba(99, 102, 241, .08);
  border-color: rgba(99, 102, 241, .25);
}

.block-cyan {
  background: rgba(6, 182, 212, .08);
  border-color: rgba(6, 182, 212, .25);
}

/* tips */
.tips-wrap {
  padding: 1.5rem;
}

.tips-wrap h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.tip-item {
  display: flex;
  gap: .75rem;
  background: rgba(255, 255, 255, .04);
  border-radius: 12px;
  padding: .85rem;
  margin-bottom: .65rem;
  align-items: flex-start;
}

.tip-item .icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: .05rem;
}

.tip-item .label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent3);
  margin-bottom: .2rem;
}

.tip-item .val {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.5;
}

/* affirmation */
.affirm-wrap {
  padding: 1.5rem;
  text-align: center;
}

.affirm-wrap h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.affirm-text {
  font-size: 1.05rem;
  font-style: italic;
  color: #f9a8d4;
  line-height: 1.65;
  min-height: 3.5rem;
  transition: opacity .3s;
}

.affirm-text.fade {
  opacity: 0;
}

/* compat */
.compat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

/* actions */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
  padding: .5rem 0 1rem;
}

/* history */
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 1rem;
  background: rgba(255, 255, 255, .04);
  border-radius: 12px;
  margin-bottom: .5rem;
  font-size: .85rem;
}

.history-item .name {
  font-weight: 700;
}

.history-item .date {
  font-size: .72rem;
  color: var(--muted);
  margin-top: .15rem;
}

.history-view {
  padding: .35rem .9rem;
  background: rgba(168, 85, 247, .2);
  border: 1px solid rgba(168, 85, 247, .35);
  border-radius: 99px;
  cursor: pointer;
  font-size: .75rem;
  color: var(--text);
  font-family: var(--font-body);
  transition: background .2s;
}

.history-view:hover {
  background: rgba(168, 85, 247, .4);
}

/* toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(30, 20, 50, .95);
  border: 1px solid var(--border);
  padding: .65rem 1.4rem;
  border-radius: 99px;
  font-size: .85rem;
  backdrop-filter: blur(12px);
  z-index: 99;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* responsive */
@media (max-width: 460px) {
  .compat-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    gap: .5rem;
  }
}

.about-section {
  margin-top: 2rem;
  animation: fadeIn 1.2s ease-out;
}

.about-section ul li b {
  color: var(--accent3);
  font-weight: 700;
}

/* Quiz စတင်တဲ့အခါ ဒါကိုလည်း ဖုံးသွားအောင် app.js မှာ ပြင်ပါမယ် */
.hidden {
  display: none !important;
}