 :root {}

 body {
     font-family: 'Helvetica Neue', sans-serif;
     margin: 0;
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: flex-start;
     min-height: 100vh;
     text-align: center;
     padding: 0 1rem 2rem;
     box-sizing: border-box;
     -webkit-font-smoothing: antialiased;
 }

 h1 {
     margin: 1rem 0 0.5rem;
     font-size: clamp(1.6rem, 5vw, 2.4rem);
     letter-spacing: 0.05em;
     font-weight: 700;
     color: #1a1a1a;
 }

 #game {
     position: relative;
     touch-action: manipulation;
     margin-top: 0.5rem;
     transition: width 0.25s ease, height 0.25s ease;
 }

 .tile {
     position: absolute;
     width: var(--tile-inner, 40px);
     height: var(--tile-inner, 40px);
     line-height: var(--tile-inner, 40px);
     font-size: calc(var(--tile-inner, 40px) * 0.6);
     background-color: #f0e5ca;
     border: 2px solid #e9dcc5;
     font-weight: bold;
     border-radius: 12px;
     display: flex;
     justify-content: center;
     align-items: center;
     box-sizing: border-box;
     cursor: pointer;
     user-select: none;
     -webkit-tap-highlight-color: transparent;
     will-change: transform;
     transition: transform 0.25s ease, opacity 0.25s ease;
     box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
 }

 .selected {
     background-color: #aadcee;
 }

 .fade-out {
     opacity: 0;
 }

 #status {
     font-size: clamp(1.6rem, 5vw, 2.4rem);
     font-weight: bold;

 }

 #message {
     font-size: 2rem;
     font-weight: bold;
     color: #2d6a4f;
     margin-top: 0.5rem;
 }

 #message.feedback {
     font-size: 1.2rem;
     font-weight: bold;
     margin: 1rem 0;
     color: #e63946;
     /* error red */
 }

 #foundWordsContainer {
     margin-top: 1rem;
     max-width: 90%;
     text-align: left;

 }

 #foundWordsContainer h2 {
     margin: 0 0 0.5rem;
     font-size: 1.5rem;
     color: #1a1a1a;
 }



 .word-badges {
     display: flex;
     flex-wrap: wrap;
     gap: 8px;
     margin-top: 0.5rem;
 }

 .word-badges .badge {
     background-color: #f0e5ca;
     border: 2px solid #e9dcc5;
     border-radius: 12px;
     padding: 4px 10px;
     font-size: 1.5rem;
     font-weight: bold;
     box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
     user-select: none;
     white-space: nowrap;
     display: inline-flex;
     align-items: center;
     justify-content: center;
 }

 @media (min-width: 600px) {
     #status {
         font-size: 1.75rem;
     }
 }

 #shareButton {
  margin-top: 1rem;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 12px;
  background-color: #aadcee;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: background-color 0.2s ease;
}

#shareButton:hover {
  background-color: #7ec6de;
}

#gameOverMessage {
  text-align: center;
  margin-top: 2rem;
  animation: fadeIn 0.5s ease-in;
}

#gameOverMessage h2 {
  font-size: 2.5rem;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

#gameOverMessage p {
  font-size: 1.25rem;
  color: #2d6a4f;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
  margin-top: 0;
  font-size: 1.8rem;
}

.modal-content p {
  font-size: 1rem;
  margin: 0.75rem 0;
}

.modal-content button {
  margin-top: 1rem;
  padding: 10px 20px;
  font-weight: bold;
  font-size: 1rem;
  border-radius: 8px;
  background-color: #aadcee;
  border: none;
  cursor: pointer;
}

.tile.highlighted {
  background-color: rgba(255, 255, 0, 0.4);
}


#helpButton {
  position: fixed;
  top: 1rem;
  right: 1rem;
  font-size: 1.25rem;
  padding: 0.3rem;
  background: #f0e5ca;
  border: 2px solid #e9dcc5;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1000;
}

.copy-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #222;
  color: #fff;
  padding: 1em 2em;
  border-radius: 8px;
  font-size: 1.2em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.copy-modal.show {
  opacity: 1;
  pointer-events: auto;
}



@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

