.site-name {
  font: 700 20px/1 Sora, Arial, sans-serif;
  letter-spacing: -0.4px;
  color: #f0f0f0;
  white-space: nowrap;
}

/* =========================================================
   TYPINGMETER WORD BLITZ
   Mobile-first responsive game UI.
   ========================================================= */

.blitz-section {
  width: 100%;
  max-width: 900px;
  margin: 34px auto 20px;
  padding: 0;
  min-width: 0;
}

.blitz-card,
.blitz-history-section,
.blitz-faq {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.blitz-card {
  background: #151515;
  border: 1px solid #292929;
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .22);
}

.blitz-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  min-width: 0;
}

.blitz-header>div {
  min-width: 0;
  flex: 1 1 auto;
}

.blitz-kicker {
  display: inline-block;
  color: #2196f3;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.blitz-header h2 {
  margin: 5px 0 7px;
  font-size: 28px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.blitz-header p,
.blitz-note,
.blitz-input-hint,
.blitz-history-header p,
.blitz-result p {
  color: #8e8e8e;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.blitz-header p {
  margin: 0;
}

.blitz-back-link {
  flex: 0 0 auto;
  color: #aaa;
  text-decoration: none;
  font-size: 13px;
  padding: 9px 12px;
  border: 1px solid #333;
  border-radius: 10px;
  white-space: nowrap;
}

.blitz-back-link:hover {
  color: #fff;
  border-color: #2196f3;
}

.blitz-lobby,
.blitz-game {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.blitz-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.blitz-option-group {
  min-width: 0;
  background: #101010;
  border: 1px solid #292929;
  border-radius: 14px;
  padding: 15px;
}

.blitz-option-label {
  display: block;
  color: #777;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.3px;
  margin-bottom: 10px;
}

.blitz-choice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.blitz-choice {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #333;
  background: #1a1a1a;
  color: #aaa;
  border-radius: 9px;
  padding: 10px 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
}

.blitz-choice:hover {
  border-color: #2196f3;
  color: #fff;
}

.blitz-choice.is-active {
  background: #2196f3;
  border-color: #2196f3;
  color: #fff;
}

.blitz-best-preview {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  color: #777;
  font-size: 10px;
  letter-spacing: 1px;
  text-align: center;
  overflow-wrap: anywhere;
}

.blitz-best-preview strong {
  color: #fff;
  font-size: 20px;
}

.blitz-best-preview small {
  color: #666;
  font-size: 10px;
}

.blitz-primary-btn,
.blitz-secondary-btn {
  min-width: 0;
  max-width: 100%;
  border-radius: 10px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
  transition: .2s ease;
}

.blitz-primary-btn {
  border: 1px solid #2196f3;
  background: #2196f3;
  color: #fff;
}

.blitz-primary-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.blitz-secondary-btn {
  border: 1px solid #333;
  background: #1d1d1d;
  color: #ddd;
}

.blitz-secondary-btn:hover {
  border-color: #2196f3;
}

.blitz-game {
  gap: 16px;
}

.blitz-stats-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.blitz-stats-bar>div {
  min-width: 0;
  background: #101010;
  border: 1px solid #292929;
  border-radius: 11px;
  padding: 11px 6px;
  text-align: center;
  overflow: hidden;
}

.blitz-stats-bar span,
.blitz-word-label {
  display: block;
  color: #666;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.1px;
}

.blitz-stats-bar strong {
  display: block;
  margin-top: 5px;
  font-size: 17px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.blitz-timer-track {
  width: 100%;
  height: 6px;
  background: #292929;
  border-radius: 999px;
  overflow: hidden;
}

.blitz-timer-fill {
  width: 100%;
  height: 100%;
  background: #2196f3;
  transform-origin: left center;
  transition: transform .15s linear;
}

.blitz-word-area {
  width: 100%;
  min-width: 0;
  min-height: 205px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
  background: #101010;
  border: 1px solid #292929;
  border-radius: 15px;
  padding: 25px 15px;
  overflow: hidden;
}

.blitz-word {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 76px;
  display: grid;
  place-items: center;
  font-size: clamp(36px, 8vw, 72px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.08;
  color: #fff;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-wrap: balance;
}

.blitz-word-meta {
  width: min(420px, 100%);
  max-width: 100%;
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #666;
  font-size: 11px;
}

.blitz-word-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.blitz-word-area.is-correct {
  border-color: #2196f3;
}

.blitz-word-area.is-wrong {
  border-color: #777;
}

.blitz-input-wrap {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#wordInput {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  background: #0d0d0d;
  color: #fff;
  border: 1px solid #383838;
  border-radius: 12px;
  padding: 16px 17px;
  outline: none;
  font: inherit;
  font-size: 18px;
  line-height: 1.35;
  text-align: center;
}

#wordInput:focus {
  border-color: #2196f3;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, .08);
}

#wordInput:disabled {
  opacity: .65;
}

.blitz-input-hint {
  margin: -4px 0 0;
  text-align: center;
  overflow-wrap: anywhere;
}

kbd {
  display: inline-block;
  border: 1px solid #333;
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 2px 6px;
  color: #bbb;
  background: #191919;
  font-size: 11px;
}

.blitz-actions,
.blitz-result-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.blitz-result {
  min-width: 0;
  text-align: center;
}

.blitz-result-icon {
  font-size: 52px;
  margin-bottom: 8px;
}

.blitz-result h3 {
  margin: 5px 0 7px;
  font-size: 30px;
  overflow-wrap: anywhere;
}

.blitz-result-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
  min-width: 0;
}

.blitz-result-stats>div {
  min-width: 0;
  background: #101010;
  border: 1px solid #292929;
  border-radius: 12px;
  padding: 14px 8px;
  overflow: hidden;
}

.blitz-result-stats span {
  display: block;
  color: #777;
  font-size: 10px;
}

.blitz-result-stats strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
  overflow-wrap: anywhere;
}

