body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #3e3c4d; /* Set the background color */
  color: white; /* Set default text color to white */
  transition: transform 1s ease; /* Smooth rotation effect */
}

.container {
  display: flex; /* Use flexbox to center content */
  flex-direction: column; /* Stack items vertically */
  align-items: center; /* Center items horizontally */
  text-align: center;
  max-width: 600px;
  width: 100%; /* Full width for responsiveness */
}

.logo-background {
  background-color: #302E3A; /* Color behind the logo */
  padding: 10px; /* Add some padding */
  border-radius: 5px; /* Rounded corners for the background */
  width: 100%; /* Full width */
  display: flex; /* Flex to center the logo */
  justify-content: center; /* Center horizontally */
}

#paragraph {
  font-size: 18px;
  line-height: 1.5;
  padding: 20px;
  background-color: #302E3A; /* Background color for the paragraph */
  margin-bottom: 20px;
  color: whitesmoke; /* Change text color in the paragraph to black */
}

.stats {
  margin-top: 20px;
}

#paragraph span.highlighted {
  background-color: yellow; /* Highlighting for wrong letters */
}

#paragraph span.letter-highlighted {
  background: lightgreen; /* Highlight color for correct letters */
}

#hiddenInput {
  position: fixed;
  top: 50%; /* Center vertically */
  left: 50%; /* Center horizontally */
  transform: translate(-50%, -50%);
  width: 1px;
  height: 1px;
  opacity: 0; /* Invisible */
}

/* Center buttons in the container */
button {
  display: block; /* Makes each button a block element */
  margin: 10px auto; /* Centers the button with margin on top and bottom */
}

/* Start button styling */
#startButton, #seeResultsButton, #restartButton {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  background-color: #4CAF50;
  color: white; /* Button text color */
  border: none;
  border-radius: 5px;
}

#startButton:focus, #seeResultsButton:focus, #restartButton:focus {
  outline: none;
}

/* Style for the results section */
#resultsSection {
  margin-top: 20px;
}

/* Style for the textarea */
textarea {
  width: 100%; /* Full width for the text area */
  height: 100px; /* Set a height for the text area */
  margin-top: 10px; /* Space above the text area */
  padding: 10px; /* Padding inside the text area */
  font-size: 16px; /* Font size for the text area */
  color: black; /* Text color for the text area */
  background-color: white; /* Background color for the text area */
}

.pacman {
    position: fixed;
    top: 50%;
    left: -50px;
    width: 50px;
    height: 50px;
    background: yellow;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    animation: pacman-slide 4s linear forwards;
}

.orb {
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    animation: fade-out 4s linear forwards;
}

@keyframes pacman-slide {
    0% { left: -50px; }
    100% { left: 100%; }
}

@keyframes fade-out {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* Jumpscare image styling */
#jumpscare-image {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px; /* Adjust as needed */
    height: auto;
    z-index: 1000; /* Make sure it’s on top of other elements */
    animation: jumpscare-fade 1s ease-in-out forwards;
}

.jumpscare-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('jumpscare-image.jpg') no-repeat center center;
    background-size: cover;
    z-index: 10000; /* Ensure it appears on top of everything */
}

@keyframes jumpscare-fade {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

.jumpscare-gif {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('mouth-hungry.gif') no-repeat center center;
    background-size: cover;
    z-index: 10000; /* Ensure it appears on top */
    opacity: 1; /* Start fully visible */
    transition: opacity 1s ease-in-out; /* Smooth fade-out */
}

/* Navbar Styling */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #6b6257; /* Muted pastel beige */
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

/* Logo */
.nav-logo a {
    text-decoration: none;
    color: #3e3c4d; /* Neutral dark gray */
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: -1px -1px 0px rgba(0, 0, 0, 0.9); /* Subtler effect */
}

/* Links */
.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 15px;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: #3a3a3a; /* Neutral dark gray */
    font-size: 1rem;
    font-weight: 500;
    padding: 5px 10px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Hover Effects */
.nav-links a:hover {
    background-color: #b9afa5; /* Darker muted pastel beige */
    color: #ffffff; /* White for better contrast */
    border-radius: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 10px;
    }
}

.about-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 70px); /* Full viewport minus navbar height */
    background-color: #f4f4f4; /* Subtle background for the about section */
    padding: 20px;
}

.about-text {
    max-width: 600px;
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #3e3c4d; /* Neutral dark gray */
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

#leaderboard-list li:first-child {
    font-weight: bold; /* Highlight the first-place entry */
    color: gold;       /* Gold color for first place */
}

#leaderboard-list li:nth-child(2) {
    font-weight: bold;
    color: silver;     /* Silver color for second place */
}

#leaderboard-list li:nth-child(3) {
    font-weight: bold;
    color: bronze;     /* Bronze color for third place */
}

li {
  list-style-type: none;
}
#resultContainer {
    margin-top: 20px;
    font-size: 18px;
    font-weight: bold;
    color: lightgreen; /* Success message color */
    display: none; /* Hidden by default */
    text-align: center;
}
