:root {
  --accent: #6366f1;
  --accent2: #818cf8;
  transition: --accent 1.5s ease, --accent2 1.5s ease;
}

html {
  scroll-behavior: smooth;
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: #18181b;
  color: #f8f9fa;
  min-height: 100vh;
  overflow-x: hidden;
  background: radial-gradient(circle at 8% 12%, rgba(99,102,241,.1), transparent 10%),
              radial-gradient(circle at 92% 88%, rgba(129,140,248,.07), transparent 12%),
              linear-gradient(180deg, #060607 0%, #0e0f11 60%, #0b0b0c 100%);
}

body::before,
body::after {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .4;
  animation: float 12s infinite ease-in-out alternate;
  transition: background 1.5s ease;
}

body::before { background: var(--accent); top: -50px; left: -75px; }
body::after { background: var(--accent2); bottom: -60px; right: -60px; animation-delay: 4s; }

@keyframes float { to { transform: translate(15px, -25px); } }

.top-btn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  background: 0 0;
  border: none;
  color: var(--accent);
  z-index: 10;
  transition: transform .3s, color 1.5s ease;
  min-width: 44px;
  min-height: 44px;
}

.top-btn:hover,
.top-btn:active { transform: scale(1.2); }

.logo {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 700;
  transition: color 1.5s ease;
}

.hero {
  min-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  box-sizing: border-box;
}

.container {
  max-width: 380px;
  width: 100%;
  padding: 1.5rem;
  border-radius: 1.25rem;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 24px rgba(0,0,0,.2);
  margin: 0 auto;
}

h1 {
  font-size: 3rem;
  margin: 0 0 2rem;
  font-weight: 700;
  background: linear-gradient(270deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientMove 6s infinite linear;
  transition: background 1.5s ease;
}

@keyframes gradientMove { to { background-position: 100%; } }

#countdown {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1.25rem;
  color: var(--accent2);
  transition: color 1.5s ease;
}

#countdown.celebrate {
  color: #fff;
  text-shadow: 0 0 15px rgba(99,102,241,.6);
}

#hurry {
  font-size: 1rem;
  color: #e5e7eb;
  opacity: .9;
  margin: 0;
  line-height: 1.5;
}

.menu-buttons {
  display: flex;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
  position: absolute;
  bottom: 2rem; /* Added margin-bottom for visibility */
  left: 0;
  right: 0;
  padding: 0 1.5rem 3rem;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: .65rem 1.25rem;
  border-radius: .65rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.3);
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: background .3s, color 1.5s ease, transform .3s;
  min-width: 100px;
  min-height: 44px;
  text-align: center;
}

.btn span {
  flex: 1;
  text-align: center;
}

.btn svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
  transition: fill 1.5s ease;
}

.btn:hover,
.btn:active {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px) scale(1.05);
}

.down-anchor {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
}

.down-btn {
  background: 0 0;
  border: none;
  color: var(--accent);
  cursor: pointer;
  transition: color 1.5s ease, transform .3s;
  min-width: 44px;
  min-height: 44px;
}

.down-btn svg {
  width: 32px;
  height: 32px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.down-btn:hover,
.down-btn:active { color: #fff; }

#features, #socials {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem 1rem;
  background: rgba(255,255,255,.04);
  border-radius: 1rem;
  backdrop-filter: blur(8px);
  text-align: center;
  box-sizing: border-box;
}

.features-intro {
  font-size: 1rem;
  color: #e5e7eb;
  opacity: .9;
  margin: 0.5rem 0 2rem;
  line-height: 1.5;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.feature {
  background: rgba(255,255,255,.05);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(255,255,255,.1);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .5s ease, transform .5s ease, box-shadow .3s ease;
  box-sizing: border-box;
}

.feature.show {
  opacity: 1;
  transform: translateY(0);
}

.feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,.3);
  background: linear-gradient(135deg, rgba(255,255,255,.05), rgba(99,102,241,.1));
}

.feature h3 {
  margin: 0 0 .5rem;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.25rem;
  font-weight: 700;
}

.feature p {
  margin: 0;
  color: #d1d5db;
  font-size: .95rem;
  line-height: 1.4;
}