.blitz-best-result {
  display: inline-block;
  max-width: 100%;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid #333;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.blitz-history-section {
  margin: 42px auto 0;
  padding: 26px;
  background: #121212;
  border: 1px solid #242424;
  border-radius: 16px;
}

.blitz-history-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  min-width: 0;
  margin-bottom: 16px;
}

.blitz-history-header>div:first-child {
  min-width: 0;
}

.blitz-history-header h2 {
  margin: 5px 0 7px;
  font-size: 22px;
  overflow-wrap: anywhere;
}

.blitz-history-header p {
  margin: 0;
}

.blitz-history-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 0 0 auto;
}

.blitz-history-count {
  color: #777;
  font-size: 11px;
  white-space: nowrap;
}

.blitz-clear-btn {
  border: 1px solid #333;
  background: transparent;
  color: #aaa;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 11px;
  white-space: nowrap;
}

.blitz-clear-btn:hover {
  color: #fff;
  border-color: #2196f3;
}

.blitz-history {
  display: grid;
  gap: 8px;
  max-height: 440px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 2px 6px 2px 2px;
  scrollbar-gutter: stable;
  min-width: 0;
}

.blitz-history::-webkit-scrollbar {
  width: 8px;
}

.blitz-history::-webkit-scrollbar-track {
  background: #0d0d0d;
  border-radius: 8px;
}

.blitz-history::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 8px;
}

.blitz-history-row {
  display: grid;
  grid-template-columns: 1.3fr .8fr .8fr .8fr .8fr;
  gap: 8px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  background: #101010;
  border: 1px solid #282828;
  border-radius: 10px;
  padding: 11px 12px;
  overflow: hidden;
}

.blitz-history-row>div {
  min-width: 0;
  overflow: hidden;
}

.blitz-history-row span {
  display: block;
  color: #666;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .7px;
}

.blitz-history-row strong {
  display: block;
  margin-top: 3px;
  color: #ddd;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blitz-history-empty {
  padding: 24px 10px;
  text-align: center;
  color: #666;
  border: 1px dashed #2b2b2b;
  border-radius: 10px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.blitz-faq {
  margin: 42px auto 0;
  padding: 26px;
  background: #121212;
  border: 1px solid #242424;
  border-radius: 16px;
}

.blitz-faq h2 {
  margin: 0 0 13px;
  font-size: 22px;
}

.blitz-faq details {
  border-top: 1px solid #242424;
  padding: 13px 0;
}

.blitz-faq details:first-of-type {
  border-top: 0;
}

.blitz-faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.blitz-faq p {
  color: #999;
  line-height: 1.7;
  font-size: 14px;
  margin: 9px 0 0;
  overflow-wrap: anywhere;
}

.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;
}

/* Tablet */
@media (max-width: 700px) {
  .blitz-stats-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .blitz-result-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blitz-history-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .blitz-history-row>div:first-child {
    grid-column: 1 / -1;
  }

  .blitz-history-row>div:nth-child(5) {
    display: none;
  }
}

