/* --- Глобальные настройки и переменные --- */
:root {
  --primary-color: #e50914; /* Акцентный красный */
  --primary-hover: #f61a25;
  --dark-bg: #101010;
  --light-bg: #1a1a1a;
  --text-color: #e0e0e0;
  --text-muted: #888;
  --border-color: #2a2a2a;
  --font-family: "Montserrat", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: var(--font-family);
  background-color: var(--dark-bg);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}
html {
  scroll-behavior: smooth;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.accent {
  color: var(--primary-color);
}
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* --- ФИНАЛЬНАЯ РАБОЧАЯ ВЕРСИЯ: Анимированный фон --- */
#slot-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: flex;
    justify-content: center;
    overflow: hidden;
    background: #101010;
}

/* Градиентная маска для плавного исчезновения барабанов по краям */
#slot-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(to bottom, 
        #101010 0%, 
        rgba(16,16,16,0) 20%, 
        rgba(16,16,16,0) 80%, 
        #101010 100%
    );
    pointer-events: none; /* Маска не должна перехватывать клики */
}

/* Контейнер для одного барабана */
.slot-reel {
    position: relative;
    height: 100%;
    width: 150px; /* Ширина одного барабана */
    flex-shrink: 0;
}

/* Внутренний блок, который будет анимироваться */
.reel-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%; /* Этот блок теперь 200vh высотой */
    will-change: transform;
    animation: vertical-spin linear infinite;
}

/* Секция внутри барабана (верхняя и нижняя копия) */
.reel-section {
    width: 100%;
    height: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Обертка для иконки с фиксированной высотой для ровного интервала */
.icon-wrapper {
    height: 140px; 
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon-wrapper i {
    font-size: 5rem;
    opacity: 0.25;
    text-shadow: 0 0 8px currentColor, 0 0 15px currentColor;
}

/* Ключевая анимация для плавной прокрутки */
@keyframes vertical-spin {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-50%); /* Сдвигаем ровно на половину высоты (на высоту одной секции) */
    }
}

/* Задаем разную скорость и направление для барабанов */
.slot-reel:nth-child(1) .reel-inner { animation-duration: 10s; }
.slot-reel:nth-child(2) .reel-inner { animation-duration: 12s; }
.slot-reel:nth-child(3) .reel-inner { animation-duration: 9s; animation-direction: reverse; }
.slot-reel:nth-child(4) .reel-inner { animation-duration: 14s; }
.slot-reel:nth-child(5) .reel-inner { animation-duration: 11s; animation-direction: reverse; }
.slot-reel:nth-child(6) .reel-inner { animation-duration: 10.5s; }
.slot-reel:nth-child(7) .reel-inner { animation-duration: 13s; animation-direction: reverse; }
.slot-reel:nth-child(8) .reel-inner { animation-duration: 11.5s; }
.slot-reel:nth-child(9) .reel-inner { animation-duration: 9.5s; animation-direction: reverse; }
.slot-reel:nth-child(10) .reel-inner { animation-duration: 15s; }
.slot-reel:nth-child(11) .reel-inner { animation-duration: 10.2s; }
.slot-reel:nth-child(12) .reel-inner { animation-duration: 13.5s; animation-direction: reverse; }

/* --- Top Bar с логикой скрытия --- */
.top-bar {
  background-color: var(--primary-color);
  color: #fff;
  padding: 8px 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  position: sticky; /* Важно для работы скрытия */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1001;
  transition: transform 0.3s ease-in-out; /* Анимация скрытия */
}
.top-bar.hidden {
  transform: translateY(-100%); /* Прячем плашку */
}
.top-bar i {
  margin-right: 8px;
}

