:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #6a6a6a;
  --accent: #0f62fe;
  --border: #e6e6e6;
  --card: #f8f8f8;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Noto Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.app-header { padding: 32px 16px 8px; text-align: center; }
h1 { margin: 0; font-size: 28px; }
.subtitle { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

.container {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 24px;
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  min-height: 0; /* allow children to size/scroll within */
}

.input-panel, .output-panel {
  background: var(--bg);
  min-height: 0;
  overflow: auto;
}

.tabs {
  display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  margin-bottom: 12px;
}
.tab {
  appearance: none; border: 0; background: transparent; padding: 10px 14px; cursor: pointer;
  color: var(--muted);
}
.tab.active { background: var(--card); color: var(--fg); }

.tab-content { display: none; }
.tab-content.active { display: block; }

textarea, input[type="url"], input[type="text"], select {
  width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff;
  font: inherit;
}
textarea { resize: vertical; }

.hint { color: var(--muted); font-size: 12px; margin-top: 8px; }

.controls {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px;
}
.control { display: grid; gap: 6px; align-items: center; justify-content: center;}
.control input[type="range"] { width: 100%; }
#hopsVal { font-size: 12px; color: var(--muted); }

.checkbox { display: inline-flex; align-items: center; gap: 8px; user-select: none; }

.actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

.btn {
  appearance: none; border: 1px solid var(--border); background: #fff; color: var(--fg);
  padding: 10px 14px; border-radius: 8px; cursor: pointer; transition: transform .02s ease, background .2s;
}
.btn:hover { background: var(--card); }
.btn.primary { background: var(--fg); color: #fff; border-color: var(--fg); }
.btn.primary:hover { background: #000; }

.status { min-height: 20px; color: var(--muted); margin-bottom: 8px; }

.steps { display: grid; gap: 10px; }
.step-card {
  border: 1px solid var(--border); border-radius: 10px; background: var(--card);
  padding: 12px;
}
.step-head {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px;
}
.step-head .lang { font-weight: 700; }
.step-head .note { color: var(--muted); font-size: 12px; }
.step-text { white-space: pre-wrap; }

.final { margin-top: 16px; height: 96%; }
.final h2 { margin: 12px 0; font-size: 18px; }
.final-text {
  white-space: pre-wrap; border: 1px solid var(--border); border-radius: 10px; background: #fff;
  padding: 12px; min-height: 90%;
  /*overflow-y: auto;*/
  max-height: 90%;
  height: 90%;
}

.app-footer {
  padding: 24px 16px; text-align: center; color: var(--muted); font-size: 12px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

@media (max-width: 900px) {
  .container { grid-template-columns: 1fr; }
  .controls { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .controls { grid-template-columns: 1fr; }
}