/* Phones */
@media (max-width: 560px) {
  .blitz-section {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 12px;
    padding: 0;
  }

  .blitz-card {
    padding: 14px;
    border-radius: 14px;
  }

  .blitz-header {
    display: block;
    margin-bottom: 18px;
  }

  .blitz-header h2 {
    font-size: 23px;
  }

  .blitz-back-link {
    display: none;
  }

  .blitz-option-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .blitz-option-group {
    padding: 12px;
  }

  .blitz-choice {
    padding: 10px 5px;
    font-size: 12px;
  }

  .blitz-stats-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .blitz-stats-bar>div {
    padding: 10px 5px;
  }

  .blitz-stats-bar strong {
    font-size: 16px;
  }

  .blitz-word-area {
    min-height: 170px;
    padding: 18px 10px;
    border-radius: 12px;
  }

  .blitz-word {
    min-height: 62px;
    font-size: clamp(32px, 12vw, 48px);
    letter-spacing: -.5px;
  }

  .blitz-word-meta {
    font-size: 10px;
  }

  #wordInput {
    padding: 14px 11px;
    font-size: 16px;
    border-radius: 10px;
  }

  .blitz-input-hint {
    font-size: 11px;
    line-height: 1.55;
  }

  .blitz-actions .blitz-secondary-btn,
  .blitz-result-actions .blitz-primary-btn,
  .blitz-result-actions .blitz-secondary-btn {
    width: 100%;
  }

  .blitz-result-actions {
    flex-direction: column;
  }

  .blitz-result-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .blitz-result-stats>div {
    padding: 12px 6px;
  }

  .blitz-result-stats strong {
    font-size: 19px;
  }

  .blitz-history-section,
  .blitz-faq {
    margin-top: 24px;
    padding: 14px;
    border-radius: 14px;
  }

  .blitz-history-header {
    display: block;
  }

  .blitz-history-actions {
    justify-content: space-between;
    margin-top: 12px;
  }

  .blitz-history-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blitz-history-row>div:first-child {
    grid-column: 1 / -1;
  }

  .blitz-history-row>div:nth-child(5) {
    display: block;
    grid-column: 1 / -1;
  }
}

/* Very small phones: 320–360px */
@media (max-width: 380px) {
  .blitz-card {
    padding: 11px;
  }

  .blitz-option-group {
    padding: 10px;
  }

  .blitz-choice-row {
    gap: 5px;
  }

  .blitz-choice {
    padding: 9px 3px;
    font-size: 11px;
  }

  .blitz-word-area {
    min-height: 155px;
    padding-left: 7px;
    padding-right: 7px;
  }

  .blitz-word {
    font-size: clamp(29px, 12vw, 42px);
  }

  #wordInput {
    padding-left: 8px;
    padding-right: 8px;
  }

  .blitz-history-row {
    padding: 9px;
  }
}

/* =========================================================
   FINAL WORD BLITZ MOBILE OVERFLOW FIX
   Keeps the word display strictly inside its card and scales
   the target word down on narrow screens.
   ========================================================= */
.blitz-card,
.blitz-game,
.blitz-word-area,
.blitz-word,
.blitz-word-meta,
.blitz-input-wrap {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.blitz-word-area {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: normal;
}

.blitz-word {
  width: 100%;
  max-width: 100%;
  padding-inline: 4px;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  text-wrap: wrap;
}

.blitz-word-meta {
  overflow: hidden;
}

.blitz-word-meta span {
  min-width: 0;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .blitz-word-area {
    min-height: 145px;
    padding: 15px 8px;
  }

  /* Smaller target text on mobile so even long words stay comfortably inside. */
  .blitz-word {
    min-height: 50px;
    font-size: clamp(24px, 9vw, 38px);
    line-height: 1.08;
    letter-spacing: -0.4px;
    padding-inline: 2px;
  }

  .blitz-word-label {
    font-size: 8px;
  }

  .blitz-word-meta {
    width: 100%;
    gap: 6px;
    font-size: 9px;
  }
}

@media (max-width: 380px) {
  .blitz-word-area {
    min-height: 132px;
    padding: 12px 6px;
  }

  .blitz-word {
    min-height: 44px;
    font-size: clamp(22px, 8.5vw, 32px);
    line-height: 1.05;
  }
}

/* Auto-scroll targets: keep them clear of the site header. */
#blitzGame,
#blitzResult {
  scroll-margin-top: 24px;
}