/* --- Кнопки --- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
  box-shadow: 0 0 15px rgba(229, 9, 20, 0.4);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(229, 9, 20, 0.6);
}
.btn-secondary {
  background-color: transparent;
  color: var(--text-color);
  border: 2px solid var(--border-color);
}
.btn-secondary:hover {
  background-color: var(--border-color);
  color: #fff;
}
.btn-lg {
  padding: 18px 40px;
  font-size: 1.1rem;
}
.pulse {
  animation: pulse-animation 2s infinite;
}
@keyframes pulse-animation {
  0% {
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.4);
  }
  50% {
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.8);
  }
  100% {
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.4);
  }
}

/* --- Header --- */
.header {
  position: sticky; /* Важно для "прилипания" под top-bar */
  top: 0; /* Прилипает к верху, когда top-bar скрывается */
  left: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  background-color: rgba(16, 16, 16, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}
.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  letter-spacing: 2px;
}
.nav ul {
  list-style: none;
  display: flex;
}
.nav li {
  margin: 0 15px;
}
.nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  padding-bottom: 5px;
}
.nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}
.nav a:hover::after {
  width: 100%;
}
.header-actions {
  display: flex;
  gap: 15px;
}
.burger-menu {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
}

/* --- Hero Section --- */
.hero {
  min-height: calc(100vh - 84px); /* Корректировка высоты с учетом хедера */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 0;
}
.hero h1 {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}
.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 40px;
  color: var(--text-muted);
}
/* Улучшение читаемости на главном экране */
.hero .container {
  background: rgba(16, 16, 16, 0.75);
  backdrop-filter: blur(8px);
  padding: 40px;
  border-radius: 15px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* --- Content Blocks Animation --- */
.content-block {
  padding: 80px 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.content-block.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Games Section --- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 25px;
}
.game-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.game-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(229, 9, 20, 0.5);
}
.game-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.game-card:hover .game-card-overlay {
  opacity: 1;
}
.game-card-overlay h3 {
  margin-bottom: 15px;
  text-align: center;
}
.game-card-overlay .btn {
  padding: 8px 20px;
}
.btn-demo {
  color: var(--text-muted);
  text-decoration: none;
  margin-top: 10px;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}
.btn-demo:hover {
  color: #fff;
}

/* --- Jackpot Section --- */
.jackpot-section {
  background: radial-gradient(circle, #252525 0%, var(--dark-bg) 70%);
  text-align: center;
}
.jackpot-section .section-title {
  margin-bottom: 15px;
}
.jackpot-section > .container > i.fa-crown {
  font-size: 3rem;
  color: #ffd700;
  text-shadow: 0 0 15px #ffd700;
  margin-bottom: 10px;
}
.jackpot-section p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 30px;
}
.jackpot-counter {
  font-size: 5rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 30px;
  color: #fff;
  text-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
}

/* --- Tournament Section --- */
.tournament-section {
  background-color: var(--light-bg);
}
.tournament-card {
  background: var(--dark-bg);
  border-radius: 10px;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.tournament-info {
  padding: 40px;
  flex: 1;
}
.tournament-info h3 {
  font-size: 2rem;
  margin-bottom: 10px;
}
.prize-pool {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.countdown {
  display: flex;
  gap: 20px;
  margin: 30px 0;
}
.time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--light-bg);
  padding: 15px;
  border-radius: 5px;
  min-width: 80px;
}
.time-block span {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
}
.tournament-image {
  flex: 1;
  min-width: 40%;
}
.tournament-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Bonuses Section --- */
.bonuses-section {
  background-color: var(--dark-bg);
}
.bonus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}
.bonus-card {
  background: var(--light-bg);
  padding: 40px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.bonus-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
}
.bonus-card i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}
.bonus-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}
.bonus-card p {
  color: var(--text-muted);
}

/* --- Info Section (Accordion) --- */
.info-section {
  background-color: var(--light-bg);
}
.accordion {
  max-width: 800px;
  margin: 0 auto;
}
.accordion-item {
  background: var(--dark-bg);
  border-radius: 5px;
  margin-bottom: 10px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}
