*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.congrats-section {
  position: relative;
  overflow: hidden;
  padding: 80px 20px;
  background:
    radial-gradient(
      ellipse 80% 60% at 50% -10%,
      rgba(57, 73, 171, 0.45) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 60% 40% at 90% 80%,
      rgba(189, 157, 108, 0.18) 0%,
      transparent 60%
    ),
    linear-gradient(160deg, #0d1642 0%, #1a237e 50%, #0d1642 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.congrats-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    transparent,
    transparent 80px,
    rgba(189, 157, 108, 0.05) 80px,
    rgba(189, 157, 108, 0.05) 81px
  );
  pointer-events: none;
}

.congrats-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.badge-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(189, 157, 108, 0.12);
  border: 1px solid rgba(189, 157, 108, 0.4);
  border-radius: var(--radius-full);
  padding: 8px 22px;
  color: var(--color-secondary-light);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.headline-block {
  text-align: center;
  margin-bottom: 48px;
}
.headline-block .congrats-title {
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 600;
  color: var(--color-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.headline-block .name-title {
  font-size: clamp(1.7rem, 5vw, 3rem);
  font-weight: 900;
  color: var(--color-secondary-light);
  line-height: 1.2;
  margin-bottom: 6px;
}
.headline-block .rank-title {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 700;
  color: var(--color-white);
  opacity: 0.9;
}

.card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(189, 157, 108, 0.25);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow:
    var(--shadow-2xl),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.card-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
}

.photo-panel {
  position: relative;
  background: linear-gradient(
    160deg,
    rgba(57, 73, 171, 0.5) 0%,
    rgba(13, 22, 66, 0.8) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  border-left: 1px solid rgba(189, 157, 108, 0.2);
}
.photo-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    rgba(189, 157, 108, 0.03) 20px,
    rgba(189, 157, 108, 0.03) 21px
  );
}
.photo-ring {
  position: relative;
  z-index: 1;
}
.photo-ring::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(
    var(--color-secondary-light),
    var(--color-secondary),
    var(--color-secondary-light) 60%,
    transparent 60%,
    transparent 70%,
    var(--color-secondary) 70%,
    var(--color-secondary-light)
  );
  animation: spin-ring 6s linear infinite;
}
.photo-ring::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--color-primary-dark);
}
@keyframes spin-ring {
  to {
    transform: rotate(360deg);
  }
}

.photo-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  display: block;
}

.ribbon {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 3;
  animation: ribbon-bounce 2.5s ease-in-out infinite;
}
.ribbon svg {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 4px 12px rgba(251, 191, 36, 0.5));
}

@keyframes ribbon-bounce {
  0%,
  100% {
    transform: rotate(-5deg) scale(1);
  }
  50% {
    transform: rotate(5deg) scale(1.1);
  }
}

/* ---- Info panel ---- */
.info-panel {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.info-text {
  font-family: var(--font-secondary);
  font-size: clamp(0.95rem, 1.8vw, 1.08rem);
  line-height: 2;
  color: rgba(255, 255, 255, 0.88);
  text-align: right;
}
.info-text .highlight {
  color: var(--color-secondary-light);
  font-weight: 700;
}
.info-text .dept {
  color: var(--color-secondary);
  font-weight: 600;
}

.stars-row {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.stars-row svg {
  width: 20px;
  height: 20px;
  color: var(--color-secondary-light);
}

.wish-text {
  font-family: var(--font-secondary);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.65);
  text-align: right;
  font-style: italic;
  border-right: 3px solid var(--color-secondary);
  padding-right: 14px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  padding: 18px 36px;
  border-top: 1px solid rgba(189, 157, 108, 0.2);
  background: rgba(13, 22, 66, 0.5);
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.88rem;
  font-family: var(--font-secondary);
  transition: color var(--transition-base);
}
.contact-item:hover {
  color: var(--color-secondary-light);
}
.contact-item svg {
  width: 16px;
  height: 16px;
  color: var(--color-secondary);
  flex-shrink: 0;
}

.contact-divider {
  width: 1px;
  height: 20px;
  background: rgba(189, 157, 108, 0.3);
}

.shimmer-line {
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-secondary-light),
    var(--color-secondary),
    transparent
  );
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
  border-radius: var(--radius-full);
  margin: 0 auto 40px;
  max-width: 200px;
}
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/*  RESPONSIVE  */
@media (max-width: 700px) {
  .card-body {
    grid-template-columns: 1fr;
  }
  .photo-panel {
    border-left: none;
    border-bottom: 1px solid rgba(189, 157, 108, 0.2);
    padding: 36px 20px 28px;
  }
  .info-panel {
    padding: 28px 20px;
  }
  .card-footer {
    gap: 16px;
    padding: 16px 20px;
    flex-direction: column;
  }
  .contact-divider {
    display: none;
  }
  .ribbon {
    top: 16px;
    right: 16px;
  }
}
