/* Bright Minds Club — dizajni i plote. Ngjyrat: oklch, kontrast i larte, shkronja te medha. */

:root {
  --bg: oklch(0.982 0.008 85);
  --surface: oklch(0.995 0.004 85);
  --card: oklch(1 0 0);
  --text: oklch(0.24 0.024 250);
  --muted: oklch(0.47 0.02 250);
  --primary: oklch(0.46 0.09 190);
  --primary-dark: oklch(0.4 0.09 190);
  --primary-fg: oklch(0.99 0.005 190);
  --accent: oklch(0.72 0.16 62);
  --accent-fg: oklch(0.22 0.05 62);
  --success: oklch(0.62 0.14 152);
  --warning: oklch(0.75 0.15 78);
  --danger: oklch(0.55 0.19 27);
  --border: oklch(0.88 0.012 85);
  --tile: oklch(0.955 0.012 85);
  --radius: 0.9rem;
  --shadow: 0 1px 2px oklch(0.24 0.024 250 / 0.06), 0 8px 24px oklch(0.24 0.024 250 / 0.06);
  --shadow-lift: 0 6px 12px oklch(0.24 0.024 250 / 0.08), 0 18px 40px oklch(0.24 0.024 250 / 0.1);
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 0.5rem; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1rem; }
a { color: var(--primary-dark); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.wrap { width: 100%; max-width: 74rem; margin: 0 auto; padding: 0 1rem; }
main.wrap { padding-bottom: 3rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--primary);
  color: var(--primary-fg); padding: 0.75rem 1rem; z-index: 50;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 1rem; padding-top: 0.85rem; padding-bottom: 0.85rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: inherit; min-width: 0; }
.brand-mark {
  display: grid; place-items: center; width: 2.9rem; height: 2.9rem; flex: 0 0 auto;
  border-radius: 999px; background: var(--primary); color: var(--primary-fg);
}
.brand-mark svg { width: 1.6rem; height: 1.6rem; }
.brand-text { min-width: 0; display: block; }
.brand-text strong { display: block; font-family: var(--font-display); font-size: 1.4rem; }
.brand-text small { display: block; color: var(--muted); font-size: 0.9rem; }
.header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }

