/* Main container for the Word Guess game */
@import url('./effects.css');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  margin: 0;
  padding: 0;
  height: 100%; /* Ensure body and html take up full viewport height */
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background-color: #f7f7f7; /* Light gray background for the entire page */
  color: #333; /* Dark gray text color */
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

.wordguess {
  display: flex;
  justify-content: center;
  align-items: center;
  /*border: rgb(241, 47, 255) 5px solid;*/
}

/* Game container */
.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Title Styling */

#game-title {
  display: flex;
  font-family: Georgia, Arial, sans-serif;  
  margin-bottom: 10px;
}

#game-title-main {
  font-size: 2.5em;
  font-weight: bold;
  align-items: center;
  justify-content: center;
}

#game-title-version {
  color:#1178b3;
  font-size: 2em;
  font-weight: normal;
  text-align: center; 
}


/* Game options (radio buttons) */
.game-options {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 15px;
}

#radio {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

/* Custom radio button */
input[type="radio"] {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid black;
  border-radius: 50%;
  background-color: white;
  cursor: pointer;
  position: relative;
}

input[type="radio"]:checked {
  background-color: #c90a0a; /* Radio button color */
  border-color: black;
  box-shadow: inset 0 0 0 4px white; /* Creates the inner white gap */
}

/* Label styling for radio buttons */
.game-options label {
  font-family: Arial, sans-serif;
  font-size: 1.2em;
  margin-left: 8px;
  margin-right: 20px;
  cursor: pointer;
}

/* Timer styling */
#timer {
  font-size: 2rem;
  margin-top: 15px;
  padding-left: 10px;
  padding-right: 10px;  
  font-family: Arial, sans-serif;
  color: black;
  border: solid gray 2px;
  border-radius: 5px;;
}

/* Button Row Styling */
.button-row {
  display: flex;
  justify-content: center;
  margin-left: 10px;  
  margin-right: 10px;
  margin-bottom: 20px;
}

/* Individual Button Styling */
.button-row button {
  padding: 10px 15px;
  margin: 0 10px;
  font-size: 1.2em;
  border: 1px solid black;
  border-radius: 5px;
  background-color: #eee;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.button-row button:hover {
  background-color: #ddd;
}

.button-row button:active {
  background-color: #ccc;
}

/* Grid container */
.grid-container {
  display: flex;
  flex-direction: column;
  width: 300px;
  height: auto;
  /*border: 2px solid orange;*/
  margin-bottom: 10px;
}

/* Each row in the grid */
.grid-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

/* Each grid cell */
.grid-cell {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  border: 2px solid #ddd;
  margin: 2px;
  font-size: 1.5em;
  background-color: #fff;
  border-radius: 10px;
}

/* Keyboard container */
.keyboard-container {
  display: flex;
  flex-direction: column;
  margin-left: 5px;
  margin-right: 5px;
  /*border: purple solid 5px;*/
}

/* Each row in the keyboard */
.keyboard-row {
  display: flex;
  justify-content: center;
}

/* Letter keys */
.key {
  width: 50px;
  height: 60px;
  border: none;
  background-color: #eee;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2px;
  color: black;
  font-family: Arial, sans-serif;
}

/* Enter key */
.key.enter-key {
  width: 90px;
  font-size: 1.1em;
}

/* Delete key */
.key.delete-key {
  width: 60px;
  font-size: 1.1em;
}

/* Hover effect */
.key:hover {
  background-color: #ddd;
}

.game-settings {
  display: flex;
  flex-direction: row; /* Stacks items vertically */    
  gap:10px;
  margin-bottom: 20px;
  /*border: solid red 5px;*/
}

.game-settings input[type="number"],
.game-settings select {  
  font-size: 1.1rem; /* Slightly larger font for visibility */
}

.game-settings-rows {
  display: flex;
  flex-direction: row;
}

#wordLength, #maxGuesses {
  width: 50px;               /* Set the width only */
  display: flex;              /* Enables Flexbox */
  align-items: center;        /* Vertically centers the text */
  justify-content: center;     /* Horizontally centers the text */
  text-align: center;          /* Additional alignment for cross-browser compatibility */
  font-size: 16px;             /* Adjust font size if needed */
  box-sizing: border-box;      /* Ensures padding and borders don’t affect the width */
}

#word_frq {
  width: 150px;               /* Set the width only */
  display: flex;              /* Enables Flexbox */
  align-items: center;        /* Vertically centers the text */
  justify-content: center;     /* Horizontally centers the text */
  text-align: center;          /* Additional alignment for cross-browser compatibility */
  font-size: 16px;             /* Adjust font size if needed */
  box-sizing: border-box;      /* Ensures padding and borders don’t affect the width */
}

#run {
  display: flex;              /* Enables Flexbox */
  align-items: center;        /* Vertically centers the text */
  justify-content: center;     /* Horizontally centers the text */
  text-align: center;          /* Additional alignment for cross-browser compatibility */
  gap: 20px;
}