.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  user-select: none;
}
.accordion-header h4 {
  font-size: 1.2rem;
}
.accordion-header i {
  font-size: 1.2rem;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}
.accordion-item.active .accordion-header i {
  transform: rotate(45deg);
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}
.accordion-content p {
  padding: 0 20px 20px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Footer --- */
.footer {
  background: #000;
  padding: 60px 0 20px;
  border-top: 1px solid var(--border-color);
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-about p {
  color: var(--text-muted);
  margin-top: 15px;
}
.footer-links h4,
.footer-payments h4 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: #fff;
}
.footer-links ul {
  list-style: none;
}
.footer-links li {
  margin-bottom: 10px;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-links a:hover {
  color: var(--primary-color);
}
.payment-icons {
  display: flex;
  gap: 15px;
  font-size: 2.5rem;
  color: var(--text-muted);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
}
.social-links a {
  color: var(--text-muted);
  font-size: 1.5rem;
  margin-left: 20px;
  transition: color 0.3s ease;
}
.social-links a:hover {
  color: var(--primary-color);
}

/* --- CTA Banner --- */
#cta-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(26, 26, 26, 0.9);
  backdrop-filter: blur(5px);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 999;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(100%);
  transition: transform 0.5s ease-in-out;
}
#cta-banner.visible {
  transform: translateY(0);
}
#cta-banner p {
  margin: 0;
}
.cta-banner-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s ease;
}
.close-btn:hover {
  color: #fff;
}

/* --- Адаптивность --- */
@media (max-width: 992px) {
  .section-title {
    font-size: 2rem;
  }
  .hero h1 {
    font-size: 3rem;
  }
  .nav {
    display: none;
  }
  .header-actions {
    display: none;
  }
  .burger-menu {
    display: block;
  }
  .nav.active {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--light-bg);
  }
  .nav.active ul {
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
  }
  .nav.active li {
    margin: 10px 0;
  }
  .jackpot-counter {
    font-size: 4rem;
  }
  .tournament-card {
    flex-direction: column;
  }
  .tournament-image {
    max-height: 300px;
  }
  .footer-top {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .payment-icons {
    justify-content: center;
  }
}
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .jackpot-counter {
    font-size: 3.5rem;
  }
  .countdown {
    flex-wrap: wrap;
    justify-content: center;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 15px;
  }
  #cta-banner {
    flex-direction: column;
    text-align: center;
    gap: 15px;
    padding: 20px;
  }
  .cta-banner-actions {
    width: 100%;
    justify-content: space-between;
  }
}
@media (max-width: 480px) {
  .top-bar {
    font-size: 0.8rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .jackpot-counter {
    font-size: 2.8rem;
  }
  .time-block {
    min-width: 65px;
  }
  .time-block span {
    font-size: 2rem;
  }
  /* Кнопка под играми */
}
.show-all-container {
  text-align: center;
  margin-top: 50px;
}

/* Стили для нового прозрачного текстового блока */
.text-block-section {
  background-color: transparent; /* Делаем фон секции прозрачным */
}

/* Улучшение читаемости для текстового блока */
.text-block-content {
  display: flex;
  align-items: center;
  gap: 50px;
  background: rgba(16, 16, 16, 0.75); /* Делаем менее прозрачным */
  backdrop-filter: blur(8px);
  padding: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.text-block-icon i {
  font-size: 8rem;
  color: var(--primary-color);
  opacity: 0.5;
}

.text-block-text .section-title {
  text-align: left;
  margin-bottom: 20px;
  font-size: 2.2rem;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.5); /* Тень для лучшей читаемости */
}

.text-block-text p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 15px;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.7); /* Тень для лучшей читаемости */
}

/* Адаптивность для текстового блока */
@media (max-width: 768px) {
  .text-block-content {
    flex-direction: column;
    text-align: center;
  }

  .text-block-text .section-title {
    text-align: center;
  }
}
