:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #0f172a;
  --primary-dark: #1e293b;
  --accent: #a21caf;
  --success: #10b981;
  --error: #ef4444;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  /* --tool-shadow: 0 10px 30px rgba(17, 117, 42, 0.664); */
  --tool-shadow: 0 10px 30px rgba(27, 99, 244, 0.664);
  --radius: 14px;
  --tool-width: min(980px, 100%);
}

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

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

/* Header */
.topbar,
.site-header.minimal {
  background: transparent;
  border-bottom: 1px solid var(--border);
}

.topbar-inner,
.nav-wrap.minimal {
  min-height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.brand,
.brand.minimal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
}

.brand-mark,
.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.topnav {
  display: inline-flex;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.lang-menu {
  position: relative;
}

.lang-trigger {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.lang-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
  display: none;
  z-index: 50;
  overflow: hidden;
}

.lang-menu:hover .lang-options,
.lang-menu:focus-within .lang-options {
  display: block;
}

.lang-options a {
  display: block;
  text-decoration: none;
  color: #334155;
  padding: 8px 10px;
  font-size: 0.85rem;
}

.lang-options a:hover,
.lang-options a.active {
  background: #f1f5f9;
  color: #0f172a;
}

.lang-menu.minimal .lang-trigger {
  background: transparent;
}

.topnav a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 600;
}

.topnav a:hover,
.footer-inner a:hover {
  color: var(--text);
}

/* Hero */
.hero {
  padding: 34px 0 22px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 26px;
  align-items: center;
}

.kicker {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.86rem;
  margin-bottom: 8px;
  font-style: italic;
}

.hero-copy h1 {
  font-size: clamp(2rem, 2.9vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.hero-copy p {
  color: var(--muted);
  max-width: 620px;
}

.hero-art {
  position: relative;
  min-height: 220px;
  display: grid;
  place-items: center;
}

.art-window {
  width: min(360px, 90%);
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.art-window-bar {
  height: 30px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
}

.art-lines {
  height: 130px;
  margin: 14px;
  border-radius: 10px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.14),
    rgba(15, 23, 42, 0.14) 10px,
    rgba(15, 23, 42, 0.05) 10px,
    rgba(15, 23, 42, 0.05) 20px
  );
}

.art-badge {
  position: absolute;
  right: 3%;
  bottom: 8%;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #7246767d;
  color: #fff;
}

/* Clone tool */
.tool-section {
  padding-bottom: 16px;
}

.tool-wrap {
  width: var(--tool-width);
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--tool-shadow);
}

.clone-form {
  padding: 14px;
}

.url-field {
  position: relative;
  margin-bottom: 10px;
}

.url-field input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 14px 14px 14px 42px;
  font-size: 0.96rem;
  font-family: inherit;
}

.url-field input:focus,
.depth-select-wrap select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.14);
}

.paste-btn {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
}

.control-row {
  display: flex;
  gap: 10px;
}

.depth-select-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 8px 10px;
  flex: 1;
}

.depth-select-wrap label {
  font-size: 0.86rem;
  font-weight: 600;
  color: #4b5563;
}

.depth-select-wrap select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  font-family: inherit;
  flex: 1;
}

