/* Космические эффекты */
.cosmic-header {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(5, 5, 16, 0.95) 0%,
    rgba(10, 10, 26, 0.9) 50%,
    rgba(15, 15, 40, 0.85) 100%
  );
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(138, 43, 226, 0.3);
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.cosmic-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 90% 40%, rgba(77, 184, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(255, 102, 178, 0.1) 0%, transparent 50%);
  animation: particles-float 20s ease-in-out infinite;
}

.cosmic-glow {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-purple),
    var(--star-blue),
    var(--accent-pink),
    transparent
  );
  filter: blur(5px);
  animation: glow-pulse 3s ease-in-out infinite;
}

.cosmic-border {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
}

/* Космические кнопки */
.cosmic-button {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(138, 43, 226, 0.2) 0%,
    rgba(77, 184, 255, 0.2) 50%,
    rgba(255, 102, 178, 0.2) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  font-weight: 500;
  overflow: hidden;
  transition: all 0.3s ease;
}

.cosmic-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.cosmic-button:hover::before {
  left: 100%;
}

.cosmic-button:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 10px 30px rgba(138, 43, 226, 0.4),
    0 5px 15px rgba(77, 184, 255, 0.3),
    inset 0 0 20px rgba(255, 255, 255, 0.05);
  border-color: rgba(138, 43, 226, 0.5);
}

/* Космические карточки */
.cosmic-card {
  background: linear-gradient(
    135deg,
    rgba(26, 26, 58, 0.8) 0%,
    rgba(15, 15, 40, 0.9) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.cosmic-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    45deg,
    var(--accent-purple),
    var(--star-blue),
    var(--accent-pink),
    var(--accent-purple)
  );
  border-radius: 17px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.cosmic-card:hover::before {
  opacity: 0.3;
}

.cosmic-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.6),
    0 10px 30px rgba(138, 43, 226, 0.3),
    0 5px 15px rgba(77, 184, 255, 0.2);
  border-color: rgba(138, 43, 226, 0.3);
}

/* Бейджи */
.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-new {
  background: linear-gradient(45deg, var(--accent-purple), var(--star-blue));
  color: white;
  animation: badge-pulse 2s ease-in-out infinite;
}

.badge-popular {
  background: linear-gradient(45deg, var(--accent-pink), #ff6b6b);
  color: white;
}

/* Анимации */
@keyframes particles-float {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-10px) scale(1.05);
    opacity: 1;
  }
}

@keyframes glow-pulse {
  0%, 100% {
    opacity: 0.5;
    transform: scaleX(1);
  }
  50% {
    opacity: 1;
    transform: scaleX(1.05);
  }
}

@keyframes badge-pulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.8);
  }
}

@keyframes star-twinkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Звездный рейтинг */
.rating-stars {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.rating-stars .star {
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rating-stars .star svg {
  width: 20px;
  height: 20px;
}

.rating-stars.normal .star svg {
  width: 18px;
  height: 18px;
}

.rating-stars.small .star svg {
  width: 14px;
  height: 14px;
}

.rating-stars.large .star svg {
  width: 24px;
  height: 24px;
}

.rating-stars .star.filled,
.rating-stars.editable .star.hover {
  color: #ffd700;
  animation: star-twinkle 0.5s ease;
}

.rating-stars .star.half-filled {
  background: linear-gradient(90deg, #ffd700 50%, #666 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Статистика в шапке */
.stats-bar {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-icon {
  font-size: 1.2rem;
  animation: star-twinkle 3s ease-in-out infinite;
}

.stat-value {
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--star-blue);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-gray);
}

/* Эффекты для главной страницы */
.hero {
  position: relative;
  padding: 6rem 0;
  text-align: center;
  background: radial-gradient(
    ellipse at center,
    rgba(138, 43, 226, 0.1) 0%,
    transparent 70%
  );
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(
    45deg,
    var(--star-blue),
    var(--accent-pink),
    var(--star-blue)
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

/* Адаптивность */
@media (max-width: 768px) {
  .stats-bar {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 26, 0.95);
    padding: 1rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 999;
  }
  
  .stats-bar.active {
    display: flex;
  }
  
  .stat-item {
    width: 100%;
    justify-content: center;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
}