/* ===== Переменные ===== */
:root {
  --color-bg: #0a0a0a;
  --color-text: #eaeaea;
  --color-tile-bg: rgba(255, 255, 255, 0.03);
  --color-tile-border: rgba(255, 255, 255, 0.1);
  --color-tile-hover: #50B42E;
  --color-tile-hover-alt: #c0de03;
  --color-tile-shadow: #50B42E;
  --color-scroll-track: rgba(255, 255, 255, 0.05);
  --color-scroll-thumb: #50B42E;
  --color-scroll-thumb-hover: #50B42E;
}

/* ===== Сброс и базовые стили ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  
  font-family: "Noto Sans", "Segoe UI", Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  overflow-y: auto;
  overflow-x: hidden;
}

#vanta-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}




/* ===== Общий контейнер ===== */
main {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* ===== Заголовки категорий ===== */
.category {
  margin-bottom: 3rem;
}

.category h2 {
  margin: 0 0 2rem;
  font-size: 1.6rem;
  text-align: center;
  color: var(--color-tile-hover);
}

/* ===== Сетка плиток ===== */
.tiles {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-gap: 2rem;
  justify-content: center;
  grid-template-columns: repeat(auto-fit, 270px);
}

/* ===== Оформление плитки ===== */
.tiles li {
  background: var(--color-tile-bg);
  border: 1px solid var(--color-tile-border);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s  ease-in-out, border-color 0.3s  ease-in-out;
}

.tiles a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
}

.tiles img {
  width: 80px;
  height: 80px;
  margin-bottom: 0.75rem;
  user-select: none;
}

.tiles h3 {
  margin: 0;
  font-size: 1.1rem;
  text-align: center;
}

.tiles p {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  line-height: 1.3;
  opacity: 0.8;
  text-align: center;
}

.tiles li:hover,
.tiles li:focus-within {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--color-tile-hover);
  box-shadow: 0 8px 20px var(--color-tile-shadow);
}

/* ===== Адаптив ===== */
@media (max-width: 480px) {
  .category h2 {
    font-size: 1.4rem;
  }
  .tiles img {
    width: 36px;
    height: 36px;
  }
  .tiles h3 {
    font-size: 1rem;
  }
  .tiles p {
    font-size: 0.75rem;
  }
}

/* ===== Стилизация скроллбаров (WebKit) ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-scroll-track);
}

::-webkit-scrollbar-thumb {
  background-color: var(--color-scroll-thumb);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-scroll-thumb-hover);
}

/* ===== Стилизация скроллбаров (Firefox) ===== */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-scroll-thumb) var(--color-scroll-track);
}
