/* ========== СТИЛИ ДЛЯ ГЛАВНОЙ СТРАНИЦЫ (HOME) ========== */

/* Базовые стили */
.logo-block1 {
  padding: 20px 15px 10px;  /* Уменьшил нижний отступ */
  text-align: center;
  margin-bottom: 5px;       /* Приблизил к нижнему блоку */
}

.hero-logo-text {
  font-size: 40px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  min-height: 48px;
}

.hero-logo-subtitle {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Обертка для центрирования */
.top-links-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 5px;
    margin-top: -15px;  /* Поднимаем выше */
    position: relative;
    z-index: 10;
}

.top-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: rgba(16, 69, 107, 0);
    backdrop-filter: blur(8px);
    padding: 8px 30px;
    border-radius: 60px;
    border: 1px solid rgba(9, 23, 56, 0);
    width: auto;
    min-width: 280px;
}
/* Цветные слова для печатной машинки */
#typewriterText {
    color: white !important;
    background: linear-gradient(135deg, #60a5fa, #c4b5fd, #fbbf24) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: 0 0 30px rgba(96, 165, 250, 0.5) !important;
    font-weight: 800 !important;
}
.top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;                /* Уменьшил отступ между иконкой и текстом */
  color: #888888;
  text-decoration: none;
  font-size: 0.7rem;       /* УМЕНЬШИЛ ШРИФТ ДЛЯ КОМПАКТНОСТИ */
  font-weight: 500;
  padding: 6px 0;          /* Убрал лишние горизонтальные паддинги */
  white-space: nowrap;
  transition: none;
}


.top-link svg {
  stroke: #888888;
  flex-shrink: 0;
}

.top-link span {
  color: #888888;
}

.top-link::before {
  display: none;
}

.top-link:hover {
  background: transparent;
  transform: none;
}

.top-link:hover svg,
.top-link:hover span {
  stroke: #888888;
  color: #888888;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
  .top-links {
    gap: 20px;
    padding: 8px 20px;
    border-radius: 50px;
  }
  
  .top-link {
    gap: 6px;
    padding: 6px 2px;
    font-size: 0.7rem;
  }
  
  .top-link svg {
    width: 14px;
    height: 14px;
  }
}

/* Адаптация для мобильных — гарантирует, что строка не сломается */
@media (max-width: 580px) {
  .top-links-wrapper {
    margin-left: 8px;
    margin-right: 8px;
  }
  
  .top-links {
    gap: 8px;              /* Ещё компактнее */
    padding: 5px 12px;
    flex-wrap: nowrap;     /* ЗАПРЕЩАЕМ ПЕРЕНОС СТРОКИ */
    justify-content: space-around;
    border-radius: 40px;
    min-width: 100%;       /* Растягиваем на всю ширину экрана */
  }
  
  .top-link {
    font-size: 0.55rem;    /* Максимально мелкий шрифт для телефонов */
    gap: 4px;
  }

  /* Скрываем иконки на очень маленьких экранах, чтобы текст влез */
  .top-link svg {
    width: 12px;
    height: 12px;
  }
}

/* ========== КАСТОМНЫЙ СКРОЛЛБАР ========== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 10px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #1e293b #0f172a;
}

body {
  -ms-overflow-style: none;
}

/* ========== НОВАЯ КАРУСЕЛЬ (ЕДИНСТВЕННАЯ) ========== */
.infinite-carousel {
  position: relative;
  width: 100%;
  margin: 0 0 28px 0;
  overflow: hidden;
}

.infinite-carousel-viewport {
  width: 100%;
  overflow: hidden;
}

.infinite-carousel-track {
  display: flex;
  gap: 16px;
  width: fit-content;
  padding: 20px 0;
  will-change: transform;
}
.infinite-carousel-track {
  will-change: transform;
}
.infinite-slide {
  flex: 0 0 auto;
  width: 340px;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 0.4;
  transform: scale(0.88);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.infinite-slide.active {
  opacity: 1 !important;
  transform: scale(1) !important;
  box-shadow: 0 0 50px rgba(59, 130, 246, 0.8), 0 10px 30px rgba(0, 0, 0, 0.6) !important;
  border: 1px solid rgba(96, 165, 250, 0.6) !important;
  z-index: 10;
}

.infinite-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 480px) {
  .infinite-slide {
    width: 300px;
  }
}