@media (max-width: 500px) {
  .key {
      width: 35px;
      height: 50px;
      font-size: 1.1em;
  }

  .key.enter-key {
      width: 50px;
      font-size: 1em;
  }

  .key.delete-key {
      width: 40px;
      font-size: 1em;
  }

  .game-settings {
    display: flex;
    flex-direction: column; /* Stacks items vertically */ 
    gap:10px;   
    /*border: solid red 5px;*/
  }

  .game-settings-rows label {
    margin-right: 10px;
  }

  .game-settings input[type="number"],
  .game-settings select {      
      font-size: 1.1rem; /* Slightly larger font for visibility */
  }

}

@media (max-width: 380px) {
  .key {
      width: 32px;
      height: 50px;
      font-size: 1.1em;
  }

  .key.enter-key {
      width: 50px;
      font-size: 1em;
  }

  .key.delete-key {
      width: 40px;
      font-size: 1em;
  }

  .game-settings {
    display: flex;
    flex-direction: column; /* Stacks items vertically */ 
    gap:5px;   
    /*border: solid red 5px;*/
  }

  .game-settings-rows label {
    margin-right: 5px;
    /*border: green 2px solid;*/
  }

  .game-settings input[type="number"],
  .game-settings select {      
      font-size: 1.1rem; /* Slightly larger font for visibility */
  }

}

/* Flip animation for X-axis rotation (vertical flip) */
@keyframes flipX {
  0% {
      transform: rotateX(0deg);
  }
  50% {
      transform: rotateX(90deg);
      background-color: transparent;
  }
  100% {
      transform: rotateX(0deg);
      background-color: inherit;
  }
}

.grid-cell.flip {
  animation: flipX 0.6s ease-in-out;
  transform-style: preserve-3d;
  perspective: 1000px;
  backface-visibility: hidden;
}

/* Container for the timer and share button */
.info-row {
  display: flex;
  justify-content: center;  /* Place the timer and button on opposite ends */
  align-items: center;  /* Vertically center the items */
  width: 100%;
  max-width: 300px;  /* Ensure it fits well with the grid width */
  margin-bottom: 10px;  /* Add space below this row */
  gap:20px;
}

/* Timer styling */
#timer {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;  /* Dark gray color */
}

.X-icon, .facebook-icon {
  width: 50px;
  height: 50px;  
  transition: transform 0.3s ease;
  display: inline-block;
  cursor: pointer; /* Makes the icon appear clickable */
}

/* Hover Effect */
.X-icon:hover, .facebook-icon:hover {
  transform: scale(1.1); /* Increase scaling for more emphasis */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add shadow for a "lifted" effect */
}

/* Active (Click) Effect */
.X-icon:active, .facebook-icon:active {
  transform: scale(0.9); /* Slightly smaller on click for a pressed effect */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Reduce shadow on click */
}


/* Share button styling 
.share-button {
  padding: 10px 15px;
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
  color: #fff;  
  background-color: #1DA1F2;  
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.share-button:hover {
  background-color: #1a8cd8;  
  transform: scale(1.05); 

.share-button:active {
  background-color: #1178b3; 
  transform: scale(0.95);  
}
*/

/* Share Buttons Row */
.share-buttons {
  display: flex;
  gap: 8px; /* Space between the buttons */
}

/* X (Twitter) Share Button */
.x-share {
  background-color: #1DA1F2; /* X blue color */
}

.x-share:hover {
  background-color: #1a8cd8; /* Slightly darker X color on hover */
}

.x-share:active {
  background-color: #1178b3; /* Even darker X color on click */
}

/* Facebook Share Button */
.facebook-share {
  background-color: #3b5998; /* Facebook blue */
}

.facebook-share:hover {
  background-color: #334b7c; /* Slightly darker Facebook color on hover */
}

.facebook-share:active {
  background-color: #2d4373; /* Even darker Facebook color on click */
}

/*

.game-settings {
  margin-top: 10px;
  display: flex;
  flex-direction: row;
  gap: 8px;
  width: 100%;
}

.game-settings label {
  font-weight: bold;
}

.game-settings input[type="number"] {
  padding: 5px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 80px;
}

*/

/* Style for the Renew Game button */
#renewGameButton, #word_finder_button, #synonym_button, #definition_button {
  margin-top: 15px;
  padding: 10px 20px;
  font-size: 1em;
  color: #ffffff;
  background-color: #3b3a36;  /* Dark gray background */
  border: 2px solid #2e2e2e;  /* Dark border */
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Hover effect for Renew Game button */
#renewGameButton:hover, #word_finder_button:hover, #synonym_button:hover, #definition_button:hover {
  background-color: #4e4d49; /* Slightly lighter on hover */
  transform: scale(1.05);    /* Small enlargement on hover */
}

/* Active state for Renew Game button */
#renewGameButton:active, #word_finder_button:active, #synonym_button:active, #definition_button:active {
  background-color: #ffffff;  /* White background when clicked */
  color: #000000;             /* Black text when clicked */
  border: 2px solid #2e2e2e;  /* Retain border */
  transform: scale(0.98);     /* Slight shrink on click */
}

/* Message box styles */
.message-box {
  position: fixed;
  bottom: 20px;
  left: 50%;
  text-align: center;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.message-box.show {
  opacity: 1;
}

