:root {
  --bg: #06080f;
  --surface: #0f121b;
  --surface-2: #161a26;
  --line: rgba(255, 255, 255, 0.14);
  --text: #f4f6ff;
  --muted: #b5bdd2;
  --chip: #1a2132;
  --chip-active: #223f5e;
  --brand-red: #e50914;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Plus Jakarta Sans", sans-serif;
  background:
    radial-gradient(1000px 700px at 100% 16%, rgba(214, 52, 158, 0.22), transparent 58%),
    radial-gradient(1200px 600px at 0% -8%, rgba(51, 92, 190, 0.24), transparent 52%),
    var(--bg);
}

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

.container {
  width: min(1320px, calc(100% - 2.4rem));
  margin-inline: auto;
}

.topbar {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  background: linear-gradient(180deg, rgba(6, 8, 14, 0.95), rgba(6, 8, 14, 0.7));
}

.topbar-inner {
  width: min(1320px, calc(100% - 2.4rem));
  margin-inline: auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand img {
  display: block;
  width: auto;
  height: 34px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  margin-left: 1rem;
}

.main-nav a {
  color: #d6ddf1;
  font-size: 0.9rem;
  padding: 0.32rem 0.14rem;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: #ffffff;
}

.main-nav a.active {
  color: #8cf3f9;
}

.join-btn {
  margin-left: auto;
  padding: 0.54rem 0.95rem;
  border-radius: 8px;
  background: var(--brand-red);
  color: #ffffff;
  font-family: "Montserrat", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
}

.join-btn:hover {
  background: #ff1e2a;
}

.menu-toggle {
  display: none;
}

.tools-page {
  padding: 108px 0 3rem;
}

.tools-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-family: "Montserrat", sans-serif;
  letter-spacing: -0.02em;
}

.tools-hero p {
  margin: 0.75rem 0 0;
  color: var(--muted);
  max-width: 60ch;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
}

.search-row {
  margin-top: 1.45rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
}

.search-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  height: 50px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.9rem;
  background: rgba(10, 14, 22, 0.75);
}

.search-box svg,
.search-menu svg {
  width: 18px;
  height: 18px;
  stroke: #9eabc9;
  stroke-width: 1.8;
  stroke-linecap: round;
  fill: none;
}

.search-box input {
  border: 0;
  outline: none;
  width: 100%;
  color: #f1f4ff;
  background: transparent;
  font-size: 1rem;
}

.search-menu {
  width: 50px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(10, 14, 22, 0.75);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.tools-section {
  margin-top: 2.25rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.7vw, 2.2rem);
  font-family: "Montserrat", sans-serif;
}

.section-split h2 {
  margin-right: auto;
}

.sort-wrap {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(10, 14, 22, 0.72);
  display: inline-flex;
  align-items: center;
  padding: 0 0.7rem;
  gap: 0.55rem;
}

.sort-wrap span {
  color: #9aa6c8;
  font-size: 0.86rem;
}

.sort-wrap select {
  border: 0;
  outline: none;
  color: #edf1ff;
  background: transparent;
  font-weight: 700;
  font-family: "Montserrat", sans-serif;
}

.chip-row {
  margin-top: 0.88rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--chip);
  color: #d6def3;
  border-radius: 9px;
  padding: 0.38rem 0.75rem;
  font-size: 0.85rem;
}

.chip.active {
  background: var(--chip-active);
  border-color: rgba(86, 196, 255, 0.48);
  color: #dff4ff;
}

.tools-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

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

.tool-card,
.stack-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)),
    radial-gradient(120% 130% at 100% 0%, var(--accent, rgba(76, 170, 255, 0.2)), transparent 55%),
    rgba(10, 14, 24, 0.95);
}

.tool-card:hover,
.stack-card:hover {
  border-color: rgba(255, 255, 255, 0.32);
}

.tool-head {
  display: flex;
  align-items: center;
  gap: 0.58rem;
}

.tool-head h3 {
  margin: 0;
  font-size: 2rem;
  font-family: "Montserrat", sans-serif;
}

.tool-type {
  margin-top: 0.2rem;
  display: inline-flex;
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
  background: rgba(86, 196, 255, 0.16);
  color: #9ee7ff;
  font-size: 0.72rem;
}

.tool-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 11px;
  color: #e7f0ff;
  font-family: "Montserrat", sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  background: rgba(7, 10, 18, 0.82);
}

.tool-card p {
  margin: 0.72rem 0 0;
  color: #d0d8ee;
  font-size: 0.98rem;
}

.tool-score {
  color: #8bf2b5;
  font-weight: 700;
  font-family: "Montserrat", sans-serif;
}

