:root {
  color-scheme: light;
  --canvas: #f3f7ff;
  --surface: #ffffff;
  --surface-hover: #e8f1ff;
  --text: #071a33;
  --text-soft: #174b82;
  --line: #b7d3ff;
  --line-strong: #0866ff;
  --accent: #0866ff;
  --accent-text: #ffffff;
  --focus: #7c3aed;
  --shadow: 0 14px 36px rgba(8, 102, 255, 0.12);
  --topbar: rgba(243, 247, 255, 0.92);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #06101f;
  --surface: #0b1b32;
  --surface-hover: #102a4d;
  --text: #f7fbff;
  --text-soft: #acd3ff;
  --line: #23558a;
  --line-strong: #60a5fa;
  --accent: #60a5fa;
  --accent-text: #06101f;
  --focus: #c4b5fd;
  --shadow: 0 16px 44px rgba(0, 82, 204, 0.24);
  --topbar: rgba(6, 16, 31, 0.92);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(8, 102, 255, 0.12), transparent 32rem),
    var(--canvas);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.4;
  transition: background-color 160ms ease, color 160ms ease;
}

button,
input {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 16px;
  font-weight: 800;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(320px, 620px) minmax(190px, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding: 12px clamp(20px, 4vw, 64px);
  border-bottom: 2px solid var(--line);
  background: var(--topbar);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  color: var(--text);
  font-size: 21px;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #0866ff, #7c3aed);
  box-shadow: 0 8px 22px rgba(8, 102, 255, 0.28);
  color: #ffffff;
  font-size: 23px;
  font-weight: 900;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 14px;
  border: 2px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(8, 102, 255, 0.08);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.search-box:focus-within {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(8, 102, 255, 0.14);
}

.search-box svg {
  width: 22px;
  flex: 0 0 22px;
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-width: 2;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.search-box input::placeholder {
  color: var(--text-soft);
  opacity: 1;
}

.theme-toggle {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 112px;
  min-height: 48px;
  padding: 0 16px;
  border: 2px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  background: var(--surface-hover);
  box-shadow: var(--shadow);
}

.theme-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.theme-icon-sun,
:root[data-theme="dark"] .theme-icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-icon-sun {
  display: block;
}

.main-content {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 36px clamp(20px, 4vw, 64px) 72px;
}

.site-footer {
  padding: 0 20px 38px;
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
  text-align: center;
}

.site-footer a {
  color: var(--accent);
  font-weight: 900;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.launcher-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.result-count {
  display: grid;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  place-items: center;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 17px;
  font-weight: 900;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.filter-button {
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.filter-button:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

.filter-button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

.tool-section + .tool-section {
  margin-top: 38px;
}

.tool-section h2 {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

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

.tool-card {
  --tool-color: #7c3aed;
  display: flex;
  min-width: 0;
  min-height: 250px;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  padding: 22px;
  border: 2px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(8, 102, 255, 0.08);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.tool-card[data-group="business"] { --tool-color: #0866ff; }
.tool-card[data-group="ads"] { --tool-color: #f97316; }
.tool-card[data-group="pages"] { --tool-color: #059669; }
.tool-card[data-group="utilities"] { --tool-color: #db2777; }

.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--tool-color);
  background: var(--surface-hover);
  box-shadow: var(--shadow);
}

.tool-card:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.card-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 15px;
}

.card-title {
  min-width: 0;
}

.card-title h3 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.expand-icon {
  width: 28px;
  height: 28px;
  margin-top: 12px;
  fill: none;
  stroke: var(--tool-color);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
  transition: transform 140ms ease;
}

.tool-card:hover .expand-icon {
  transform: translateY(3px);
}

.twofa-expand {
  display: grid;
  width: 44px;
  height: 44px;
  margin-top: 2px;
  padding: 0;
  place-items: center;
  border: 2px solid var(--tool-color);
  border-radius: 12px;
  background: var(--surface);
  color: var(--tool-color);
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease;
}

.twofa-expand:hover {
  transform: translateY(-2px);
  background: var(--surface-hover);
}

.twofa-expand svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.tool-card > p {
  flex: 1;
  color: var(--text-soft);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.48;
}

.twofa-card {
  cursor: default;
}

.twofa-card .card-heading {
  grid-template-columns: minmax(0, 1fr) 44px;
}

.twofa-field {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
}

.twofa-field input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 2px solid var(--line-strong);
  border-radius: 13px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.twofa-field input::placeholder {
  color: var(--text-soft);
  letter-spacing: 0;
  opacity: 1;
}

.twofa-field input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 18%, transparent);
}

.twofa-field input[aria-invalid="true"] {
  border-color: #dc2626;
}

.twofa-output {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.twofa-code-button {
  position: relative;
  display: grid;
  min-height: 84px;
  width: 100%;
  padding: 10px 16px;
  place-items: center;
  border: 2px solid var(--tool-color, var(--accent));
  border-radius: 14px;
  background: var(--tool-color, var(--accent));
  color: #ffffff;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.twofa-code-button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--tool-color, var(--accent)) 28%, transparent);
}

.twofa-code-button:disabled {
  background: var(--surface);
  color: var(--text);
  cursor: default;
  opacity: 1;
}

.twofa-code-button.copied {
  box-shadow: 0 0 0 4px color-mix(in srgb, #16a34a 35%, transparent);
}

.twofa-code-button > span {
  font-size: 31px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
}

.twofa-code-button .twofa-timer {
  position: absolute;
  top: 8px;
  right: 12px;
  color: currentColor;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-indent: 0;
}

[data-twofa-status].is-error {
  color: #b91c1c;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.action-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 2px solid var(--line-strong);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.action-button:hover {
  transform: translateY(-2px);
  background: var(--surface-hover);
  box-shadow: 0 8px 20px rgba(8, 102, 255, 0.14);
}

.drag-action,
.open-action,
.copy-action.copied {
  border-color: var(--tool-color, var(--accent));
  background: var(--tool-color, var(--accent));
  color: #ffffff;
}

.drag-action {
  flex: 1 1 190px;
  cursor: grab;
}

.drag-action:active {
  cursor: grabbing;
}

.copy-action {
  flex: 0 0 94px;
}

.open-action {
  min-width: 150px;
}

.ip-card-action {
  width: 100%;
  flex: 1 1 100%;
  border-color: var(--tool-color);
  background: var(--tool-color);
  color: #ffffff;
}

.tool-dialog {
  width: min(820px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: var(--text);
  box-shadow: 0 28px 90px rgba(0, 43, 102, 0.38);
}

.tool-dialog::backdrop {
  background: rgba(3, 13, 31, 0.74);
  backdrop-filter: blur(7px);
}

.dialog-panel {
  position: relative;
  max-height: calc(100vh - 32px);
  padding: 30px;
  overflow: auto;
  border: 2px solid var(--line-strong);
  border-radius: 24px;
  background: var(--surface);
}

.dialog-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--surface-hover);
  color: var(--text);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.dialog-heading {
  padding-right: 58px;
}

.dialog-meta {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 16px;
  font-weight: 850;
}

.dialog-heading h2 {
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.dialog-description {
  margin-top: 26px;
  color: var(--text);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.42;
}

.dialog-details {
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.55;
}

.dialog-preview {
  margin-top: 24px;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--surface-hover);
}

.dialog-preview img {
  display: block;
  width: 100%;
  max-height: 390px;
  object-fit: contain;
}

.dialog-actions {
  margin-top: 28px;
}

.dialog-actions .action-button {
  min-height: 54px;
  font-size: 18px;
}

.dialog-actions.twofa-dialog-actions {
  display: block;
  margin-top: 26px;
}

.dialog-actions.ip-dialog-actions {
  display: block;
  margin-top: 0;
}

.twofa-dialog-body {
  --tool-color: #7c3aed;
  display: grid;
  gap: 14px;
}

.twofa-dialog-field input {
  min-height: 58px;
  font-size: 19px;
}

.twofa-dialog-code {
  min-height: 132px;
  margin-top: 4px;
}

.twofa-dialog-code > span {
  font-size: clamp(42px, 9vw, 64px);
}

.toast {
  position: fixed;
  z-index: 30;
  right: 24px;
  bottom: 24px;
  padding: 14px 18px;
  border: 2px solid var(--line-strong);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 17px;
  font-weight: 850;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.empty-state {
  display: grid;
  min-height: 320px;
  place-items: center;
  align-content: center;
  gap: 18px;
  border: 2px dashed var(--line-strong);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  font-size: 20px;
}

.empty-state button {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 16px;
  font-weight: 850;
  cursor: pointer;
}

.noscript {
  margin: 20px;
  padding: 18px;
  border: 2px solid #ef4444;
  border-radius: 14px;
  background: #fee2e2;
  color: #7f1d1d;
  font-size: 18px;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: auto minmax(260px, 1fr) auto;
  }

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

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .search-box {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .launcher-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-row {
    justify-content: flex-start;
  }

}

@media (max-width: 700px) {
  .topbar {
    gap: 12px;
    padding: 10px 16px 14px;
  }

  .brand {
    font-size: 20px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .theme-toggle {
    min-width: 102px;
    min-height: 44px;
    padding: 0 13px;
  }

  .main-content {
    padding: 28px 16px 48px;
  }

  .launcher-head {
    margin-bottom: 28px;
  }

  .filter-row {
    flex-wrap: nowrap;
    width: calc(100vw - 32px);
    padding-bottom: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .filter-row::-webkit-scrollbar {
    display: none;
  }

  .filter-button {
    flex: 0 0 auto;
  }

  .tool-list {
    grid-template-columns: 1fr;
  }

  .tool-section + .tool-section {
    margin-top: 32px;
  }

  .tool-card {
    min-height: 0;
    padding: 19px;
  }

  .card-title h3 {
    font-size: 22px;
  }

  .dialog-panel {
    padding: 24px 20px;
  }

  .dialog-heading {
    padding-right: 48px;
  }

  .dialog-close {
    top: 14px;
    right: 14px;
  }

  .dialog-actions .action-button {
    width: 100%;
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
