* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

header {
  text-align: center;
  margin-bottom: 40px;
}

header h1 {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 10px;
}

.subtitle {
  color: #666;
  font-size: 1.1rem;
}

.form-group {
  margin-bottom: 30px;
}

label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  font-size: 1rem;
}

input[type="text"] {
  width: 100%;
  padding: 15px 20px;
  font-size: 1.2rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.radio-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.radio-label {
  flex: 1;
  min-width: 100px;
  cursor: pointer;
}

.radio-label input {
  display: none;
}

.radio-btn {
  display: block;
  padding: 15px 20px;
  text-align: center;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s;
}

.radio-btn.boy {
  background: #e3f2fd;
}

.radio-btn.girl {
  background: #fce4ec;
}

.radio-btn.both {
  background: #f3e5f5;
}

.radio-label input:checked + .radio-btn {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
  transform: scale(1.02);
}

.generate-btn {
  width: 100%;
  padding: 18px;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.generate-btn:active {
  transform: translateY(0);
}

.results {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 2px solid #f0f0f0;
}

.results h2 {
  text-align: center;
  color: #333;
  margin-bottom: 25px;
  font-size: 1.8rem;
}

.name-list {
  display: grid;
  gap: 15px;
}

.name-card {
  background: linear-gradient(135deg, #f8f9ff 0%, #fff5f8 100%);
  padding: 20px 25px;
  border-radius: 15px;
  border-left: 4px solid #667eea;
  transition: transform 0.3s, box-shadow 0.3s;
}

.name-card:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.name-card .full-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.name-card .pinyin {
  font-size: 0.95rem;
  color: #888;
  margin-bottom: 10px;
  font-style: italic;
}

.name-card .meaning {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
}

.name-card .meaning strong {
  color: #667eea;
}

.regenerate-btn {
  display: block;
  width: 100%;
  margin-top: 25px;
  padding: 15px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #667eea;
  background: white;
  border: 2px solid #667eea;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.regenerate-btn:hover {
  background: #667eea;
  color: white;
}

.hidden {
  display: none;
}

footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #f0f0f0;
  color: #888;
}

@media (max-width: 480px) {
  .container {
    padding: 25px;
  }

  header h1 {
    font-size: 1.8rem;
  }

  .radio-group {
    flex-direction: column;
  }

  .name-card .full-name {
    font-size: 1.5rem;
  }
}
