*, *::after, *::before {
  box-sizing: border-box;
  font-family: Arial;
}

body {
  background-color: #F5F2E8;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 0em;
  font-size: clamp(.5rem, 2.5vmin, 1.5rem);
}

.body-dark {
  background-color: #000000;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 0em;
  font-size: clamp(.5rem, 2.5vmin, 1.5rem);
}

.wrap{
  position: fixed;
  width: 100%;
  top: 6%;
}

.wrap-mobile{
  position: fixed;
  width: 100%;
  top: 10%;
}

.wrap-lower{
position: fixed;
width: 100%;
bottom: 2%;
}

.clue{
  display: grid;
  justify-content: center;
  color: rgb(0, 0, 0);
  vertical-align: bottom;
  margin-top: 1em;
  font-size: 1.5em;
}

.clue-dark{
  display: grid;
  justify-content: center;
  color: rgb(255, 255, 255);
  vertical-align: bottom;
  margin-top: 1em;
  font-size: 1.5em;
}

img {
  width: 65px;
  height:65px;
}

.keyboard {
  display: grid;
  grid-template-columns: repeat(20, minmax(auto, 1.5em));
  grid-auto-rows: 3.5em;
  gap: .25em;
  justify-content: center;
  align-content: center;
}

.keyboard-mobile {
  display: grid;
  grid-template-columns: repeat(20, minmax(auto, 1.5em));
  grid-auto-rows: 4.5em;
  gap: .25em;
  justify-content: center;
  align-content: center;
}

.key {
  font-size: inherit;
  grid-column: span 2;
  border: none;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgb(223, 219, 219);
  color: black;
  fill: black;
  text-transform: uppercase;
  border-radius: .25em;
  cursor: pointer;
  user-select: none;
}

.key.large {
  grid-column: span 3;
}

.key > svg {
  width: 1.75em;
  height: 1.75em;
}

.key:hover, .key:focus {
  --lightness-offset: 10%;
}

.key.wrong {
  background-color: hsl(240, 3%, 37%);
  color: white;
}

.key.wrong-location {
  background-color: hsl(49, 70%, 55%);
  color: white;
}

.key.wrong-locationContrast {
  background-color: hsl(202, 63%, 66%);
  color: black;
}

.key.correct {
  background-color: #28a745;
  color: white;
}

.key.correctContrast {
  background-color: #f89e53;
  color: black;
}

.guess-grid {
  display: grid;
  justify-content: center;
  align-content: center;
  margin-top: 1em;
  grid-template-rows: repeat(3, 5em);
  gap: .25em;
}

.guess4{
  grid-template-columns: repeat(4, 5em);
}

.guess5{
  grid-template-columns: repeat(5, 5em);
}

.guess6{
  grid-template-columns: repeat(6, 5em);
}

.tile {
  font-size: 2em;
  color: black;
  border: .05em solid hsl(240, 2%, 23%);
  text-transform: uppercase;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  transition: transform 250ms linear;
}

.tile-dark {
  font-size: 2em;
  color: rgb(255, 255, 255);
  border: .05em solid hsl(240, 2%, 23%);
  text-transform: uppercase;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  transition: transform 250ms linear;
}

.tile[data-state="active"] {
  border-color: hsl(200, 1%, 34%);
}

.tile[data-state="wrong"] {
  border: none;
  background-color: hsl(240, 3%, 37%);
  color: white;
}

.tile[data-state="wrong-locationContrast"] {
  border: none;
  background-color: hsl(202, 63%, 66%);
  color: black;
}

.tile[data-state="wrong-location"] {
  border: none;
  background-color: hsl(49, 70%, 55%);
  color: white;
}

.tile[data-state="correct"] {
  border: none;
  background-color: #28a745;
  color: white;
}

.tile[data-state="correctContrast"] {
  border: none;
  background-color: #f89e53;
  color: black;
}

.tile.shake {
  animation: shake 250ms ease-in-out;
}

.tile.dance {
  animation: dance 500ms ease-in-out;
}

.tile.flip {
  transform: rotateX(90deg);
}

@keyframes shake {
  10% {
    transform: translateX(-5%);
  }

  30% {
    transform: translateX(5%);
  }

  50% {
    transform: translateX(-7.5%);
  }

  70% {
    transform: translateX(7.5%);
  }

  90% {
    transform: translateX(-5%);
  }

  100% {
    transform: translateX(0);
  }
}

@keyframes dance {
  20% {
    transform: translateY(-50%);
  }  

  40% {
    transform: translateY(5%);
  }  

  60% {
    transform: translateY(-25%);
  }  

  80% {
    transform: translateY(2.5%);
  }  

  90% {
    transform: translateY(-5%);
  }  

  100% {
    transform: translateY(0);
  }
}

