:root {
  --main-green: #1f8f4e;
  --main-green-dark: #166e3a;
  --light-green: #e9f7ef;
  --accent-blue: #0d6efd;
  --gray-light: #f8f9fa;
  --gray-medium: #6c757d;
  --dark-bg: #0f0f0f;
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.15);
  --transition: all 0.25s ease-in-out;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: #ffffff;
  color: #212529;
  line-height: 1.6;
}

/* Navbar */



/* Hero Section - обновленный */
.hero {
  position: relative;
  height: 90vh;
  min-height: 600px;
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Убрано затемнение (псевдоэлемент ::after удален) */

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end; /* Выравнивание по нижнему краю */
  justify-content: flex-start; /* Выравнивание по левому краю */
  color: white;
  padding-bottom: 80px; /* Отступ от нижнего края */
}

.hero-button-wrapper {
  margin-left: 0; /* Прижимаем к левому краю */
}

/* Custom Button */
.btn-primary-custom {
  background-color: var(--main-green);
  color: white;
  font-weight: 600;
  padding: 14px 36px;
  border-radius: 50px;
  border: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: var(--transition);
  font-size: 1.2rem;
  letter-spacing: 0.3px;
}

.btn-primary-custom:hover {
  background-color: var(--main-green-dark);
  color: white;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.btn-main {
  background: var(--main-green);
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 50px;
  font-weight: 500;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-main:hover {
  background: var(--main-green-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-outline-main {
  background: transparent;
  color: var(--main-green);
  border: 2px solid var(--main-green);
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 500;
  transition: var(--transition);
}

.btn-outline-main:hover {
  background: var(--main-green);
  color: white;
}

/* Sections */
.section {
  padding: 80px 20px;
}

.section-light {
  background: var(--light-green);
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  font-weight: 700;
  font-size: 2.3rem;
  color: var(--main-green-dark);
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--main-green);
  border-radius: 2px;
}

/* Cards */
.card-custom {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  background: white;
}

.card-custom:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.card-custom .card-body {
  padding: 1.8rem 1.5rem;
}

.card-custom .card-title {
  font-weight: 700;
  color: var(--main-green-dark);
  margin-bottom: 0.75rem;
}

.card-img-top {
  height: 220px;
  object-fit: cover;
}

.game-card {
  border: 1px solid rgba(0,0,0,0.05);
}

.game-card .card-body i {
  color: var(--main-green);
  margin-bottom: 10px;
}

/* Feedback Form */
.feedback-form {
  background: white;
  border-radius: 30px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.03);
}

.feedback-form .form-control,
.feedback-form .form-control-lg {
  border: 2px solid #e9ecef;
  border-radius: 16px;
  padding: 12px 20px;
  font-size: 1rem;
  transition: var(--transition);
}

.feedback-form .form-control:focus {
  border-color: var(--main-green);
  box-shadow: 0 0 0 4px rgba(31, 143, 78, 0.15);
  outline: none;
}

/* Footer */
footer {
  background: var(--dark-bg);
  color: #adb5bd;
  padding: 60px 20px 30px;
}

.footer-logo {
  height: 60px;
  object-fit: contain;
}

footer h6 {
  color: white;
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 1.1rem;
}

footer ul {
  padding-left: 0;
}

footer li {
  margin-bottom: 10px;
}

footer a {
  color: #adb5bd;
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}

footer a:hover {
  color: white;
  transform: translateX(3px);
}

.social-icons a {
  font-size: 26px;
  margin-right: 18px;
  display: inline-block;
  color: #adb5bd;
  transition: var(--transition);
}

.social-icons a:hover {
  color: white;
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid #222;
  margin-top: 50px;
  padding-top: 25px;
  text-align: center;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
      min-height: 500px;
  }
  .hero-content {
      padding-bottom: 40px;
      padding-left: 20px;
  }
  .btn-primary-custom {
      padding: 12px 28px;
      font-size: 1rem;
  }
  .section {
      padding: 60px 15px;
  }
  .section-title {
      font-size: 2rem;
  }
  .card-img-top {
      height: 180px;
  }
}

/* Личный кабинет (добавлено) */
.cabinet-menu {
  background: #f1f1f1;
  padding: 10px;
  border-radius: 12px;
}

.cabinet-btn {
  width: 100%;
  padding: 15px;
  margin-bottom: 8px;
  border: none;
  background: #ddd;
  font-size: 18px;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition);
}

.cabinet-btn.active,
.cabinet-btn:hover {
  background: #2f8f2f;
  color: white;
}


