body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 20px;
  background-color: #f4f4f4;
  color: #333;
}

h1, h2, h3 {
  color: #333;
  text-align: center;
}

button {
  background-color: #2E7D32;
  color: white;
  padding: 10px 15px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #1B5E20;
}

#name-list li {
  cursor: pointer;
  margin-bottom: 5px;
  padding: 5px;
  transition: color 0.3s ease, background-color 0.3s ease;
  animation: fadeIn 0.5s ease-in-out;
}

#name-list li:hover {
  color: #4CAF50;
  background-color: #f0f0f0;
}

#name-generator {
  text-align: center;
  margin-bottom: 20px;
}

#name-generator label {
  display: block;
  margin: 10px 0 5px;
}

#name-generator select {
  padding: 5px;
  margin-bottom: 10px;
}

#name-details {
  background-color: #fff;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  transition: opacity 0.3s ease;
}

#name-details.show {
  opacity: 1;
}

#name-details.hide {
  opacity: 0;
}

footer {
  text-align: center;
  margin-top: 20px;
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0,0,0);
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 600px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  animation: fadeIn 0.3s;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

/* 语言切换按钮样式 */
#language-switcher {
  text-align: center;
  margin-top: 10px;
}

#language-switcher button {
  background-color: #4CAF50;
  color: white;
  padding: 5px 10px;
  border: none;
  cursor: pointer;
  margin: 0 5px;
  transition: background-color 0.3s ease;
}

#language-switcher button:hover {
  background-color: #45a049;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 5% auto;
  }
}

/* 提高可访问性 */
button:focus, input:focus, select:focus {
  outline: 2px solid #4CAF50;
}

/* 添加动画效果 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#name-list li {
  animation: fadeIn 0.5s ease-in-out;
}

/* 改进颜色对比度 */
body {
  color: #333;
}

button {
  background-color: #2E7D32;
}

button:hover {
  background-color: #1B5E20;
}

/* 内容卡片样式 */
.content-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.content-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.content-card h3 {
  color: #2E7D32;
  margin-top: 0;
  font-size: 1.2em;
  margin-bottom: 15px;
}

.content-card p {
  font-size: 0.9em;
  color: #333;
  line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .content-cards {
    grid-template-columns: 1fr;
  }
}

.generator-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.generator-controls label, .generator-controls select, .generator-controls button {
  margin: 5px;
}

#generate-random {
  background-color: #FFA000;
}

#generate-random:hover {
  background-color: #FF8F00;
}

@media (max-width: 768px) {
  .generator-controls {
    flex-direction: column;
    align-items: center;
  }
  
  .generator-controls label, .generator-controls select, .generator-controls button {
    width: 100%;
    max-width: 300px;
  }
}