:root {
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-light: #ccfbf1;
  --text: #0f172a;
  --muted: #64748b;
  --bg: #f8fafc;
  --card: #fff;
  --border: #e2e8f0;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(15, 118, 110, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--teal); text-decoration: underline; }

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 1rem 1.1rem 3rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.site-nav .brand { font-weight: 800; color: var(--teal-dark); font-size: 1rem; }
.site-nav .spacer { flex: 1; }

.hero {
  background: linear-gradient(135deg, #0f766e, #0d9488 45%, #14b8a6);
  color: #fff;
  border-radius: 20px;
  padding: 1.35rem 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  line-height: 1.25;
}

.hero p { margin: 0; opacity: 0.92; font-size: 0.98rem; }

.generator {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 780px) {
  .generator { grid-template-columns: 1fr 300px; align-items: start; }
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.tab {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.tab.active {
  background: var(--teal-light);
  border-color: var(--teal);
  color: var(--teal-dark);
  font-weight: 700;
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0.65rem 0 0.35rem;
  color: var(--text);
}

input[type="text"],
input[type="url"],
input[type="password"],
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  background: #fff;
}

textarea { min-height: 88px; resize: vertical; }

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.color-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

input[type="color"] {
  width: 42px;
  height: 36px;
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
}

input[type="range"] { width: 100%; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1rem;
  font-weight: 700;
  cursor: pointer;
  font: inherit;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
}

.btn-primary:hover { background: var(--teal-dark); }

.btn-secondary {
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid var(--border);
}

.preview-box {
  text-align: center;
}

#qr-canvas-wrap {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

#qr-canvas-wrap canvas,
#qr-canvas-wrap img {
  max-width: 100%;
  height: auto;
}

.hint { font-size: 0.78rem; color: var(--muted); margin-top: 0.35rem; }

.ad-slot {
  display: flex;
  justify-content: center;
  margin: 1.25rem 0;
  min-height: 50px;
}

.ad-slot.rect { min-height: 250px; }

.content h2 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.5rem;
}

.content h3 { font-size: 1rem; margin: 1.1rem 0 0.35rem; }

.use-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  margin: 0.85rem 0;
}

.use-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  font-size: 0.85rem;
  text-align: center;
}

.use-card strong { display: block; color: var(--teal-dark); margin-bottom: 0.25rem; }

.faq-item { margin-bottom: 0.85rem; }

.lang-en {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

#google_translate_element { margin-bottom: 0.75rem; font-size: 0.85rem; }