.tool-tags {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.tool-tags span {
  padding: 0.18rem 0.5rem;
  border-radius: 8px;
  font-size: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #c6d6fa;
}

.tool-actions {
  margin-top: 0.85rem;
  display: flex;
  gap: 0.45rem;
}

.tool-actions button,
.tool-actions a {
  flex: 1;
  text-align: center;
  border-radius: 9px;
  min-height: 38px;
  display: grid;
  place-items: center;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

.tool-actions button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #f0f3ff;
  color: #181b29;
  cursor: pointer;
}

.tool-actions button.saved {
  background: linear-gradient(140deg, #7cf5c1, #8de7ff);
  border-color: rgba(124, 245, 193, 0.9);
  color: #0d1a1e;
}

.tool-actions a {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e4ebff;
  background: rgba(15, 21, 34, 0.78);
}

.tool-card[hidden] {
  display: none !important;
}

.empty-state {
  margin-top: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  color: #afbbd8;
  background: rgba(11, 16, 27, 0.66);
  font-size: 0.93rem;
}

.stacks-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.stack-card h3 {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.8rem);
  font-family: "Montserrat", sans-serif;
}

.stack-card p {
  margin: 0.66rem 0 0;
  color: #d2dbef;
}

.stack-card a {
  margin-top: 0.9rem;
  height: 38px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(16, 24, 38, 0.78);
  display: inline-grid;
  place-items: center;
  min-width: 120px;
  padding: 0 0.9rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

.t1 { --accent: rgba(63, 202, 255, 0.28); }
.t2 { --accent: rgba(76, 160, 255, 0.25); }
.t3 { --accent: rgba(207, 94, 245, 0.26); }
.t4 { --accent: rgba(255, 80, 184, 0.26); }
.t5 { --accent: rgba(58, 239, 201, 0.24); }
.t6 { --accent: rgba(135, 132, 255, 0.22); }
.t7 { --accent: rgba(68, 199, 255, 0.24); }
.t8 { --accent: rgba(58, 227, 255, 0.2); }
.t9 { --accent: rgba(155, 101, 255, 0.24); }
.t10 { --accent: rgba(255, 135, 212, 0.24); }
.t11 { --accent: rgba(83, 223, 255, 0.22); }
.t12 { --accent: rgba(78, 167, 255, 0.24); }
.t13 { --accent: rgba(147, 146, 255, 0.23); }
.t14 { --accent: rgba(255, 114, 171, 0.22); }
.t15 { --accent: rgba(80, 241, 222, 0.22); }
.t16 { --accent: rgba(71, 208, 255, 0.24); }
.t17 { --accent: rgba(93, 175, 255, 0.23); }
.t18 { --accent: rgba(162, 138, 255, 0.2); }
.t19 { --accent: rgba(255, 128, 201, 0.2); }
.t20 { --accent: rgba(105, 220, 255, 0.2); }
.t21 { --accent: rgba(116, 198, 255, 0.2); }
.t22 { --accent: rgba(160, 152, 255, 0.2); }
.t23 { --accent: rgba(255, 136, 206, 0.2); }

.s1 { --accent: rgba(62, 224, 190, 0.3); }
.s2 { --accent: rgba(91, 175, 255, 0.3); }
.s3 { --accent: rgba(185, 118, 255, 0.3); }

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 8, 15, 0.58) 0%, rgba(6, 8, 15, 0.82) 38%, rgba(6, 8, 15, 0.93) 100%);
}

.footer-overlay {
  position: relative;
  z-index: 1;
}

.footer-content {
  text-align: center;
  padding: clamp(4.2rem, 11vw, 7rem) 0 clamp(3rem, 8vw, 5rem);
}

.footer-brand-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  display: block;
  width: min(460px, 82vw);
  max-width: 200px;
}

.social-row {
  margin-top: 0;
  display: flex;
  justify-content: center;
  gap: 0.55rem;
}

.social-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.social-row-top,
.social-row-bottom {
  flex-wrap: nowrap;
}

.social-link {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #ecf0ff;
  background: rgba(7, 11, 20, 0.5);
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.social-link svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.social-link .icon-fill {
  fill: currentColor;
  stroke: none;
}

.social-link:hover {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(17, 24, 38, 0.92);
  transform: translateY(-1px);
}

.social-link:focus-visible {
  outline: 2px solid rgba(126, 240, 247, 0.9);
  outline-offset: 2px;
}

.social-link.youtube:hover {
  color: #ff4d5a;
}

.social-link.facebook:hover {
  color: #7fa5ff;
}

.social-link.instagram:hover {
  color: #ff73b3;
}

.social-link.x:hover {
  color: #ffffff;
}

.social-link.tiktok:hover {
  color: #8af1f7;
}

.social-link.spotify:hover {
  color: #5eff94;
}

.social-link.telegram:hover {
  color: #7fd6ff;
}

.social-link.discord:hover {
  color: #9fa8ff;
}

.social-link.whatsapp:hover {
  color: #6df79b;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.copyright {
  margin-top: 5rem;
  color: #98a5c8;
}

.footer-legal {
  margin-top: 1.5rem;
  display: flex;
  gap: 1.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-legal a {
  color: #dbe3fb;
}

.footer-legal a:hover {
  color: #ffffff;
}

@media (max-width: 1100px) {
  .main-nav {
    gap: 0.75rem;
  }

  .main-nav a {
    font-size: 0.84rem;
  }

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

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.48rem 0.8rem;
    background: rgba(8, 11, 19, 0.78);
    color: #eff3ff;
    font-family: "Montserrat", sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 1.1rem;
    right: 1.1rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(9, 12, 20, 0.98);
    padding: 0.65rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.1rem;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    width: 100%;
    padding: 0.58rem;
  }

  .join-btn {
    margin-left: 0;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .search-menu {
    display: none;
  }
}

@media (max-width: 640px) {
  .container,
  .topbar-inner {
    width: min(1320px, calc(100% - 1.2rem));
  }

  .topbar-inner {
    min-height: 64px;
  }

  .brand img {
    height: 30px;
  }

  .join-btn {
    display: none;
  }

  .tools-page {
    padding-top: 92px;
  }

  .tools-grid,
  .top-grid,
  .stacks-grid {
    grid-template-columns: 1fr;
  }

  .section-head h2 {
    font-size: clamp(1.25rem, 7vw, 1.7rem);
  }

  .sort-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .footer-content {
    padding-top: 3.2rem;
  }
}
