html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100%;
  background: radial-gradient(ellipse at center, #08040f 0%, #000000 100%);
  cursor: default;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #dbdbdb; /* серый для всего текста кроме Gateron */
}

#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 80px;
  background: transparent;
  backdrop-filter: blur(10px);
  border-bottom: none;
  display: flex;
  align-items: center;
  z-index: 1000;
  user-select: none;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Тонкая RGB-линия под шапкой */
#header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet, red);
  background-size: 1600% 1600%;
  animation: rgbLineShift 12s linear infinite;
}

@keyframes rgbLineShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative; /* чтобы ::after у header работал правильно */
  z-index: 1;
}

.left-buttons a,
.right-buttons a {
  text-decoration: none;
  color: #dbdbdb; /* светло-серый */
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 600;
  margin-right: 10px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  height: 38px;
  box-sizing: border-box;
  cursor: pointer;
  border: none; /* убрать странный border, если был */
  position: relative; /* для псевдоэлементов */
  overflow: hidden;
}

.left-buttons a:last-child,
.right-buttons a:last-child {
  margin-right: 0;
}

/* Цвет текста логотипа Gateron - оставляем как было */
.logo-button {
  font-weight: 900;
  font-size: 35px;
  background: linear-gradient(270deg, red, orange, yellow, green, blue, indigo, violet, red);
  background-size: 1600% 1600%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textGradient 7s ease infinite;
  transition: transform 0.3s ease;
  color: initial; /* override серого цвета */
  border: none;
}
.logo-button:hover {
  text-shadow: none;
  transform: scale(1.1);
}

@keyframes textGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.nav-button,
.auth-button:not(.register) {
  font-weight: 500;
  font-size: 15px;
  border: none;
  color: #dbdbdb;
}
.nav-button:hover,
.auth-button:not(.register):hover {
  text-shadow:
    0 0 8px #6f86d6,
    0 0 16px #48c6ef,
    0 0 24px #ff99cc;
  color: #dbdbdb;
  box-shadow: none;
}

/* Кнопка Register с RGB рамкой и анимацией как у других */
.auth-button.register {
  font-weight: 500;
  font-size: 15px;
  color: #dbdbdb;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  padding: 8px 16px;
  overflow: visible; /* чтобы glow снаружи виден был */
  z-index: 0;
  transition: color 0.3s ease;
  border: 2px solid transparent; /* добавим границу для ровного размера */
}

/* Основная RGB-рамка снаружи */
.auth-button.register {
  position: relative;
  padding: 10px 20px;
  font-weight: 500;
  font-size: 17px;
  color: #;
  background: transparent;
  border-radius: 15px; /* мягкие углы */
  cursor: pointer;
  z-index: 0;
  overflow: visible;
  border: none;
}

.auth-button.register::before {
  content: "";
  position: absolute;
  top: 1px; bottom: 1px; left: 1px; right: 1px;
  border-radius: 15px; /* чуть больше чем у кнопки, чтобы рамка была с мягкими углами */
  padding: 2px; /* толщина рамки */
  background: linear-gradient(270deg, red, orange, yellow, green, blue, indigo, violet, red);
  background-size: 1400% 1400%;
  animation: rgbGradient 5s linear infinite;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
  transition: all 0.3s ease;
}

.auth-button.register:hover::before {
  top: -6px; bottom: -6px; left: -6px; right: -6px;
  border-radius: 25px;
  padding: 3px;
}

.auth-button.register:hover {
  text-shadow:
    0 0 8px #6f86d6,
    0 0 16px #48c6ef,
    0 0 24px #ff99cc;
  color: #dbdbdb;
  box-shadow: none;
}

@keyframes rgbGradient {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

canvas#bg {
  position: fixed;
  top: 65px;
  left: 0;
  width: 100%;
  height: calc(100% - 65px);
  z-index: 0;
  pointer-events: none;
}