.alert-container {
  position: fixed;
  top: 10vh;
  left: 50vw;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.alert {
  pointer-events: none;
  background-color: hsl(204, 7%, 85%);
  padding: .75em;
  border-radius: .25em;
  opacity: 1;
  transition: opacity 500ms ease-in-out;
  margin-bottom: .5em;
}

.alert:last-child {
  margin-bottom: 0;
}

.alert.hide {
  opacity: 0;
}

svg {
  pointer-events: none;
}

button {
  touch-action: manipulation;
}

.win-keyboard{
  display: none;
}

.win-box {
  display: none; /* Use flexbox for centering */
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically (if needed) */
  flex-direction: column; /* Stack buttons vertically */
  color: black;
}

.win-box-dark {
  display: none; /* Use flexbox for centering */
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically (if needed) */
  flex-direction: column; /* Stack buttons vertically */
  color: rgb(255, 255, 255);
}


.win-box-show{
  display: flex;
}

.lose-box {
  display: none; /* Use flexbox for centering */
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically (if needed) */
  flex-direction: column; /* Stack buttons vertically */
  color: black;
}

.lose-box-dark {
  display: none; /* Use flexbox for centering */
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically (if needed) */
  flex-direction: column; /* Stack buttons vertically */
  color: rgb(255, 255, 255);
}

.lose-box-show{
  display: flex;
}

.button {
  background-color: #28a745; /* Green background */
  color: white; /* Text color */
  border: 2px solid white; /* White border */
  border-radius: 12px; /* Rounded corners */
  padding: 6px 12px; /* Reduced padding for less width */
  cursor: pointer; /* Cursor changes to pointer on hover */
  transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transition */
  margin: 5px; /* Add some spacing between buttons */
  width: 30%;
}

.button:hover {
  background-color: #218838; /* Darker shade on hover */
  transform: scale(1.05); /* Slightly grow on hover */
}

.button:focus {
  outline: none; /* Remove outline */
  box-shadow: 0 0 5px white; /* Add shadow for focus state */
}

.support{
  font-size: small;
}

.supportMain{
  font-family: "Calibri";
}

.bi{
  margin-top: 100%;
  padding-top: 10%;
  padding-left: 10%;
  margin-right: 75%;
}

.bi-dark{
  color: white;
  margin-top: 100%;
  padding-top: 10%;
  padding-left: 10%;
  margin-right: 75%;
}

.nextClue{
	background: none;
	color: inherit;
	border: none;
	font: inherit;
	cursor: pointer;
	outline: inherit;
}

.nextday{
  color: black;
  text-align: center;
  padding-bottom: 0.5rem;
  position: fixed;
  width: 100%;
  top: 2%;
}

.nextdayArchive{
  color: black;
  text-align: center;
  padding-bottom: 0.5rem;
}

.day{
  display: inline;
  font-size: 25px;
}

.randomizer-button {
  margin-top: 10px;
  margin-left: 0.5rem;
  padding: 5px 5px;
  font-size: 1rem;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  width: 10rem;
  border: 2px solid white; /* White border */
  border-radius: 12px; /* Rounded corners */
}

/* Navbar Styles */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-mobile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  height: 30%;
}

.navbar-left {
  flex-shrink: 0;
}

.navbar-left .logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.navbar-left .logo img {
  width: auto;
}

.navbar-right {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.3s ease;
  border: none;
  background: none;
  padding: 0;
  margin-right: 10px;
}

.nav-icon:hover {
  opacity: 0.7;
}

.video-container {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    max-width: 720px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    /* Card / glass style */
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(16,24,40,0.12), inset 0 1px 0 rgba(255,255,255,0.6);
    z-index: 1001;
    margin-bottom: 25px;
}

.video-container h3 {
    color: #0b1220;
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.video-frame {
    width: 90%;
    aspect-ratio: 16 / 9;
    border: none; /* remove hard border */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(16,24,40,0.08);
    background-color: rgba(0,0,0,0.02);
}

/* Mobile-specific adjustments */
@media screen and (max-width: 768px) {
    .video-container {
        width: 95%;
        max-width: none;
        padding: 12px;
        border-radius: 14px;
    }
}

#clue {
  display: block;
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  border-radius: 8px;
  background-color: #f7f7f7;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  word-wrap: break-word;
  white-space: normal;
  color: black;
}

@media (max-width: 600px) {
#clue {
  display: block;
  max-width: 300px;
  margin: 0 auto;
  padding: 1rem;
  border-radius: 8px;
  background-color: #f7f7f7;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  word-wrap: break-word;
  white-space: normal;
  color: black;
}
}