/* ═══════════════════════════════════════════════
   Selah Puzzles — Shared Styles v6.0 REDESIGN
   ═══════════════════════════════════════════════ */

@font-face { font-family:'Galano Grotesque'; src:url('../fonts/Galano_Grotesque_Light.otf') format('opentype'); font-weight:300; font-display:swap; }
@font-face { font-family:'Galano Grotesque'; src:url('../fonts/Galano_Grotesque.otf') format('opentype'); font-weight:400; font-display:swap; }
@font-face { font-family:'Galano Grotesque'; src:url('../fonts/Galano_Grotesque_Medium.otf') format('opentype'); font-weight:500; font-display:swap; }
@font-face { font-family:'Galano Grotesque'; src:url('../fonts/Galano_Grotesque_SemiBold.otf') format('opentype'); font-weight:600; font-display:swap; }
@font-face { font-family:'Galano Grotesque'; src:url('../fonts/Galano_Grotesque_Bold.otf') format('opentype'); font-weight:700; font-display:swap; }

:root {
  --navy: #2D3270;
  --navy-deep: #1e2254;
  --sky: #5BB8F5;
  --white: #FFFFFF;
  --teal: #50C2C3;
  --teal-light: #6EC9CE;
  --teal-pale: rgba(80,194,195,0.15);
  --purple-soft: #A999C8;
  --blue-soft: #889ED0;
  --bg: #faf9f7;
  --bg-white: #ffffff;
  --bg-subtle: #f0efe9;
  --bg-surface: #e6e5df;
  --text: var(--navy);
  --text-mid: #555880;
  --text-dim: #8b8ea8;
  --border: rgba(45,50,112,0.08);
  --border-md: rgba(45,50,112,0.12);
  --shadow-sm: 0 1px 3px rgba(45,50,112,0.06);
  --shadow-md: 0 4px 12px rgba(45,50,112,0.08);
  --shadow-lg: 0 8px 32px rgba(45,50,112,0.10);
  --error: #ef4444;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 100px;
  --font: 'Galano Grotesque', Arial, Helvetica, sans-serif;
  --transition: 0.15s ease;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  overflow-x: hidden;
}

/* ── SITE HEADER ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
  padding: 14px 24px;
  background: rgba(250,249,247,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.logo-wrap { display: flex; flex-direction: column; text-decoration: none; line-height: 1; }
.logo-top { display: flex; align-items: flex-end; gap: 4px; }
.logo-selah { font-family: 'Dancing Script', cursive; font-weight: 700; font-size: 42px; color: #2D3270; line-height: 0.85; }
.logo-cross { width: 22px; height: 30px; margin-bottom: 4px; flex-shrink: 0; }
.logo-puzzles { font-family: var(--font); font-weight: 700; font-size: 16px; color: #2D3270; letter-spacing: 7px; margin-top: 2px; }
.site-nav { display: flex; gap: 2px; align-items: center; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; min-width: 0; flex: 1 1 100%; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { font-size: 11px; font-weight: 600; letter-spacing: 1px; color: var(--text-dim); text-decoration: none; padding: 7px 14px; border-radius: var(--radius-pill); transition: all var(--transition); white-space: nowrap; flex-shrink: 0; }
.site-nav a:hover { color: var(--text-mid); background: var(--bg-subtle); }
.site-nav a.active { color: var(--white); background: var(--navy); }

/* ── PAGE ── */
.page { display: flex; flex-direction: column; align-items: center; min-height: calc(100vh - 100px); padding: 18px 0 32px; background: var(--bg); }

/* ── FOOTER ── */
.site-footer { text-align: center; padding: 28px 20px; font-size: 11px; font-weight: 300; color: var(--text-dim); letter-spacing: 1px; border-top: 1px solid var(--border); background: var(--bg); }

/* ── OVERLAYS ── */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(250,249,247,0.82); backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: center; }
.overlay.hidden { display: none; }

/* ── DIFFICULTY SWITCHER ── */
.badge-wrap { position: relative; }
.badge.badge--tap { cursor: pointer; transition: all var(--transition); }
.badge.badge--tap:hover { background: var(--bg-surface); }
.badge.badge--tap::after { content: " ▾"; font-size: 9px; }

.diff-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 90;
  background: #ffffff; border: 2px solid rgba(45,50,112,0.12);
  border-radius: 12px; box-shadow: 0 8px 32px rgba(45,50,112,0.15);
  overflow: hidden; min-width: 160px; width: max-content;
}
.diff-dropdown.open { display: flex; flex-direction: column; }
.diff-dropdown-btn {
  display: block; width: 100%; padding: 14px 22px; border: none; background: none;
  font-size: 12px; font-weight: 600; letter-spacing: 2px; color: #2D3270;
  font-family: var(--font); cursor: pointer; text-align: center;
  border-bottom: 1px solid rgba(45,50,112,0.06); transition: background 0.15s;
  white-space: nowrap;
}
.diff-dropdown-btn:last-child { border-bottom: none; }
.diff-dropdown-btn:hover { background: #f0efe9; }
.diff-dropdown-btn.active { color: #50C2C3; background: rgba(80,194,195,0.08); }

.diff-confirm {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(250,249,247,0.82); backdrop-filter: blur(12px);
  align-items: center; justify-content: center;
}
.diff-confirm.open { display: flex; }
.diff-confirm-card {
  background: var(--bg-white); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 36px; text-align: center;
  box-shadow: var(--shadow-lg); max-width: 320px; width: 90%;
  animation: pop .35s ease;
}
.diff-confirm-msg {
  font-size: 15px; font-weight: 500; color: var(--navy); margin-bottom: 20px; line-height: 1.6;
}
.diff-confirm-btns { display: flex; gap: 10px; justify-content: center; }
.diff-confirm-yes {
  padding: 12px 28px; border-radius: var(--radius-md); border: none;
  background: var(--navy); color: var(--white); font-size: 12px;
  font-weight: 700; letter-spacing: 2px; cursor: pointer; font-family: var(--font);
}
.diff-confirm-no {
  padding: 12px 28px; border-radius: var(--radius-md);
  border: 1.5px solid var(--border); background: var(--bg);
  color: var(--text-mid); font-size: 12px; font-weight: 600;
  letter-spacing: 2px; cursor: pointer; font-family: var(--font);
}

/* ── RESPONSIVE ── */
@media (max-width: 420px) {
  .site-nav { gap: 2px; }
  .site-nav a { font-size: 9px; padding: 5px 8px; }
  .logo-selah { font-size: 32px; }
  .logo-cross { width: 14px; height: 22px; }
  .logo-puzzles { font-size: 12px; letter-spacing: 4px; }
  .site-header { padding: 10px 12px; }
}
