body {
  font-family: sans-serif;
  background: #121212;
  overflow-x: hidden;
  margin: 0;
}

.wrapper {
  min-height: 10vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; 
  align-items: center;
}

.main-content-spacer {
  flex-grow: 1;
}

.para {
  color: gainsboro;
  font-size: 4vh;
  font-weight: bold;
  margin: 3vh auto 0;
  height: 1vh;
  padding-top: 10px;
  animation: fadeIn 0.75s ease-in-out forwards;
  text-align: center;
  position: static;
  transform: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.grid-container {
  position: static;
  display: flex;
  justify-content: center;
  align-items: center;
  height: auto;
  width: 100%;
  margin: 5vh auto;
  transform: none;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  row-gap: 2vh;
  column-gap: 5vh;
  height: 75vh;  
  width: 100%;  
}

.input-grid {
  display: grid;
  grid-template-columns: 1fr 0.1fr;
  grid-template-rows: 1fr;
}

.card {
  height: 34vh;
  width: 31vh;
  justify-self: center;
  border: 0.35vh solid #2B2B2B;
  padding: 5%;
  border-radius: 10px;
  background: #20202080;
  padding-bottom: 0;
  animation: fadeIn 1.25s ease-in-out forwards;
}

.input-wrapper {
    position: relative;
    padding-bottom: 1vh;
}

.suggestions {
    background: #2C2C2C;
    color: #F8F8F8;
    position: absolute;       /* ⬅️ make it float above the input */
    bottom: 100%;             /* ⬅️ place above the input field */
    left: 0;
    right: 0;
    margin-top: 5px;
    display: flex;
    flex-direction: column-reverse;
    z-index: 10;
}

.suggestions div {
    padding: 5px 10px;
    text-align: center;
}
.suggestions div.top-option {
    text-align: center;
    transition: background-color 0.3s;
}

.suggestions div.highlighted {
    background-color: #084079;
    color: white;
}

.suggestions div:hover {
    background-color: #054a94;
    color: white;
}

.name-input {
  display: grid;
  background-color: #2C2C2C;
  color: white;
  width: 100%;
  text-align: center;
  justify-self: center;
  font-size: 3vh;
  border: none;
  border-radius: 1vh 0 0 1vh;
  transition: background-color 0.5s, color 0.5s;
}

.name-input:disabled {
  color: #9A9A9A;
  background-color: #242424;
}

.name-input:focus {
    outline: none;
    box-shadow: none;
}

.enter-button {
  background-color: #2C2C2C;
  color: white;
  border: none;
  border-radius: 1vh 0 0 1vh;
  font-size: 3vh;
  cursor: pointer;
  transition: background-color 0.5s, color 0.5s;
  transform: scale(-1, 1);
  cursor: pointer;
}

.enter-button:disabled {
  color: #9A9A9A;
  background-color: #242424;
  cursor: default;
}

.enter-button:focus {
    outline: none;
    box-shadow: none;
}

/*make on hover button go bigger - project for later byron*/

.hint-wrapper {
    padding: 0.25vh;
}

.hint {
    background-color: #2C2C2C;
    color: #FAFAFA;
    text-align: center;
    justify-self: center;
    border: none;
    border-radius: 0.8vh;
    font-family: sans-serif;
    width: 100%;
    padding-top: 0.5vh;
    padding-bottom: 0.5vh;
    font-size: 1.4vh;
    height: 1.8vh;
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: background-color 0.6s;
    font-weight: bolder;
}

.hint.flip {
  animation: flip 0.75s ease forwards;
}

@keyframes flip {
  0% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0);
  }
  100% {
    transform: scaleY(1);
  }
}

.suggestion {
  padding: 6px 10px;
  cursor: pointer;
}
.suggestion.highlighted {
  background-color: #007bff;
  color: white;
}

a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5vh;
  height: 5vh;
  background-color: rgb(37, 37, 37);
  border-radius: 1vh;
  text-decoration: none;
  transition: 200ms ease-out;
  color: rgb(196, 196, 196);
  position: fixed;
  z-index: 10;
  pointer-events: auto;
}

a.disabled {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}

#welcomeA {
  top: 1vh;
  right: 1vw;
  /* or swapped for vertical layout */
}

#resetA {
  top: 1vh;
  right: 5vw;
  /* or swapped for vertical layout */
}

#dailyA {
  top: 1vh;
  left: 5vw
}

#infiniteA {
  top: 1vh;
  left: 5vw;
}

a:not(#footerA):hover {
  background-color: #333333;
}

.disabled-link {
  pointer-events: none;
  opacity: 0.5;
  cursor: default;
}

