:root {
  --color-primary: #8a2be2;
  --color-dark-bg: #10061e;
  --color-card-bg: #190d30;
  --color-text-light: #ffffff;
  --color-text-muted: #b0a0c9;
  --max-width: 1100px;
  --border-radius-lg: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  background-color: var(--color-dark-bg);
  color: var(--color-text-light);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 60px 0;
}

h1,
h2,
h3 {
  margin-bottom: 20px;
  font-weight: 800;
}

h2 {
  font-size: 2rem;
  color: var(--color-text-light);
  margin-bottom: 40px;
  text-align: center;
}

/* Упрощенные анимации для производительности */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.btn {
  padding: 12px 30px;
  margin: 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  box-shadow: 0 4px 20px rgba(138, 43, 226, 0.4);
}

.btn-primary:hover {
  background-color: #7b1dc9;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-light);
  border: 1px solid var(--color-primary);
}

.btn-secondary:hover {
  background-color: rgba(138, 43, 226, 0.1);
}

.btn-lg {
  padding: 15px 50px;
  font-size: 1.1rem;
  border-radius: 100px;
}

/* Navbar */
.navbar-wrapper {
  position: relative;
  z-index: 100;
  width: 100%;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background: linear-gradient(
    135deg,
    rgba(138, 43, 226, 0.15),
    rgba(16, 6, 30, 0.95)
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(138, 43, 226, 0.2);
  border-radius: 16px;
  max-width: 1200px;
  margin: 25px auto 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  background: none;
  border: none;
  padding: 10px;
}

.hamburger .bar {
  width: 25px;
  height: 3px;
  background-color: var(--color-text-light);
  margin: 3px 0;
  transition: 0.3s;
}

.hamburger.active .bar:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-text-light);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: auto;
  padding: 8px 20px;
  background: linear-gradient(
    135deg,
    rgba(138, 43, 226, 0.1),
    rgba(16, 6, 30, 0.7)
  );
  border-radius: 12px;
  border: 1px solid rgba(138, 43, 226, 0.3);
}

.logo img {
  width: 180px;
  height: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: var(--color-text-light);
  text-decoration: none;
  margin-left: 20px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.3s ease;
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  width: 50%;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.nav-links a:hover {
  color: var(--color-primary);
}

.nav-links a:hover::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

.btn-nav {
  border: 1px solid var(--color-primary);
  padding: 8px 15px;
  border-radius: 5px;
  margin-left: 20px;
}

.btn-nav:hover {
  background-color: rgba(138, 43, 226, 0.2);
}

/* ОПТИМИЗИРОВАННЫЙ ГЛАВНЫЙ БЛОК - без сложных анимаций */
.hero-section {
  position: relative;
  padding: 120px 20px 80px;
  text-align: center;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--color-dark-bg);
  margin-top: -160px;
  padding-top: 200px;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("background.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.5;
  z-index: 0;
  will-change: opacity;
}

/* Упрощенная маска */
.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 30%,
    rgba(16, 6, 30, 0.5) 60%,
    rgba(16, 6, 30, 0.8) 80%,
    var(--color-dark-bg) 100%
  );
  z-index: 1;
}

.hero-section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--color-dark-bg) 100%
  );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-section h1 {
  font-size: 6rem;
  margin-bottom: 30px;
  line-height: 1.1;
  text-shadow: 0 5px 30px rgb(255, 255, 255);
  background: linear-gradient(135deg, #ffffff 0%, #f8f4ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    text-shadow: 0 5px 30px rgba(231, 231, 231, 0.5);
  }
  to {
    text-shadow: 0 5px 40px rgba(231, 231, 231, 0.7),
      0 5px 50px rgba(255, 255, 255, 0.3);
  }
}

.hero-section p {
  font-size: 1.4rem;
  color: var(--color-text-muted);
  margin-bottom: 50px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-10px) translateX(-50%);
  }
  60% {
    transform: translateY(-5px) translateX(-50%);
  }
}

