:root {
  --bg: #0b0f0d;
  --panel: rgba(12, 18, 15, 0.88);
  --panel-strong: rgba(13, 20, 17, 0.96);
  --line: rgba(0, 255, 153, 0.18);
  --line-hot: rgba(0, 255, 153, 0.36);
  --text: rgba(235, 255, 247, 0.94);
  --muted: rgba(220, 255, 240, 0.66);
  --accent: #00ff99;
  --accent-2: #18f5ff;
  --purple: #a855f7;
  --gold: #ffd166;
  --danger: #ff4d6d;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 16% 8%, rgba(0, 255, 153, 0.12), transparent 34%),
    radial-gradient(circle at 86% 22%, rgba(24, 245, 255, 0.10), transparent 28%),
    linear-gradient(180deg, #060907 0%, var(--bg) 58%, #070a08 100%);
  overflow-x: hidden;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

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

.app {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px clamp(12px, 4vw, 22px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 9, 0.88);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line-hot);
  border-radius: 50%;
  color: var(--accent);
  font-weight: 1000;
  box-shadow: 0 0 20px rgba(0, 255, 153, 0.24);
}

.brand strong {
  display: block;
  font-size: 19px;
  line-height: 1;
  letter-spacing: 0.7px;
}

.brand small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-pill {
  min-width: 86px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 16, 13, 0.8);
}

.stat-pill span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
}

.stat-pill strong {
  display: block;
  margin-top: 2px;
  color: var(--accent);
  font-size: 17px;
}

.home {
  width: 100%;
  max-width: 1160px;
  min-width: 0;
  margin: 0 auto;
  padding: clamp(12px, 3vw, 24px);
}

.hero {
  width: 100%;
  min-width: 0;
  min-height: 260px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  padding: clamp(18px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 84% 36%, rgba(168, 85, 247, 0.26), transparent 30%),
    radial-gradient(circle at 72% 72%, rgba(24, 245, 255, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(0, 255, 153, 0.12), rgba(12, 18, 15, 0.88) 48%, rgba(8, 10, 18, 0.96));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

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

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 11ch;
  font-size: clamp(42px, 10vw, 78px);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  max-width: 560px;
  margin-top: 12px;
  color: rgba(235, 255, 247, 0.78);
  font-size: clamp(15px, 2.2vw, 18px);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.hero > div,
.tool-card > div {
  min-width: 0;
}

.hero-button,
.small-button,
.card-button {
  min-height: 44px;
  border: 1px solid var(--line-hot);
  border-radius: var(--radius);
  background: rgba(10, 18, 15, 0.84);
  color: var(--text);
  cursor: pointer;
}

.hero-button {
  min-width: 150px;
  min-height: 56px;
  padding: 0 18px;
  color: #02140d;
  font-weight: 1000;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 28px rgba(0, 255, 153, 0.28);
}

.section {
  margin-top: 22px;
}

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

h2 {
  font-size: 22px;
}

.section-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

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

.tool-card {
  position: relative;
  min-width: 0;
  min-height: 176px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(12, 18, 15, 0.84);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.tool-card.featured {
  border-color: rgba(24, 245, 255, 0.56);
  background:
    radial-gradient(circle at 88% 16%, rgba(168, 85, 247, 0.28), transparent 32%),
    radial-gradient(circle at 20% 90%, rgba(24, 245, 255, 0.20), transparent 36%),
    linear-gradient(180deg, rgba(24, 245, 255, 0.08), rgba(12, 18, 15, 0.9));
}

.tool-card h3 {
  margin: 8px 0 0;
  font-size: 20px;
  letter-spacing: 0;
}

.tool-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.tool-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-hot);
  border-radius: 50%;
  color: var(--accent);
  font-size: 22px;
  font-weight: 1000;
  background: rgba(0, 255, 153, 0.07);
  box-shadow: inset 0 0 16px rgba(0, 255, 153, 0.06);
}

.new-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(255, 209, 102, 0.72);
  border-radius: 999px;
  color: #1a1100;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.8px;
  background: linear-gradient(135deg, var(--gold), #fff2a8);
  box-shadow: 0 0 20px rgba(255, 209, 102, 0.28);
}

.new-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff4d6d;
  box-shadow: 0 0 8px #ff4d6d;
}

.card-button {
  width: 100%;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
}

.drawer.hidden {
  display: none;
}

.drawer-shell {
  width: min(1180px, 100%);
  height: calc(100dvh - 24px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line-hot);
  border-radius: var(--radius);
  background: #08100d;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.drawer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 16, 13, 0.96);
}

.drawer-bar span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.drawer-bar strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
}

.drawer-actions {
  display: flex;
  gap: 8px;
}

.small-button {
  display: inline-grid;
  place-items: center;
  min-width: 72px;
  padding: 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.play-surface {
  min-height: 0;
  overflow: hidden;
  background: #070a08;
}

.play-surface iframe {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  border: 0;
  background: #0b0f1a;
}

.module-root {
  min-height: 100%;
  padding: 14px;
}

.toast-zone {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 40;
  width: min(92vw, 460px);
  display: grid;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  padding: 12px;
  border: 1px solid var(--line-hot);
  border-radius: var(--radius);
  background: rgba(8, 13, 11, 0.96);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

@media (max-width: 900px) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: start;
  }

  .hero {
    min-height: 330px;
    grid-template-columns: 1fr;
    padding: 24px;
  }

  h1 {
    font-size: clamp(40px, 13vw, 56px);
  }

  .hero-button {
    min-width: 0;
    width: 100%;
  }

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

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

  .drawer {
    padding: 0;
  }

  .drawer-shell {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
  }

  .play-surface iframe {
    min-height: 0;
  }
}