.navbar {
  transition: all 0.3s ease;
  padding: 15px 0;
  background: var(--main-green); /* Стандартный цвет для внутренних страниц */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Прозрачная шапка для главной страницы */
.navbar-transparent {
  background: transparent !important;
  box-shadow: none;
  position: absolute;
  width: 100%;
  z-index: 1000;
}

/* Эффект стекла при скролле для главной */
.navbar-transparent.navbar-scrolled {
  background: rgba(31, 143, 78, 0.9) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Логотип */
.navbar-brand {
  padding: 0;
  margin-right: 30px;
}

.logo-img {
  height: 50px;
  width: auto;
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.05);
}

/* Навигационное меню */
.navbar-nav {
  gap: 5px;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-weight: 500;
  font-size: 1rem;
  padding: 10px 16px !important;
  color: rgba(255, 255, 255, 0.9) !important;
  transition: all 0.3s ease;
  border-radius: 50px;
}

.nav-link:hover {
  color: white !important;
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* Активный пункт меню */
.nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  color: white !important;
  font-weight: 600;
}

/* Индикатор под активным пунктом (для главной) */
.navbar-transparent .nav-link::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: white;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.navbar-transparent .nav-link.active::after,
.navbar-transparent .nav-link:hover::after {
  width: 30px;
}

/* Кнопка входа/регистрации */
.btn-auth {
  background: white;
  color: var(--main-green) !important;
  font-weight: 600;
  padding: 10px 24px !important;
  border-radius: 50px;
  margin-left: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease !important;
}

.btn-auth:hover {
  background: var(--light-green);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.btn-auth i {
  margin-right: 8px;
  font-size: 1.1rem;
}

/* Кнопка регистрации (зеленая на белом фоне) */
.btn-register {
  background: var(--main-green);
  color: white !important;
  border: 2px solid white;
}

.btn-register:hover {
  background: var(--main-green-dark);
  border-color: var(--main-green-dark);
}

/* Кнопка выхода (для личного кабинета) */
.btn-logout {
  background: rgba(255, 255, 255, 0.2);
  color: white !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Тогглер для мобильного меню */
.navbar-toggler {
  border: 2px solid white;
  padding: 8px 12px;
  border-radius: 12px;
}

.navbar-toggler:focus {
  box-shadow: none;
  outline: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Мобильное меню */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: var(--main-green);
    border-radius: 20px;
    padding: 20px;
    margin-top: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  }
  
  .navbar-transparent .navbar-collapse {
    background: rgba(31, 143, 78, 0.95);
    backdrop-filter: blur(10px);
  }
  
  .nav-link {
    text-align: center;
    padding: 12px !important;
  }
  
  .btn-auth {
    margin: 10px 0 0 0;
    text-align: center;
    display: block;
  }
  
  .navbar-transparent .nav-link::after {
    display: none;
  }
}

/* Анимация появления меню */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar-collapse.show {
  animation: slideDown 0.3s ease forwards;
}

/* Стили для слайдера */
.hero-slider {
    position: relative;
    height: 90vh;
    min-height: 600px;
    overflow: hidden;
}

.carousel, .carousel-inner, .carousel-item {
    height: 100%;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.carousel-caption {
    position: absolute;
    bottom: 30%;
    left: 0;
    right: 0;
    text-align: left;
    background: linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
    padding: 50px;
}

.carousel-caption .container {
    max-width: 600px;
}

.slide-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    animation: slideInLeft 0.8s ease;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.slide-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    animation: slideInLeft 0.8s ease 0.2s both;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.carousel-caption .btn {
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* Индикаторы (точечки) */
.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 8px;
    background-color: white;
    opacity: 0.5;
}

.carousel-indicators button.active {
    opacity: 1;
    background-color: var(--main-green);
}

/* Стрелки навигации */
.carousel-control-prev, .carousel-control-next {
    width: 5%;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: rgba(0,0,0,0.3);
    border-radius: 0 8px 8px 0;
}

.hero-slider:hover .carousel-control-prev,
.hero-slider:hover .carousel-control-next {
    opacity: 0.7;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1 !important;
    background: rgba(0,0,0,0.5);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 40px;
    height: 40px;
}

/* Анимации */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .hero-slider {
        height: 70vh;
        min-height: 500px;
    }
    
    .carousel-caption {
        bottom: 20%;
        padding: 30px;
    }
    
    .slide-title {
        font-size: 1.8rem;
    }
    
    .slide-subtitle {
        font-size: 1rem;
    }
    
    .carousel-control-prev, .carousel-control-next {
        opacity: 0.5;
    }
}