@media (min-width: 769px) {
  .infinite-slide {
    width: 380px;
  }
}

/* ========== БЛОК ПОПОЛНЕНИЯ STEAM ========== */
.card-modern {
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(47, 96, 188, 0.72), rgba(47, 16, 160, 0.694));
    border: 1px solid rgba(0, 0, 0, 0.759);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.6), 0 10px 25px rgba(0, 0, 0, 0.4); /* ДОБАВИТЬ ЭТУ СТРОКУ */
}

.card-modern h3 {
  margin-bottom: 16px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.card-modern h3 strong {
  color: #1b6ae9;
  background: rgba(75, 141, 246, 0.292);
  padding: 2px 12px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 700;
}

.steam-fields-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.steam-fields-row .field-group {
  flex: 1;
  min-width: 140px;
}

.steam-fields-row .input-modern {
  width: 100%;
  padding: 14px 16px;
  background: #0a0a0a;
  border: 1px solid #000000;
  border-radius: 16px;
  color: white;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.steam-fields-row .input-modern:focus {
  background: #111111 !important;
}

.steam-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.commission-badge {
  background: rgba(34, 197, 94, 0.15);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.7rem;
  color: #22c55e;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.promo-btn {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 30px;
  transition: all 0.2s ease;
}

.promo-btn:hover {
  background: rgba(59, 130, 246, 0.1);
}

.payment-section {
  margin-top: 4px;
}

.pay-btn-blue {
  width: 100%;
  padding: 16px 24px;
  border: none;
  background: linear-gradient(135deg, #2853a3, #326fd9, #1d4983);
  border-radius: 20px !important;
  color: white;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 0 20px rgba(30, 60, 114, 0.5), 0 4px 15px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  position: relative;
}

.pay-btn-blue:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgb(255, 255, 255);
}

.pay-btn-blue:active {
  transform: scale(0.98);
}

@media (max-width: 550px) {
  .steam-fields-row {
    flex-direction: column;
    gap: 10px;
  }
  .steam-fields-row .field-group {
    min-width: auto;
  }
  .steam-info-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .card-modern {
    padding: 16px;
  }
}

/* ========== БЛОКИ ИГР И ПРИЛОЖЕНИЙ ========== */
.games-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.games-header h4 {
  font-size: 20px;
  font-weight: 600;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
}

.scroll-btn {
  background: var(--bg-elevated);
  border: none;
  color: var(--text-main);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.scroll-btn:hover {
  background: var(--accent-primary);
}

.games-scroll-container {
  overflow-x: auto;
  overflow-y: visible;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  max-height: 260px;
}

.games-scroll-container::-webkit-scrollbar {
  height: 4px;
}

.games-scroll-container::-webkit-scrollbar-track {
  background: var(--bg-elevated);
  border-radius: 10px;
}

.games-scroll-container::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 10px;
}

.games-scroll-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: min-content;
  padding: 4px 0 12px;
}

.games-row, .games-row-second {
  display: flex;
  gap: 12px;
  min-width: min-content;
}

.game-card {
  flex-shrink: 0;
  width: 90px;
  height: 110px;
  background: var(--bg-card);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: none;
  border: 1px solid rgba(255,255,255,0.05);
}

.game-card:hover {
  border-color: var(--accent-primary);
  background: var(--bg-elevated);
  transform: none;
}

.game-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #1a2332, #0f1722);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-icon i {
  font-size: 1.8rem;
  color: var(--accent-primary);
}

.game-name {
  font-size: 0.7rem;
  font-weight: 500;
  text-align: center;
  color: var(--text-muted);
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 480px) {
  .game-card {
    width: 75px;
    height: 95px;
  }
  .game-icon {
    width: 45px;
    height: 45px;
  }
  .game-icon i {
    font-size: 1.5rem;
  }
  .game-name {
    font-size: 0.65rem;
  }
  .games-scroll-container {
    max-height: 220px;
  }
}

