* {
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
  background: #fafaf8;
  margin: 0;
  padding: 20px;
}
.help-button {
  position: relative;
  background: #ffffff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
  z-index: 1000;
}
.help-button:hover {
  transform: translateY(-2px);
}
.help-button svg {
  width: 28px;
  height: 28px;
}
.help-panel {
  position: fixed;
  inset: 0;
  background: rgba(28, 39, 76, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1100;
}
.help-panel[hidden] {
  display: none;
}
.help-panel-content {
  background: #ffffff;
  border-radius: 14px;
  max-width: 520px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  position: relative;
}
.help-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #1c274c;
}
.help-panel h2 {
  margin-top: 0;
  color: #1f2d3d;
}
.help-list {
  padding-left: 18px;
  margin: 16px 0;
}
.help-list li {
  margin-bottom: 8px;
  color: #2c3e50;
}
.help-example {
  background: #1e272e;
  color: #ecf0f1;
  border-radius: 8px;
  padding: 12px;
  white-space: pre-wrap;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}
.ms-fonttype-sitka body {
  font-family: "Sitka Text", Georgia, Cambria, Calibri;
}
.container {
  max-width: 930px;
  margin: auto;
  background: #fafaf8;
  padding: 25px;
  border-radius: 12px;
}
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
h1 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 20px;
}
.panel {
  flex: 1;
  margin-bottom: 20px;
}
label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #34495e;
}
.input-container {
  position: relative;
}
.word-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(255, 255, 255, 0.8);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 12px;
  color: #555;
}
textarea,
input[type="text"] {
  width: 100%;
  padding: 12px 40px 12px 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  transition: border 0.3s;
}
textarea {
  height: 180px;
  resize: vertical;
}
textarea:focus,
input[type="text"]:focus {
  border-color: #3498db;
  outline: none;
}
button {
  background: #3498db;
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
  margin-top: 10px;
}
button:hover {
  background: #2980b9;
}
.result {
  margin-top: 20px;
  padding: 15px;
  background: #f5ecd9;
  border: 1px solid #ddd;
  border-radius: 8px;
  min-height: 100px;
  position: relative;
}
.result-content {
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 15px;
  color: #2c3e50;
}
.result-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-copy:hover {
  background: rgba(255, 255, 255, 1);
}
.result-copy svg {
  width: 18px;
  height: 18px;
  fill: #2c3e50;
}
.result-copy:hover svg {
  fill: #1f5f8b;
}
.result.error {
  background: #fadbd8;
}
.result.error .result-content {
  color: #e74c3c;
}
.samples {
  margin-top: 30px;
}
.samples h2 {
  font-size: 20px;
  color: #2c3e50;
  margin-bottom: 15px;
}
.samples-grid {
  column-count: 2;
  column-gap: 20px;
}
@media (max-width: 720px) {
  body {
    padding: 0;
  }

  .container {
    padding: 10px;
  }

  .help-button {
    width: 36px;
    height: 36px;
  }

  .samples-grid {
    column-count: 1;
  }
}
.sample-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  break-inside: avoid;
  margin-bottom: 20px;
  display: inline-block;
  width: 100%;
}
.sample-code {
  background: #1e272e;
  color: #ecf0f1;
  border-radius: 8px;
  padding: 12px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sample-code:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.sample-title {
  font-weight: 600;
  color: #1f2d3d;
  margin-bottom: 10px;
  font-size: 22px;
}
.sample-description {
  color: #34495e;
  font-size: 14px;
  line-height: 1.5;
}
.sample-options {
  display: grid;
  gap: 0;
  margin-bottom: 16px;
}
.sample-option-group {
  background: #f8f9fb;
  border-radius: 8px;
  padding: 12px;
}
.sample-option-label {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 6px;
  font-size: 13px;
}
.sample-option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
}
.sample-option-input {
  display: block;
  font-size: 13px;
  color: #34495e;
  margin-bottom: 6px;
}
.sample-option-input input {
  margin-right: 6px;
}
.sample-option-text {
  width: 100%;
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  font-size: 13px;
}
.sample-examples {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.sample-example {
  background: #f4f6f8;
  border-radius: 8px;
  padding: 12px;
}
.sample-example-title {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 6px;
}
.sample-example-content {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 10px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #2c3e50;
}
