/* ======= Общие стили ======= */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: #0b0c10;
  color: #fff;
  overflow-x: hidden;
}

.container {
  width: 90%;
  margin: 0 auto;
}

/* ======= Шапка ======= */
header {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 40px;
  max-width: 1300px;
  margin: 0 auto;
}

/* ======= Логотип ======= */
.logo-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 0.9;
  user-select: none;
}

.logo-main {
  font-family: 'Cinzel', serif;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #ffb347 0%, #ff8008 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 8px #8b2e00, 0 0 15px #5c0b00;
}

.logo-sub {
  font-family: 'Cinzel', serif;
  font-size: clamp(10px, 1.5vw, 16px);
  font-weight: 600;
  color: #ffc36a;
  text-shadow: 0 0 8px #5c0b00;
}

/* ======= Меню ======= */
nav {
  display: flex;
  align-items: center;
}

.menu {
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
}

.menu li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.menu li a:hover {
  color: #f22c2c;
}

.cabinet-btn {
  background: #f22c2c;
  padding: 8px 16px;
  border-radius: 8px;
  color: #fff !important;
  transition: background 0.3s;
}

.cabinet-btn:hover {
  background: #b31010;
}

/* ======= Бургер ======= */
.menu-toggle {
  display: none;
  font-size: 30px;
  color: #fff;
  cursor: pointer;
  user-select: none;
}

/* ======= Hero Section ======= */
.hero {
  height: 100vh;
  background: url('img/bg.png') no-repeat center center/cover;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 0 20px;
}

.overlay {
  background: rgba(0, 0, 0, 0.6);
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0; left: 0;
}

.hero-content {
  z-index: 2;
  max-width: 800px;
}

.hero h1 {
  font-size: clamp(32px, 6vw, 60px);
  color: #fff;
  margin-bottom: 20px;
  text-transform: uppercase;
  line-height: 1.2;
}

.hero p {
  font-size: clamp(16px, 2.2vw, 20px);
  color: #ddd;
  margin-bottom: 30px;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 40px;
}

.btn-primary,
.btn-secondary {
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: bold;
  text-transform: uppercase;
  transition: 0.3s;
}

.btn-primary {
  background: #f22c2c;
  color: #fff;
}

.btn-primary:hover {
  background: #a50e0e;
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
}

.btn-secondary:hover {
  background: #fff;
  color: #000;
}

.players-count {
  font-size: 18px;
  background: rgba(0,0,0,0.6);
  display: inline-block;
  padding: 10px 20px;
  border-radius: 10px;
  color: #00ff7f;
  font-weight: bold;
}

/* ======= Servers Section ======= */
.servers {
  padding: 100px 0;
  background: #111;
  text-align: center;
}

.servers h2 {
  color: #f22c2c;
  margin-bottom: 50px;
  font-size: clamp(24px, 4vw, 36px);
}

.server-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.server-card {
  background: #1b1b1b;
  border-radius: 12px;
  padding: 25px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.server-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 15px rgba(242,44,44,0.4);
}

/* ======= About Section ======= */
.about {
  padding: 100px 0;
  background: #0b0c10;
  text-align: center;
}

.about h2 {
  color: #f22c2c;
  font-size: clamp(24px, 4vw, 36px);
  margin-bottom: 20px;
}

.about p {
  font-size: clamp(14px, 2vw, 18px);
  max-width: 800px;
  margin: auto;
  line-height: 1.6;
  color: #ddd;
  padding: 0 15px;
}

/* ======= Footer ======= */
footer {
  background: #000;
  text-align: center;
  padding: 20px 0;
  color: #777;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: clamp(12px, 2vw, 16px);
}

/* ======= Адаптивное меню ======= */
@media (max-width: 900px) {
  .header-content {
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 12px 25px;
  }

  .menu {
    display: none;
    position: absolute;
    top: 70px;
    right: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 25px 0;
    gap: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  .menu.active {
    display: flex;
    animation: slideDown 0.4s ease;
  }

  .menu li {
    width: 100%;
    text-align: center;
  }

  .menu li a {
    display: inline-block;
    width: 80%;
    padding: 10px 0;
    border-radius: 8px;
    font-size: 18px;
    transition: background 0.3s;
  }

  .menu li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f22c2c;
  }

  .cabinet-btn {
    display: inline-block;
    width: 80%;
    text-align: center;
  }

  .menu-toggle {
    display: block;
  }
}

/* ======= Дополнительная адаптивность ======= */
@media (max-width: 600px) {
  .hero-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .btn-primary, .btn-secondary {
    width: 90%;
  }

  .server-list {
    grid-template-columns: 1fr;
  }

  .menu li a {
    font-size: 20px;
  }
}

/* ======= Анимация выпадения меню ======= */
@keyframes slideDown {
  from {opacity: 0; transform: translateY(-10px);}
  to {opacity: 1; transform: translateY(0);}
}

/* ======= Модальные окна (Авторизация / Регистрация) ======= */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
  animation: fadeIn .3s ease;
}

.modal-content {
  background: rgba(20, 20, 20, .92);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  padding: 45px 35px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  animation: popup .4s ease;
  box-shadow: 0 0 35px rgba(255,0,0,0.25);
}


.modal-content h2 {
  color: #f22c2c;
  font-family: 'Cinzel', serif;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.auth-form input {
  width: 84%;
  margin: 0 auto 15px;  /* <== ЦЕНТРОВКА */
  display: block;       /* <== ЧТОБЫ margin работал */
  
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 15px;
  transition: 0.3s;
}

.auth-form input:focus {
  border-color: #f22c2c;
  box-shadow: 0 0 8px rgba(242,44,44,0.5);
}

.auth-form button {
  width: 90%;
  padding: 12px;
  background: #f22c2c;
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.auth-form button:hover {
  background: #b31010;
  transform: translateY(-2px);
}

.modal a {
  color: #ffb347;
  text-decoration: none;
  transition: color 0.3s;
}

.modal a:hover {
  color: #fff;
}

.close-btn {
  top: 12px;
  right: 12px;
  font-size: 30px;
  color: #f22c2c;
  transition: .25s;
}

.close-btn:hover {
  transform: rotate(90deg) scale(1.2);
  color: #ff4747;
}

/* ======= Анимации ======= */
@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

@keyframes popup {
  from { transform: translateY(20px) scale(.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}