* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  margin: 0;
  padding: 20px;
  background: #f5f7fa;
  color: #222;
}
.header {
  background: #1a365d;
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.header h1 { margin: 0; font-size: 1.4rem; }
.btn {
  background: #2b6cb0;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}
.btn:hover { background: #2c5282; }
.btn-export { background: #276749; }
.btn-export:hover { background: #22543d; }

.editor-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  min-height: 70vh;
}
@media (max-width: 900px) {
  .editor-container { grid-template-columns: 1fr; }
}

.panel {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.panel-header {
  background: #edf2f7;
  padding: 12px 16px;
  font-weight: 600;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  max-height: 75vh;
  line-height: 1.7;
  font-size: 15px;
}
#chinese-content {
  outline: none;
  min-height: 400px;
}
#chinese-content:focus {
  background: #fffef7;
}
#english-content {
  background: #f8fafc;
  color: #2d3748;
  white-space: pre-wrap;
}
.note {
  font-size: 13px;
  color: #718096;
  margin-top: 8px;
}
.loading { color: #718096; font-style: italic; }
