:root {
  --main-color: #2196f3;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  line-height: 1.6;
  background-color: #f4f4f9;
  color: #333;
  margin: 0;
  padding: 0;
}

.game {
  background-color: #eee;
  min-height: 100vh;
}

.container {
  margin: auto;
  max-width: 900px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
}

.name {
  background-color: var(--main-color);
  color: white;
  padding: 15px;
  font-size: 30px;
  text-align: center;
  font-weight: bold;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.message {
  background-color: white;
  padding: 15px;
  margin: 20px 0;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  font-size: 20px;
  color: #555;
}

.message span {
  font-weight: bold;
  color: var(--main-color);
}

.message span::before {
  content: '[ ';
}

.message span::after {
  content: ' ]';
}

.start {
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  background-color: var(--main-color);
  color: white;
  padding: 15px 30px;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.start:hover {
  background-color: #1769aa;
  transform: scale(1.05);
}

.start:active {
  transform: scale(0.95);
}

.the-word {
  text-align: center;
  font-weight: bold;
  font-size: 50px;
  color: var(--main-color);
  user-select: none;
  margin: 15px 0;
}

.input {
  margin: 15px 0;
  width: 100%;
  max-width: 460px;
  display: block;
  padding: 15px;
  border: 3px solid var(--main-color);
  text-align: center;
  font-size: 20px;
  text-transform: capitalize;
  border-radius: 8px;
  caret-color: var(--main-color);
  transition: border-color 0.3s ease-in-out;
}

.input:focus {
  outline: none;
  border-color: #1769aa;
  box-shadow: 0 0 8px rgba(23, 105, 170, 0.5);
}

.upcoming-words {
  background-color: white;
  padding: 15px;
  font-weight: bold;
  color: var(--main-color);
  font-size: 20px;
  margin: 15px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(0, 150, 136, 0.2);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.upcoming-words div {
  background-color: var(--main-color);
  color: white;
  font-weight: bold;
  margin: 5px;
  padding: 10px 15px;
  border-radius: 6px;
  font-size: 16px;
}

.control {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin: 15px 0;
  width: 100%;
  max-width: 500px;
}

.control span {
  font-weight: bold;
  color: #009688;
  font-size: 18px;
}

.finish {
  font-weight: bold;
  font-size: 40px;
  text-align: center;
  padding: 15px;
  margin: 15px 0;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 15px;
}

/* Success Message */
.good {
  color: #28a745;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
}

/* Failure Message */
.bad {
  color: #dc3545;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
}

.retry {
  display: inline-block;
  background-color: #ff5722;
  color: white;
  font-size: 18px;
  font-weight: bold;
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  margin-top: 15px;
  align-self: center;
}

.retry:hover {
  background-color: #e64a19;
  transform: scale(1.1);
}

.retry:active {
  transform: scale(0.95);
}

@media (max-width: 768px) {
  .message {
    font-size: 18px;
  }
  .name {
    font-size: 24px;
    padding: 15px;
  }
  .the-word {
    font-size: 40px;
  }
  .input {
    font-size: 18px;
    padding: 10px;
  }
  .control {
    flex-direction: column;
    gap: 10px;
  }
  .start {
    padding: 10px 20px;
  }
}