/* ===================================================================
   style.css
   Clean, mobile-first Apple-style UI, dark-sky-blue default theme.
   =================================================================== */

:root {
  --base-font-size: 16px;

  /* Shared tokens */
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;

  --shadow-1: 0 10px 30px rgba(0,0,0,0.25);
  --shadow-2: 0 6px 20px rgba(0,0,0,0.22);

  --transition-fast: 150ms ease;
  --transition-med: 250ms ease;

  /* Theme variables (swapped via [data-theme]) */
  --bg: #0b1420;
  --elev: #0f1d2e;
  --text: #e8f3ff;
  --muted: #a6c4e8;
  --accent-1: #114b8a;  /* container odd */
  --accent-2: #0a7ac4;  /* container even */
  --accent-1-weak: #0e3f74;
  --accent-2-weak: #096aa9;
  --btn-bright: #ffd166; /* bright for OT */
  --btn-bright-text: #1c1c1c;
}

html { font-size: var(--base-font-size); }
*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; /* Aptos fallback */
  color: var(--text);
  background: radial-gradient(1200px 800px at 50% -10%, rgba(40,120,200,0.18), transparent 60%), var(--bg);
  min-height: 100vh;
}

/* -------------------- Themes (4 dark + 4 light) -------------------- */
body[data-theme="dark-sky-blue"] {
  --bg: #07131f;
  --elev: #0c1e31;
  --text: #e9f1fa;
  --muted: #a5c6ea;
  --accent-1: #124a88;
  --accent-2: #0a76c1;
  --accent-1-weak: #103e72;
  --accent-2-weak: #0a68a8;
  --btn-bright: #ffd166;
  --btn-bright-text: #1a1a1a;
}
body[data-theme="dark-emerald"] {
  --bg: #061410;
  --elev: #0c221b;
  --text: #ebf7f1;
  --muted: #b8e6d5;
  --accent-1: #0f6d55;
  --accent-2: #1a8f6e;
  --accent-1-weak: #0d5f49;
  --accent-2-weak: #177f62;
  --btn-bright: #f6d365;
  --btn-bright-text: #102014;
}
body[data-theme="dark-amethyst"] {
  --bg: #12071a;
  --elev: #1f0b2b;
  --text: #f6ebff;
  --muted: #dab8ff;
  --accent-1: #6b2ea5;
  --accent-2: #8b3ad1;
  --accent-1-weak: #5c2690;
  --accent-2-weak: #7b33bb;
  --btn-bright: #ffd37d;
  --btn-bright-text: #251325;
}
body[data-theme="dark-graphite"] {
  --bg: #0c0f13;
  --elev: #161c24;
  --text: #f0f2f5;
  --muted: #c3c9d4;
  --accent-1: #3a4756;
  --accent-2: #56667a;
  --accent-1-weak: #333f4d;
  --accent-2-weak: #4c5a6b;
  --btn-bright: #ffd89e;
  --btn-bright-text: #121316;
}
body[data-theme="light-sky-blue"] {
  --bg: #f3f8ff;
  --elev: #ffffff;
  --text: #10324f;
  --muted: #5b89b8;
  --accent-1: #d0e6ff;
  --accent-2: #c5ddff;
  --accent-1-weak: #b5d6ff;
  --accent-2-weak: #aacfff;
  --btn-bright: #ffb703;
  --btn-bright-text: #09243b;
}
body[data-theme="light-sand"] {
  --bg: #fbf7f0;
  --elev: #ffffff;
  --text: #3b2c1f;
  --muted: #8a7b6c;
  --accent-1: #f3e5cf;
  --accent-2: #ead9bd;
  --accent-1-weak: #e7d6b7;
  --accent-2-weak: #dfcaa6;
  --btn-bright: #ef8354;
  --btn-bright-text: #3b2c1f;
}
body[data-theme="light-mint"] {
  --bg: #f3fff8;
  --elev: #ffffff;
  --text: #13372c;
  --muted: #5a8f7d;
  --accent-1: #d9ffee;
  --accent-2: #c8ffe6;
  --accent-1-weak: #c8f7e4;
  --accent-2-weak: #b6f2db;
  --btn-bright: #ff9f1c;
  --btn-bright-text: #0f2e26;
}
body[data-theme="light-paper"] {
  --bg: #fbfbfb;
  --elev: #ffffff;
  --text: #1c1c1c;
  --muted: #6b6f76;
  --accent-1: #eeeeee;
  --accent-2: #e7e7e7;
  --accent-1-weak: #e2e2e2;
  --accent-2-weak: #dbdbdb;
  --btn-bright: #ffa62b;
  --btn-bright-text: #1c1c1c;
}

