:root {
  --bg: #0d0d0d;
  --surface: #161616;
  --surface-hover: #1c1c1c;
  --border: rgba(255, 255, 255, 0.06);
  --text: #f5f5f5;
  --muted: #8a8a8a;
  --accent: #66c0f4;
  --accent-soft: rgba(102, 192, 244, 0.15);
  --radius: 20px;
  --font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

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

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(102, 192, 244, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(26, 159, 255, 0.05), transparent 45%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

.page {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 40px 0 80px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
  animation: rise 0.6s ease both;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, #1a9fff 0%, #0b6aa8 55%, #06608a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 10px 24px rgba(26, 159, 255, 0.25);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.55), transparent 40%),
    linear-gradient(160deg, #66c0f4, transparent 60%);
  opacity: 0.9;
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 12px;
  left: 13px;
  top: 16px;
  border: 2.5px solid #fff;
  border-radius: 40% 40% 45% 45%;
  box-shadow: 7px 0 0 -1px rgba(255, 255, 255, 0.35);
}

.brand h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand .count {
  margin-left: 4px;
  color: var(--muted);
  font-weight: 600;
  font-size: 1.1rem;
}

.hub-search {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 32px;
  animation: rise 0.6s ease 0.05s both;
}

.hub-search svg {
  width: 18px;
  height: 18px;
  stroke: var(--muted);
  flex-shrink: 0;
}

.hub-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}

.hub-search input::placeholder {
  color: #666;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  animation: rise 0.55s ease both;
}

.tool-card:nth-child(1) { animation-delay: 0.06s; }
.tool-card:nth-child(2) { animation-delay: 0.1s; }
.tool-card:nth-child(3) { animation-delay: 0.14s; }
.tool-card:nth-child(4) { animation-delay: 0.18s; }
.tool-card:nth-child(5) { animation-delay: 0.22s; }
.tool-card:nth-child(6) { animation-delay: 0.26s; }
.tool-card:nth-child(7) { animation-delay: 0.3s; }
.tool-card:nth-child(8) { animation-delay: 0.34s; }
.tool-card:nth-child(9) { animation-delay: 0.38s; }

.preview-art.theme-steam {
  background:
    linear-gradient(145deg, rgba(255, 122, 24, 0.2), transparent 48%),
    linear-gradient(320deg, #171a21, #2a475e 55%, #66c0f4);
}

.preview-art.theme-review {
  background:
    linear-gradient(145deg, rgba(102, 192, 244, 0.18), transparent 45%),
    linear-gradient(320deg, #1b2838, #2a475e 60%, #67c1f5);
}

.preview-art.theme-comments {
  background:
    linear-gradient(145deg, rgba(255, 80, 80, 0.18), transparent 50%),
    linear-gradient(320deg, #1a1a1a, #3f3f3f 55%, #ff4d4d);
}

.preview-art.theme-twitch {
  background:
    linear-gradient(145deg, rgba(145, 70, 255, 0.25), transparent 50%),
    linear-gradient(320deg, #0e0e10, #2d1b4e 55%, #9146ff);
}

.preview-art.theme-achieve {
  background:
    linear-gradient(145deg, rgba(180, 228, 20, 0.18), transparent 50%),
    linear-gradient(320deg, #1b2838, #3d4f63 50%, #c4e538);
}

.preview-art.theme-playing {
  background:
    linear-gradient(145deg, rgba(255, 122, 24, 0.2), transparent 50%),
    linear-gradient(320deg, #171a22, #2b3344 55%, #ff7a18);
}

.preview-art.theme-lower {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 50%),
    linear-gradient(320deg, #10131a, #243049 55%, #7aa2ff);
}

.preview-art.theme-discord {
  background:
    linear-gradient(145deg, rgba(88, 101, 242, 0.25), transparent 50%),
    linear-gradient(320deg, #1e1f22, #313338 55%, #5865f2);
}

.preview-art.theme-alerts {
  background:
    linear-gradient(145deg, rgba(26, 159, 255, 0.2), transparent 50%),
    linear-gradient(320deg, #0f1a24, #1b2838 55%, #1a9fff);
}

.tool-card:hover {
  transform: translateY(-4px);
  background: var(--surface-hover);
  border-color: rgba(102, 192, 244, 0.22);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.tool-card.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.preview {
  position: relative;
  aspect-ratio: 16 / 11;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    #121212;
  background-size: 24px 24px, 24px 24px, auto;
  overflow: hidden;
}

.preview-art {
  position: absolute;
  inset: 12% 10% 18% 10%;
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(102, 192, 244, 0.2), transparent 50%),
    linear-gradient(320deg, #1b2838 0%, #2a475e 50%, #1a9fff 140%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.preview-art .stack {
  display: grid;
  gap: 8px;
  width: 72%;
}

.preview-art .bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.preview-art .bar.wide { width: 100%; }
.preview-art .bar.mid { width: 70%; }
.preview-art .bar.short { width: 42%; }

.preview-art .orb {
  position: absolute;
  width: 70px;
  height: 70px;
  right: -10px;
  bottom: -16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #9fdfff, #1a9fff 45%, #0b4f7a 80%);
  filter: blur(1px);
  opacity: 0.85;
}

.tool-icon {
  position: absolute;
  left: 18px;
  bottom: -18px;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(160deg, #66c0f4, #1a9fff);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(26, 159, 255, 0.35);
  z-index: 2;
}

.tool-icon svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.tool-body {
  padding: 28px 18px 18px;
}

.tool-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tool-title svg {
  width: 16px;
  height: 16px;
  stroke: var(--muted);
  transition: stroke 0.2s ease, transform 0.2s ease;
}

.tool-card:hover .tool-title svg {
  stroke: var(--accent);
  transform: translate(1px, -1px);
}

.tool-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 28px, 1200px);
    padding-top: 28px;
  }

  .brand h1 {
    font-size: 1.4rem;
  }
}
