:root {
  --bg: #080a0f;
  --surface: #11151d;
  --surface-elevated: #171c26;
  --surface-muted: #202633;
  --text: #f4f7fb;
  --muted: #98a4b8;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #2dd4bf;
  --accent-dark: #14b8a6;
  --warning: #f8c462;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(180deg, #0c1017 0%, var(--bg) 42%, #07090d 100%);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.has-popup {
  overflow: hidden;
}

a {
  color: inherit;
}

.container {
  max-width: 1120px;
}

.page-header {
  padding: 48px 0 28px;
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--text);
  font-size: clamp(38px, 6vw, 70px);
  font-weight: 850;
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  color: var(--text);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
}

.header__text {
  max-width: 390px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.tabs {
  position: sticky;
  top: 12px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 24px 0;
  padding: 7px;
  background: rgba(17, 21, 29, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.tabs__link {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.tabs__link:hover,
.tabs__link:focus-visible {
  background: var(--surface-muted);
  color: var(--text);
  outline: none;
}

.tabs__link.is-active {
  background: var(--accent);
  color: #06100f;
  box-shadow: 0 10px 28px rgba(45, 212, 191, 0.18);
}

.catalog {
  padding-bottom: 44px;
}

.catalog__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.catalog__count {
  margin-bottom: 4px;
  color: var(--muted);
  font-weight: 700;
}

.state {
  margin: 24px 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  box-shadow: var(--shadow);
}

.state:empty {
  display: none;
}

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

.tool-card {
  position: relative;
  display: flex;
  min-height: 328px;
  flex-direction: column;
  padding: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.tool-card:hover {
  border-color: rgba(45, 212, 191, 0.42);
  transform: translateY(-2px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}

.tool-card--best {
  grid-column: span 2;
  border-color: transparent;
  background:
    linear-gradient(145deg, #1b2433, #10151f 56%, #121824) padding-box,
    linear-gradient(135deg, #ef4444, #f59e0b, #22c55e, #06b6d4, #6366f1, #d946ef) border-box;
  border-width: 2px;
  box-shadow:
    0 26px 76px rgba(0, 0, 0, 0.54),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 42px rgba(45, 212, 191, 0.1);
}

.tool-card--best::before {
  content: "";
  position: absolute;
  inset: -35%;
  z-index: 0;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(45, 212, 191, 0.16) 55deg,
    rgba(99, 102, 241, 0.14) 120deg,
    rgba(217, 70, 239, 0.12) 185deg,
    transparent 250deg,
    rgba(245, 158, 11, 0.1) 310deg,
    transparent 360deg
  );
  filter: blur(26px);
  opacity: 0.55;
  pointer-events: none;
  animation: best-card-glow 8s linear infinite;
}

.tool-card--best > * {
  position: relative;
  z-index: 1;
}

.tool-card--best .tool-card__title {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.04;
}

.tool-card--best .tool-card__description {
  max-width: 720px;
  color: #d6deea;
  font-size: 17px;
}

.tool-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.tool-card__title {
  margin: 0;
  color: var(--text);
  font-size: 23px;
  font-weight: 820;
  line-height: 1.16;
  letter-spacing: 0;
}

.best-label {
  align-self: flex-start;
  margin-bottom: 14px;
  padding: 7px 10px;
  background: rgba(45, 212, 191, 0.14);
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 6px;
  color: #8ff5e6;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.rating {
  flex: 0 0 auto;
  display: inline-flex;
  min-width: 60px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 9px;
  background: rgba(248, 196, 98, 0.12);
  border: 1px solid rgba(248, 196, 98, 0.34);
  border-radius: 6px;
  color: var(--warning);
  font-weight: 900;
}

.tool-card__description {
  margin-bottom: 18px;
  color: var(--muted);
  line-height: 1.58;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tool-tag {
  --bs-badge-padding-x: 0.68rem;
  --bs-badge-padding-y: 0.45rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 13px;
}

.tool-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
}

.tool-card__meta {
  display: grid;
  gap: 6px;
}

.pricing {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 800;
}

.click-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.link-actions {
  display: flex;
  justify-content: flex-end;
  min-width: 148px;
}

.tool-button {
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-color: #06100f;
  --bs-btn-hover-bg: var(--accent-dark);
  --bs-btn-hover-border-color: var(--accent-dark);
  --bs-btn-hover-color: #06100f;
  --bs-btn-focus-shadow-rgb: 45, 212, 191;
  min-height: 42px;
  border-radius: 6px;
  font-weight: 900;
}

.is-hidden {
  display: none !important;
}

.captcha-popup {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.captcha-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
}

.captcha-popup__panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 24px;
  background: linear-gradient(180deg, #171c26, #10151d);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.56);
}

.captcha-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.captcha-popup__close:hover,
.captcha-popup__close:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.captcha-popup__title {
  max-width: 320px;
  margin-bottom: 12px;
  font-size: 26px;
}

.captcha-popup__text {
  margin-bottom: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.slide-captcha {
  position: relative;
  height: 58px;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent),
    rgba(255, 255, 255, 0.06);
  background-size: 220% 100%, auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  user-select: none;
  touch-action: none;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background-position 0.8s ease;
  animation: slide-track-shimmer 2.8s ease-in-out infinite;
}

.slide-captcha.is-dragging,
.slide-captcha.is-complete {
  border-color: rgba(45, 212, 191, 0.42);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.08);
}

.slide-captcha__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.24), rgba(99, 102, 241, 0.28));
  transition: width 0.18s ease;
}

.slide-captcha__text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-left: 58px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 800;
  pointer-events: none;
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}

.slide-captcha.is-complete .slide-captcha__text {
  color: #8ff5e6;
  opacity: 0.92;
}

.slide-captcha__handle {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  color: #06100f;
  cursor: grab;
  font-size: 22px;
  font-weight: 900;
  touch-action: none;
  box-shadow:
    0 12px 26px rgba(45, 212, 191, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.slide-captcha.is-dragging .slide-captcha__fill,
.slide-captcha.is-dragging .slide-captcha__handle {
  transition: none;
}

.slide-captcha__handle:active {
  cursor: grabbing;
  background: #5eead4;
  box-shadow:
    0 16px 34px rgba(45, 212, 191, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.slide-captcha__handle:focus-visible {
  outline: 3px solid rgba(45, 212, 191, 0.28);
  outline-offset: 2px;
}

.faq {
  padding: 18px 0 64px;
}

.faq__head {
  margin-bottom: 20px;
}

.faq__accordion {
  display: grid;
  gap: 10px;
}

.faq__item {
  overflow: hidden;
  background: rgba(17, 21, 29, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.faq__item .accordion-button {
  min-height: 58px;
  background: transparent;
  color: var(--text);
  font-weight: 800;
  line-height: 1.35;
  box-shadow: none;
}

.faq__item .accordion-button:not(.collapsed) {
  background: rgba(45, 212, 191, 0.08);
  color: var(--text);
}

.faq__item .accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(45, 212, 191, 0.18);
}

.faq__item .accordion-button::after {
  filter: invert(1) grayscale(1);
  opacity: 0.72;
}

.faq__item .accordion-body {
  color: var(--muted);
  line-height: 1.6;
  border-top: 1px solid var(--line);
}

@keyframes best-card-glow {
  0% {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(1.04);
  }

  100% {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes slide-track-shimmer {
  0%,
  100% {
    background-position: 160% 0, 0 0;
  }

  50% {
    background-position: -60% 0, 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tool-card--best::before {
    animation: none;
  }

  .slide-captcha {
    animation: none;
  }
}

@media (max-width: 860px) {
  .header__inner,
  .catalog__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .header__text {
    max-width: 100%;
  }

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

  .tool-card--best {
    grid-column: span 2;
  }
}

@media (max-width: 620px) {
  .page-header {
    padding-top: 34px;
  }

  .tabs {
    position: static;
    grid-template-columns: 1fr;
  }

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

  .tool-card {
    min-height: auto;
  }

  .tool-card--best {
    grid-column: span 1;
  }
}
