body {
  background-color: #121213;
  color: #ffffff;
  font-family: 'Roboto', sans-serif;
}

.game-board {
  max-width: 350px;
  margin: 0 auto;
  padding: 20px;
  background: rgba(58, 58, 60, 0.1);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.cell {
  width: 60px;
  height: 60px;
  border: 2px solid rgba(58, 58, 60, 0.4);
  border-radius: 4px;
  margin: 2px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  font-weight: bold;
  text-transform: uppercase;
  background-color: transparent;
  color: #ffffff;
  transition: all 0.3s ease;
  box-shadow: none;
}

.cell:not(:empty) {
  background-color: #1e1e24;
  border-color: #2d2d35;
}

.cell.correct {
  background-color: #02a647;
  border-color: #02a647;
  color: white;
  box-shadow: 0 0 8px rgba(2, 166, 71, 0.3);
}

.cell.present {
  background-color: #e5b804;
  border-color: #e5b804;
  color: white;
  box-shadow: 0 0 8px rgba(229, 184, 4, 0.3);
}

.cell.absent {
  background-color: #4a4a4c;
  border-color: #4a4a4c;
  opacity: 0.8;
  color: #a0a0a0;
  box-shadow: none;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(5px); }
  50% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
  100% { transform: translateX(0); }
}

.shake {
  animation: shake 0.5s ease-in-out;
}

h1 {
  font-weight: 700;
  margin-bottom: 30px;
}

@keyframes pop {
  0% { transform: scale(0.8); }
  100% { transform: scale(1); }
}

.game-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 1024px) {
  .game-container {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
  }

  .letter-status {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 20px;
    background: transparent;
    border-radius: 10px;
    height: fit-content;
    box-shadow: none;
    backdrop-filter: none;
    width: auto !important;
    max-height: 500px;
  }

  .letter-item {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    text-transform: uppercase;
    background: #1e1e24;
    transition: all 0.3s ease;
    margin-bottom: 2px;
    box-shadow: none;
    border: 1px solid rgba(58, 58, 60, 0.4);
    opacity: 1;
    color: #ffffff;
  }

  .letter-item.correct {
    background: #02a647;
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(2, 166, 71, 0.3);
    opacity: 1;
  }

  .letter-item.present {
    background: #e5b804;
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(229, 184, 4, 0.3);
    opacity: 1;
  }

  .letter-item.absent {
    background: #3a3a3c;
    opacity: 0.8;
    color: #666666;
    box-shadow: none;
    border: 1px solid #4a4a4c;
  }

  .virtual-keyboard {
    margin: 0;
  }

  .game-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .replay-button {
    margin-top: 20px;
  }

  .sidebar {
    margin-left: 50px;
  }
}

@media (max-width: 1023px) {
  .game-container {
    flex-direction: column;
    align-items: center;
  }
}

@media (min-width: 600px) and (max-width: 1023px) {
  .game-container {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
  }

  .toast-notification {
    position: absolute;
    top: 0;
    right: 30px;
    transform: translateX(0);
    opacity: 1;
    animation: slideIn 0.3s ease-out;
  }

  .virtual-keyboard {
    margin-top: 200px;
  }

  .game-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

.toast-notification {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 20px;
  padding: 16px;
  border-radius: 8px;
  text-align: center;
  font-size: 1.1rem;
  animation: slideLeft 0.5s ease-in-out;
  opacity: 1;
  animation-fill-mode: forwards;
  z-index: 1000;
}

.toast-win {
  background: linear-gradient(45deg, #02a647, #019540);
}

.toast-lose {
  background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.toast-error {
  background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.show-letter-status .toast-notification {
  position: absolute;
  top: 0;
  right: 30px;
  transform: translateX(0);
  opacity: 1;
  animation: slideIn 0.3s ease-out;
}

.show-letter-status .letter-status {
  margin-top: 60px;
}

.show-letter-status .replay-button {
  margin-top: 0;
  align-self: center;
}

.show-letter-status .letter-status,
.show-letter-status .replay-button {
  display: block;
}

.replay-button {
  background: linear-gradient(45deg, #02a647, #019540);
  border: none;
  color: white;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: bold;
  margin-top: 20px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(46, 204, 113, 0.2);
}

.replay-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.replay-button:active {
  transform: translateY(0);
}

@keyframes slideDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateX(50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@media (max-width: 500px) {
  .cell {
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
  }

  .game-board {
    padding: 20px;
  }
}

.virtual-keyboard {
  max-width: 500px;
  margin: 20px auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.letter-status {
  display: none;
  width: 40px;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.key {
  background: #1e1e24;
  border: none;
  border-radius: 4px;
  color: #ffffff;
  font-weight: bold;
  margin: 0 2px;
  padding: 12px;
  min-width: 30px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  opacity: 1;
}

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

.key.wide {
  min-width: 65px;
}

.key.correct {
  background: #02a647;
}

.key.present {
  background: #e5b804;
}

.key.absent {
  background: #3a3a3c;
  opacity: 0.8;
  color: #666666;
  border: 1px solid #4a4a4c;
}

.sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.sidebar .letter-status {
  margin-bottom: 0px;
}

.sidebar .replay-button {
  margin: 0;
}

.sidebar .letter-status {
  margin-bottom: 0px;
}

.toast-notification.hide {
  animation: slideOut 0.3s ease-out forwards;
}