@media (min-width: 769px) {
  #features .features-grid {
    grid-template-columns: repeat(3, minmax(260px, 300px));
  }
  #features .features-grid .feature {
    width: 100%;
    box-sizing: border-box;
  }
  #features {
    width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  font-size: .85rem;
  background: rgba(255,255,255,.05);
  border-top: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(6px);
  font-weight: 500;
}

.lang-switch {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.08);
  border-radius: 1.25rem;
  overflow: hidden;
}

.lang-btn {
  padding: .3rem .75rem;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: .8rem;
  background: 0 0;
  color: #aaa;
  transition: background .3s, color 1.5s ease;
  min-width: 44px;
  min-height: 36px;
}

.lang-btn.active {
  background: var(--accent);
  color: #fff;
}

.side-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(80vw, 300px);
  height: 100%;
  background: rgba(24,24,27,.95);
  backdrop-filter: blur(8px);
  box-shadow: -4px 0 15px rgba(0,0,0,.5);
  transition: right .4s ease;
  padding: 1.5rem;
  z-index: 20;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.side-menu.open { right: 0; }

.side-menu ul {
  list-style: none;
  padding: 0;
  margin: 3rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.side-menu li {
  opacity: 0;
  transform: translateX(20px);
  transition: opacity .3s ease, transform .3s ease;
  transition-delay: calc(0.1s * var(--index));
}

.side-menu.open li {
  opacity: 1;
  transform: translateX(0);
}

.side-menu a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  transition: color 1.5s ease, background .3s ease;
}

.side-menu a:hover,
.side-menu a:focus { background: rgba(255,255,255,.1); color: #fff; }

.side-menu p {
  margin: 0 0 1rem 1rem;
  font-size: 0.9rem;
  color: #ddd;
}

.close-btn {
  background: 0 0;
  border: none;
  color: var(--accent);
  font-size: 1.8rem;
  cursor: pointer;
  position: absolute;
  top: .75rem;
  right: .75rem;
  transition: color 1.5s ease, transform .3s;
  min-width: 44px;
  min-height: 44px;
}

.close-btn:hover,
.close-btn:focus { transform: rotate(90deg); color: #fff; }

#socials h2 { font-size: 1.8rem; margin-bottom: 1.5rem; }

.socials-grid {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-btn { color: var(--accent2); }

@media (max-width: 768px) {
  body::before, body::after { width: 150px; height: 150px; filter: blur(40px); animation: none; }
  .hero { min-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding: 1rem; }
  h1 { font-size: 1.6rem; }
  #countdown { font-size: .9rem; }
  .container { padding: 1rem; margin: 0 .75rem; }
  .btn { padding: .5rem 1rem; font-size: .85rem; min-width: 90px; }
  .btn svg { width: 16px; height: 16px; }
  .down-btn svg { width: 28px; height: 28px; }
  .features-grid { grid-template-columns: 1fr; }
  .feature { padding: 1rem; }
  .feature h3 { font-size: 1.1rem; }
  .feature p { font-size: .9rem; }
  .features-intro { font-size: .95rem; }
  footer { flex-direction: column; gap: .5rem; font-size: .75rem; text-align: center; }
  .side-menu { padding: 1rem; }
  .side-menu a { font-size: 1.1rem; padding: 0.5rem 0.75rem; }
  .close-btn { font-size: 1.6rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.4rem; }
  .container { padding: .75rem; margin: 0 .5rem; }
  .btn { padding: .4rem .8rem; font-size: .8rem; min-width: 80px; }
  .down-btn svg { width: 24px; height: 24px; }
  .features-intro { font-size: .9rem; }
}

.pre-reg {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

.pre-reg-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #111;
  color: var(--accent); /* ← заменили белый на переменную цвета */
  fill: currentColor;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.25s, transform 0.25s, color 1.5s ease; /* добавили плавный переход цвета */
}

.pre-reg-btn:hover {
  background: #222;
  transform: translateY(-2px);
  color: var(--accent2); /* можно поменять на второй цвет при наведении */
}

.pre-reg-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: currentColor;
  transition: fill 1.5s ease; /* чтобы и иконка меняла цвет вместе с текстом */
}
