/* EPIC CATEGORIES SECTION - Stunning Creative Design */

/* SECTION STYLING */
.epic-categories-section {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

/* Background Decoration */
.epic-categories-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
  animation: gradientFloat 15s ease-in-out infinite;
  pointer-events: none;
}

@keyframes gradientFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(2deg); }
  66% { transform: translate(-20px, 20px) rotate(-2deg); }
}

/* SECTION HEADER */
.epic-section-header {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  z-index: 1;
}

.epic-section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: #fff;
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3); }
  50% { box-shadow: 0 15px 40px rgba(59, 130, 246, 0.5); }
}

.epic-section-title {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #1e293b 0%, #3b82f6 50%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
  line-height: 1.2;
}

.epic-section-subtitle {
  color: #64748b;
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* CATEGORIES GRID */
.epic-categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  position: relative;
  z-index: 1;
}

/* CATEGORY CARD - 3D TILT */
.epic-category-card {
  position: relative;
  height: 320px;
  border-radius: 24px;
  overflow: hidden;
  cursor: pointer;
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.3s ease;
}

.epic-category-card:hover {
  transform: translateY(-10px);
}

/* CARD INNER - For 3D Effect */
.epic-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.epic-category-card:hover .epic-card-inner {
  transform: rotateX(5deg) rotateY(5deg) scale(1.02);
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

/* CARD IMAGE */
.epic-card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.epic-category-card:hover .epic-card-image {
  transform: scale(1.15);
}

/* GRADIENT OVERLAY */
.epic-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.1) 40%,
    rgba(0, 0, 0, 0.6) 70%,
    rgba(0, 0, 0, 0.85) 100%
  );
  transition: all 0.4s ease;
}

.epic-category-card:hover .epic-card-overlay {
  background: linear-gradient(
    180deg,
    rgba(59, 130, 246, 0.3) 0%,
    rgba(139, 92, 246, 0.4) 40%,
    rgba(0, 0, 0, 0.7) 70%,
    rgba(0, 0, 0, 0.9) 100%
  );
}

/* ANIMATED BORDER */
.epic-card-border {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 24px;
  padding: 3px;
  background: linear-gradient(
    45deg,
    transparent 0%,
    transparent 40%,
    rgba(59, 130, 246, 0.5) 50%,
    transparent 60%,
    transparent 100%
  );
  background-size: 300% 300%;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.epic-category-card:hover .epic-card-border {
  opacity: 1;
  animation: borderRotate 2s linear infinite;
}

@keyframes borderRotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* CARD CONTENT */
.epic-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  color: #fff;
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.epic-category-card:hover .epic-card-content {
  transform: translateY(0);
}

/* CATEGORY ICON */
.epic-category-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  font-size: 1.3rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.epic-category-card:hover .epic-category-icon {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  transform: scale(1.1) rotate(-5deg);
}

/* CATEGORY NAME */
.epic-category-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.2;
}

/* CATEGORY COUNT */
.epic-category-count {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 15px;
}

/* EXPLORE BUTTON */
.epic-explore-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.epic-category-card:hover .epic-explore-btn {
  opacity: 1;
  transform: translateY(0);
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border-color: transparent;
}

.epic-explore-btn:hover {
  transform: translateX(5px) !important;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.epic-explore-btn i {
  transition: transform 0.3s ease;
}

.epic-explore-btn:hover i {
  transform: translateX(3px);
}

/* SHIMMER EFFECT */
.epic-card-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%
  );
  transition: left 0.6s ease;
}

.epic-category-card:hover .epic-card-shimmer {
  left: 100%;
}

/* FLOATING PARTICLES */
.epic-card-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  border-radius: 24px;
}

.epic-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  opacity: 0;
}

.epic-category-card:hover .epic-particle {
  opacity: 1;
  animation: float-up 2s ease-out infinite;
}

.epic-particle:nth-child(1) { left: 20%; bottom: 30%; animation-delay: 0s; }
.epic-particle:nth-child(2) { left: 40%; bottom: 50%; animation-delay: 0.3s; }
.epic-particle:nth-child(3) { left: 60%; bottom: 40%; animation-delay: 0.6s; }
.epic-particle:nth-child(4) { left: 80%; bottom: 60%; animation-delay: 0.9s; }
.epic-particle:nth-child(5) { left: 30%; bottom: 70%; animation-delay: 1.2s; }

@keyframes float-up {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) scale(0);
    opacity: 0;
  }
}

/* VIEW ALL CATEGORIES LINK */
.epic-view-all {
  text-align: center;
  margin-top: 50px;
}

.epic-view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: #fff;
  padding: 16px 35px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.epic-view-all-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  transition: left 0.6s ease;
}

.epic-view-all-link:hover::before {
  left: 100%;
}

.epic-view-all-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.4);
  color: #fff;
}

.epic-view-all-link i {
  transition: transform 0.3s ease;
}

.epic-view-all-link:hover i {
  transform: translateX(5px);
}

/* RESPONSIVE STYLES */
@media (max-width: 1200px) {
  .epic-categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
  
  .epic-category-card {
    height: 280px;
  }
}

@media (max-width: 768px) {
  .epic-categories-section {
    padding: 60px 0;
  }
  
  .epic-section-title {
    font-size: 2rem;
  }
  
  .epic-section-subtitle {
    font-size: 0.95rem;
  }
  
  .epic-categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .epic-category-card {
    height: 220px;
    border-radius: 20px;
  }
  
  .epic-card-inner {
    border-radius: 20px;
  }
  
  .epic-card-content {
    padding: 20px;
    transform: translateY(0);
  }
  
  .epic-category-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .epic-category-name {
    font-size: 1.1rem;
  }
  
  .epic-category-count {
    font-size: 0.75rem;
  }
  
  .epic-explore-btn {
    opacity: 1;
    transform: translateY(0);
    padding: 8px 15px;
    font-size: 0.75rem;
  }
  
  .epic-view-all-link {
    padding: 14px 25px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .epic-categories-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  .epic-category-card {
    height: 200px;
  }
}
