/* ================== GLOBAL STYLES & VARIABLES ================== */
:root {
  --primary-bg: #0d1117;
  --secondary-bg: #161b22;
  --accent-color: #f7b733; /* Gold */
  --accent-hover: #f9c75a;
  --text-primary: #c9d1d9;
  --text-secondary: #8b949e;
  --border-color: #30363d;
  --font-family: "Poppins", sans-serif;
  --container-width: 1200px;
  --header-height: 70px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--primary-bg);
  color: var(--text-primary);
  line-height: 1.6;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  font-weight: 600;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-hover);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 20px;
  color: white;
}

.section-subtitle {
  font-size: 1.2rem;
  text-align: center;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 50px auto;
}

/* ================== BUTTONS ================== */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background-color: transparent;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
}
.btn-primary:hover {
  background-color: var(--accent-color);
  color: var(--primary-bg);
}

.btn-accent {
  background-color: var(--accent-color);
  color: var(--primary-bg);
  box-shadow: 0 4px 15px rgba(247, 183, 51, 0.3);
}
.btn-accent:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(247, 183, 51, 0.5);
}

.btn-large {
  padding: 15px 40px;
  font-size: 1.1rem;
}

.btn-secondary {
  background-color: var(--secondary-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background-color: var(--border-color);
  color: white;
}

/* ================== HEADER ================== */
.header {
  background-color: rgba(13, 17, 23, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.header .container {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}
.logo i {
  margin-right: 8px;
  color: var(--accent-color);
}

.nav ul {
  display: flex;
  gap: 30px;
}

.nav a {
  color: var(--text-primary);
  font-weight: 400;
  position: relative;
  padding: 5px 0;
}
.nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}
.nav a:hover::after {
  width: 100%;
}

/* ================== HERO SECTION ================== */
#hero {
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background: url(img/1cd8a901-b7f9-4154-949c-68bafe996cff.png) no-repeat center
    center/cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    var(--primary-bg) 5%,
    rgba(13, 17, 23, 0.6) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#hero h1 {
  font-size: 4rem;
  color: white;
  margin-bottom: 20px;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

#hero p {
  font-size: 1.3rem;
  max-width: 700px;
  margin-bottom: 30px;
  color: var(--text-primary);
}

.promo-code {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: rgba(22, 27, 34, 0.8);
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 30px;
}
.promo-code span {
  color: var(--text-secondary);
}
.promo-code input {
  background: transparent;
  border: none;
  color: var(--accent-color);
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
}
.promo-code input:focus {
  outline: none;
}

/* ================== LIVE FEED ================== */
#live-feed {
  background-color: var(--secondary-bg);
  padding: 15px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

#live-feed .container {
  display: flex;
  align-items: center;
  gap: 20px;
}

#live-feed h3 {
  color: white;
  white-space: nowrap;
}

.feed-container {
  flex-grow: 1;
  overflow: hidden;
}

#winners-list {
  display: flex;
  gap: 40px;
}

.winner-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-bg);
  padding: 8px 15px;
  border-radius: 20px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(20px);
  animation: slideInAndFade 0.5s forwards;
}

.winner-item i {
  color: var(--accent-color);
}
.winner-item span {
  color: var(--text-secondary);
}
.winner-item strong {
  color: white;
}

@keyframes slideInAndFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================== SHARED SECTION STYLES ================== */
section {
  padding: 80px 0;
}
.section-light {
  background-color: var(--secondary-bg);
}

/* ================== STEPS SECTION ================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
}

.step-card {
  background-color: var(--primary-bg);
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.step-icon {
  font-size: 3rem;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.step-card h3 {
  margin-bottom: 15px;
  color: white;
  font-size: 1.5rem;
}

/* ================== TOURNAMENTS SECTION ================== */
.tournaments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.tournament-card {
  background-color: var(--secondary-bg);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tournament-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tournament-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 25px;
}
.card-content h4 {
  font-size: 1.4rem;
  color: white;
  margin-bottom: 10px;
}

