body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: #dce8e1;
  padding: 30px;
  margin: 0;
  color: #333;
}
h2 {
  margin-bottom: 8px;
  color: #2d3748;
  font-weight: 600;
}
p {
  max-width: 600px;
  margin: 10px auto 20px;
  line-height: 1.5;
  color: #4a5568;
  font-size: 14px;
}
.panel {
  max-width: 920px;
  margin: 0 auto 25px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  background: white;
}
.panel-header {
  padding: 14px 20px;
  background: #2e3a2e;
  color: #c8e6c9;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.panel-content {
  transition:
    max-height 0.3s ease-out,
    opacity 0.3s ease;
  max-height: 800px;
  opacity: 1;
  overflow: hidden;
}
.panel-content.collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}
canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #fafafa;
  border: none;
}
.header-container {
  text-align: center;
  margin-bottom: 20px;
}
.header-container h2 {
  margin: 0 0 12px 0;
  font-weight: 700;
}
.header-container p {
  margin: 0;
  line-height: 1.6;
  color: #555;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 600;
  color: #333;
  line-height: 1.6;
}
.controls {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
button {
  padding: 8px 16px;
  font-size: 14px;
  background: #2e3a2e;
  color: #c8e6c9;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(66, 153, 225, 0.3);
}
button:hover {
  background: #66bb6a;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(66, 153, 225, 0.4);
}
button:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(66, 153, 225, 0.3);
}
button.delete-btn {
  background: #e53e3e;
  box-shadow: 0 2px 4px rgba(229, 62, 62, 0.3);
}
button.delete-btn:hover {
  background: #c53030;
  box-shadow: 0 4px 8px rgba(229, 62, 62, 0.4);
}
input {
  padding: 8px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border 0.2s;
}
input:focus {
  border-color: #4299e1;
  box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.2);
}
pre {
  background: #2e3a2e;
  color: #c8e6c9;
  padding: 18px;
  border-radius: 10px;
  margin: 25px auto;
  text-align: left;
  max-width: 900px;
  font-family: "Fira Code", monospace;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}
.json-title {
  font-weight: 600;
  color: #2e3a2e;
  font-size: 14px;
  margin-right: 12px;
  align-self: center;
}
.json-area {
  position: relative;
  max-width: 900px;
  margin: 25px auto;
}
.json-buttons {
  display: flex;
  justify-content: flex-end;
  text-align: right;
  margin-bottom: 8px;
}
.btn-copy {
  padding: 6px 12px;
  font-size: 13px;
  background: #6b8e23;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 1px 3px rgba(107, 142, 35, 0.3);
  margin-left: 8px;
}
.btn-copy:hover {
  background: #5a7b1f;
}
#inlineEditor {
  position: absolute;
  display: none;
  font-size: 16px;
  font-family: Arial, sans-serif;
  text-align: center;
  border: 2px solid #4caf50;
  border-radius: 6px;
  padding: 4px 8px;
  background: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  outline: none;
  z-index: 10;
}

.java-hint {
  margin-top: 12px;
  padding: 12px;
  background-color: #f9fbe7;
  border: 1px solid #dcedc8;
  border-radius: 6px;
  font-size: 13px;
  color: #5d4037;
}

.java-hint strong {
  color: #33691e;
}

.java-structure,
.java-code {
  margin-top: 8px;
}

.java-hint code {
  display: block;
  padding: 8px;
  margin-top: 4px;
  background: #f1f8e9;
  border-left: 2px solid #8bc34a;
  font-family: 'Consolas', 'Courier New', monospace;
  white-space: pre;
  overflow-x: auto;
  font-size: 14px;
  color: #2e7d32;
}

/* 特别：反序列化代码加粗 */
.java-code code {
  font-weight: bold;
}
