/* Fantasy Football Special Page Styles */

:root {
  --fantasy-purple: #8b5cf6;
  --fantasy-purple-dark: #6d28d9;
  --fantasy-accent: #10b981;
  --fantasy-gold: #f59e0b;
  --fantasy-card-bg: rgba(30, 41, 59, 0.7);
  --fantasy-card-border: rgba(255, 255, 255, 0.1);
  --fantasy-glass: rgba(15, 23, 42, 0.8);
}

/* Fantasy Hero Section */
.fantasy-hero {
  position: relative;
  padding: 3.5rem 0 3rem;
  background: radial-gradient(circle at 50% 20%, rgba(139, 92, 246, 0.15) 0%, rgba(15, 23, 42, 1) 70%);
  text-align: center;
  overflow: hidden;
}

.fantasy-hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
  z-index: 1;
  pointer-events: none;
}

.fantasy-hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.fantasy-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 30px;
  color: #c4b5fd;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fantasy-hero__title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.fantasy-hero__desc {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--color-text-muted);
  max-width: 680px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* Benefits Section ("Блок: О нас + преимущества") */
.benefits-section {
  padding: 2rem 0 4rem;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid var(--color-border);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.benefit-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid var(--fantasy-card-border);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.benefit-card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(139, 92, 246, 0.15);
}

.benefit-card__icon-wrapper {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  position: relative;
}

.benefit-card__icon-wrapper--moreless {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  font-weight: 900;
  font-size: 0.75rem;
  box-shadow: 0 6px 15px rgba(16, 185, 129, 0.3);
}

.benefit-card__icon-wrapper--cash {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 6px 15px rgba(59, 130, 246, 0.3);
}

.benefit-card__icon-wrapper--payouts {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  color: #fff;
  box-shadow: 0 6px 15px rgba(139, 92, 246, 0.3);
}

.benefit-card__tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  margin-top: 0.4rem;
}

.benefit-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.benefit-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Play Now Main Interactive Section ("Блок: Играть сейчас") */
.play-now-section {
  padding: 4rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

.section-header__tag {
  color: var(--fantasy-purple);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  display: block;
}

.section-header__title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  color: #fff;
  margin-bottom: 0.75rem;
}

/* Player Filters Bar */
.player-filters {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #fff;
}

.filter-btn--active {
  background: var(--fantasy-purple);
  color: #fff;
  border-color: var(--fantasy-purple);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

/* Player Grid / Mobile Slider Container */
.players-container-wrapper {
  position: relative;
  margin-bottom: 3.5rem;
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  transition: var(--transition);
}

/* Player Card Component */
.player-card {
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.player-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.player-card--selected {
  border-color: var(--fantasy-accent);
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.player-card__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  text-transform: uppercase;
}

.player-card__badge--DEL { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.4); }
.player-card__badge--MED { background: rgba(59, 130, 246, 0.2); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.4); }
.player-card__badge--DEF { background: rgba(245, 158, 11, 0.2); color: #fde047; border: 1px solid rgba(245, 158, 11, 0.4); }
.player-card__badge--POR { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }

.player-card__avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(51, 65, 85, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  overflow: hidden;
  font-size: 1.8rem;
}

.player-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-card__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2rem;
  line-height: 1.2;
}

