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

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #0f1117;
  color: #e2e8f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px 64px;
}

/* ===== Back Link ===== */
.back-link {
  align-self: flex-start;
  color: #64748b;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  margin-bottom: 32px;
}

.back-link:hover {
  color: #f1f5f9;
}

/* ===== Layout ===== */
main {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== Title ===== */
.app-title {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

/* ===== Options ===== */
.options-bar {
  display: flex;
  gap: 28px;
  align-items: center;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}

.option-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #4a90d9;
  cursor: pointer;
}

.option-item select {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 0.9rem;
  padding: 4px 8px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.option-item select:focus {
  border-color: #4a90d9;
}

/* ===== Editor ===== */
.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.editor-pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pane-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

textarea {
  width: 100%;
  height: 420px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  color: #e2e8f0;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.88rem;
  line-height: 1.65;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}

textarea:focus {
  border-color: #4a90d9;
}

textarea[readonly] {
  color: #94a3b8;
  cursor: default;
}

textarea::placeholder {
  color: #334155;
}

/* ===== Button ===== */
.action-row {
  display: flex;
  justify-content: center;
}

.btn-convert {
  padding: 14px 48px;
  background: #4a90d9;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s, background 0.25s;
}

.btn-convert:hover {
  opacity: 0.88;
}

.btn-convert:active {
  transform: scale(0.97);
}

.btn-convert.copied {
  background: #22c55e;
}

.btn-convert.error {
  background: #ef4444;
}
