html, body {
  height: 100vh;
  overflow: hidden;
  padding: 0;
  margin: 0;
  font-family: Arial, sans-serif;
}


.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
h1 {
  text-align: center; 
  margin-top: 0; 
  padding: 1.5% 0; 
  height: 10vh;
  background-color: #ffffff; 
  color: #003253; 
  font-family: Arial, sans-serif; 
  width: 100%;
  position: absolute;
  font-size: 8vh;
  top: 0;
  left: 0;
}

#logo {
  position: absolute;
  width: 150px;
  height: 150px;
  margin-left: 80vh;
}


p {
    text-align: center;
    margin-top: 0px;  
    margin-bottom: 20px;  
    font-size: 4vh;  
    font-weight: bold;
    padding: 0 10px;  
}

#chatBox {
  position: absolute;
  top: 10vh;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 200px;
  font-size: 2vh;
  text-align: center;
  pointer-events: none; /* Ensure messages don't interfere with clicking */
  z-index: 1000;
}

.message {
  display: none;
  margin-bottom: 1vh;
  background-color: black;
  color: white;
  padding: 10px;
  border-radius: 5px;
  animation: flashMessage 2s forwards;
}

.message-disappearing {
  opacity: 0;
  transition: opacity 1s;
}

@keyframes flashMessage {
  0% { opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; }
}



.text{
  display: absolute;
  font-size: 20px;
  left: 200px;
}

.guess {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  border: 2px solid #333;
  font-size: 24px;
}
#keyboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20vh;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    margin: .5% 0;
}
.key {
    width: 5vh;
    height: 4vh;
    margin: .5%;
    border-radius: 14px;
    border: none;
    background-color: #d3d6da;
    cursor: pointer;
    BORDER: 2px solid #686e75;
}

.enter-key {
    width: 10vh; /* Adjust width to fit your design */
}

.delete-key {
    font-size: 2.5vh; /* Adjust size of the "X" symbol */
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

#guessInput {
  margin-right: 10px;
}

#playAgainButton {
    position: fixed;
    margin-top: 37vh;
    width: 10vw;
    height: 3vh;
    border-radius: 14px;
}

/* Win animation */
@keyframes win-animation {
    0%, 100% {
        transform: scale(1);
        background-color: rgb(106, 170, 100); /* Original green color */
    }
    50% {
        transform: scale(1.2);
        background-color: gold;
    }
}

.wordle-box.win .back{
    animation: win-animation 1s ease-in-out forwards;
}


.wordle-grid {
    display: grid;
    grid-template-columns: repeat(5, 60px); 
    grid-template-rows: repeat(6, 60px); 
    height: 250px;
    width: 350px;
    gap: 1%; 
    justify-content: center; 
    align-items: center;
    margin-top: 10vh; 
    padding-bottom: 0;
}

/* Add this to your CSS file */
.wordle-box {
  width: 80%;
  height: 80%;
  border-radius: 14px;
  border: 2px solid #d3d6da; /* Gray border */
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2vh;
  font-weight: bold;
  color: #000; /* Black text, if needed */
  position: relative;
  perspective: 1000px; /* Perspective for 3D effect */
}

.wordle-box .front,
.wordle-box .back {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  border: 2px solid #d3d6da; /* Gray border */
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  color: #000; /* Black text, if needed */
  position: absolute;
  transition: transform 0.4s;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.wordle-box .front {
  transform: rotateX(0deg);
}

.wordle-box .back {
  transform: rotateX(180deg);
}

.wordle-box.flipped .front {
  transform: rotateX(180deg);
}

.wordle-box.flipped .back {
  transform: rotateX(0deg);
}

.wordle-box.no-transition .front,
.wordle-box.no-transition .back {
  transition: none;
}

/* shake animation */
.shake {
  animation: shake 0.5s;
}
@keyframes speak {

}
@keyframes shake {
  0% {
    transform: translate(1px);
  }
  10% {
    transform: translate(-2px);
  }
  20% {
    transform: translate(2px);
  }
  30% {
    transform: translate(-2px);
  }
  40% {
    transform: translate(2px);
  }
  50% {
    transform: translate(-2px);
  }
  60% {
    transform: translate(2px);
  }
  70% {
    transform: translate(-2px);
  }
  80% {
    transform: translate(2px);
  }
  90% {
    transform: translate(-2px);
  }
  100% {
    transform: translate(1px);
  }
}

/* Container for the form elements */
.login-form {
    position: fixed; 
    top: 0; 
    right: 0; 
    padding: 10px;
    display: flex;
    flex-direction: column; 
    align-items: flex-start; 
    width: 200px; 
}

/* Container for buttons */
.button-container {
    display: flex; 
    width: 100%; 
    justify-content: space-between; 
    gap: 10px; 
}

/* General style for buttons */
.login-form button {
    flex: 1; 
    padding: 8px 16px;
    border-radius: 20px; 
    color: white;
    border: none;
    cursor: pointer;
    margin-bottom: 0; 
}

/* Specific style for the login button */
.login-btn {
    background-color: #007bff; 
}

.login-btn:hover {
    background-color: #0056b3; 
}

/* Specific style for the signup button */
.signup-btn {
    background-color: #4CAF50; 
}

.signup-btn:hover {
    background-color: #45a049; 
}

/* Style for the flash messages container */
#flash-messages {
    position: fixed;      
    top: 20px;            
    left: 50%;          
    transform: translateX(-50%); 
    z-index: 1000;     
    width: auto;     
    text-align: center; 
}

