body {
  font-family: Arial, sans-serif;
  background: #f0f0f0;
  text-align: center;
  padding: 10px;
}


@font-face {
  font-family: 'UKNumberPlate';
  src: url('fonts/UKNumberPlate.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

.container {
  max-width: 400px;
  margin: auto;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px #ccc;
}

#threeLetters{
  visibility: hidden;
  background-color: #ffeb3b; /* UK plate yellow */
  color: #000;
  font-family: 'UKNumberPlate', 'Courier New', monospace;
  font-size: 3.3em;
  width: 120px;
  height: 60px;
  line-height: 60px;
  text-align: center;
  border-radius: 5px;
  margin: 10px auto;
  box-shadow: 0 0 4px rgba(0,0,0,0.3);
  letter-spacing: 0.1em;
  user-select: none;

}

.letters {
  font-size: 2em;
  margin: 10px 0;
}

.difficulty {
  font-size: 1em;
  margin: 10px 0;
}

.info {
  margin: 10px 0;
}

#userInput {
  visibility: hidden;       /* hides it visually */
  opacity: 0;               /* optional: fade effect */
  pointer-events: none;     /* prevents interaction */
  width: 100%;              /* full container width */
  max-width: 400px;         /* match your layout */
  height: 40px;             /* consistent height */
  box-sizing: border-box;
  margin: 10px auto;
  text-transform: uppercase;
  font-size: 1em;
}

button {
  padding: 10px 20px;
  font-size: 1em;
}

#timerBar {
  width: 100%;
  height: 20px;
  margin: 10px;
}



#messageBar {
  background: transparent;
  border: none;
  color: transparent;           /* hide text when idle */
  height: 40px;
  max-width: 400px;
  margin: 10px auto;
  text-align: center;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
  box-sizing: border-box;
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#messageText {
  width: 100%;
  text-align: center;
}

.overlay-button {
  cursor: pointer;
  margin: 10px;
  padding: 10px 20px;
  font-size: 1.2em;
}


#timerContainer {
  width: 100%;
  height: 20px;
  background-color: #ccc;
  border-radius: 5px;
  overflow: hidden;
  margin: 10px 0;
}

#timerFill {
  height: 100%;
  width: 100%;
 /* background-color: green;*/
 /* transition: width 0.1s linear, background-color 0.3s ease;*/
}

#timerMessage {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 0.9em;
    pointer-events: none;
}


.container {
  background-color: #f0f0f0;
}

#languageModal {
 /* visibility: hidden; */
  position: fixed;
  top: 10%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #f0f0f0;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  z-index: 1000;

  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.languageOption {
  font-size: 1.2em;
  margin: 10px 0;
  cursor: pointer;
  text-align: center;
  display: block;

}
.languageOption:hover {
  background-color: #f0f0f0;
}
.tileRow {
  display: flex;
  justify-content: center;
  gap: 1px;
  margin: 1px 0;
}

.tile {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  perspective: 800px;
  contain: strict;
  box-sizing: border-box;
}

.tile-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.4s ease;
  transform-origin: center center;
  will-change: transform;
  box-sizing: border-box;
}

.tile.flip .tile-inner {
  transform: rotateY(180deg);
}

.tile-front,
.tile-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  background-color: #f4e29c;
  border: 2px solid #b89c4c;
  border-radius: 6px;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  font-size: 2.5em;
  font-weight: bold;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: Black, sans-serif;
  backface-visibility: hidden;
  padding: 0;
  margin: 0;
  letter-spacing: 0;
  font-variant-ligatures: none;
  font-feature-settings: "kern" 0;
}

.tile-back {
  transform: rotateY(180deg);
}

.gameBox {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
  padding-top: 0px; /* reduced from 40px */
}



#languageIcon, #helpIcon {
  visibility: hidden; 
  width: 40px;
  height: 40px;
  font-size: 1.5em;
  cursor: pointer;
  background: #eee;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#tileRow {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-grow: 1;
}


.tileRowWrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px; /* tighter spacing */
}
#tileRow {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-grow: 1;
}

.sideIcon {
  font-size: 1.5em;
  cursor: pointer;
  background: #eee;
  border-radius: 50%;
  padding: 5px 10px;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

u {
  display: inline;
}

#gameOverOverlay {
  line-height: normal;
  white-space: nowrap;

}

e
.share-icon {
  transition: filter 0.2s ease;
}

.share-icon:hover {
  filter: brightness(1.3) saturate(1.2); /* lighter on hover */
}

.share-icon:active {
  filter: brightness(0.8) saturate(1.5); /* darker on click */
}

/* Fix Google cookie consent banner layout */
iframe[title="Google consent"],
iframe[src*="consent"] {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  overflow: hidden !important;
  border: none !important;
  z-index: 9999 !important; /* keep it above your content */
}

/* Ensure the page itself only has one scrollbar */
html, body {
  overflow-y: auto !important;
}
#interstitial-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #fff;
  z-index: 9999;

  display: none;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;

  padding: 20px;
  box-sizing: border-box;

  visibility: hidden;
  opacity: 0;
  overflow-y: auto;
  pointer-events: auto;

}

#interstitial-overlay.show {
  display: flex;
  visibility: visible;
  opacity: 1;
}

#interstitial-ad-container {
  width: 100%;
  max-width: 400px;
  min-height: 50px;
  margin-top: 50px;
  flex: 1;
}

#interstitial-ad-container,
#interstitial-ad-container ins,
#interstitial-ad-container iframe {
  pointer-events: auto;   /* still clickable */
  user-select: none;
  outline: none;
}
#interstitial-ad-container iframe {
  tabindex: -1 !important;        /* prevent keyboard focus */
}


.overlay-button {
  margin-top: 20px;
  font-size: 16px;
  font-weight: 500;
  color: #000;
  background-color: #f0f0f0;
  border: 1px solid #000;
  padding: 10px 16px;
  border-radius: 6px;
  text-decoration: none;

  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
  z-index: 10000; /* higher than ad */

}

.play-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}