/* ============================================
   ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ ШАПКИ
   ============================================ */

/* Контейнер */
.container-header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Верхняя панель */
.header_top {
    background: linear-gradient(135deg, #23242a 0%, #2a2b33 100%);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    padding: 0;
}

.header_top .container-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
}

/* Мобильные кнопки */
.header_mobile_btns {
    display: none;
}

.header_mobile_btns button {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.header_mobile_btns button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Основное меню */
.main_nav ul {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link i {
    font-size: 16px;
}

.nav-link:hover {
    background: rgba(73, 181, 69, 0.2);
    text-decoration: none;
    transform: translateY(-2px);
}

.nav-link--highlight {
    background: linear-gradient(135deg, #2bb42b 0%, #49b545 100%);
}

.nav-link--highlight:hover {
    background: linear-gradient(135deg, #49b545 0%, #5cc55f 100%);
    box-shadow: 0 4px 12px rgba(73, 181, 69, 0.4);
}

.nav-link--boosty:hover {
    background: rgba(241, 95, 44, 0.2);
}

/* Правая часть */
.header_right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 13px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.lang-switch:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

.nav_profile,
.nav_cats {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #2bb42b 0%, #49b545 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav_profile:hover,
.nav_cats:hover {
    background: linear-gradient(135deg, #49b545 0%, #5cc55f 100%);
    box-shadow: 0 4px 12px rgba(73, 181, 69, 0.4);
    transform: translateY(-2px);
}

.mobile-only {
    display: none;
}

/* Баннер */
.header_banner {
    margin-top: 60px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1e1f24 0%, #2a2b33 100%);
}

.header_banner_overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(30, 31, 36, 0.3) 0%, 
        rgba(42, 43, 51, 0.6) 100%);
    z-index: 1;
}

.header_banner_content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 15px;
}

.logo {
    display: block;
    max-width: 100%;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 1200px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Поиск */
.header_search {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px 0;
    border-bottom: 3px solid #49b545;
}

.search-form {
    max-width: 900px;
    margin: 0 auto;
}

.search-wrapper {
    display: flex;
    gap: 12px;
    align-items: stretch;
    flex-wrap: wrap;
}

.search-input-group {
    flex: 1;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 18px;
    color: #6c757d;
    font-size: 18px;
    pointer-events: none;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 14px 50px 14px 50px;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
}

.search-input:focus {
    outline: none;
    border-color: #49b545;
    box-shadow: 0 0 0 4px rgba(73, 181, 69, 0.1);
}

.search-clear {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-clear:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

.search-buttons {
    display: flex;
    gap: 10px;
}

.btn-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #2bb42b 0%, #49b545 100%);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #49b545 0%, #5cc55f 100%);
    box-shadow: 0 6px 20px rgba(73, 181, 69, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #fff;
    color: #49b545;
    border: 2px solid #49b545;
}

.btn-secondary:hover {
    background: #49b545;
    color: #fff;
    transform: translateY(-2px);
}

.search-tips {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 15px;
    background: rgba(73, 181, 69, 0.1);
    border-left: 3px solid #49b545;
    border-radius: 6px;
    font-size: 13px;
    color: #495057;
}

.search-tips i {
    color: #f1c40f;
    font-size: 16px;
}

/* Слайдер */
.header_slider {
    background: #fff;
    padding: 30px 0;
    border-bottom: 1px solid #e9ecef;
}

.slider-header {
    margin-bottom: 20px;
}

.slider-title {
    font-size: 24px;
    font-weight: 700;
    color: #23242a;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.slider-title i {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 1024px) {
    .nav-link span {
        display: none;
    }
    
    .nav-link {
        padding: 10px 12px;
    }
}

@media (max-width: 768px) {
    .header_mobile_btns {
        display: block;
    }
    
    .main_nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: #23242a;
        padding: 80px 20px 20px;
        transition: left 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }
    
    .main_nav.open_panel {
        left: 0;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }
    
    .main_nav ul {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .nav-link {
        width: 100%;
        padding: 14px 18px;
    }
    
    .nav-link span {
        display: inline;
    }
    
    .lang-switch span,
    .nav_profile span {
        display: none;
    }
    
    .mobile-only {
        display: flex;
    }
    
    .search-wrapper {
        flex-direction: column;
    }
    
    .search-buttons {
        width: 100%;
    }
    
    .btn-search {
        flex: 1;
        justify-content: center;
    }
    
    .btn-search span {
        display: none;
    }
    
    .header_banner {
        margin-top: 55px;
    }
    
    .logo img {
        border-radius: 6px;
    }
    
    .slider-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .header_top .container-header {
        padding: 10px 12px;
    }
    
    .search-input {
        padding: 12px 45px 12px 45px;
        font-size: 14px;
    }
    
    .header_search {
        padding: 20px 0;
    }
    
    .header_slider {
        padding: 20px 0;
    }
    
    .slider-title {
        font-size: 18px;
    }
}

/* Overlay для мобильного меню */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.nav-overlay.active {
    display: block;
}

/* ============================================
   ИГРОВОЙ СЛАЙДЕР - НОВЫЙ ДИЗАЙН
   ============================================ */

.game-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  user-select: none;
}

/* Контейнер */
.carousel-container {
  flex: 1;
  overflow: hidden;
  position: relative;
  padding: 10px 0;
}

.carousel-track {
  display: flex;
  gap: 20px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Карточка игры */
.carousel-item {
  flex: 0 0 auto;
  width: 180px;
  position: relative;
  cursor: pointer;
}

.carousel-item .item-link {
  display: block;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fff;
}

.carousel-item .item-link:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 30px rgba(73, 181, 69, 0.3);
}

.carousel-item .item-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, 
    transparent 0%, 
    transparent 50%, 
    rgba(0, 0, 0, 0.7) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.carousel-item .item-link:hover::before {
  opacity: 1;
}

.carousel-item .item-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  border: none !important;
  transition: transform 0.3s ease;
}

.carousel-item .item-link:hover .item-img {
  transform: scale(1.05);
}

/* Размер файла */
.carousel-item .item-rating {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #49b545 0%, #2bb42b 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 20px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 4px;
}

.carousel-item .item-rating::before {
  content: '\f019';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 10px;
}

/* Индикатор "НОВИНКА" */
.carousel-item .item-link::after {
  content: 'НОВИНКА';
  position: absolute;
  top: 10px;
  left: -35px;
  background: linear-gradient(135deg, #de5a26 0%, #f15f2c 100%);
  color: #fff;
  padding: 4px 40px;
  font-size: 10px;
  font-weight: 700;
  transform: rotate(-45deg);
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Убираем индикатор для старых постов */
.carousel-item:nth-child(n+6) .item-link::after {
  display: none;
}

/* Кнопки управления */
.carousel-control {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #49b545 0%, #2bb42b 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(73, 181, 69, 0.3);
  flex-shrink: 0;
}

.carousel-control:hover {
  background: linear-gradient(135deg, #5cc55f 0%, #49b545 100%);
  box-shadow: 0 6px 20px rgba(73, 181, 69, 0.5);
  transform: scale(1.1);
}

.carousel-control:active {
  transform: scale(0.95);
}

.carousel-control:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: scale(1);
}

.carousel-control:disabled:hover {
  background: linear-gradient(135deg, #49b545 0%, #2bb42b 100%);
  box-shadow: 0 4px 12px rgba(73, 181, 69, 0.3);
}

.carousel-control i {
  transition: transform 0.3s ease;
}

.carousel-control:hover:not(:disabled) i {
  transform: translateX(0);
}

.carousel-control.prev:hover:not(:disabled) i {
  transform: translateX(-3px);
}

.carousel-control.next:hover:not(:disabled) i {
  transform: translateX(3px);
}

/* Анимация появления */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.carousel-item {
  animation: fadeInUp 0.5s ease backwards;
}

.carousel-item:nth-child(1) { animation-delay: 0.05s; }
.carousel-item:nth-child(2) { animation-delay: 0.1s; }
.carousel-item:nth-child(3) { animation-delay: 0.15s; }
.carousel-item:nth-child(4) { animation-delay: 0.2s; }
.carousel-item:nth-child(5) { animation-delay: 0.25s; }

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 1200px) {
  .carousel-item {
    width: 160px;
  }
  
  .carousel-item .item-img {
    height: 220px;
  }
  
  .carousel-track {
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .carousel-item {
    width: 140px;
  }
  
  .carousel-item .item-img {
    height: 200px;
  }
  
  .carousel-control {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .game-carousel {
    gap: 10px;
  }
  
  .carousel-track {
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .carousel-item {
    width: 130px;
  }
  
  .carousel-item .item-img {
    height: 180px;
  }
  
  .carousel-control {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  
  .carousel-item .item-rating {
    font-size: 10px;
    padding: 4px 8px;
  }
}