@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

:root {
  --main-font: 'Inter', sans-serif;
  --main-color: #F0C75E;
  --background-color: #1B1B1B;
  --white-color: #D8D0C1; 
  --black-color: #0E0E0E;
  --description-color: #746A5A;

  --green-color: #4A734D;
  --ip-copied-background: rgba(74, 115, 77, 0.17);
  --ip-copied-icon-background: rgba(74, 115, 77, 0.5);

  --copy-ip-button-background: rgba(139, 30, 63, 0.7);
  --how-to-join-button-background: rgba(116, 106, 90, 0.2);
  --stats-background: rgba(116, 106, 90, 0.05); 
  --stat-icon-background-2: rgba(139, 30, 63, 0.5); 

  --scroll-bar: rgba(116, 106, 90, 0.3); 
  --scroll-bar-hover: #5B534A;

  --red-color: #C72C41; 
  --warning-background: rgba(199, 44, 65, 0.17); 
  --warning-icon-background: rgba(199, 44, 65, 0.5);
  --warning-color: #B0525E; 

  --default-rank-color: rgba(210, 208, 208, 0.3);
}

body {
  background: var(--background-color);
  font-family: var(--main-font);
  color: var(--white-color);
}

/* ========== NAVBAR ========== */
.navbar {
  display: flex;
  width: 100%;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 20px 150px;
  background: var(--background-color);
  transition: 0.3s ease-in-out;
  position: relative;
  z-index: 1000;
}

.navbar a {
  text-decoration: none;
}

.navbar .menu-mobile {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.navbar .menu-mobile .logo {
  display: flex;
  flex-direction: row;
  justify-content: left;
  align-items: center;
  gap: 10px;
}

.navbar .menu-mobile .logo img {
  max-width: 40px;
  height: auto;
}

.rounded-logo {
  border-radius: 8px !important;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.rounded-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(240, 199, 94, 0.3);
}

.navbar .menu-mobile .logo h3 {
  color: var(--white-color);
  font-weight: 900;
  font-size: 20px;
}

/* Гамбургер меню - всегда видимый и кликабельный */
.navbar .menu-mobile .hamburger {
  color: var(--white-color);
  font-size: 28px;
  cursor: pointer;
  transition: 0.3s;
  display: none;
  padding: 10px;
  z-index: 1001;
}

.navbar .menu-mobile .hamburger:hover {
  opacity: 0.8;
  transform: scale(1.1);
}

.navbar .links {
  display: flex;
  flex-direction: row;
  gap: 30px;
  align-items: center;
  transition: all 0.3s ease-in-out;
}

/* ОСНОВНЫЕ СТИЛИ ДЛЯ ССЫЛОК */
.navbar .links .link {
  color: var(--description-color);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
  line-height: normal;
  padding: 8px 0;
  display: inline-block;
}

/* БАЗОВАЯ ЛИНИЯ ДЛЯ ВСЕХ ССЫЛОК */
.navbar .links .link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  height: 3px;
  background: var(--main-color);
  border-radius: 3px;
  transition: width 0.3s ease, left 0.3s ease;
}

/* АКТИВНАЯ ССЫЛКА - линия на всю ширину */
.navbar .links .link.active::after {
  width: 100%;
  left: 0;
}

/* ГЛАВНАЯ - при наведении линия слева направо */
.navbar .links a[href="index.html"]:not(.active)::after,
.navbar .links a[href="#"]:not(.active)::after {
  width: 0;
  left: 0;
}

.navbar .links a[href="index.html"]:not(.active):hover::after,
.navbar .links a[href="#"]:not(.active):hover::after {
  width: 100%;
  left: 0;
}

/* ПРАВИЛА - при наведении линия из центра */
.navbar .links a[href="rules.html"]:not(.active)::after {
  width: 0;
  left: 50%;
  transform: translateX(-50%);
}

.navbar .links a[href="rules.html"]:not(.active):hover::after {
  width: 100%;
  left: 50%;
  transform: translateX(-50%);
}

/* КОМАНДА - при наведении линия справа налево */
.navbar .links a[href="admin-team.html"]:not(.active)::after {
  width: 0;
  right: 0;
  left: auto;
}

.navbar .links a[href="admin-team.html"]:not(.active):hover::after {
  width: 100%;
  right: 0;
  left: auto;
}

/* Цвет текста при наведении */
.navbar .links .link:not(.active):hover {
  color: var(--white-color);
}

/* КНОПКА */
.nav-button {
  background-color: #f0c75e;
  border: none;
  color: #1a1a1a;
  padding: 8px 24px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-button:hover {
  background-color: #ffd966;
  transform: scale(1.05);
}

/* ========== FOOTER ========== */
#footer {
  padding: 20px 150px;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  background: var(--stats-background);
}

#footer p {
  color: var(--description-color);
  font-size: 17px;
}

#footer p span {
  color: var(--white-color);
}

#footer .social-links {
  display: flex;
  flex-direction: row;
  gap: 15px;
}

#footer .social-links .link {
  color: var(--description-color);
  text-decoration: none;
  font-size: 20px;
  transition: 0.2s;
}

#footer .social-links .link:hover {
  color: var(--white-color);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: var(--stats-background);
}

::-webkit-scrollbar-thumb {
  background: var(--scroll-bar);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-bar-hover);
}

/* ========== OTHER ========== */
section:not(#header) .content {
  padding: 90px 150px;
  width: 100%;
}

/* ========== RESPONSIVE ========== */
@media screen and (max-width: 1625px) {
  .navbar {
    padding: 20px 90px;
  }
  
  #footer {
    padding: 20px 90px;
  }
  
  section:not(#header) .content {
    padding: 90px;
  }
}

@media screen and (max-width: 1000px) {
  .navbar .links {
    gap: 20px;
  }
  
  .nav-button {
    padding: 6px 16px;
    font-size: 14px;
  }
}

/* ========== МОБИЛЬНОЕ МЕНЮ ========== */
@media screen and (max-width: 867px) {
  .navbar {
    flex-direction: column;
    padding: 15px 20px;
    max-height: 70px;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
  }

  .navbar.active {
    max-height: 400px;
  }

  .navbar .menu-mobile {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .navbar .menu-mobile .hamburger {
    display: block !important; /* Принудительно показываем */
  }

  .navbar .links {
    flex-direction: column;
    width: 100%;
    opacity: 1;
    visibility: visible;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, margin 0.3s ease;
    margin-top: 0;
    gap: 15px;
    align-items: flex-start;
  }

  .navbar.active .links {
    max-height: 300px;
    margin-top: 20px;
  }
  
  .nav-button {
    width: 100%;
    text-align: center;
  }
  
  /* На мобильных отключаем все анимации линий для простоты */
  .navbar .links .link::after {
    display: none;
  }
  
  .navbar .links .link.active {
    color: var(--main-color);
  }
}

@media screen and (max-width: 819px) {
  .navbar {
    padding: 15px 20px;
  }
  
  #footer {
    padding: 20px 30px;
  }
  
  section:not(#header) .content {
    padding: 50px 30px;
  }
}

@media screen and (max-width: 564px) {
  #footer {
    flex-direction: column;
    gap: 30px;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
}