.site-nav { background: var(--card); border-bottom: 1px solid var(--border); }
.nav-row { display: flex; gap: 0.25rem; overflow-x: auto; padding-top: 0.4rem; padding-bottom: 0.4rem; }
.nav-row a {
  padding: 0.6rem 1rem; border-radius: 999px; text-decoration: none;
  color: var(--text); font-weight: 600; white-space: nowrap;
}
.nav-row a:hover { background: var(--tile); }
.nav-row a.is-active { background: var(--primary); color: var(--primary-fg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0 1.35rem; border-radius: var(--radius);
  border: 2px solid transparent; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; transition: background-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-quiet { background: var(--card); color: var(--text); border-color: var(--border); }
.btn-quiet:hover { background: var(--tile); }
.btn-small { min-height: 2.6rem; padding: 0 1rem; }
.btn-large { min-height: 3.5rem; font-size: 1.15rem; padding: 0 1.9rem; }

.pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.9rem; border-radius: 999px; font-weight: 700; font-size: 1rem;
}
.pill-streak { background: oklch(0.93 0.06 62); color: var(--accent-fg); }
.pill-done { background: oklch(0.92 0.05 152); color: oklch(0.3 0.08 152); }
.pill-todo { background: var(--accent); color: var(--accent-fg); }

/* ---------- Cards & layout ---------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 1.25rem; padding: 1.5rem; box-shadow: var(--shadow);
}
.card + .card { margin-top: 1.5rem; }
.card-title { font-size: 1.3rem; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.card-title svg { width: 1.4rem; height: 1.4rem; flex: 0 0 auto; color: var(--accent); }
.section { margin-top: 2.5rem; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: 0.95rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--primary-dark); font-size: 0.95rem; margin-bottom: 0.25rem; }

.hero { margin-top: 2rem; display: grid; gap: 2rem; }
.hero-stats { background: var(--tile); border-radius: var(--radius); padding: 1.25rem; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin: 0 0 1rem; }
.stat-grid > div { background: var(--card); border-radius: var(--radius); padding: 0.9rem 0.5rem; text-align: center; }
.stat-grid dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; }
.stat-grid dd { margin: 0.2rem 0 0; font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.countdown { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); margin: 1rem 0 0; }
.countdown svg { width: 1.25rem; height: 1.25rem; }
.countdown strong { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-variant-numeric: tabular-nums; color: var(--text); }

.game-grid { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.25rem; }
.game-card { display: flex; flex-direction: column; gap: 0.5rem; height: 100%; text-decoration: none; color: inherit; }
.game-card:hover { box-shadow: var(--shadow-lift); }
.game-card .pill { margin-top: auto; align-self: flex-start; }

.two-col { display: grid; gap: 1.5rem; }
.feature-list { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.feature-list li { margin-bottom: 0.4rem; }

/* ---------- Leaderboard ---------- */
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th, .lb-table td { text-align: left; padding: 0.6rem 0.4rem; border-bottom: 1px solid var(--border); }
.lb-table th { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.lb-table td:nth-child(3), .lb-table td:nth-child(4),
.lb-table th:nth-child(3), .lb-table th:nth-child(4) { text-align: right; font-variant-numeric: tabular-nums; }
.lb-table tr.is-me { background: oklch(0.94 0.05 190); font-weight: 700; }

/* ---------- Forms ---------- */
.auth-card { max-width: 38rem; margin: 2rem auto 0; }
.form { display: grid; gap: 0.4rem; margin: 1.25rem 0; }
.form label { font-weight: 700; margin-top: 0.6rem; }
.form input {
  font: inherit; padding: 0.85rem 1rem; border-radius: var(--radius);
  border: 2px solid var(--border); background: var(--surface); color: var(--text);
}
.form button { margin-top: 1.25rem; justify-self: start; }
.error-box { background: oklch(0.95 0.05 27); border: 2px solid var(--danger); border-radius: var(--radius); padding: 0.9rem 1rem; margin-bottom: 1rem; }
.error-box p { margin: 0; font-weight: 600; }
.error-text { color: var(--danger); font-weight: 600; }
.notice { background: oklch(0.95 0.04 190); border-left: 5px solid var(--primary); padding: 0.85rem 1rem; border-radius: 0.6rem; margin-bottom: 1rem; }

/* ---------- Games ---------- */
.game-head { margin-top: 2rem; }
.game-layout { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.game-aside { display: grid; gap: 1.5rem; align-content: start; }
.game-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; font-weight: 600; }
.game-bar p { margin: 0; }
.clock { font-family: ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums; }
.game-status { min-height: 1.9rem; font-weight: 700; color: var(--primary-dark); margin: 0.75rem 0; }
.game-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }

/* Crossword */
.crossword-wrap { display: grid; gap: 1.5rem; }
.crossword-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
  background: var(--text); padding: 4px; border-radius: 0.6rem;
  max-width: 25rem; width: 100%; margin: 0 auto;
}
.cw-cell { position: relative; aspect-ratio: 1; background: var(--card); }
.cw-num { position: absolute; top: 2px; left: 4px; font-size: 0.7rem; font-weight: 700; color: var(--muted); }
.cw-cell input {
  width: 100%; height: 100%; border: 0; background: transparent; text-align: center;
  font: 700 clamp(1.3rem, 5vw, 1.9rem)/1 var(--font-body); text-transform: uppercase; color: var(--text);
}
.cw-cell.is-active { background: oklch(0.93 0.06 190); }
.cw-cell.in-word { background: oklch(0.965 0.02 190); }
.cw-cell.is-wrong input { color: var(--danger); }
.cw-cell.is-locked input { color: var(--primary-dark); }
.clue-columns { display: grid; gap: 1.5rem; }
.clue-list { list-style: none; margin: 0; padding: 0; }
.clue-list button {
  display: flex; gap: 0.5rem; width: 100%; text-align: left; font: inherit;
  background: none; border: 0; border-radius: 0.5rem; padding: 0.5rem 0.6rem; cursor: pointer; color: inherit;
}
.clue-list button:hover { background: var(--tile); }
.clue-list button.is-active { background: oklch(0.93 0.06 190); font-weight: 700; }
.clue-list span { font-weight: 700; color: var(--primary-dark); }