/* ========== ТОВАРЫ ========== */
.products-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 16px 0 12px;
}

.products-header h4 {
  font-size: 1.1rem;
  font-weight: 600;
}

/* ========== СТРАНИЦА КЛЮЧЕВОГО СЛОВА ========== */
.keyword-page-header {
  position: sticky;
  top: 70px;
  background: var(--bg-dark);
  padding: 12px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 100;
}

.back-btn {
  background: var(--bg-elevated);
  border: none;
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.back-btn:hover {
  background: var(--accent-primary);
}

.keyword-page-header h2 {
  font-size: 1.3rem;
  font-weight: 600;
}

/* ========== НОВЫЕ ВЕРТИКАЛЬНЫЕ КАРТОЧКИ 4:5 ========== */
.horizontal-scroll-container {
  display: flex;
  flex-direction: row;
  gap: 16px;
  overflow-x: auto;
  overflow-y: visible;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 8px 4px 16px 4px;
  scrollbar-width: thin;
}

.horizontal-scroll-container::-webkit-scrollbar {
  height: 4px;
}

.horizontal-scroll-container::-webkit-scrollbar-track {
  background: #0f172a;
  border-radius: 10px;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb {
  background: #3b82f6;
  border-radius: 10px;
}

.vertical-card {
  flex: 0 0 auto;
  width: 140px;
  cursor: pointer;
  transition: none;
}

.vertical-card:hover {
  transform: none;
}

.vertical-card:active {
  transform: none;
}

.vertical-card-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  overflow: hidden;
  background: #0a0a0a;
  border: 1px solid rgba(59, 130, 246, 0.15);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.vertical-card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: none;
}

.vertical-card:hover .vertical-card-img {
  transform: none;
}

.vertical-card-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.4), transparent);
  padding: 16px 12px 12px 12px;
  text-align: center;
}

.vertical-card-title span {
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  display: block;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 768px) {
  .vertical-card {
    width: 160px;
  }
  .vertical-card-title span {
    font-size: 0.95rem;
  }
}

@media (min-width: 1024px) {
  .vertical-card {
    width: 180px;
  }
  .vertical-card-title span {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .vertical-card {
    width: 120px;
  }
  .vertical-card-title {
    padding: 12px 8px 8px 8px;
  }
  .vertical-card-title span {
    font-size: 0.75rem;
  }
}

#gamesScrollContainer,
#appsScrollContainer {
  overflow: visible !important;
}

#gamesScrollWrapper,
#appsScrollWrapper {
  overflow: visible !important;
  width: 100%;
}

.games-row, .games-row-second {
  display: none;
}

#typewriterText {
  min-height: 40px;
  display: inline-block;
  white-space: nowrap;
}

@media (max-width: 480px) {
  #typewriterText {
    min-height: 32px;
    font-size: 1.2rem;
  }
}




/* Принудительный скролл для блоков игр и приложений */
.games-scroll-container {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: thin !important;
  -webkit-overflow-scrolling: touch !important;
  white-space: nowrap !important;
}

#gamesScrollWrapper,
#appsScrollWrapper {
  display: inline-block !important;
  white-space: nowrap !important;
}

#gamesScrollWrapper .horizontal-scroll-container,
#appsScrollWrapper .horizontal-scroll-container {
  display: inline-flex !important;
  gap: 16px !important;
  white-space: nowrap !important;
}

/* Всегда показываем скроллбар */
.games-scroll-container {
  overflow-x: scroll !important;
}

/* Стили скроллбара */
.games-scroll-container::-webkit-scrollbar {
  height: 6px !important;
  display: block !important;
}

.games-scroll-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
}

.games-scroll-container::-webkit-scrollbar-thumb {
  background: #3b82f6 !important;
  border-radius: 10px !important;
}


/* Кнопки листания */
.games-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.scroll-btn {
    background: rgba(59, 130, 246, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-left: 8px;
}

.scroll-btn:hover {
    background: #3b82f6;
    transform: scale(1.05);
}