.prize-pool {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.prize-pool strong {
  color: var(--accent-color);
  font-weight: 700;
}

/* ================== POPULAR SLOTS SECTION ================== */
.slots-grid {
  display: grid;
  /* Создает адаптивную сетку: колонки шириной минимум 250px, которые заполняют все доступное пространство */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.slot-card {
  background-color: var(--primary-bg);
  border-radius: 12px;
  overflow: hidden;
  position: relative; /* Необходимо для позиционирования тега */
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.slot-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.slot-image {
  position: relative;
  overflow: hidden; /* Скрывает части изображения, выходящие за рамки при увеличении */
}

.slot-image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

/* Эффект приближения изображения при наведении на карточку */
.slot-card:hover .slot-image img {
  transform: scale(1.1);
}

.slot-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(13, 17, 23, 0.75); /* Полупрозрачный темный фон */
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0; /* Скрыт по умолчанию */
  transition: opacity 0.3s ease;
  z-index: 2;
}

/* Показываем оверлей при наведении на карточку */
.slot-card:hover .slot-overlay {
  opacity: 1;
}

.slot-info {
  padding: 20px;
}

.slot-info h4 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.slot-tag {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 3; /* Поверх изображения, но под оверлеем */
  pointer-events: none; /* Чтобы тег не мешал наведению на карточку */
}

.slot-tag.hot {
  background-color: #e74c3c; /* Огненно-красный цвет */
  color: white;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

.slot-tag i {
  margin-right: 5px;
}

/* ================== LOYALTY SECTION ================== */
.loyalty-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  margin-top: 50px;
}
.loyalty-image img {
  border-radius: 12px;
}
.loyalty-details ul {
  margin-bottom: 30px;
}
.loyalty-details li {
  font-size: 1.1rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}
.loyalty-details i {
  font-size: 1.5rem;
  margin-right: 15px;
}
.bronze {
  color: #cd7f32;
}
.silver {
  color: #c0c0c0;
}
.gold {
  color: #ffd700;
}
.diamond {
  color: #b9f2ff;
}

/* ================== COMMUNITY SECTION ================== */
/* .testimonials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 50px;
}

.testimonial-card {
  background-color: var(--secondary-bg);
  padding: 30px;
  border-radius: 12px;
  border-left: 5px solid var(--accent-color);
}
.testimonial-card blockquote {
  font-style: italic;
  margin-bottom: 15px;
  font-size: 1.1rem;
}
.testimonial-card cite {
  font-weight: 600;
  color: var(--text-secondary);
} */

/* ================== COMMUNITY / DYNAMIC REVIEWS SECTION ================== */
#testimonial-container {
    max-width: 800px;
    margin: 0 auto 50px auto;
    background-color: var(--secondary-bg);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.testimonial-content {
    /* Плавный переход для смены контента */
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

/* Класс для анимации исчезновения */
.testimonial-content.is-fading {
    opacity: 0;
    transform: translateY(10px);
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    margin: 0 auto 15px auto;
    object-fit: cover;
}

.testimonial-stars {
    margin-bottom: 20px;
    color: var(--accent-color);
    font-size: 1.2rem;
}

#testimonial-quote {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 20px;
    min-height: 80px; /* Задаем минимальную высоту, чтобы блок не "прыгал" при смене текста */
    display: flex;
    align-items: center;
    justify-content: center;
}

#testimonial-author {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-style: normal;
}

/* Стили для community-cta остаются прежними */
.community-cta {
    text-align: center;
    margin-top: 50px;
    background-color: var(--secondary-bg);
    padding: 40px;
    border-radius: 12px;
}
.community-cta p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}
.social-icon {
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease;
}
.social-icon:hover {
    transform: translateY(-5px);
}
.discord { background-color: #5865F2; }
.telegram { background-color: #2AABEE; }

/* ////////////////////////// */

.community-cta {
  text-align: center;
  margin-top: 50px;
  background-color: var(--secondary-bg);
  padding: 40px;
  border-radius: 12px;
}
.community-cta p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}
.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
}
.social-icon {
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.3s ease;
}
.social-icon:hover {
  transform: translateY(-5px);
}
.discord {
  background-color: #5865f2;
}
.telegram {
  background-color: #2aabee;
}

/* ================== FOOTER ================== */
.footer {
  background-color: var(--secondary-bg);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 20px 0;
}
.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-about p {
  color: var(--text-secondary);
  margin-top: 15px;
}
.footer h4 {
  color: white;
  margin-bottom: 20px;
  font-size: 1.2rem;
}
.footer-links ul li {
  margin-bottom: 10px;
}
.footer-links a {
  color: var(--text-secondary);
}
.footer-links a:hover {
  color: var(--accent-hover);
  padding-left: 5px;
}
.social-icons-footer a {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-right: 15px;
}
.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ================== ANIMATED COIN FALL ================== */
#coin-fall-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; /* Важно, чтобы монеты не вылетали за пределы экрана */
  z-index: 1; /* Помещаем монеты между оверлеем и контентом */
}

.coin {
  position: absolute;
  border-radius: 50%;
  /* Градиент создает эффект объема и блеска */
  background: radial-gradient(circle, #ffd700 20%, #f7b733 80%);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
  /* Анимация падения */
  animation: fall linear forwards;
}

@keyframes fall {
  from {
    /* Начинаем падение сверху за пределами экрана */
    transform: translateY(-150px) rotateZ(0deg);
    opacity: 1;
  }
  to {
    /* Заканчиваем падение внизу за пределами экрана */
    transform: translateY(100vh) rotateZ(720deg);
    opacity: 0;
  }
}

/* ================== SCROLL ANIMATIONS ================== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================== RESPONSIVE DESIGN ================== */
@media (max-width: 992px) {
  .section-title {
    font-size: 2.2rem;
  }
  .nav {
    display: none;
  } /* Simple hiding for demo; a hamburger menu would be better */
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .loyalty-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .loyalty-image {
    order: -1;
    margin-bottom: 30px;
  }
  .loyalty-details ul {
    justify-content: center;
  }
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-links ul,
  .social-icons-footer {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  #hero h1 {
    font-size: 3rem;
  }
  #hero p {
    font-size: 1.1rem;
  }
  #live-feed .container {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .header .btn {
    display: none;
  }
  #hero h1 {
    font-size: 2.5rem;
  }
  .btn-large {
    padding: 12px 30px;
    font-size: 1rem;
  }
  .step-card {
    padding: 30px;
  }
}
