* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Arial', sans-serif;
}

body {
  background-color: #000;
  color: #fff;
  overflow-x: hidden;
}

/* Шапка */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 160px;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  border-bottom: 1px solid #333;
}

.header-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  z-index: 2; /* <-- добавлено */
}

.button-wrapper {
  width: 100%;
  max-width: 150px;
  display: flex;
  justify-content: center;
}

.header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-top: 10px;
  padding-bottom: 10px;
  flex-shrink: 0;
  min-width: 0;
  z-index: 1;
}

.header-gif {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
}

.header-gif img {
  max-height: 100%;
  width: auto;
  height: 100%;
}

.header-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0;
}

/* Кнопки */
.cta-button {
  display: inline-block;
  height: 50px;
  padding: 0 30px;
  background: #ff6600;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 30px;
  line-height: 50px;
  text-align: center;
  transition: all 0.3s ease;
}

.cta-button:hover {
  background: #ff4500;
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(255, 102, 0, 0.4);
}

.purple-button {
  background: #8000ff;
}

.purple-button:hover {
  background: #5e00c0;
  box-shadow: 0 5px 15px rgba(128, 0, 255, 0.4);
}

/* Пульсирующее сияние */
.glow {
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.6);
  }
  100% {
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
  }
}

/* Видео */
.video-container {
  position: fixed;
  top: 160px;
  left: 0;
  width: 100%;
  height: calc(100vh - 160px);
  overflow: hidden;
  z-index: -1;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* Тексты поверх видео */
.text-overlay {
  position: absolute;
  top: 160px;
  left: 0;
  width: 100%;
  height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.text-block {
  position: absolute;
  width: 100%;
  text-align: center;
  font-size: 3rem;
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
  padding: 0 20px;
  opacity: 0;
  animation-fill-mode: forwards;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-up {
  animation: fadeInUp 2s ease forwards;
  animation-delay: 1s;
}

.animate-down {
  animation: fadeInDown 2s ease forwards;
  animation-delay: 1s;
}

.top-text {
  top: 15%;
}

.bottom-text {
  top: 50%;
}

.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 160px;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* Подвал */
footer {
  padding: 2rem;
  background-color: rgba(0, 0, 0, 0.8);
  text-align: center;
  position: relative;
  z-index: 1;
  margin-top: calc(100vh - 160px);
}

footer h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contact-text {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

input, textarea {
  width: 100%;
  padding: 10px 15px;
  font-size: 1rem;
  border-radius: 10px;
  border: none;
}

button {
  padding: 10px 30px;
  font-size: 1rem;
  background: #ff6600;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background: #ff4500;
  transform: scale(1.05);
}

/* Адаптивность */
@media (max-width: 768px) {
  header {
    flex-direction: row;
    flex-wrap: nowrap;
    height: auto;
    justify-content: space-between;
  }

  .header-side,
  .header-center {
    flex: 1;
    min-width: 0;
    padding: 5px;
  }

  .button-wrapper {
    max-width: 120px;
    z-index: 2; /* <- ключевой момент */
  }

  .cta-button {
    font-size: 0.9rem;
    height: 45px;
    line-height: 45px;
    padding: 0 20px;
  }

  .header-gif {
    height: 80px;
  }

  .header-title {
    font-size: 1.4rem;
  }

  .text-block {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .button-wrapper {
    max-width: 100px;
  }

  .cta-button {
    font-size: 0.8rem;
    padding: 0 15px;
  }

  .header-title {
    font-size: 1.2rem;
  }

  .text-block {
    font-size: 1.5rem;
  }
}
