:root {
  --bg-main: #060b1c;
  --bg-mid: #0b1636;
  --bg-accent-a: #1d4ed8;
  --bg-accent-b: #059669;
  --text-light: #f8fbff;
  --text-faint: #c7d8f7;
  --ink-strong: #0f172a;
  --ink-soft: #5b6b88;
  --line-soft: #d8e3f4;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: #ffffff;
  --brand-a: #06b6d4;
  --brand-b: #3b82f6;
  --brand-c: #10b981;
  --ok: #166534;
  --ok-bg: #ecfdf5;
  --err: #9f1239;
  --err-bg: #fff1f2;
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  color: var(--text-light);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background:
    radial-gradient(900px 520px at -12% -16%, rgba(37, 99, 235, 0.5), transparent 62%),
    radial-gradient(760px 460px at 108% -12%, rgba(13, 148, 136, 0.36), transparent 64%),
    linear-gradient(175deg, var(--bg-mid) 0%, var(--bg-main) 65%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
}

body::before {
  inset: auto -150px -180px auto;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, rgba(16, 185, 129, 0.28), rgba(16, 185, 129, 0));
  filter: blur(6px);
}

body::after {
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black 20%, transparent 84%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 10px 14px 0;
  backdrop-filter: blur(10px);
}

.header-inner {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(120deg, rgba(9, 20, 47, 0.82), rgba(13, 30, 66, 0.78));
  box-shadow: 0 12px 36px rgba(2, 8, 22, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.header-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #e5efff;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.header-brand img {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  object-fit: contain;
  background: #ffffff;
  padding: 4px;
  box-shadow: 0 10px 22px rgba(3, 10, 29, 0.28);
}

.header-nav {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.header-nav a {
  text-decoration: none;
  color: #d9e8ff;
  font-size: 0.81rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  transition: all .2s ease;
}

.header-nav a:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.16);
}

.header-nav a.active {
  color: #041222;
  border-color: rgba(255, 255, 255, 0.45);
  background: linear-gradient(98deg, #89f7fe 0%, #66a6ff 60%, #4ade80 100%);
  box-shadow: 0 8px 20px rgba(102, 166, 255, 0.35);
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px 14px 46px;
}

.hero {
  text-align: center;
  margin: 16px 0 24px;
  animation: riseIn .55s ease-out both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.23);
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: #e8f0ff;
  font-weight: 700;
  font-size: 0.94rem;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #ffffff;
  padding: 4px;
  object-fit: contain;
}

h1 {
  margin: 14px 0 10px;
  font-family: "Outfit", Arial, sans-serif;
  font-size: clamp(2rem, 5.1vw, 3.45rem);
  line-height: 1.04;
  letter-spacing: 0.12px;
  text-wrap: balance;
  color: #f6fbff;
  text-shadow: 0 12px 28px rgba(6, 11, 28, 0.3);
}

.hero p {
  margin: 0 auto;
  max-width: 780px;
  color: var(--text-faint);
  font-size: clamp(0.98rem, 2.1vw, 1.12rem);
  line-height: 1.6;
}

.hero-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.hero-badges span {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.81rem;
  color: #e3eeff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
}

.trust-grid {
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.trust-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  padding: 12px;
  box-shadow: 0 10px 20px rgba(3, 8, 22, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: left;
}

.trust-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.trust-title {
  margin: 0 0 3px;
  color: #f6fbff;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.1px;
}

.trust-text {
  margin: 0;
  color: #d3e1fb;
  font-size: 0.78rem;
  line-height: 1.35;
}

.card {
  display: grid;
  grid-template-columns: 1.22fr 1fr;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(245, 250, 255, 0.93));
  color: var(--ink-strong);
  box-shadow: 0 30px 68px rgba(4, 9, 24, 0.45);
  backdrop-filter: blur(6px);
  animation: riseIn .7s ease-out both;
}

.tool-panel,
.preview-panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--panel-strong) 0%, #f4f8ff 100%);
  padding: 16px;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.08);
}

.tool-panel h2,
.preview-panel h2,
.howto h2 {
  margin: 0 0 12px;
  font-family: "Outfit", Arial, sans-serif;
  font-size: 1.18rem;
  color: #0b152f;
  letter-spacing: 0.2px;
}

.label {
  display: block;
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 0.89rem;
  font-weight: 700;
}

.url-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

#urlInput {
  flex: 1 1 100%;
  width: 100%;
  min-width: 220px;
  height: 50px;
  border: 1px solid #cad8f0;
  border-radius: var(--radius-md);
  padding: 0 56px 0 14px;
  background: #ffffff;
  color: #111827;
  font-size: 16px;
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  transition: border-color .2s ease, box-shadow .2s ease;
}

