:root {
  --primary-color: #ff6b6b;
  --secondary-color: #4ecdc4;
  --accent-color: #ffe66d;
  --text-color: #2d3436;
  --bg-color: #f7f9fc;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.game-container {
  width: 90%;
  max-width: 600px;
  background: white;
  padding: 2rem;
  border-radius: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.hidden {
  display: none !important;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px dashed #eee;
}

.stat {
  font-size: 1.2rem;
  font-weight: bold;
}

.stat span {
  color: var(--primary-color);
  font-size: 1.5rem;
}

.heart {
  font-size: 1.8rem;
  margin-left: 5px;
  display: inline-block;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.heart.lost {
  filter: grayscale(1) opacity(0.3);
  transform: scale(0.8);
}

.title {
  color: var(--secondary-color);
  font-size: 2.5rem;
  margin-top: 0;
  text-shadow: 2px 2px 0px var(--accent-color);
}

.word-display {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.char-box, .char-input {
  width: 45px;
  height: 55px;
  border: 3px solid var(--secondary-color);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  font-weight: bold;
  background: white;
  text-align: center;
  text-transform: lowercase;
  outline: none;
  transition: border-color 0.3s, background-color 0.3s;
}

.char-input:focus {
  border-color: var(--primary-color);
  background-color: #fff9f9;
}

.info-panel {
  background: #f0f4f8;
  padding: 1.5rem;
  border-radius: 15px;
  margin-bottom: 2rem;
  text-align: left;
}

.info-panel p {
  margin: 0.5rem 0;
  line-height: 1.5;
}

.input-area {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.guess-btn {
  padding: 1rem 2rem;
  font-size: 1.2rem;
  font-weight: bold;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
}

.guess-btn:hover {
  background-color: #ff5252;
  transform: translateY(-2px);
}

.message {
  height: 1.5rem;
  margin-top: 1.5rem;
  font-weight: bold;
  font-size: 1.2rem;
  padding: 10px;
  border-radius: 10px;
  transition: opacity 0.3s;
}

.message.success {
  background-color: #d4edda;
  color: #155724;
  opacity: 1;
}

.message.error {
  background-color: #f8d7da;
  color: #721c24;
  opacity: 1;
}

.message:empty {
  opacity: 0;
}

#game-over-screen h1 {
  color: var(--primary-color);
  font-size: 3.5rem;
}

.final-score {
  font-size: 2rem;
  font-weight: bold;
}

.restart-btn {
  padding: 1rem 2.5rem;
  font-size: 1.5rem;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  margin-top: 2rem;
}

.restart-btn:hover {
  background-color: #3dbfb6;
}