.page-button:hover {
  background-color: #484848; 
}
.popupContent {
  color: gainsboro;
  display: absolute;
  top: 3.5vh;
  left: 50vw;
  position: fixed;
  transform: translate(-50%, -50%);
  margin-top: 47vh;
  width: 30vw;
  height: 55vh;
  padding: 3vh;
  padding-top: 0;
  z-index: 1003;
  overflow: auto;
  border-radius: 2vh;
  border: 0.35vh solid #2B2B2B;
  background-color: #181818;
  animation: fadeIn 0.75s ease-in-out forwards;
  -ms-overflow-style: none; 
  scrollbar-width: none; 
}

.popupContent::-webkit-scrollbar {
  display: none;
}

.popupContent h2 {
  font-size: 3vh;
  margin-bottom: 2vh;
  text-align: center;
  color: #f8f8f8;
}

.popupContent h3 {
  font-size: 2.5vh;
  margin-top: 3.5vh;
  margin-bottom: 3vh;
  text-align: center;
  color: #f8f8f8;
}

.popupContent p {
  font-size: 2vh;
  line-height: 1.6;
  margin-bottom: 1.5vh;
  text-align: center;
  color: #ccc;
}

.popupOverlay {
  display: none;
  position: fixed;
  top: 0%;
  left: 0%;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  backdrop-filter: blur(1vh);
  -webkit-backdrop-filter: blur(1vh); 
}

.highlight-yellow {
  color: black;
  background-color: #C8B653;
  padding: 0.1em 0.3em;
  border-radius: 0.3em;
}

.highlight-green {
  color: black;
  background-color: #6CA965;
  padding: 0.1em 0.3em;
  border-radius: 0.3em;
}

.popupCloseBtn {
  display: block; 
  position: relative; 
  background-color: #2C2C2C;
  color: white;
  border: none;
  width: 50%;
  border-radius: 1vh;
  font-size: 3vh;
  padding: 0.8vh 1.4vh 1vh 1.4vh;
  cursor: pointer;
  animation: fadeIn 0.75s ease-in-out forwards;
  transition: background-color 0.2s, color 0.5s, transform 0.15s ease-out;

  z-index: 1000;
  margin: 2vh auto 0;
}

.popupCloseBtn:hover {
  background-color: #3d3d3d;
  transform: scale(1.1);
}

#winPopup > .popupContent {
  height: 55vh;
  width: 40%;
}

#gameOverPopup > .popupContent {
  height: 55vh;
  width: 40%;
}

#histogramChart {
  margin-top: 1vh;
  width: 95%;
}

.histogram-row {
  display: flex;
  align-items: center;
  margin: 0.25vw 0;
}

.histogram-label {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 0.75vh;
  height: 3vh;
  width: 5vh;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  background-color: #6CA965;
  font-size: 2vh;
  color: #FAFAFA;
}

.histogram-label.failed {
  font-size: 2vh;
  background-color: #ff7575;
  color: white;
}

.bar-container {
  flex: 1;
  display: flex;
  align-items: center;
}

.bar {
  height: 3vh;
  min-width: 2vh;
  background-color: #2F2F2F;
  color: #FAFAFA;
  padding-right: 0.75vh;
  text-align: right;
  line-height: 3vh;
  font-weight: bold;
  overflow: hidden;
  white-space: nowrap;
  border-radius: 5px;
}

.count {
  margin-left: 0.75vh;
  font-weight: bold;
  white-space: nowrap;
}

#board {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -80%);
  animation: fadeIn 1.5s ease-in-out forwards;
}

.cell-button {
  background: #262626;
  width: 15vw;
  height: 10vh;
  color: gainsboro;
  border: 0.35vh solid #343434;
  border-radius: 1.5vh;
  margin: 0.4vh;
  font-size: 2.25vh;
  transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
  position: relative;
  opacity: 1;
  z-index: 50;
  box-shadow: none;
  cursor: pointer;
}

.cell-button.correct {
  transition: opacity 0.9s ease-out;
  pointer-events: none;
}

.cell-button:hover {
  background: #3d3d3d;
  border-color: #555;
  box-shadow: 0 0 0.8vh 0.2vh #444 inset, 0 0 1.2vh rgba(255,255,255,0.05);
}

.cell-button.toggle {
  background: #4b4b4b;
  border-color: #666;
  box-shadow: 0 0 1vh 0.3vh #555 inset;
}

.cell-button.toggle:hover {
  background: #595959;
  border-color: #777;
  box-shadow: 0 0 1.2vh 0.2vh #666 inset;
}

.cell-text {
  display: inline-block;
  transition: opacity 0.7s ease-in-out;
  opacity: 1;
}

.fade-out {
  opacity: 0;
}

