* {
  margin: 0;
  padding: 0;
}

main{
  max-width: 100% !important;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 30px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.container h1 {
  text-align: center;
  color: #ff6b6b;
  font-size: 3em;
  margin-bottom: 20px;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 30px;
  padding: 20px;
  background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
  border-radius: 20px;
}

button {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  font-family: "Comic Sans MS", cursive;
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

button:active {
  transform: translateY(0);
}

.btn-color {
  background: #ff6b6b;
  color: white;
}
.btn-increase {
  background: #4ecdc4;
  color: white;
}
.btn-decrease {
  background: #95e1d3;
  color: #333;
}
.btn-reset {
  background: #ffe66d;
  color: #333;
}
.btn-creative {
  background: #ff6348;
  color: white;
}
.btn-quiz {
  background: #a29bfe;
  color: white;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-bottom: 20px;
  padding: 15px;
  background: #dfe6e9;
  border-radius: 15px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: bold;
  color: #2d3436;
  cursor: pointer;
}

.checkbox-label input {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.char-item {
  aspect-ratio: 1;
  display: grid;
  align-items: center;
  justify-content: center;
  font-size: 2.5em;
  font-weight: bold;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 1px 4px 8px rgba(0, 0, 0, 0.2);
  user-select: none;
  border: 2px solid #bdae93; /* Subtle darker border */
  /* 3D shadow effect */
  box-shadow: 7px 10px 0 0 #cd5c5c,
    /* Darker side of the block */ 20px 6px 15px rgba(0, 0, 0, 0.5); /* General drop shadow for lift */
}

.char-item:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.words-panel {
  margin-top: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 20px;
  min-height: 150px;
  display: none;
}

.words-panel.active {
  display: block;
  animation: slideIn 0.5s;
}

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

.words-panel h2 {
  color: #6c5ce7;
  margin-bottom: 15px;
}

.words-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.word-card {
  padding: 15px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s;
}

.word-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  background: #e8f4f8;
}

.word-card .english {
  font-size: 1.2em;
  font-weight: bold;
  color: #2d3436;
  margin-bottom: 5px;
}

.word-card .translation,
.word-card .significance {
  font-size: 0.9em;
  color: #636e72;
}

.word-card img {
  width: 200px !important;
}
.word-card audio {
  color: blue;
}

.quiz-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.quiz-modal.active {
  display: flex;
}

.quiz-content {
  background: white;
  padding: 40px;
  border-radius: 30px;
  text-align: center;
  max-width: 600px;
  animation: zoomIn 0.5s;
}

@keyframes zoomIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.quiz-content h2 {
  font-size: 2.5em;
  color: #ff6b6b;
  margin-bottom: 20px;
}

.quiz-target {
  font-size: 5em;
  color: #6c5ce7;
  margin: 30px 0;
  font-weight: bold;
}

.score-board {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
  font-size: 1.2em;
  font-weight: bold;
}

.correct {
  color: #00b894;
}
.incorrect {
  color: #d63031;
}

.celebration {
  position: fixed;
  pointer-events: none;
  font-size: 3em;
  animation: celebrate 2s;
  z-index: 2000;
}

@keyframes celebrate {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-200px) rotate(360deg);
    opacity: 0;
  }
}

.loading {
  text-align: center;
  color: #6c5ce7;
  font-size: 1.2em;
  margin: 20px 0;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2em;
  }
  .char-item {
    font-size: 1.8em;
  }
  .characters-grid {
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  }
}
.qwerty-layout {
  grid-column: 1;
}
