:root {
  --bg: #f8f8fc;
  --bg-soft: #f4f1ff;
  --surface: #ffffff;
  --surface-muted: #f8f6ff;
  --text: #0f172a;
  --text-muted: #52606d;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --primary: #6f4bff;
  --primary-600: #5f3fe6;
  --primary-soft: rgba(111, 75, 255, 0.12);
  --primary-glow: rgba(111, 75, 255, 0.2);
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, rgba(111, 75, 255, 0.14), transparent 30%), var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

img, picture, video, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 16px;
  border: 2px solid rgba(111, 75, 255, 0.22);
  background: rgba(111, 75, 255, 0.08);
  position: relative;
}

.site-header,
.site-footer,
header.sticky,
header.sticky-top {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.site-nav {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 1rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: rgba(15, 23, 42, 0.72);
  transition: color 180ms ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  overflow-y: auto;
  padding: 1.5rem;
  display: none;
}

.mobile-menu.open {
  display: block;
}

.mobile-link {
  display: block;
  padding: 1rem 0;
  color: var(--text);
  font-weight: 700;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-600), #8c78ff);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.65rem 1rem;
  letter-spacing: 0.02em;
}

.btn-primary,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(90deg, var(--primary), #8c78ff);
  color: #fff;
  border-radius: 16px;
  padding: 0.95rem 1.6rem;
  border: none;
  font-weight: 700;
  transition: transform 220ms ease, box-shadow 220ms ease, opacity 220ms ease;
}

.btn-primary:hover,
.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 50px rgba(111, 75, 255, 0.22);
}

.btn-primary:disabled,
.primary-button:disabled {
  opacity: 0.72;
  transform: none;
  cursor: not-allowed;
}

.btn-secondary,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 0.95rem 1.6rem;
  font-weight: 700;
  transition: transform 220ms ease, background 220ms ease, border-color 220ms ease;
}

.btn-secondary:hover,
.secondary-button:hover {
  transform: translateY(-1px);
  background: rgba(248, 250, 252, 0.95);
  border-color: rgba(15, 23, 42, 0.14);
}

.btn-ghost,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  padding: 0.95rem 1.6rem;
  transition: transform 220ms ease, background 220ms ease, border-color 220ms ease;
}

.btn-ghost:hover,
.ghost-button:hover {
  transform: translateY(-1px);
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.18);
}

.input,
.input-field,
input[type='text'],
input[type='email'],
input[type='password'],
textarea,
select {
  width: 100%;
  min-height: 52px;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

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

.input-field.has-icon,
.input-field.has-icon.pr-12 {
  padding-left: 3.3rem;
}

.input-field.has-icon.pr-12 {
  padding-right: 3.2rem;
}

.link-copy-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  width: 100%;
}

.copy-link-input {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.95);
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  color: var(--text);
}

.copy-button {
  min-height: 38px;
  padding: 0.78rem 1rem;
  font-size: 0.94rem;
  border-radius: 16px;
}

.analytics-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.analytics-table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.analytics-table th,
.analytics-table td {
  padding: 0.9rem 0.9rem;
  white-space: normal;
  word-break: break-word;
  vertical-align: middle;
}

.analytics-table th {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

.analytics-table td {
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .link-copy-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .copy-button {
    width: 100%;
  }

  .analytics-table th,
  .analytics-table td {
    padding: 0.75rem 0.7rem;
    font-size: 0.82rem;
  }

  .input-field,
  .input {
    min-height: 46px;
    font-size: 0.96rem;
  }

  .primary-button,
  .secondary-button {
    padding: 0.82rem 1.2rem;
  }
}

.input:focus,
.input-field:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: rgba(111, 75, 255, 0.45);
  box-shadow: 0 0 0 6px rgba(111, 75, 255, 0.12);
  outline: none;
  background: #fff;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.75);
}

.form-card,
.panel,
.card,
.apply-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.06);
}

.form-card {
  padding: 2rem;
}

.card {
  padding: 2rem;
}

.card-small {
  padding: 1.5rem;
}

.alert,
.alert-success,
.alert-error {
  border-radius: 20px;
  padding: 1.1rem 1.2rem;
  margin-top: 1rem;
}

.alert-success {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #14532d;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.section {
  padding: 90px 0;
}

.section-compact {
  padding: 60px 0;
}

.section-title {
  font-size: clamp(2.05rem, 2.9vw, 3.8rem);
  line-height: 1.02;
  font-weight: 800;
  margin: 0;
}

.section-copy {
  color: rgba(15, 23, 42, 0.72);
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  max-width: 58rem;
  margin-top: 1rem;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: 0;
  font-size: 2rem;
}

.section-heading p {
  margin: 0;
  color: rgba(15, 23, 42, 0.7);
}

.card-grid,
.stats-grid,
.feature-grid,
.help-grid,
.faq-grid {
  display: grid;
  gap: 1.5rem;
}

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

.stats-grid,
.feature-grid,
.help-grid,
.faq-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.footer {
  background: #fff;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.footer-list a:hover {
  color: var(--primary);
}

.text-muted {
  color: rgba(15, 23, 42, 0.62);
}

.text-small {
  font-size: 0.92rem;
}

.max-w-prose {
  max-width: 65ch;
}

.shadow-soft {
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.06);
}

.faq-item {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  padding: 1.1rem 1.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  background: transparent;
  cursor: pointer;
}

.faq-a {
  padding: 0 1.3rem 1.2rem;
  color: rgba(15, 23, 42, 0.72);
  font-size: 0.97rem;
  line-height: 1.75;
}

.faq-a.hidden {
  display: none;
}

@media (max-width: 1024px) {
  .card-grid,
  .stats-grid,
  .feature-grid,
  .help-grid,
  .faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .site-nav {
    padding: 1rem;
  }
  .section {
    padding: 60px 0;
  }
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }
  .card-grid,
  .stats-grid,
  .feature-grid,
  .help-grid,
  .faq-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .btn-primary,
  .btn-secondary,
  .btn-ghost,
  .primary-button,
  .secondary-button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 15px;
  }
  .section-title {
    font-size: 1.85rem;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
  }
  .form-card {
    padding: 1.5rem;
  }
  .input,
  .input-field {
    min-height: 48px;
    padding: 0.95rem 1rem;
  }
  .site-nav {
    gap: 0.75rem;
  }
}
