/* Golden Games — External stylesheet
 * Extracted from index.html <style> block.
 * TODO: Move all inline styles here and remove <style> block from index.html.
 * Until then, this file holds new styles added after extraction begins.
 */

/* ── Root variables ──────────────────────────────────────── */
:root {
  --primary:       #1a365d;
  --accent:        #b7791f;
  --accent-light:  #f6c048;
  --bg:            #070d1c;
  --card-radius:   1.4rem;
  --transition:    0.25s ease;
}

/* ── Memory: matched card state ──────────────────────────── */
.card-inner.matched .card-face.card-back {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border-color: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}
.card-inner.matched {
  opacity: 0.85;
  pointer-events: none;
}

/* ── WordSearch: found word cells — dark theme ───────────── */
.ws-cell.found {
  background-color: #166534 !important;
  color: #bbf7d0 !important;
  border-color: #22c55e !important;
  font-weight: 700;
}
.ws-cell.selected {
  background-color: #854d0e !important;
  color: #fef08a !important;
  border-color: #eab308 !important;
}

/* ── Solitaire: premium card design ─────────────────────── */
.playing-card {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border: 1.5px solid #94a3b8;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  line-height: 1;
}
.playing-card.selected {
  transform: translateY(-8px);
  border: 2.5px solid var(--accent);
  box-shadow: 0 12px 24px rgba(183,121,31,0.4);
}
.playing-card .card-value { font-size: 1.3em; }
.playing-card .card-suit  { font-size: 0.85em; }
.red-suit   { color: #dc2626; }
.black-suit { color: #0f172a; }

/* ── Game view dark container ────────────────────────────── */
.game-panel {
  background: rgba(255,255,255,0.97);
  border-radius: 1.75rem;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(183,121,31,0.25);
  overflow: hidden;
}

/* ── Statistics scoreboard ───────────────────────────────── */
.stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  transition: background var(--transition);
}
.stats-row:hover { background: rgba(255,255,255,0.1); }
.stats-badge {
  background: linear-gradient(135deg, #b7791f, #f6c048);
  color: #0f172a;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 2px 10px;
  border-radius: 9999px;
}

/* ── Difficulty selector ─────────────────────────────────── */
.diff-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}
.diff-btn.easy   { border-color: #22c55e; color: #22c55e; background: rgba(34,197,94,0.1); }
.diff-btn.normal { border-color: #3b82f6; color: #3b82f6; background: rgba(59,130,246,0.1); }
.diff-btn.hard   { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,0.1); }
.diff-btn.active { color: #fff; }
.diff-btn.easy.active   { background: #22c55e; }
.diff-btn.normal.active { background: #3b82f6; }
.diff-btn.hard.active   { background: #ef4444; }

/* ── Category skill tags ─────────────────────────────────── */
.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ── Toast notification ──────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #1e293b;
  color: #f1f5f9;
  padding: 0.6rem 1.4rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9999;
  white-space: nowrap;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Accessibility: screen-reader only ───────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Focus ring (keyboard navigation) ───────────────────── */
:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 3px;
}