/* Style for individual flash messages */
.flash-message {
    padding: 10px 20px;
    margin-bottom: 10px;
    border-radius: 5px;
    background-color: #f8d7da; 
    color: #721c24; 
}

.flash-success {
    background-color: #d4edda; 
    color: #155724; 
}

.flash-message {
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    opacity: 1;
    visibility: visible;
}

/* Hiding the message */
.flash-message-hide {
    opacity: 0;
    visibility: hidden;
}

/* Add to style.css */
.welcome-container {
    position: fixed;
    top: 0;
    right: 0;
    background-color: #f8f9fa;
    padding: 10px;
    border-bottom-left-radius: 8px;
}

.signout-btn {
    background-color: #dc3545; 
    color: white;
    padding: 5px 10px;
    text-decoration: none;
    margin-left: 10px;
    border-radius: 4px;
}

.signout-btn:hover {
    background-color: #bd2130;
}

.toggle-container {
    display: flex;
    align-items: center;
    margin-top: 10px;
    position: fixed;
    padding: 10px;
    top: 40px;
    right: 0;
}

.toggle-container .switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin-right: 10px;
}

.toggle-container .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-container .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-container .slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-container input:checked + .slider {
    background-color: #2196F3;
}

.toggle-container input:checked + .slider:before {
    transform: translateX(26px);
}

#toggleLabel {
    font-size: 16px;
    color: #000;
}

.logged-out-position {
    top: 70px;
}

.sidebar-toggle {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1001;
}

#toggleSidebarButton {
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
}

.stats-sidebar {
    position: fixed;
    z-index: 1000;
    left: -250px;  
    top: 0px;
    width: 250px;
    height: 100vh;
    background-color: #f9f9f9;
    border-right: 1px solid #ccc;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    transition: left 0.3s ease;  
}

.stats-sidebar.open {
    left: 0;  
}

.stats-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.stats-table th, .stats-table td {
    text-align: left;
    padding: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stats-table th:nth-child(1), .stats-table td:nth-child(1) {
    width: 60%;
}

.stats-table th:nth-child(2), .stats-table td:nth-child(2) {
    width: 40%;
}

.stats-table th {
    background-color: #eee;
}

/* Leaderboard */
/* Leaderboard Icon */
.leaderboard-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #FFD700;
    color: #FFF;
    font-size: 36px;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Leaderboard Popup */
.leaderboard-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    background-color: #2a2a2a;
    border: 2px solid #444;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    color: white;
    text-align: center;
    padding: 20px;
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.leaderboard-header h2 {
    margin: 0;
    color: #00bfff;
    align-items: center;
    width: 400px;
}

.leaderboard-table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
}

.leaderboard-selection {
    margin: 15px 0;
}

.leaderboard-selection label {
    margin-right: 10px;
}

.leaderboard-selection select {
    padding: 5px;
    background-color: #333;
    color: white;
    border: 1px solid #444;
    border-radius: 5px;
}

.leaderboard-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th, .leaderboard-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    color: white;
}

#playerRankSection {
    margin-top: 20px;
}

.leaderboard-table th, .leaderboard-table td {
    border: 1px solid #444;
    padding: 10px;
}

.leaderboard-table th {
    background-color: #333;
}

.leaderboard-table td {
    background-color: #555;
}

.leaderboard-table tbody tr.highlighted td {
    background-color: yellow; /* Highlight color */
    color: black; /* Ensure the text color is readable */
}

.leaderboard-table tbody tr:nth-child(odd) {
    background-color: #444;
}

.leaderboard-table tbody tr:nth-child(even) {
    background-color: #555;
}

.close-button {
    position: absolute;
    right: 10px;
    top: 10px;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.close-button:hover {
    color: gray;
}

/* for stats for games for each guess # */
#guess-stats {
    margin-top: 20px;
}

.guess-bar {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.guess-label {
    width: 30px; 
    text-align: left;
    margin-right: 17px;
    font-weight: bold;
}

.guess-bar-fill {
    height: 20px;
    background-color: #4CAF50; 
    border-radius: 5px;
    text-align: right;
    padding-right: 5px;
    box-sizing: border-box;
    color: white;
    line-height: 20px; 
    font-size: 12px;
    transition: width 0.5s ease-in-out; 
}