/* About section */
.about-section-wrapper {
  display: block;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.about-section {
  padding-top: 0;
  text-align: left;
}

.about-content-box {
  background-color: var(--color-card-bg);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  padding-top: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  margin-bottom: 30px;
}

.about-content-box h2 {
  text-align: center;
  margin-top: 0;
}

.about-flex {
  display: flex;
  gap: 40px;
  align-items: center;
}

.about-text {
  flex: 1;
}

.about-text .version {
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.features {
  list-style: none;
  padding-left: 0;
  margin-top: 20px;
}

.features li {
  margin-bottom: 10px;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  font-weight: 600;
}

.features svg {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

.about-image {
  flex: 1;
  min-width: 25%;
  height: 400px;
  position: relative;
  overflow: hidden;
}

.about-image img {
  border-radius: var(--border-radius-lg);
  border: 3px solid rgba(138, 43, 226, 0.3);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Features section */
.features-section {
  margin-top: -115px;
}

.feature-cards-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.krug {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  overflow: hidden;
  background-color: #8a2be2;
  border-radius: 50%;
  margin-bottom: 15px;
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
}

.krug svg {
  width: 24px;
  height: 24px;
  color: var(--color-card-bg);
}

.card {
  background-color: var(--color-card-bg);
  padding: 25px;
  border-radius: var(--border-radius-lg);
  text-align: left;
  min-height: 200px;
  border-top: 3px solid var(--color-primary);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.card h3 {
  font-size: 1.25rem;
  color: var(--color-primary);
  margin-bottom: 10px;
  font-weight: 700;
}

.card p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* ОТДЕЛЬНЫЙ БЛОК ДЛЯ ЗАЯВКИ */
#join-application {
  width: 100%;
  padding: 0;
  margin: 0px 0;
}

.join-application-card {
  text-align: center;
  background-color: var(--color-card-bg);
  padding: 80px;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 700px;
  margin: 0 auto;
  border-top: 3px solid var(--color-primary);
}

.join-tagline {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: var(--color-text-muted);
}

.application-process {
  text-align: left;
  max-width: 600px;
  margin: 30px auto 0;
  padding: 20px;
  background-color: rgba(138, 43, 226, 0.1);
  border-radius: var(--border-radius-lg);
}

.application-process h3 {
  color: var(--color-primary);
  margin-bottom: 15px;
}

.application-process ol {
  padding-left: 20px;
  color: var(--color-text-muted);
}

.application-process li {
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Social cards */
.social-card {
  background-color: var(--color-card-bg);
  padding: 25px;
  border-radius: var(--border-radius-lg);
  text-align: left;
  min-height: 200px;
  border-top: 3px solid;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  max-width: 300px;
  margin: 0 auto;
}

.social-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  overflow: hidden;
  border-radius: 50%;
  margin-bottom: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.social-card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.social-card-content {
  margin-bottom: 20px;
}

.social-card-content p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 15px;
  line-height: 1.5;
}

.social-card-button {
  display: block;
  width: 100%;
  padding: 12px;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.social-card-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* Social colors */
.telegram-card {
  border-top-color: #0088cc;
}

.telegram-card h3 {
  color: #0088cc;
}

.telegram-icon {
  background: linear-gradient(135deg, #0088cc, #00a2ff);
}

.telegram-button {
  background: linear-gradient(135deg, #0088cc, #00a2ff);
}

.discord-card {
  border-top-color: #5865f2;
}

.discord-card h3 {
  color: #5865f2;
}

.discord-icon {
  background: linear-gradient(135deg, #5865f2, #7289da);
}

.discord-button {
  background: linear-gradient(135deg, #5865f2, #7289da);
}

.wiki-card {
  border-top-color: #f7b233;
}

.wiki-card h3 {
  color: #f7b233;
}

.wiki-icon {
  background: linear-gradient(135deg, #f7b233, #f9c95c);
}

.wiki-button {
  background: linear-gradient(135deg, #f7b233, #f9c95c);
}

.boosty-card {
  border-top-color: #f15a2c;
}

.boosty-card h3 {
  color: #f15a2c;
}

.boosty-icon {
  background: linear-gradient(135deg, #f15a2c, #ef7829);
}

.boosty-button {
  background: linear-gradient(135deg, #f15a2c, #ef7829);
}

/* Социальные сети - отдельная секция */
.social-section {
  padding: 40px 0 20px;
  margin-bottom: 0;
}

.social-blocks-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.social-blocks-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

/* Coming soon - отдельная секция */
.coming-soon-section {
  padding: 20px 0 40px;
  margin-top: 0;
}

.coming-soon-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.coming-soon-card {
  background-color: var(--color-card-bg);
  padding: 30px;
  border-radius: var(--border-radius-lg);
  text-align: center;
  min-height: 200px;
  border: 2px dashed var(--color-primary);
  opacity: 0.7;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.coming-soon-card:hover {
  opacity: 1;
  transform: translateY(-5px);
  border: 2px solid var(--color-primary);
}

.coming-soon-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  background-color: rgba(138, 43, 226, 0.2);
  border-radius: 50%;
  margin-bottom: 20px;
}

.coming-soon-icon svg {
  width: 30px;
  height: 30px;
  color: var(--color-primary);
}

/* Footer */
.footer-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  background: linear-gradient(
    135deg,
    rgba(138, 43, 226, 0.15),
    rgba(16, 6, 30, 0.95)
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(138, 43, 226, 0.2);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
  margin-top: 40px;
}

.footer-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-text-light);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-links {
  display: flex;
  gap: 30px;
}

.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-copyright {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
  background-color: var(--color-dark-bg);
}

.image-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.5s ease;
  object-fit: cover;
}

.image-layer.active {
  opacity: 1;
  z-index: 2;
}

.image-layer:not(.active) {
  opacity: 0;
  z-index: 1;
}

/* АДАПТИВНОСТЬ */
@media (max-width: 1200px) {
  .feature-cards-container,
  .social-blocks-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .coming-soon-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-section h1 {
    font-size: 5rem;
  }
}

@media (max-width: 992px) {
  .about-flex {
    flex-direction: column;
  }

  .about-image {
    flex: none;
    width: 100%;
    margin-top: 30px;
    height: 450px;
  }

  .hero-section h1 {
    font-size: 4rem;
  }

  .hero-section p {
    font-size: 1.2rem;
  }

  .footer-navbar {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }

  .join-application-card {
    max-width: 90%;
    padding: 40px;
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: row;
    padding: 15px 20px;
    margin: 15px auto 0;
    position: relative;
  }

  .hamburger {
    display: flex;
    order: 2;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(
      135deg,
      rgba(138, 43, 226, 0.15),
      rgba(16, 6, 30, 0.95)
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-top: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    gap: 15px;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    margin-left: 0;
    font-size: 0.9rem;
  }

  .btn-nav {
    margin-top: 10px;
    margin-left: 0;
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  .hero-section h1 {
    font-size: 3rem;
  }

  .hero-section p {
    font-size: 1.1rem;
    padding: 0 15px;
  }

  .feature-cards-container,
  .social-blocks-row,
  .coming-soon-container {
    grid-template-columns: 1fr;
  }

  .about-image {
    height: 300px;
    width: 100%;
  }

  .about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .about-text {
    margin-bottom: 40px;
  }

  .about-content-box {
    padding: 40px 25px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 300px;
    margin: 5px auto;
  }

  .social-card {
    max-width: 100%;
    padding: 20px;
    min-height: 180px;
  }

  .hero-section {
    margin-top: -100px;
    padding-top: 180px;
    min-height: 90vh;
  }

  .join-application-card {
    padding: 30px 20px;
    margin: 50px auto;
  }

  .footer-navbar {
    padding: 15px 20px;
  }

  .footer-links {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .about-section {
    h2 {
      font-size: 2.5rem !important;
    }
  }
  .hero-section h1 {
    font-size: 2.5rem;
  }

  .hero-section p {
    font-size: 1rem;
  }

  .about-content-box h2 {
    font-size: 2.5rem;
  }

  .social-card {
    padding: 20px;
  }

  .about-image {
    height: 350px;
    width: 100%;
  }

  .logo {
    padding: 6px 15px;
  }

  .logo img {
    width: 150px;
  }

  .hero-section {
    margin-top: -120px;
    padding-top: 160px;
    min-height: 85vh;
  }

  .hero-buttons .btn {
    padding: 10px 20px;
  }

  .application-process {
    padding: 15px;
  }

  .join-application-card {
    padding: 25px 15px;
  }

  .join-application-card h2 {
    font-size: 1.8rem;
  }

  .social-section h2,
  .coming-soon-section h2 {
    margin-bottom: 30px;
  }
}

@media (max-width: 360px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section p {
    font-size: 0.95rem;
  }

  .about-content-box h2 {
    font-size: 2rem;
  }

  .logo img {
    width: 120px;
  }

  .nav-links a {
    font-size: 0.85rem;
  }

  .hero-section {
    padding-top: 140px;
  }

  .join-application-card h2 {
    font-size: 1.6rem;
  }

  .about-image {
    height: 200px;
  }
}

/* Оптимизация для мобильных - убираем тяжелые эффекты */
@media (max-width: 768px) {
  .hero-bg {
    background-attachment: scroll !important;
    transform: none !important;
    filter: none !important;
  }

  .hero-section::before,
  .hero-section::after {
    animation: none !important;
  }

  .navbar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
