/* ==========================================================================
   Homepage, games directory and content pages.
   ========================================================================== */

/* --- Hero --------------------------------------------------------------- */
.hero {
  padding: 64px 0 48px;
  text-align: center;
  background:
    radial-gradient(1000px 420px at 50% -10%, var(--primary-soft), transparent 70%);
}

.hero h1 { margin-bottom: 16px; }

.hero h1 .accent {
  background: linear-gradient(100deg, var(--primary), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary);
}

.hero .lead {
  margin: 0 auto 32px;
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  max-width: 46ch;
}

.hero .btn-row { justify-content: center; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.hero-stat { text-align: center; }

.hero-stat strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
}

.hero-stat span {
  font-size: .8125rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* --- Daily challenge ---------------------------------------------------- */
.daily {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 28px 32px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.daily-body { flex: 1 1 320px; }

.daily h2 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.daily p { color: var(--text-secondary); margin-bottom: 0; }

.daily-date {
  font-size: .8125rem;
  font-weight: 700;
  color: var(--warning);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* --- Streak calendar ---------------------------------------------------- */
.streak {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.streak-day {
  width: 40px;
  text-align: center;
  font-size: .6875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.streak-day .dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 4px auto 0;
  border-radius: 50%;
  border: 2px solid var(--border);
  font-size: .8125rem;
  color: var(--text-secondary);
}

.streak-day[data-done="true"] .dot {
  background: var(--success-soft);
  border-color: var(--success);
  color: var(--success);
  font-weight: 700;
}

/* --- Game cards --------------------------------------------------------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  min-height: 200px;
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  text-decoration: none;
}

.game-card .icon {
  font-size: 2.25rem;
  line-height: 1;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--surface-secondary);
  margin-bottom: 4px;
}

.game-card h3 { font-size: 1.125rem; }

.game-card p {
  color: var(--text-secondary);
  font-size: .9375rem;
  flex: 1;
}

.game-card .play {
  font-weight: 700;
  color: var(--primary);
  font-size: .9375rem;
}

.game-card:hover .play::after { transform: translateX(3px); }

.game-card .play::after {
  content: " →";
  display: inline-block;
  transition: transform .15s ease;
}

/* Accent tints keep the grid varied without turning it into a rainbow. */
.game-card[data-accent="blue"] .icon   { background: var(--primary-soft); }
.game-card[data-accent="green"] .icon  { background: var(--success-soft); }
.game-card[data-accent="amber"] .icon  { background: color-mix(in srgb, var(--warning) 18%, transparent); }
.game-card[data-accent="purple"] .icon { background: color-mix(in srgb, var(--purple) 18%, transparent); }
.game-card[data-accent="red"] .icon    { background: var(--error-soft); }

/* --- Name the Countries hub: one card per starting letter ---------------- */
.letter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.letter-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.letter-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--primary);
  text-decoration: none;
}

.letter-card-letter {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
}

.letter-card-count {
  font-size: .75rem;
  color: var(--text-secondary);
}

/* --- Personal stats ----------------------------------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
}

.stat span {
  font-size: .8125rem;
  color: var(--text-secondary);
}

/* --- Explore links ------------------------------------------------------ */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.explore-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 600;
  min-height: 60px;
  transition: border-color .15s ease, background-color .15s ease;
}

.explore-link:hover {
  border-color: var(--primary);
  background: var(--surface-secondary);
  text-decoration: none;
}

.explore-link .icon { font-size: 1.5rem; }
.explore-link small { display: block; font-weight: 500; color: var(--text-secondary); }

/* --- Games directory categories ----------------------------------------- */
.game-category { margin: 40px 0 48px; }

.game-category h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.game-category > p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* --- Article / content pages -------------------------------------------- */
.article {
  max-width: 760px;
}

.article h2 { margin: 40px 0 12px; }
.article h3 { margin: 28px 0 8px; }
.article p { margin-bottom: 16px; }

.article ul {
  list-style: disc;
  padding-left: 22px;
  margin-bottom: 16px;
}

.article ul li { margin-bottom: 8px; }
.article ol { list-style: decimal; padding-left: 22px; margin-bottom: 16px; }

/* --- Country detail ----------------------------------------------------- */
.country-header {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 32px 0 16px;
}

.country-header .flag { font-size: 4.5rem; line-height: 1; }

.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.fact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.fact dt {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.fact dd { font-size: 1.0625rem; font-weight: 700; }

/* --- Country index list ------------------------------------------------- */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select {
  height: 46px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.filter-bar input { flex: 1 1 240px; }

.country-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.country-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  min-height: 62px;
}

.country-list a:hover {
  border-color: var(--primary);
  text-decoration: none;
}

.country-list .flag { font-size: 1.75rem; }
.country-list strong { display: block; font-size: .9375rem; }
.country-list small { color: var(--text-secondary); }


/* --- Review callout ------------------------------------------------------ */
.review-callout {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: var(--radius-lg);
  color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease;
}

.review-callout:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.review-callout-icon { font-size: 1.75rem; line-height: 1; }
.review-callout strong { display: block; font-size: 1.0625rem; }
.review-callout small { color: var(--text-secondary); }
.review-callout-go { margin-left: auto; color: var(--primary); font-weight: 800; font-size: 1.25rem; }
