/* =====================================
   MIND ODYSSEY — MOBILE-FIRST STYLE
   ===================================== */

:root {
  /* Dark theme base */
  --bg: #0f172a;
  --text: #e2e8f0;
  --surface: #1a2236;
  --card-bg: var(--surface);
  --border: rgba(148,163,184,0.2);
  --pill-bg: rgba(99,102,241,0.15);
  --shadow: 0 6px 30px rgba(0,0,0,0.4);
  --btn-bg: #6366f1;
  --btn-hover: #4f46e5;
  --ok: #10b981;
  --err: #ef4444;
  --radius: 20px;

  /* Fluid type & tap sizes */
  --fs-xs: clamp(14px, 3.2vw, 16px);
  --fs-sm: clamp(16px, 3.8vw, 18px);
  --fs-md: clamp(18px, 4.4vw, 22px);
  --fs-lg: clamp(22px, 5vw, 28px);
  --fs-xl: clamp(26px, 6vw, 36px);
  --tap-size: 60px;
  --gap: clamp(12px, 3vw, 24px);

  /* Shape scaling */
  --shape-size: clamp(110px, 25vw, 160px);
}

[data-theme="light"] {
  --bg: #f8fafc;
  --text: #0f172a;
  --surface: #ffffff;
  --card-bg: var(--surface);
  --border: rgba(15,23,42,0.15);
  --pill-bg: rgba(99,102,241,0.12);
  --shadow: 0 6px 26px rgba(2,6,23,0.1);
}

/* Global */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", sans-serif;
  font-size: clamp(16px, 2.5vw, 20px);
    line-height: 1.4;

  text-align: center;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background 0.4s, color 0.4s;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem clamp(1rem, 4vw, 2rem);
}
h1 {
  font-size: var(--fs-lg);
  margin: 0;
}
#theme-toggle {
  border: none;
  background: none;
  font-size: 1.6rem;
  color: var(--text);
  cursor: pointer;
}

/* Cards & sections */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  margin: 1rem;
}

/* Buttons */
button {
  background: var(--btn-bg);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 0.9rem 1.4rem;
  font-weight: 600;
  font-size: var(--fs-md);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  min-height: var(--tap-size);
}
button:hover {
  background: var(--btn-hover);
  transform: translateY(-1px);
}
button:active {
  transform: scale(0.96);
}
.btn-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--gap);
  margin-top: 1.2rem;
}
.wrap{max-width:980px;margin:1rem auto;padding:1rem}

/* Pills (round/score indicators) */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--pill-bg);
  font-size: var(--fs-sm);
  margin: 0.2rem;
}

/* Option blocks (Sequence / Emotion / Odd) */
.option, .choice-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: var(--fs-md);
  padding: 1rem 1.2rem;
  text-align: left;
  width: 100%;
  transition: transform 0.1s, border-color 0.2s;
}
.option:hover, .choice-btn:hover {
  transform: translateY(-2px);
  border-color: var(--btn-bg);
}
.option.correct {
  outline: 3px solid var(--ok);
}
.option.wrong {
  outline: 3px solid var(--err);
}

/* Shapes (Odd One Out visual) */
.shape-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--shape-size), 1fr));
  gap: var(--gap);
  justify-items: center;
  margin: 1.2rem 0;
}
.shape-cell {
  width: var(--shape-size);
  height: var(--shape-size);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.2px solid var(--border);
  transition: transform 0.1s, border-color 0.2s;
}
.shape-cell:hover {
  transform: translateY(-2px);
  border-color: var(--btn-bg);
}
.shape-cell.correct {
  outline: 3px solid var(--ok);
}
.shape-cell.wrong {
  outline: 3px solid var(--err);
}
.shape-cell svg {
  width: 100%;
  height: 100%;
}

/* Sequence display */
.seq-question {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin: 1rem 0;
}

/* Grid puzzle */
.grid {
  display: grid;
  gap: 10px;
  justify-content: center;
  margin: 1.2rem auto;
}
.grid input {
  width: 64px;
  height: 64px;
  font-size: var(--fs-lg);
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
}
.grid input:focus {
  outline: 2px solid var(--btn-bg);
}

.realm-list {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  align-items:stretch;
  gap:16px;   
}

.realm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: var(--card-bg);
  color: var(--text);
  border: 10px solid var(--border);
  
  padding: 1.2rem 1.4rem;
  font-size: var(--fs-md);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.1s ease, background 0.2s ease;
  min-height: var(--tap-size);
}

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

.realm-btn.logic:hover { background: #3b82f6; color: #fff; }
.realm-btn.emotion:hover { background: #ec4899; color: #fff; }
.realm-btn.creation:hover { background: #f59e0b; color: #fff; }
.realm-btn.spirit:hover { background: #10b981; color: #fff; }
.realm-btn.reflection:hover { background: #8b5cf6; color: #fff; }


.opts button.opt, .shape-cell {
  min-width: 40vw;
  min-height: 18vh;
  font-size: 1.3rem;
  border-radius: 16px;
  margin: 0.4rem;
  padding: 1rem;
}
/* Footer */
footer {
  opacity: 0.8;
  font-size: var(--fs-xs);
  margin-top: auto;
  padding: 1rem;
}


/* Responsive tweaks */
@media (min-width: 700px) {
  .realm-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
  }
}