.player-card__team {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.player-card__stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.3rem 0.8rem;
  border-radius: 10px;
  width: 100%;
  justify-content: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-item__val {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.stat-item__lbl {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.player-card__btn {
  width: 100%;
  padding: 0.5rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.player-card__btn--add {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.player-card__btn--add:hover {
  background: var(--fantasy-purple);
  color: #fff;
}

.player-card__btn--remove {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.player-card__btn--remove:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

/* Squad Section ("Твоя команда") */
.squad-builder-box {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 2px solid var(--fantasy-purple);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 92, 246, 0.2);
  margin-top: 1rem;
}

.squad-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.squad-header__info h3 {
  font-size: 1.4rem;
  margin-bottom: 0.2rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.squad-count-badge {
  background: rgba(139, 92, 246, 0.25);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
  padding: 0.2rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}

.squad-count-badge--full {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
}

/* Squad Slots Container / Mobile Slider */
.squad-slots-wrapper {
  margin-bottom: 1.75rem;
}

.squad-slots-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1rem;
}

.squad-slot {
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px dashed var(--color-border);
  border-radius: 14px;
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 140px;
  justify-content: center;
  position: relative;
  transition: var(--transition);
}

.squad-slot--filled {
  border-style: solid;
  border-color: var(--fantasy-accent);
  background: rgba(16, 185, 129, 0.08);
}

.squad-slot__empty-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px dashed var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.squad-slot__pos-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.squad-slot__player-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.4rem;
  border: 2px solid var(--fantasy-accent);
}

.squad-slot__player-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.squad-slot__remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.8);
  color: #fff;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  opacity: 0.8;
  transition: var(--transition);
}

.squad-slot__remove-btn:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* Play Button Action */
.squad-play-container {
  display: flex;
  justify-content: center;
}

.btn-play-now {
  background: linear-gradient(135deg, var(--fantasy-accent) 0%, #059669 100%);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  padding: 1rem 3rem;
  border-radius: 30px;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  border: none;
  animation: pulse-glow 2s infinite;
}

.btn-play-now:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.7);
}

.btn-play-now:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  animation: none;
  box-shadow: none;
  background: #334155;
  color: #94a3b8;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 15px rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 30px rgba(16, 185, 129, 0.7); }
  100% { box-shadow: 0 0 15px rgba(16, 185, 129, 0.4); }
}

/* Predictions Section ("Блок: Прогнозы") */
.predictions-section {
  padding: 4rem 0;
  background: rgba(15, 23, 42, 0.8);
  border-top: 1px solid var(--color-border);
}

.predictions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.prediction-card {
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.prediction-card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.prediction-card__img-container {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.prediction-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.prediction-card:hover .prediction-card__img {
  transform: scale(1.05);
}

.prediction-card__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--fantasy-purple);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.prediction-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.prediction-card__date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.prediction-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.prediction-card__desc {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
  flex: 1;
}

.prediction-card__btn {
  color: #c4b5fd;
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: var(--transition);
}

.prediction-card__btn:hover {
  color: #fff;
  transform: translateX(4px);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay--active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid var(--fantasy-purple);
  border-radius: 24px;
  max-width: 500px;
  width: 100%;
  padding: 2.5rem 2rem;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(139, 92, 246, 0.25);
  transform: translateY(20px);
  transition: var(--transition);
}

.modal-overlay--active .modal-box {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
  text-align: center;
}

.modal-subtitle {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: 1.75rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--color-border);
  color: #fff;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--fantasy-purple);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.form-submit-btn {
  width: 100%;
  padding: 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--fantasy-purple) 0%, var(--fantasy-purple-dark) 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  margin-top: 0.5rem;
}

.form-submit-btn:hover {
  opacity: 0.95;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* Success Modal Details */
.success-icon {
  width: 70px;
  height: 70px;
  background: rgba(16, 185, 129, 0.2);
  border: 2px solid var(--fantasy-accent);
  color: var(--fantasy-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.25rem;
}

/* Responsive & Mobile Slider Styles ("В мобилке этот блок сделайте слайдером") */
@media (max-width: 992px) {
  .squad-slots-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .sports-bar-wrapper {
    margin-top: 70px;
  }
  
  /* Mobile Players Slider */
  .players-grid-slider-mobile {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 1rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .players-grid-slider-mobile::-webkit-scrollbar {
    display: none;
  }

  .players-grid-slider-mobile .player-card {
    min-width: 240px;
    max-width: 240px;
    scroll-snap-align: center;
    flex-shrink: 0;
  }

  /* Mobile Squad Slots Slider */
  .squad-slots-grid-slider-mobile {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.75rem;
    padding-bottom: 1rem;
    scrollbar-width: none;
  }

  .squad-slots-grid-slider-mobile::-webkit-scrollbar {
    display: none;
  }

  .squad-slots-grid-slider-mobile .squad-slot {
    min-width: 120px;
    max-width: 120px;
    scroll-snap-align: center;
    flex-shrink: 0;
  }

  /* Mobile Navigation Controls for Slider */
  .slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
  }

  .slider-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--color-border);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .squad-builder-box {
    padding: 1.25rem;
    margin-top: 1.5rem;
  }
}

@media (max-width: 480px) {
  .squad-slots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
