body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0d1b2a 100%);
  color: #ffffff;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  padding-bottom: 10px;
  overflow-y: auto;
}

.top {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  justify-content: center;
}

button, select {
  padding: 10px 15px;
  font-size: 16px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}

button:hover, select:hover {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  box-shadow: 0 6px 8px rgba(37, 99, 235, 0.5);
  transform: translateY(-2px);
}

#board {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.row {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}

.cell {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #2563eb;
  border-radius: 8px;
  font-weight: 700;
  font-size: 24px;
  text-transform: uppercase;
  background-color: #0a0e27;
  color: #ffffff;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.cell.filled {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-color: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.good {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-color: #10b981;
  animation: flip 0.6s ease-in-out;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
}

.present {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border-color: #f59e0b;
  animation: flip 0.6s ease-in-out;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.6);
}

.bad {
  background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
  color: white;
  border-color: #4b5563;
  animation: flip 0.6s ease-in-out;
  box-shadow: 0 0 8px rgba(75, 85, 99, 0.4);
}

@keyframes flip {
  0% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(90deg);
  }
  100% {
    transform: rotateY(0deg);
  }
}

.msg {
  margin-top: 12px;
  min-height: 30px;
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  padding: 10px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.1);
}

.kbd {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 15px 10px;
  background: linear-gradient(180deg, rgba(10, 14, 39, 0.95) 0%, rgba(10, 14, 39, 1) 20%);
  backdrop-filter: blur(10px);
  box-shadow: 0 -4px 20px rgba(37, 99, 235, 0.2);
  z-index: 100;
}

.kbd-row {
  display: flex;
  gap: 6px;
  justify-content: center;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

.key {
  padding: 14px 8px;
  border: 1px solid #2563eb;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s;
  flex: 1;
  min-width: 0;
  text-align: center;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.key:hover {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.5);
}

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

.key.wide {
  flex: 1.5;
}

.key.key-good {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #10b981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.5);
}

.key.key-good:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.key.key-present {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: #f59e0b;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5);
}

.key.key-present:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.key.key-bad {
  background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
  border-color: #4b5563;
  box-shadow: 0 2px 4px rgba(75, 85, 99, 0.3);
}

.key.key-bad:hover {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

/* Responsive design */
@media (max-width: 768px) {
  .content-wrapper {
    padding: 10px;
    padding-bottom: 5px;
  }

  .top {
    flex-direction: column;
    gap: 10px;
  }

  .cell {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .kbd {
    padding: 12px 8px;
  }

  .kbd-row {
    gap: 4px;
  }

  .key {
    padding: 12px 6px;
    font-size: 14px;
  }

  .msg {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .cell {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }

  .row {
    gap: 4px;
  }

  .kbd {
    padding: 10px 5px;
  }

  .kbd-row {
    gap: 3px;
  }

  .key {
    padding: 10px 4px;
    font-size: 13px;
  }
}