#guessP {
  position: absolute;
  top: 61.5%;
  left: 50%;
  transform: translate(-50%, -40%);
  color: gainsboro;
  font-size: 1.75vh;
  animation: fadeIn 1.75s ease-in-out forwards;
}


.dots {
  font-size: 5vh;
  letter-spacing: 0.5vw;
  vertical-align: middle;
}

#controls {
  position: absolute;
  top: 70%;
  left: 50%;
  transform: translate(-50%, -30%);
  animation: fadeIn 1.875s ease-in-out forwards;
}


.control-button {
  border-radius: 2.5vh;
  height: 5vh;
  width: 7.5vw;
  background: #262626;
  border: 0.35vh solid #343434;
  margin: 1.25vw;
  color: gainsboro;
  font-size: 1.5vh;
  opacity: 1;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.control-button:disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

.submit-button {
  border-radius: 2.5vh;
  height: 5vh;
  width: 7.5vw;
  background: #343434;
  border: 0.35vh solid #343434;
  margin: 1.25vw;
  color: gainsboro;
  font-size: 1.5vh;
  opacity: 1;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.submit-button:disabled {
  opacity: 0.5;
  cursor: default;
}

.container {
  position: relative;
  width: 100%;
  height: 100vh;
}

.correctOverlay {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 62.4vw;
  height: 10vh;
  border-radius: 1.5vh;
  font-weight: bold;
  z-index: 20;
  transition: opacity 1s ease, top 0.5s ease;
  opacity: 1;
}


.correctOverlay.visible {
  opacity: 1;
  visibility: visible;
}

.correctOverlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.correctOverlay h {
  display: block;
  font-size: 2vh;
  margin-bottom: 1vh;
  margin-top: 1.9vh;
}

.correctOverlay p {
  margin: 0;
  font-weight: normal;
  font-size: 1.5vh;
}

#CorrectOverlay1 {
  background-color: #C8B653;
}

#CorrectOverlay2 {
  background-color: #6CA965;
}
#CorrectOverlay3 {
  background-color: #7FA9E3;
}

#CorrectOverlay4 {
  background-color: #A890C8;
}

#snackbar {
  visibility: hidden;
  min-width: 30vh; 
  margin-left: -15vh;
  background-color: #333; 
  color: gainsboro; 
  text-align: center;
  border-radius: 1vh; 
  padding: 16px;
  position: fixed; 
  z-index: 1;
  left: 50%; 
  bottom: 2vh; 
}

#snackbar.show {
  visibility: visible; 
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
  from {bottom: 0; opacity: 0;}
  to {bottom: 2vh; opacity: 1;}
}

@keyframes fadeout {
  from {bottom: 2vh; opacity: 1;}
  to {bottom: 0; opacity: 0;}
} 

.xButton {
    background-color: #2C2C2C;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px; 
    height: 20px; 
    font-size: 20px;
    cursor: pointer; 
    display: flex; 
    justify-content: center; 
    align-items: center;
    transition: background-color 0.3s ease-in-out;
    padding-bottom: 5px;
    position: absolute; 
    top: 10px;
    right: 10px;
}

.xButton:hover {
    background-color: #ff5050;
}

#winSubjectionsPopup > .popupContent,
#gameOverSubjectionsPopup > .popupContent {
  height: 20vh;
  width: 35%;
  padding: 2vh;
  margin-top: 35vh;
}

.reset-icon {
    padding-top: 0.7vh;
    transform: scaleX(-1);
    transform-origin: center;
}

.streak {
  position: static; /* or unset */
  margin: 0 auto 2vh auto; /* vertical margin to create space */
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 3vh;
  font-weight: bold;
  animation: fadeIn 2s ease-in-out forwards;
  transform: none;
}
  
  .streak-unfilled,
  .streak-filled {
    position: relative;
    color: gainsboro;
    animation: fadeIn 2s ease-in-out forwards;
  }
  
  .streak-label {
    color: gainsboro;
    font-size: 1.3vh;
    margin-top: 0.2em; 
    position: relative; 
    transform: none;
    font-weight: normal;
    animation: fadeIn 2.5s ease-in-out forwards;
}

.streak-wrapper {
  margin-top: 74vh; 
  margin-bottom: 3vh;
}

.calendar-icon, .reset-icon, .welcome-icon {
    width: 5vh;
    height: 5vh;
    z-index: 10;
}

.infinite-icon {
  transform: scale(75%);
  top: 1rem;
  right: 1rem;
  z-index: 10;
}

#subjectleA, #subjectionsA {
  top: 1vh;
  left: 1vw;
}

.subjectleIcon, .subjectionsIcon {
  transform: scale(8%);
  filter: grayscale(1);
}
