:root {
  --primary-color: rgba(1, 1, 1, 0.9);
  --secondary-color: #ff8c42;
  --accent-color: #ff6600;
  --light-color: #ffd8b5;
  --text-color: #333;
  --white: #ffffff;
  --black: #000000;
  --orange-gradient: linear-gradient(
    115deg,
    #ff6701,
    #ff9900,
    #fd640b,
    #ff8851,
    #ff9810,
    #ff7951
  );
  --success-color: #4caf50;
  --error-color: #f44336;
  --orange-bg: #b9b8b7;
  --regular-color: #3498db;
  --irregular-color: #9b59b6;
}

* {
  font-family: "Poppins", sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background-color: var(--orange-bg);
  color: var(--text-color);
  padding-top: 80px;
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(1, 1, 1, 0.9);
  padding: 0 10%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-bottom: 2px solid var(--secondary-color);
  transition: all 0.3s ease;
}

.header:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

.navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.header .navigation ul li {
  float: left;
  position: relative;
}

.header .navigation ul li a {
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
  text-decoration: none;
  padding: 22px 20px;
  display: block;
  transition: all 0.3s ease;
}

.header .navigation ul li a:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  color: var(--black);
}

#toggle,
.header label {
  display: none;
  cursor: pointer;
}

.menu {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
}

/* Main Container */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Title */
h1 {
  text-align: center;
  color: var(--black);
  margin-bottom: 30px;
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  padding-bottom: 15px;
}

h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: var(--orange-gradient);
  border-radius: 4px;
}

/* Game Header */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--white);
  border-radius: 15px;
  padding: 20px 30px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 20px;
}

.game-stats {
  display: flex;
  gap: 20px;
}

.stat-box {
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-color)
  );
  color: white;
  padding: 15px 25px;
  border-radius: 10px;
  text-align: center;
  min-width: 150px;
  box-shadow: 0 4px 10px rgba(255, 140, 66, 0.3);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.verb-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.regular-color {
  background-color: var(--regular-color);
}

.irregular-color {
  background-color: var(--irregular-color);
}

/* Game Container */
.game-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

@media (max-width: 950px) {
  .game-container {
    grid-template-columns: 1fr;
  }
}

/* Game Rules */
.game-rules {
  background-color: var(--white);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-left: 5px solid var(--secondary-color);
}

.rules-title {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rules-title i {
  color: var(--accent-color);
}

.rules-list {
  list-style-type: none;
  margin-left: 10px;
}

.rules-list li {
  margin-bottom: 12px;
  padding-left: 10px;
  position: relative;
  line-height: 1.5;
}

.rules-list li:before {
  content: "•";
  color: var(--accent-color);
  font-weight: bold;
  position: absolute;
  left: -10px;
}

/* Game Area */
.game-area {
  background-color: var(--white);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-left: 5px solid var(--accent-color);
  display: flex;
  flex-direction: column;
}

/* Hangman Area */
.hangman-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}

.hangman-title {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-align: center;
}

#hangman-canvas {
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: white;
  margin-bottom: 15px;
}

.hangman-stats {
  display: flex;
  gap: 15px;
  font-size: 1.1rem;
  font-weight: 500;
}

/* Current Verb */
.current-verb-container {
  text-align: center;
  margin-bottom: 30px;
}

.verb-label {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 10px;
}

.current-verb {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.verb-translation {
  font-size: 1.2rem;
  color: #666;
  font-style: italic;
}

/* Choice Buttons */
.choice-buttons {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.choice-btn {
  flex: 1;
  padding: 20px;
  border: none;
  border-radius: 10px;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.choice-btn i {
  font-size: 1.8rem;
}

.regular-btn {
  background: linear-gradient(135deg, var(--regular-color), #2980b9);
  color: white;
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.regular-btn:hover:not(:disabled) {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(52, 152, 219, 0.4);
}

.irregular-btn {
  background: linear-gradient(135deg, var(--irregular-color), #8e44ad);
  color: white;
  box-shadow: 0 5px 15px rgba(155, 89, 182, 0.3);
}

.irregular-btn:hover:not(:disabled) {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(155, 89, 182, 0.4);
}

.choice-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Result Display */
.result-container {
  margin-top: 20px;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  display: none;
  animation: fadeIn 0.5s ease;
}

.result-container.correct {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 2px solid var(--success-color);
  display: block;
}

.result-container.incorrect {
  background-color: #ffebee;
  color: #c62828;
  border: 2px solid var(--error-color);
  display: block;
}

.result-details {
  margin-top: 10px;
  font-size: 1.1rem;
  font-weight: 500;
}

/* Next Button */
.next-btn-container {
  text-align: center;
  margin-top: 20px;
}

.next-btn {
  padding: 15px 40px;
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-color)
  );
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(255, 140, 66, 0.3);
  display: none;
}

.next-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 140, 66, 0.4);
}

/* Progress Bar */
.progress-container {
  width: 100%;
  height: 12px;
  background-color: #e0e0e0;
  border-radius: 6px;
  margin: 20px 0 30px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--orange-gradient);
  border-radius: 6px;
  transition: width 0.5s ease;
  width: 0%;
}

/* Game Over Modal */
.game-over-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.5s ease-out;
}

.modal-content {
  background: linear-gradient(135deg, var(--white), var(--light-color));
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
  animation: scaleUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.modal-title {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.modal-message {
  font-size: 1.2rem;
  margin-bottom: 25px;
  color: var(--text-color);
  line-height: 1.5;
}

.final-score {
  font-size: 3rem;
  color: var(--secondary-color);
  font-weight: 700;
  margin: 20px 0;
}

.modal-btn {
  padding: 12px 30px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(91, 106, 191, 0.3);
  margin: 0 10px;
}

.modal-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(91, 106, 191, 0.4);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleUp {
  to {
    transform: scale(1);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 0.5s ease;
}

/* Media Queries */
@media (max-width: 950px) {
  .header label {
    display: initial;
  }

  .header {
    padding: 15px 10%;
  }

  .header .navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-color);
    display: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .header .navigation ul li {
    width: 100%;
  }

  .header .navigation ul li a {
    padding: 12px 20px;
    font-size: 18px;
  }

  #toggle:checked ~ .navigation {
    display: block;
    animation: slideDown 0.4s ease-out;
  }

  h1 {
    font-size: 2rem;
  }

  .choice-buttons {
    flex-direction: column;
  }

  .game-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .game-stats {
    width: 100%;
    justify-content: space-between;
  }

  .stat-box {
    min-width: 120px;
    padding: 12px 15px;
  }
}

@media (max-width: 768px) {
  .current-verb {
    font-size: 2.5rem;
  }

  .choice-btn {
    padding: 15px;
    font-size: 1.1rem;
  }

  #hangman-canvas {
    width: 180px;
    height: 220px;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 22px;
  }

  .header {
    padding: 12px 5%;
  }

  h1 {
    font-size: 1.8rem;
  }

  .current-verb {
    font-size: 2rem;
    min-height: 50px;
  }

  .game-stats {
    flex-direction: column;
    gap: 10px;
  }

  .stat-box {
    width: 100%;
  }
}