#pasteBtn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  margin: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  z-index: 2;
}

input,
select,
textarea,
button {
  font-size: 16px;
}

#urlInput:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.24);
}

.btn {
  border: 0;
  border-radius: var(--radius-md);
  height: 50px;
  padding: 0 15px;
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .14s ease, filter .22s ease, box-shadow .2s ease;
}

.btn:hover {
  filter: brightness(1.04);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-soft {
  background: #e9f1ff;
  color: #13203c;
  border: 1px solid #cadaf4;
}

.btn-main {
  width: 100%;
  margin-top: 12px;
  color: #ffffff;
  background: linear-gradient(100deg, var(--brand-a) 0%, var(--brand-b) 68%, var(--brand-c) 100%);
  box-shadow: 0 16px 30px rgba(59, 130, 246, 0.3);
}

#altBtn {
  width: 100%;
}

.mode-switch {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.mode-btn {
  min-height: 42px;
  height: auto;
  padding: 6px 7px;
  border-radius: 10px;
  border: 1px solid #cad8f0;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.81rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: all .2s ease;
}

.mode-btn.active {
  border-color: #60a5fa;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #0f3f74;
  box-shadow: 0 8px 22px rgba(59, 130, 246, 0.2);
}

.mode-btn small {
  display: block;
  margin-top: 0;
  font-size: 0.63rem;
  font-weight: 600;
  color: #64748b;
}

.status {
  margin-top: 10px;
  display: none;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  padding: 10px 12px;
  font-size: 0.91rem;
  line-height: 1.4;
}

.status.ok {
  color: var(--ok);
  background: var(--ok-bg);
  border-color: #bbf7d0;
}

.status.err {
  color: var(--err);
  background: var(--err-bg);
  border-color: #fecdd3;
}

.preview-empty {
  border: 1px dashed #bfd0ea;
  border-radius: var(--radius-md);
  padding: 16px;
  background: #ffffff;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.56;
}

.result {
  display: none;
  border: 1px solid #bfdfff;
  border-radius: var(--radius-md);
  padding: 12px;
  background: linear-gradient(180deg, #f0f8ff 0%, #e7f1ff 100%);
}

.result-head {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.thumb {
  width: 94px;
  height: 94px;
  border-radius: 12px;
  border: 1px solid #bfdbfe;
  background: #e2e8f0;
  object-fit: cover;
}

.meta-title {
  margin: 0;
  color: #0f172a;
  font-size: 0.96rem;
  line-height: 1.4;
  font-weight: 800;
  word-break: break-word;
}

.meta-sub {
  margin: 6px 0 0;
  color: #334155;
  font-size: 0.84rem;
  line-height: 1.4;
}

.progress {
  margin-top: 10px;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  display: none;
  background: #dbeafe;
}

.progress > div {
  width: 0;
  height: 100%;
  background: linear-gradient(95deg, var(--brand-a), #f59e0b);
  transition: width .2s linear;
}

.howto {
  margin-top: 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 249, 255, 0.94) 100%);
  color: var(--ink-strong);
  padding: 16px;
  box-shadow: 0 22px 54px rgba(4, 10, 24, 0.35);
  animation: riseIn .85s ease-out both;
}

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

.step {
  border-radius: 14px;
  border: 1px solid #d7e3f5;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 12px;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
}

.step-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f4d96;
  background: linear-gradient(180deg, #e0f2fe 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  font-weight: 800;
  font-size: 0.92rem;
}

.step strong {
  display: block;
  margin-bottom: 4px;
  color: #0f172a;
  font-size: 0.93rem;
}

.step p {
  margin: 0;
  color: #475569;
  font-size: 0.84rem;
  line-height: 1.45;
}

.seo-copy {
  margin-top: 12px;
  border-radius: 14px;
  border: 1px solid #dce7f8;
  background: #f8fbff;
  padding: 12px;
  color: #334155;
  font-size: 0.88rem;
  line-height: 1.58;
}

.seo-copy strong {
  color: #0f172a;
}

footer {
  text-align: center;
  margin-top: 14px;
  color: #d2def6;
  font-size: 0.83rem;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1020px) {
  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .site-header {
    padding-top: 8px;
  }

  .header-inner {
    border-radius: 18px;
    flex-direction: column;
    align-items: flex-start;
  }

  .header-nav {
    width: 100%;
  }

  .mode-switch {
    grid-template-columns: 1fr;
  }

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

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .result-head {
    grid-template-columns: 1fr;
  }

  .thumb {
    width: 100%;
    height: 196px;
  }
}
