/* =========================================
   Prizes Section Styles
   ========================================= */

.prizes {
  position: relative;
  overflow: hidden;
  /* z-index: var(--z-index-sections); */
}

/* Prizes Grid Layout */
.prizes__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-top: 4rem;
}

/* Prize Card */
.prize-card {
  position: relative;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* display: flex; */
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  border-radius: 1.2rem;
  /* z-index: var(--z-index-cards); */
  /* background-color: var(--card-bg); */
  background-color: rgba(var(--card-bg-rgb, 255, 255, 255), 0.25);
  border: 1px solid var(--border-color);
}

.prize-card .card_wrapper {
  text-align: center;
  display: block !important;
  padding: 3rem 2rem;
}

.prize-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0.6rem;
  background-color: var(--accent-primary);
  opacity: 0.8;
}

.prize-card:hover {
  transform: translateY(-1rem);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Prize Card Variants */
.prize-card--first::before {
  background: linear-gradient(to right, #0070f3, #00c3ff);
}

.prize-card--second::before {
  background: linear-gradient(to right, #6a11cb, #8673ff);
}

.prize-card--third::before {
  background: linear-gradient(to right, #ff3e00, #ff8d4d);
}

/* Tech-style Rank Indicator */
.prize-card__medal {
  position: relative;
  width: 8rem;
  height: 8rem;
  margin-bottom: 2.5rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text-primary);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  transform-style: preserve-3d;
  perspective: 800px;
  transition: all 0.3s ease;
  overflow: visible;
  /* z-index: 2; */
}

.prize-card__medal::before {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--card-bg);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  z-index: -1;
}

.prize-card--first .prize-card__medal {
  background: linear-gradient(135deg, #0070f3, #00c3ff);
  text-shadow: 0 0 10px rgba(0, 112, 243, 0.7);
  box-shadow: 0 0 30px rgba(0, 112, 243, 0.4),
              0 0 60px rgba(0, 112, 243, 0.2);
}

.prize-card--second .prize-card__medal {
  background: linear-gradient(135deg, #6a11cb, #8673ff);
  text-shadow: 0 0 10px rgba(106, 17, 203, 0.7);
  box-shadow: 0 0 30px rgba(106, 17, 203, 0.4),
              0 0 60px rgba(106, 17, 203, 0.2);
}

.prize-card--third .prize-card__medal {
  background: linear-gradient(135deg, #ff3e00, #ff8d4d);
  text-shadow: 0 0 10px rgba(255, 62, 0, 0.7);
  box-shadow: 0 0 30px rgba(255, 62, 0, 0.4),
              0 0 60px rgba(255, 62, 0, 0.2);
}

.prize-card__medal::after {
  content: '';
  position: absolute;
  width: 140%;
  height: 140%;
  background: conic-gradient(
    transparent 0deg,
    transparent 70deg,
    rgba(255, 255, 255, 0.1) 90deg,
    transparent 110deg,
    transparent 250deg,
    rgba(255, 255, 255, 0.1) 270deg,
    transparent 290deg,
    transparent 360deg
  );
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  animation: rotateHex 8s linear infinite;
  z-index: -2;
}

.prize-card__medal span {
  position: relative;
  z-index: 2;
}

/* Light ray effects around the hexagon */
.prize-card--first .card_wrapper::before {
  content: '';
  position: absolute;
  top: 32%;
  left: 50%;
  transform: translate(-50%, -85%);
  width: 16rem;
  height: 16rem;
  background: radial-gradient(
    circle,
    rgba(0, 112, 243, 0) 25%,
    rgba(0, 195, 255, 0.4) 50%,
    rgba(0, 112, 243, 0) 70%
  );
  border-radius: 50%;
  z-index: 0;
  animation: pulse-light 4s ease-in-out infinite;
  filter: blur(5px);
}

.prize-card--second .card_wrapper::before {
  content: '';
  position: absolute;
  top: 32%;
  left: 50%;
  transform: translate(-50%, -85%);
  width: 16rem;
  height: 16rem;
  background: radial-gradient(
    circle,
    rgba(106, 17, 203, 0) 25%,
    rgba(134, 115, 255, 0.4) 50%,
    rgba(106, 17, 203, 0) 70%
  );
  border-radius: 50%;
  z-index: 0;
  animation: pulse-light 4s ease-in-out infinite;
  filter: blur(5px);
}

.prize-card--third .card_wrapper::before {
  content: '';
  position: absolute;
  top: 32%;
  left: 50%;
  transform: translate(-50%, -85%);
  width: 16rem;
  height: 16rem;
  background: radial-gradient(
    circle,
    rgba(255, 62, 0, 0) 25%,
    rgba(255, 141, 77, 0.4) 50%,
    rgba(255, 62, 0, 0) 70%
  );
  border-radius: 50%;
  z-index: 0;
  animation: pulse-light 4s ease-in-out infinite;
  filter: blur(5px);
}

/* Circuit pattern container positioned behind the medal */
.circuit-wrapper {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -85%);
  width: 24rem;
  height: 24rem;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(
    circle at center,
    transparent 0%,
    transparent 40px,
    rgba(255, 255, 255, 1) 50px,
    rgba(255, 255, 255, 1) 100%
  );
  mask-image: radial-gradient(
    circle at center,
    transparent 0%,
    transparent 40px,
    rgba(255, 255, 255, 1) 50px,
    rgba(255, 255, 255, 1) 100%
  );
}

.circuit-pattern {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.5);
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.7;
}

/* Circuit path animations */
.prize-card--first .circuit-pattern path {
  stroke: rgba(0, 195, 255, 0.6);
  stroke-dasharray: 15;
  animation: dash 20s linear infinite;
}

.prize-card--second .circuit-pattern path {
  stroke: rgba(134, 115, 255, 0.6);
  stroke-dasharray: 15;
  animation: dash 20s linear infinite;
}

.prize-card--third .circuit-pattern path {
  stroke: rgba(255, 141, 77, 0.6);
  stroke-dasharray: 15;
  animation: dash 20s linear infinite;
}

.prize-card--first .circuit-pattern circle {
  fill: rgba(0, 195, 255, 0.8);
  animation: pulse 3s ease-in-out infinite;
}

.prize-card--second .circuit-pattern circle {
  fill: rgba(134, 115, 255, 0.8);
  animation: pulse 3s ease-in-out infinite;
}

.prize-card--third .circuit-pattern circle {
  fill: rgba(255, 141, 77, 0.8);
  animation: pulse 3s ease-in-out infinite;
}

.prize-card:hover .prize-card__medal {
  transform: translateZ(10px) rotateY(15deg);
}

/* Add circuit-like decoration to the prize card */
.prize-card .card_wrapper::after {
  content: '';
  position: absolute;
  bottom: 3rem;
  left: 2rem;
  width: 7rem;
  height: 3rem;
  background-image:
    radial-gradient(circle at center, var(--accent-primary) 1px, transparent 1px),
    radial-gradient(circle at center, var(--accent-primary) 1px, transparent 1px);
  background-size: 10px 10px;
  background-position: 0 0, 5px 5px;
  opacity: 0.3;
}

.prize-card--first .card_wrapper::after {
  --accent-primary: #0070f3;
}

.prize-card--second .card_wrapper::after {
  --accent-primary: #6a11cb;
}

.prize-card--third .card_wrapper::after {
  --accent-primary: #ff3e00;
}

/* Prize Card Title */
.prize-card__title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

/* Prize Card Amount */
.prize-card__amount {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
  display: block;
  position: relative;
}

.prize-card--first .prize-card__amount {
  color: #0070f3;
}

.prize-card--second .prize-card__amount {
  color: #6a11cb;
}

.prize-card--third .prize-card__amount {
  color: #ff3e00;
}

/* Prize Card Description */
.prize-card__description {
  font-size: 1.6rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

@keyframes rotateHex {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes dash {
  to {
    stroke-dashoffset: 1000;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
    r: 2;
  }
  50% {
    opacity: 1;
    r: 3;
  }
}

@keyframes pulse-light {
  0%, 100% {
    opacity: 0.4;
    transform: translate(-50%, -85%) scale(1);
    filter: blur(5px);
  }
  50% {
    opacity: 0.8;
    transform: translate(-50%, -85%) scale(1.3);
    filter: blur(8px);
  }
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .prizes__grid {
    gap: 2rem;
  }

  .prize-card {
    padding: 2.5rem 2rem;
  }

  .prize-card__title {
    font-size: 2.2rem;
  }

  .prize-card__amount {
    /* font-size: 3.2rem; */
  }
}

@media (max-width: 768px) {
  .prizes__grid {
    grid-template-columns: 1fr;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
  }

  .prize-card {
    margin-bottom: 3rem;
  }

  /* Adjust medal size for mobile view */
  .prize-card__medal {
    width: 7rem;
    height: 7rem;
    font-size: 3.2rem;
  }
}
