* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #eef2ff, #fdf2f8);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Main container */
.game-container {
  width: 92%;
  max-width: 720px;
  text-align: center;
}

/* Title */
.top-section {
  margin-bottom: 18px;
}

h1 {
  margin-bottom: 6px;
  font-size: 46px;
  color: #111827;
}

.subtitle {
  color: #6b7280;
  margin-bottom: 20px;
  font-size: 18px;
}

/* Mode buttons */
.mode-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.mode-buttons button {
  font-size: 15px;
  padding: 11px 18px;
  background: white;
  color: #111827;
  border: 2px solid #e5e7eb;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.08);
}

.mode-buttons button:hover {
  background: #111827;
  color: white;
}

/* Score */
.score-box {
  display: inline-block;
  font-size: 20px;
  margin-bottom: 18px;
  font-weight: bold;
  background: white;
  padding: 10px 18px;
  border-radius: 999px;
  color: #111827;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

/* Card */
.card {
  background: rgba(255, 255, 255, 0.95);
  padding: 36px;
  border-radius: 30px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.label {
  color: #6b7280;
  font-size: 21px;
  font-weight: bold;
}

/* Noun display */
#noun {
  font-size: 62px;
  margin: 18px 0 28px;
  color: #111827;
  letter-spacing: -1px;
}

/* General button */
button {
  padding: 12px 22px;
  border: none;
  border-radius: 14px;
  font-size: 18px;
  cursor: pointer;
  color: white;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

button:hover {
  transform: translateY(-2px);
}

/* Answer buttons */
.buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 25px;
}

.article-btn {
  width: 135px;
  height: 92px;
  border-radius: 22px;
  font-size: 34px;
  font-weight: bold;
  color: white;
  border: none;
  box-shadow: 0 9px 0 rgba(0, 0, 0, 0.18);
}

.article-btn span {
  display: block;
  font-size: 13px;
  font-weight: normal;
  margin-top: 6px;
  opacity: 0.95;
}

.article-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 0 rgba(0, 0, 0, 0.16);
}

.article-btn:active {
  transform: translateY(2px);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.18);
}

.article-btn.der {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
}

.article-btn.die {
  background: linear-gradient(135deg, #e11d48, #fb7185);
}

.article-btn.das {
  background: linear-gradient(135deg, #16a34a, #86efac);
}

/* Result text */
#result {
  display: inline-block;
  font-size: 24px;
  font-weight: bold;
  padding: 13px 20px;
  border-radius: 18px;
  margin: 8px 0 16px;
  min-height: 30px;
}

.correct {
  background: #dcfce7;
  color: #166534;
}

.wrong {
  background: #fee2e2;
  color: #991b1b;
}

/* Meaning and logic */
.info-box {
  margin-top: 8px;
}

#meaning {
  color: #374151;
  font-size: 18px;
  margin-top: 10px;
}

#rule {
  color: #4b5563;
  font-size: 17px;
  min-height: 40px;
  line-height: 1.5;
  font-style: italic;
}

/* Next button */
#nextBtn {
  margin-top: 20px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  font-weight: bold;
  padding: 14px 28px;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.3);
}

#nextBtn:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

/* Hidden mode */
.hidden {
  display: none;
}

/* Pattern mode */
#groupTitle {
  display: inline-block;
  font-size: 23px;
  font-weight: bold;
  margin: 22px 0;
  background: #eef2ff;
  color: #3730a3;
  padding: 10px 18px;
  border-radius: 999px;
}

#groupWords {
  text-align: left;
  margin-top: 18px;
}

.group-word {
  background: #f9fafb;
  margin: 10px 0;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
}

.group-word strong {
  font-size: 18px;
  color: #111827;
}

/* Mobile */
@media (max-width: 600px) {
  body {
    align-items: flex-start;
    padding-top: 25px;
  }

  .card {
    padding: 24px;
    border-radius: 24px;
  }

  h1 {
    font-size: 36px;
  }

  .subtitle {
    font-size: 16px;
  }

  #noun {
    font-size: 46px;
  }

  .buttons {
    flex-direction: column;
    gap: 12px;
  }

  .article-btn {
    width: 100%;
    height: 78px;
  }

  .mode-buttons {
    flex-direction: column;
  }

  .mode-buttons button,
  #nextBtn {
    width: 100%;
  }
}