#chinese-font-generator * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#chinese-font-generator {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #fff7ed, #fef2f2, #fefce8);
  padding: 25px;
  border-radius: 24px;
  color: #111827;
  max-width: 1400px;
  margin: auto;
  box-shadow: 0 12px 35px rgba(185,28,28,0.12);
}

.chinese-wrapper {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}

.chinese-controls,
.chinese-preview {
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(185,28,28,0.12);
  border-radius: 20px;
  padding: 22px;
}

.chinese-controls h2,
.chinese-preview h2 {
  color: #b91c1c;
  margin-bottom: 18px;
}

.chinese-controls label {
  display: block;
  margin-top: 14px;
  margin-bottom: 8px;
  font-weight: bold;
}

.chinese-controls input,
.chinese-controls button {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #fca5a5;
  margin-bottom: 10px;
}

.chinese-controls button {
  background: linear-gradient(90deg, #b91c1c, #dc2626);
  color: white;
  font-weight: bold;
  cursor: pointer;
  border: none;
}

.preview-box {
  min-height: 250px;
  background: white;
  border: 2px solid #fca5a5;
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 30px;
  font-size: 52px;
  font-weight: bold;
  transition: all 0.3s ease;
  word-break: break-word;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
  gap: 15px;
  margin-top: 25px;
  max-height: 650px;
  overflow-y: auto;
}

.style-card {
  background: white;
  padding: 18px;
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
  transition: .3s;
  border: 1px solid #fecaca;
}

.style-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(185,28,28,0.12);
}

@media(max-width:900px){
  .chinese-wrapper {
    grid-template-columns: 1fr;
  }

  .preview-box {
    font-size: 34px;
  }
}