* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #06101f;
  --bg2: #09172a;
  --card: #0d1b2d;
  --card2: #101f33;
  --border: #233b58;
  --text: #f5f8ff;
  --muted: #9eabc0;
  --cyan: #20b8f5;
  --blue: #168cff;
  --purple: #9b3cff;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(155,60,255,.18), transparent 28%),
    radial-gradient(circle at 90% 15%, rgba(32,184,245,.14), transparent 30%),
    linear-gradient(145deg, var(--bg), var(--bg2));
  padding-bottom: 88px;
}

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

button {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 68px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6,16,31,.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: .5px;
}

.logo-icon {
  font-size: 25px;
}

.bell {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: #0b1a2e;
  color: white;
  cursor: pointer;
}

main {
  width: min(1120px, calc(100% - 28px));
  margin: auto;
}

.hero {
  margin-top: 22px;
  padding: 34px 22px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(17,34,57,.92), rgba(7,17,32,.95));
  box-shadow: 0 25px 70px rgba(0,0,0,.28);
}

.tag,
.section-label {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
}

.hero h1 {
  margin-top: 14px;
  font-size: clamp(40px, 9vw, 76px);
  line-height: .98;
  letter-spacing: -3px;
}

.hero h1 span {
  background: linear-gradient(90deg, var(--purple), var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 700px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.primary-btn,
.secondary-btn {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  cursor: pointer;
}

.primary-btn {
  border: 0;
  color: #03101c;
  background: var(--cyan);
}

.secondary-btn {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: white;
}

.overview,
.tools-section,
.about {
  padding: 52px 0;
  border-bottom: 1px solid var(--border);
}

h2 {
  margin-top: 8px;
  font-size: clamp(28px, 6vw, 46px);
  letter-spacing: -1px;
}

.overview h2 {
  margin-bottom: 22px;
}

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

.stat {
  padding: 18px 12px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(13,27,45,.78);
}

.stat strong {
  display: block;
  font-size: 25px;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
}

.section-head {
  margin: 10px 0 24px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.section-head p {
  margin-top: 7px;
  color: var(--muted);
}

.tools-count {
  color: var(--cyan);
  font-weight: 800;
  white-space: nowrap;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.tool-card {
  min-height: 185px;
  position: relative;
  padding: 24px;
  text-align: left;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(145deg, var(--card2), var(--card));
  cursor: pointer;
  transition: transform .2s, border-color .2s, background .2s;
}

.tool-card:hover,
.tool-card:active {
  transform: translateY(-3px);
  border-color: var(--cyan);
}

.tool-icon {
  display: block;
  font-size: 34px;
  margin-bottom: 28px;
}

.tool-card h3 {
  font-size: 21px;
  margin-bottom: 7px;
}

.tool-card p {
  color: var(--muted);
}

.arrow {
  position: absolute;
  right: 20px;
  bottom: 20px;
  color: var(--cyan);
  font-size: 22px;
}

.about h2 {
  margin-top: 14px;
}

.about > p {
  max-width: 760px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.feature-row div {
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #cbd7e8;
  background: rgba(255,255,255,.03);
}

.help {
  padding: 65px 10px 55px;
  text-align: center;
}

.help h2 {
  font-size: clamp(34px, 8vw, 52px);
}

.help p {
  margin: 14px 0 22px;
  color: var(--muted);
  font-size: 17px;
}

footer {
  padding: 28px 15px 100px;
  text-align: center;
  color: #77869c;
  font-size: 13px;
}

/* Bottom navigation */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5000;
  height: 76px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
  background: rgba(5, 13, 26, .97);
  border-top: 1px solid var(--border);
  box-shadow: 0 -12px 35px rgba(0,0,0,.25);
  backdrop-filter: blur(18px);
}

.bottom-nav a {
  height: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 14px;
  color: #8e9cb0;
  font-size: 11px;
  font-weight: 800;
}

.bottom-nav a.active,
.bottom-nav a:hover {
  color: var(--cyan);
  background: rgba(32,184,245,.08);
}

.nav-icon {
  font-size: 23px;
  line-height: 1;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 6000;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  max-width: calc(100% - 30px);
  padding: 12px 17px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: white;
  background: #102238;
  box-shadow: 0 12px 35px rgba(0,0,0,.35);
  transition: .25s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 600px) {
  main {
    width: min(100% - 20px, 1120px);
  }

  .hero {
    padding: 28px 18px;
    border-radius: 22px;
  }

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

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

  .tool-card {
    min-height: 160px;
  }

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

  .tools-section,
  .overview,
  .about {
    padding: 42px 0;
  }
}

@media (min-width: 800px) {
  .tool-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .tool-card {
    min-height: 220px;
  }
}