/* Word builder */
.word-board { display: grid; gap: 6px; justify-content: center; margin: 1rem 0 1.5rem; }
.word-row { display: grid; grid-template-columns: repeat(5, minmax(0, 3.6rem)); gap: 6px; }
.word-tile {
  aspect-ratio: 1; display: grid; place-items: center; border: 3px solid var(--border);
  border-radius: 0.5rem; font-size: clamp(1.4rem, 6vw, 2rem); font-weight: 700; text-transform: uppercase;
  background: var(--card);
}
.word-tile.filled { border-color: var(--muted); }
.word-tile.correct { background: var(--success); border-color: var(--success); color: oklch(0.99 0 0); }
.word-tile.present { background: var(--warning); border-color: var(--warning); color: oklch(0.2 0.03 78); }
.word-tile.absent { background: oklch(0.75 0.01 250); border-color: oklch(0.75 0.01 250); color: oklch(0.99 0 0); }
.keyboard { display: grid; gap: 6px; }
.key-row { display: flex; justify-content: center; gap: 5px; }
.key {
  flex: 1 1 auto; min-width: 2rem; max-width: 3.2rem; min-height: 3.4rem;
  border-radius: 0.5rem; border: 2px solid var(--border); background: var(--card);
  font: 700 1rem/1 var(--font-body); cursor: pointer; color: var(--text);
}
.key:hover { background: var(--tile); }
.key-wide { max-width: 5.5rem; flex: 1.6 1 auto; font-size: 0.9rem; }
.key.correct { background: var(--success); border-color: var(--success); color: oklch(0.99 0 0); }
.key.present { background: var(--warning); border-color: var(--warning); }
.key.absent { background: oklch(0.8 0.01 250); border-color: oklch(0.8 0.01 250); color: oklch(0.4 0.01 250); }

/* Trivia */
.progress-track { height: 0.7rem; background: var(--tile); border-radius: 999px; overflow: hidden; margin: 1rem 0 1.5rem; }
.progress-fill { height: 100%; background: var(--primary); transition: width 0.3s ease; }
.quiz-category { font-weight: 700; color: var(--primary-dark); text-transform: uppercase; font-size: 0.9rem; letter-spacing: 0.05em; margin: 0; }
.quiz-text { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 0.35rem 0 1.25rem; }
.quiz-options { display: grid; gap: 0.75rem; }
.quiz-option {
  text-align: left; font: inherit; font-weight: 600; padding: 1rem 1.15rem; min-height: 3.5rem;
  border: 2px solid var(--border); border-radius: var(--radius); background: var(--card); cursor: pointer; color: inherit;
}
.quiz-option:hover:not(:disabled) { background: var(--tile); border-color: var(--primary); }
.quiz-option.is-correct { background: oklch(0.92 0.07 152); border-color: var(--success); }
.quiz-option.is-wrong { background: oklch(0.94 0.06 27); border-color: var(--danger); }
.quiz-option:disabled { cursor: default; }
.quiz-feedback { min-height: 1.8rem; font-weight: 700; margin: 1rem 0 0; }
.quiz-next { margin-top: 0.5rem; }

/* Memory */
.memory-panels { display: grid; gap: 1.25rem; margin-top: 0.5rem; }
.memory-panel { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem; background: var(--surface); }
.memory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.memory-tile { aspect-ratio: 1; background: var(--tile); border-radius: 0.6rem; padding: 0.35rem; border: 0; }
.memory-button { cursor: pointer; transition: background-color 0.15s, box-shadow 0.15s; }
.memory-button:hover { background: oklch(0.92 0.02 85); }
.memory-button.is-found { background: oklch(0.92 0.07 152); box-shadow: inset 0 0 0 4px var(--success); }
.memory-button.is-miss { animation: shake 0.35s; }
.shape { width: 100%; height: 100%; display: block; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Result panel */
.result-panel { margin-top: 1.5rem; border-color: var(--primary); }
.result-score { font-family: var(--font-display); font-size: 3rem; margin: 0; line-height: 1; }
.result-score span { font-size: 1.4rem; color: var(--muted); }
.result-lines { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0.35rem; font-weight: 600; }
.share-feedback { margin-left: 0.75rem; font-weight: 700; color: var(--success); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 2rem 0; margin-top: 3rem; }
.site-footer p { max-width: 60rem; }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .memory-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clue-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
  .two-col { grid-template-columns: minmax(0, 1fr) 22rem; }
  .game-layout { grid-template-columns: minmax(0, 1fr) 22rem; align-items: start; }
  .crossword-wrap { grid-template-columns: 25rem minmax(0, 1fr); align-items: start; }
  .clue-columns { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---- Breadcrumbs & FAQ (SEO) ---- */
.breadcrumb { margin: 1.25rem 0 0; font-size: 1rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: .5rem; opacity: .5; }
.breadcrumb a { color: inherit; }
.faq h2 { margin-top: 0; }
.faq-item { border-top: 1px solid var(--line, #d9d4cb); padding: .85rem 0; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+"; display: inline-block; width: 1.4rem; font-weight: 700; }
.faq-item[open] summary::before { content: "\2212"; }
.faq-item p { margin: .6rem 0 0 1.4rem; }
