body {
    background: linear-gradient(to bottom, navy, powderblue);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden; /* Ensure no scrolling */
}

#foreignWord, #nativeWord {
    font-size: min(6vw, 6vh); /* Responsive font size based on width AND height */

  /*  font-size: 5vw;  Responsive font size */
    margin: 0;
    text-align: center;
    text-transform: capitalize;
    text-shadow: 2px 2px 1px black;
}

#foreignWord {
    color: yellow;
}

#nativeWord {
    color: white;
}

.container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 0; /* Removed spaces between grid items */
    width: calc(100vmin - 2 * 5vw); /* Adjust width based on viewport */
    height: calc(100vmin - 2 * 5vw); /* Adjust height based on viewport */
}

.container > div {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 5vmin; /* Responsive font size */
    color: white;
    aspect-ratio: 1; /* Maintain square shape */
}

/*
#upperleft, #upperright, #lowerleft, #lowerright {
    background-color: darkblue;
}
    */

#up, #down, #left, #right {
    background-color: powderblue;
    background-size: cover; /* Ensure the image covers the entire div */
    background-position: center; /* Center the image within the div */
}

#center {
    background-color: blue;
    font-weight: bold;
}

  
  /* Tooltip styling using ::after pseudo-element */
  .hoverDiv::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none; /* let mouse events pass through */
  }
  
  /* Show tooltip on hover or when "touch-active" class is present */
  .hoverDiv:hover::after,
  .hoverDiv.touch-active::after {
    opacity: 1;
  }


  #up {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

#right {
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
}

#down {
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

#left {
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

#infoCounter {
    position: fixed;
    top: 10px;
    right: 10px;
    font-size: 3vw;
    font-weight: bold;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 8px;
    z-index: 1000;
    pointer-events: none; /* Prevents clicking issues */
    text-align: right;
}

/* splash screeen stuff below */

#splashScreen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: calc(100vmin - 2 * 5vw);
    height: calc(100vmin - 2 * 5vw);
    background-color: rgba(0, 0, 0, 0.8);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    border-radius: 10px;
    color: yellow;
}

#beginButton {
    margin-top: 20px;
    padding: 10px;
    font-size: 1.5em;
    background-color: #007BFF;
    color: white;
    border: none;
    cursor: pointer;
}

#foreignWord, #nativeWord, .container, #infoCounter {
    display: none; /* Hide these elements until the game starts */
}

.hoverDiv.correct {
  box-shadow: inset 0 0 0 10px limegreen;
}


.grid-item.word-mode {
  font-size: clamp(0.8rem, 1.8vw, 1.6rem);
  font-weight: bold;
  font-family: 'Segoe UI', sans-serif;
  color: rgb(0, 20, 50);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-image: none !important;
}


.word-mode {
  font-size: clamp(0.5rem, 4vw, 2rem);
}

.hide-cursor {
  cursor: none;
}
