/* Shared styles for TransLingo destination guide pages */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
a { touch-action: manipulation; }
body {
  background: #f9f9f9;
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: #111;
  padding: 24px 16px 48px;
}
.accent { color: #2563eb; }

.dest-container { max-width: 1000px; margin: 0 auto; }

.dest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}
.dest-logo {
  font-size: 26px;
  font-weight: 700;
  color: #111;
  text-decoration: none;
}
.dest-back {
  font-size: 14px;
  font-weight: 500;
  color: #2563eb;
  text-decoration: none;
}
.dest-back:hover { text-decoration: underline; }

/* Site-wide section nav (Translator / Trivia / Game / Guides) */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 20px;
}
.site-nav a {
  flex: 1 1 auto;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.site-nav a:hover { background: #eff6ff; color: #2563eb; }
.site-nav a.active { background: #2563eb; color: #fff; }

.dest-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 28px;
}
.dest-nav-link {
  flex: 1 1 auto;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.dest-nav-link:hover { background: #eff6ff; color: #2563eb; }
.dest-nav-link.active { background: #2563eb; color: #fff; }

.dest-hero { text-align: center; margin-bottom: 18px; }
.dest-hero-flag { font-size: 48px; display: block; line-height: 1; margin-bottom: 8px; }
.dest-hero h1 { font-size: 38px; font-weight: 700; margin-bottom: 4px; }
.dest-hero-tagline { font-size: 16px; color: #666; }

.dest-intro {
  max-width: 760px;
  margin: 0 auto 36px;
  text-align: center;
  font-size: 16px;
  color: #444;
}

.dest-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.dest-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.dest-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(37,99,235,0.12);
  border-color: #2563eb;
}
.dest-card-media {
  aspect-ratio: 3 / 2;
  background: #eef2f7;
  overflow: hidden;
}
.dest-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dest-card:hover .dest-card-media img { transform: scale(1.04); }
.dest-card-media img { transition: transform 0.3s ease; }
.dest-card-body { padding: 18px 20px 22px; }
.dest-card-body h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: #111; }
.dest-card-body p { font-size: 14px; color: #555; }

.dest-pager {
  margin-top: 40px;
  padding: 22px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-align: center;
}
.dest-pager-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #999;
  font-weight: 600;
  margin-bottom: 14px;
}
.dest-pager-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

.dest-footer {
  margin-top: 36px;
  text-align: center;
  font-size: 13px;
  color: #999;
}
.dest-footer p { margin: 2px 0; }
.dest-footer a { color: #2563eb; text-decoration: none; }
.dest-footer a:hover { text-decoration: underline; }

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.guide-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.guide-card h2,
.guide-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #111;
}
.guide-card p,
.guide-card li {
  font-size: 15px;
  color: #444;
}
.guide-card ul { padding-left: 20px; }
.guide-card li { margin-bottom: 6px; }
.guide-wide { grid-column: 1 / -1; }
.phrase-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
}
.phrase-table th,
.phrase-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
  vertical-align: top;
}
.phrase-table th {
  background: #eff6ff;
  color: #111;
  font-weight: 700;
}
.phrase-table tr:last-child td { border-bottom: 0; }
.guide-cta {
  display: inline-block;
  margin-top: 10px;
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}
.guide-cta:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .dest-hero h1 { font-size: 30px; }
  .dest-grid { grid-template-columns: 1fr; gap: 16px; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-wide { grid-column: auto; }
  .phrase-table { display: block; overflow-x: auto; }
  .dest-nav-link { flex: 1 1 40%; }
}

@media (prefers-reduced-motion: no-preference) {
  .dest-hero { animation: destFade 0.5s ease-out both; }
  .dest-card { animation: destFade 0.5s ease-out both; }
  @keyframes destFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* ---- Long-form prose blocks (shared by trivia & game pages) ---- */
.prose-block {
  max-width: 760px;
  margin: 40px auto 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 28px 30px;
}
.prose-block h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #111;
}
.prose-block h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 20px 0 6px;
  color: #111;
}
.prose-block p { font-size: 15px; color: #444; margin-bottom: 12px; }
.prose-block ul { font-size: 15px; color: #444; padding-left: 20px; margin-bottom: 12px; }
.prose-block li { margin-bottom: 6px; }

/* ---- Trivia grid (trivia page) ---- */
.trivia-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.trivia-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.trivia-card:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 16px rgba(37,99,235,0.1);
  transform: translateY(-2px);
}
.trivia-card .trivia-emoji { font-size: 28px; margin-bottom: 10px; display: block; }
.trivia-card .trivia-fact { font-size: 15px; font-weight: 600; color: #111; margin-bottom: 6px; line-height: 1.4; }
.trivia-card .trivia-detail { font-size: 14px; color: #666; line-height: 1.55; }
.trivia-card .trivia-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 20px;
  margin-top: 10px;
}
.tag-language { background: #eff6ff; color: #2563eb; }
.tag-history { background: #fef3c7; color: #92400e; }
.tag-fun { background: #f0fdf4; color: #166534; }
.tag-record { background: #fdf2f8; color: #9d174d; }
.tag-money { background: #ecfdf5; color: #047857; }

/* ---- Word Quest game (game page) ---- */
.game-card {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.game-header {
  padding: 20px 24px;
  background: #eff6ff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.game-header-left { display: flex; align-items: center; gap: 12px; }
.game-header-left > span { font-size: 24px; }
.game-title-text h2 { font-size: 18px; font-weight: 700; color: #111; }
.game-title-text p { font-size: 13px; color: #666; margin-top: 2px; }
.game-score { display: flex; gap: 16px; align-items: center; }
.score-item { text-align: center; }
.score-item .score-value { font-size: 22px; font-weight: 700; color: #2563eb; line-height: 1; }
.score-item .score-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: #666; margin-top: 2px; }
.score-divider { width: 1px; height: 32px; background: #d1d5db; }
.game-body { padding: 32px 24px; text-align: center; }
.game-prompt-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: #999; margin-bottom: 8px; font-weight: 500; }
.game-word { font-size: 32px; font-weight: 700; color: #111; margin-bottom: 6px; }
.game-lang-hint { font-size: 14px; color: #2563eb; font-weight: 500; margin-bottom: 28px; }
.game-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 500px; margin: 0 auto; }
.game-option {
  padding: 14px 20px;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  color: #111;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: system-ui, sans-serif;
}
.game-option:hover { border-color: #2563eb; background: #f8fafc; }
.game-option.correct { border-color: #16a34a; background: #f0fdf4; color: #166534; }
.game-option.wrong { border-color: #dc2626; background: #fef2f2; color: #991b1b; }
.game-option:disabled { cursor: default; }
.game-option:disabled:hover { border-color: #e5e7eb; background: #fff; }
.game-option.correct:disabled,
.game-option.correct:disabled:hover { border-color: #16a34a; background: #f0fdf4; opacity: 1; }
.game-option.wrong:disabled:hover { border-color: #dc2626; background: #fef2f2; }
.game-feedback { margin-top: 20px; font-size: 15px; font-weight: 600; min-height: 24px; }
.game-feedback.correct-text { color: #16a34a; }
.game-feedback.wrong-text { color: #dc2626; }
.game-next-btn {
  margin-top: 16px;
  padding: 10px 28px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  display: none;
}
.game-next-btn:hover { background: #1d4ed8; }
.game-streak { margin-top: 12px; font-size: 13px; color: #999; min-height: 20px; }

@media (max-width: 640px) {
  .trivia-grid { grid-template-columns: 1fr; }
  .game-options { grid-template-columns: 1fr; }
  .game-header { padding: 16px; }
  .game-body { padding: 24px 16px; }
  .game-word { font-size: 26px; }
  .prose-block { padding: 22px 18px; }
}

/* ---- Currency converter (currency page) ---- */
.fx-card {
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  padding: 26px 28px 30px;
}
.fx-field { margin-bottom: 16px; }
.fx-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #999;
  font-weight: 600;
  margin-bottom: 6px;
}
.fx-input, .fx-select {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-family: inherit;
}
.fx-input:focus, .fx-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.fx-pair { display: flex; align-items: flex-end; gap: 12px; }
.fx-pair .fx-field { flex: 1; margin-bottom: 0; }
.fx-swap {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin-bottom: 1px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  color: #2563eb;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.fx-swap:hover { background: #eff6ff; border-color: #2563eb; }
.fx-swap:active { transform: rotate(180deg); }
.fx-result {
  margin-top: 22px;
  padding: 22px;
  background: #eff6ff;
  border-radius: 10px;
  text-align: center;
}
.fx-result-value { font-size: 30px; font-weight: 700; color: #111; line-height: 1.2; }
.fx-result-sub { font-size: 14px; color: #555; margin-top: 4px; }
.fx-rate-line { font-size: 13px; color: #2563eb; font-weight: 600; margin-top: 10px; }
.fx-note { text-align: center; font-size: 12px; color: #999; margin-top: 16px; }

@media (max-width: 640px) {
  .fx-card { padding: 22px 18px 26px; }
  .fx-result-value { font-size: 26px; }
}
