/* 7one Tools — minimal square grid */

.tx-page {
  --tx-ease: 0.18s ease;
  padding-block: 28px 64px;
}

.tx-wrap {
  max-width: 920px;
}

.tx-title {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tx-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.tx-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--lx-border);
  border-radius: 12px;
  background: var(--lx-surface);
  color: var(--lx-silver-400);
  transition: border-color var(--tx-ease), box-shadow var(--tx-ease);
}

.tx-search:focus-within {
  border-color: var(--lx-purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
  color: var(--lx-purple);
}

.tx-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--lx-ink);
  outline: none;
}

.tx-search input::placeholder {
  color: var(--lx-silver-400);
}

.tx-cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.tx-cats::-webkit-scrollbar {
  display: none;
}

.tx-cat {
  flex-shrink: 0;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--lx-border);
  border-radius: 10px;
  background: var(--lx-surface);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--lx-ink-soft);
  cursor: pointer;
  transition: background var(--tx-ease), border-color var(--tx-ease), color var(--tx-ease);
}

.tx-cat:hover {
  border-color: var(--lx-purple-line);
  color: var(--lx-purple);
}

.tx-cat.is-active {
  background: var(--lx-purple);
  border-color: var(--lx-purple);
  color: #fff;
}

.tx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
}

.tx-tile {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 8px;
  border: 1px solid var(--lx-border);
  border-radius: 16px;
  background: var(--lx-surface);
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: transform var(--tx-ease), border-color var(--tx-ease), box-shadow var(--tx-ease);
}

.tx-tile--live {
  cursor: pointer;
}

.tx-tile--live:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 58, 237, 0.28);
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.12);
}

.tx-tile--live:active {
  transform: translateY(-1px);
}

.tx-tile--soon {
  opacity: 0.42;
  cursor: default;
}

.tx-tile--live::before,
.tx-tile--soon::before {
  content: '';
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.tx-tile--live::before {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.tx-tile--soon::before {
  background: var(--lx-silver-300);
}

.tx-tile__icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  flex-shrink: 0;
  overflow: hidden;
  background: transparent;
  padding: 0;
}

.tx-tile__icon svg {
  width: 24px;
  height: 24px;
}

.tx-tile__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

.tx-tile__icon--globe,
.tx-tile__icon--code,
.tx-tile__icon--lock,
.tx-tile__icon--network,
.tx-tile__icon--qr,
.tx-tile__icon--calc,
.tx-tile__icon--chart,
.tx-tile__icon--coin,
.tx-tile__icon--calendar,
.tx-tile__icon--countdown,
.tx-tile__icon--moon,
.tx-tile__icon--health,
.tx-tile__icon--scale {
  background: transparent;
  color: inherit;
}

.tx-tile__icon:has(.tx-tile__img) {
  width: 68px;
  height: 68px;
  border-radius: 20px;
}

.tx-tile__icon:has(.tx-tile__img) .tx-tile__img {
  border-radius: 20px;
}

.tx-tile__icon:not(:has(.tx-tile__img)).tx-tile__icon--globe { color: var(--lx-purple); background: var(--lx-purple-soft); }
.tx-tile__icon:not(:has(.tx-tile__img)).tx-tile__icon--code { color: #2563eb; background: #eff6ff; }
.tx-tile__icon:not(:has(.tx-tile__img)).tx-tile__icon--lock { color: #059669; background: #ecfdf5; }
.tx-tile__icon:not(:has(.tx-tile__img)).tx-tile__icon--network { color: #d97706; background: #fffbeb; }
.tx-tile__icon:not(:has(.tx-tile__img)).tx-tile__icon--qr { color: #7c3aed; background: #f5f3ff; }
.tx-tile__icon:not(:has(.tx-tile__img)).tx-tile__icon--calc { color: #7c3aed; background: var(--lx-purple-soft); }
.tx-tile__icon:not(:has(.tx-tile__img)).tx-tile__icon--chart { color: #d97706; background: #fffbeb; }
.tx-tile__icon:not(:has(.tx-tile__img)).tx-tile__icon--coin { color: #ca8a04; background: #fef9c3; }
.tx-tile__icon:not(:has(.tx-tile__img)).tx-tile__icon--calendar { color: #2563eb; background: #eff6ff; }
.tx-tile__icon:not(:has(.tx-tile__img)).tx-tile__icon--countdown { color: #059669; background: #ecfdf5; }
.tx-tile__icon:not(:has(.tx-tile__img)).tx-tile__icon--moon { color: #6366f1; background: #eef2ff; }
.tx-tile__icon:not(:has(.tx-tile__img)).tx-tile__icon--health { color: #e11d48; background: #fff1f2; }
.tx-tile__icon:not(:has(.tx-tile__img)).tx-tile__icon--scale { color: #0d9488; background: #f0fdfa; }

.tx-tile__name {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}

.tx-tile.is-hidden {
  display: none;
}

.tx-empty {
  margin: 32px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--lx-silver-500);
}

@media (min-width: 640px) {
  .tx-grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 14px;
  }

  .tx-title {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tx-tile--live:hover {
    transform: none;
  }
}