/* -------------------- Title Bar -------------------- */
.title-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0)) , var(--elev);
  box-shadow: var(--shadow-1);
  padding: 12px 16px 10px;
  backdrop-filter: blur(8px);
}
.title-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.page-title {
  margin: 0;
  font-family: "Gabriela", serif;
  font-size: clamp(1.3rem, 2.8vw, 2.2rem);
  letter-spacing: 0.3px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
  text-align: center;
}
.title-controls {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.ctrl-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  background: var(--accent-2);
  color: #fff;
  box-shadow: var(--shadow-2);
  transition: transform var(--transition-fast), filter var(--transition-fast), background var(--transition-fast);
  user-select: none;
}
.ctrl-btn:hover { filter: brightness(1.08); }
.ctrl-btn:active { transform: translateY(10px); }
.ctrl-btn:focus { outline: 2px solid rgba(255,255,255,0.6); outline-offset: 2px; }

.page-subtitle {
  text-align: center;
  margin: 8px auto 4px;
  color: var(--muted);
  max-width: 900px;
  padding: 0 12px;
}

/* -------------------- Main Layout -------------------- */
.app-root {
  max-width: 1000px;
  margin: 14px auto 60px;
  padding: 0 12px 12px;
}

/* -------------------- Prophecy Containers -------------------- */
.prophecy {
  border-radius: var(--radius-lg);
  overflow: clip;
  margin: 14px 0;
  box-shadow: var(--shadow-1);
  background: var(--accent-1);
  transition: background var(--transition-med), transform var(--transition-fast);
}
.prophecy.even { background: var(--accent-2); }
.prophecy.collapsed .prophecy-body { display: none; }

.prophecy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
}
.prophecy-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.chevron { transition: transform var(--transition-fast); }
.prophecy.expanded .chevron { transform: rotate(90deg); }

/* BODY uses responsive side-by-side layout with wrap */
.prophecy-body {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.08));
  padding: 14px 14px 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.section {
  background: rgba(0,0,0,0.12);
  border-radius: var(--radius-md);
  padding: 10px;
  flex: 1 1 360px; /* side-by-side when wide, wrap when narrow */
  min-width: 280px; /* ensure nice wrap threshold */
}
.section-title {
  margin: 0 0 10px 2px;
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 0.95rem;
  color: #fff;
}

/* Buttons */
.btn {
  display: inline-block;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.95rem;
  margin: 6px 6px 0 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition-fast), filter var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
  user-select: none;
  box-shadow: var(--shadow-2);
}
.btn:focus { outline: 2px solid rgba(255,255,255,0.7); outline-offset: 2px; }
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(10px); }

/* OT bright */
.btn-ot {
  background: var(--btn-bright);
  color: var(--btn-bright-text);
}

/* NT shaded to container color */
.prophecy .btn-nt {
  background: rgba(255,255,255,0.18);
  color: #fff;
}
.prophecy.even .btn-nt {
  background: rgba(255,255,255,0.22);
}

/* Debug ribbon */
.debug-ribbon {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 10px;
  background: #cc3333;
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 800;
  z-index: 50;
}

/* NoScript warning */
.noscript-warning {
  background: #ff6565;
  color: #1a1a1a;
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
  box-shadow: var(--shadow-2);
}

/* Responsive tweaks */
@media (max-width: 560px) {
  .prophecy-title { font-size: 1rem; }
  .btn { font-size: 0.95rem; padding: 10px 12px; }
}

/* style.css */