.btn-clone {
  min-width: 170px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

/* Progress */
.clone-progress-panel {
  width: var(--tool-width);
  margin: 0 auto;
  display: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.clone-progress-panel.active {
  display: block;
}

.progress-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: grid;
  place-items: center;
}

.icon-wrap.done {
  background: linear-gradient(135deg, #10b981, #059669);
}

.icon-wrap.error {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.progress-header-text h3 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.progress-header-text p {
  color: var(--muted);
  font-size: 0.84rem;
}

.progress-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}

.progress-stat {
  text-align: center;
  padding: 12px 8px;
  border-right: 1px solid var(--border);
}

.progress-stat:last-child {
  border-right: 0;
}

.progress-stat .num {
  font-size: 1.34rem;
  font-weight: 800;
}

.progress-stat .lbl {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.progress-bar-wrap {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.progress-bar-track {
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.progress-bar-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #334155);
  transition: width 0.3s ease;
}

.progress-bar-fill.done {
  background: linear-gradient(90deg, #10b981, #059669);
}

.progress-bar-label {
  margin-top: 7px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.78rem;
}

.progress-log {
  max-height: 290px;
  overflow-y: auto;
}

.log-entry {
  padding: 8px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.78rem;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

.log-entry .log-icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 0.6rem;
  flex-shrink: 0;
}

.log-entry .log-icon.fetch {
  background: #e2e8f0;
  color: #334155;
}

.log-entry .log-icon.ok {
  background: #dcfce7;
  color: #166534;
}

.log-entry .log-icon.err {
  background: #fee2e2;
  color: #991b1b;
}

.log-entry .log-icon.info {
  background: #fef3c7;
  color: #92400e;
}

.log-entry .log-text {
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-download {
  display: none;
  padding: 14px 18px 18px;
  gap: 10px;
  justify-content: center;
  border-top: 1px solid var(--border);
}

.progress-download.active {
  display: flex;
}

.btn-download-clone,
.btn-clone-again {
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.btn-download-clone {
  border: 0;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

.btn-clone-again {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

/* Steps */
.steps {
  padding: 34px 0;
}

.steps h2 {
  text-align: center;
  margin-bottom: 14px;
  font-size: 1.5rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.steps-grid article {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.step-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}

.steps-grid h4 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.steps-grid p {
  font-size: 0.84rem;
  color: var(--muted);
}

/* Extra content */
.extra-content {
  padding: 10px 0 34px;
}

.showcase-label {
  color: #a21caf;
  font-style: italic;
  font-weight: 700;
  margin-bottom: 16px;
}

.showcase-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
  margin-bottom: 28px;
}

.showcase-row.reverse .showcase-text {
  order: 2;
}

.showcase-row.reverse .showcase-art {
  order: 1;
}

.showcase-text h3 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.2;
  color: #1e3a8a;
  margin-bottom: 10px;
}

.showcase-text p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.showcase-text ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

.showcase-text li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #334155;
}

.showcase-text li i,
.popular-grid i {
  color: #1f7a4d;
}

.showcase-art {
  min-height: 270px;
  position: relative;
  display: grid;
  place-items: center;
}

.arrow-mark {
  position: absolute;
  top: 8%;
  left: 8%;
  color: #d946ef;
  font-size: 1.7rem;
  transform: rotate(-12deg);
}

.device-frame {
  width: 150px;
  height: 260px;
  border-radius: 24px;
  padding: 12px;
  background: #0f172a;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.device-notch {
  width: 58px;
  height: 8px;
  border-radius: 999px;
  background: #334155;
  margin: 0 auto 10px;
}

.device-screen {
  height: calc(100% - 18px);
  border-radius: 14px;
  background: linear-gradient(180deg, #e0ecff, #c7d2fe);
}

.art-chip {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.3rem;
  position: absolute;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.14);
}

.art-chip.android {
  background: #84cc16;
  left: 16%;
  top: 22%;
}

.art-chip.apple {
  background: #94a3b8;
  right: 14%;
  bottom: 16%;
}

.laptop-shell-mini {
  width: min(340px, 88%);
}

.laptop-screen-mini {
  height: 180px;
  border-radius: 14px;
  border: 10px solid #334155;
  background: repeating-linear-gradient(
    to bottom,
    rgba(59, 130, 246, 0.34),
    rgba(59, 130, 246, 0.34) 10px,
    rgba(147, 197, 253, 0.2) 10px,
    rgba(147, 197, 253, 0.2) 22px
  );
}

.laptop-base-mini {
  height: 15px;
  width: 114%;
  transform: translateX(-7%);
  border-radius: 0 0 14px 14px;
  background: #cbd5e1;
}

.ok-badge {
  position: absolute;
  left: 12%;
  bottom: 14%;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #84cc16;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  box-shadow: 0 10px 18px rgba(132, 204, 22, 0.3);
}

.popular-tools {
  margin-top: 6px;
}

.popular-tools h3 {
  text-align: center;
  margin-bottom: 12px;
  font-size: 1.22rem;
}

.popular-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.popular-grid span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px 12px;
  font-size: 0.86rem;
  color: #334155;
  font-weight: 600;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background: transparent;
}

.footer-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-inner p,
.footer-inner a {
  color: var(--muted);
  font-size: 0.84rem;
  text-decoration: none;
}

.footer-inner a {
  margin-left: 12px;
}

/* Toast */
.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1200;
  border-radius: 10px;
  padding: 11px 12px;
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 0.84rem;
  background: #1f2937;
}

.toast.success {
  background: #047857;
}

.toast.error {
  background: #b91c1c;
}

.toast.loading {
  background: #334155;
}

/* Legal pages */
.legal-page .site-header.minimal {
  margin-bottom: 12px;
}

.legal-wrap {
  width: min(860px, 92%);
  margin: 0 auto;
  padding: 20px 0 44px;
}

.legal-wrap h1 {
  font-size: 1.85rem;
  margin-bottom: 6px;
}

.legal-meta {
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 18px;
}

.legal-section {
  margin-bottom: 18px;
}

.legal-section h2 {
  font-size: 1.03rem;
  margin-bottom: 6px;
}

.legal-section p,
.legal-section li {
  color: #334155;
  font-size: 0.92rem;
  line-height: 1.7;
}

.legal-section ul {
  margin-left: 18px;
}

.back-home {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 8px;
  background-color: #dddfe4;
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .showcase-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .showcase-row.reverse .showcase-text,
  .showcase-row.reverse .showcase-art {
    order: unset;
  }

  .popular-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-art {
    display: none;
  }
}

@media (max-width: 700px) {
  .topnav {
    display: none;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .control-row {
    flex-direction: column;
  }

  .btn-clone {
    min-height: 44px;
  }

  .progress-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .progress-stat:nth-child(2n) {
    border-right: 0;
  }

  .progress-download {
    flex-direction: column;
  }

  .btn-download-clone,
  .btn-clone-again {
    width: 100%;
    justify-content: center;
  }

  .steps-grid,
  .popular-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    justify-content: center;
    padding: 12px 0;
  }
}
