#vocab-app {
  max-width: 700px;
  margin: 20px auto;
  padding: 16px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-family: "Segoe UI", sans-serif;
}

#vocab-app h2 {
  text-align: center;
  margin-bottom: 20px;
}

#vocab-app h3 {
  margin-top: 24px;
  margin-bottom: 12px;
}

.vocab-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.vocab-form input[type="text"] {
  flex: 1;
  padding: 8px;
  border: 1px solid #bbb;
  border-radius: 4px;
  font-size: 14px;
}

.vocab-form button {
  padding: 8px 14px;
  background: #0073aa;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.vocab-form button:hover {
  background: #005f8d;
}

.vocab-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.vocab-table th,
.vocab-table td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: left;
}

.vocab-table th {
  background: #f5f5f5;
}

.vocab-table button {
  padding: 4px 8px;
  font-size: 12px;
  margin-right: 4px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.vocab-table button:nth-child(1) {
  background: #ffc107;
  color: #333;
}

.vocab-table button:nth-child(1):hover {
  background: #e0a800;
}

.vocab-table button:nth-child(2) {
  background: #dc3545;
  color: white;
}

.vocab-table button:nth-child(2):hover {
  background: #b52a37;
}

.vocab-export,
.vocab-import {
  margin-top: 20px;
}

.vocab-export button,
.vocab-import button {
  padding: 8px 14px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.vocab-export button:hover,
.vocab-import button:hover {
  background: #218838;
}

.vocab-import input[type="file"] {
  margin-right: 8px;
}

.vocab-test {
  margin-top: 30px;
  padding: 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
}

.vocab-test-question {
  font-size: 18px;
  margin-bottom: 12px;
}

.vocab-test-choices button {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 10px;
  font-size: 15px;
  background: #0073aa;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.vocab-test-choices button:hover {
  background: #005f8d;
}

.vocab-test-result {
  margin-top: 12px;
  font-size: 18px;
  font-weight: bold;
}

@media (max-width: 480px) {
  .vocab-form {
    flex-direction: column;
  }

  .vocab-test-choices button {
    font-size: 14px;
  }
}
