/* ============================================
   KATEGORI MODAL STYLES
   Optimized for performance - GPU accelerated
   ============================================ */

/* Modal Popup Styling */
.swal2-popup.kategori-modal-popup {
  border-radius: 24px;
  padding: 30px 25px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9ff 100%);
  border: 1px solid rgba(124, 77, 255, 0.1);
  box-shadow: 0 25px 80px rgba(124, 77, 255, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  will-change: transform, opacity;
}

/* Title & Subtitle */
.kategori-title {
  color: #1a1a2e;
  margin-bottom: 8px;
  font-weight: 800;
  font-size: 26px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.kategori-title.lihat-skor {
  background: linear-gradient(135deg, #00bcd4, #0097a7);
  -webkit-background-clip: text;
  background-clip: text;
}

.kategori-subtitle {
  color: #6c757d;
  margin-bottom: 25px;
  font-size: 14px;
}

/* ============================================
   ANIMATED ICON - Performance Optimized
   ============================================ */
.kategori-icon-wrapper {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 25px;
  will-change: transform;
}

.kategori-icon-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(124, 77, 255, 0.12),
    rgba(101, 31, 255, 0.04)
  );
  animation: pulse-bg 3s ease-in-out infinite;
  will-change: transform, opacity;
}

.kategori-icon-bg.lihat-skor {
  background: linear-gradient(
    135deg,
    rgba(0, 188, 212, 0.12),
    rgba(0, 151, 167, 0.04)
  );
}

.kategori-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c4dff, #651fff);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(124, 77, 255, 0.3);
  z-index: 2;
  transition: transform 0.3s ease;
  will-change: transform;
}

.kategori-icon.lihat-skor {
  background: linear-gradient(135deg, #00bcd4, #0097a7);
  box-shadow: 0 8px 25px rgba(0, 188, 212, 0.3);
}

.kategori-icon:hover {
  transform: translate(-50%, -50%) scale(1.05);
}

.kategori-icon i {
  font-size: 40px;
  color: white;
}

.kategori-icon-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95px;
  height: 95px;
  border-radius: 50%;
  border: 2px dashed rgba(124, 77, 255, 0.25);
  animation: rotate-ring 20s linear infinite;
  will-change: transform;
}

.kategori-icon-ring.lihat-skor {
  border-color: rgba(0, 188, 212, 0.25);
}

.kategori-icon-ring::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c4dff, #651fff);
}

.kategori-icon-ring.lihat-skor::before {
  background: linear-gradient(135deg, #00bcd4, #0097a7);
}

/* Floating Particles - Simplified for performance */
.kategori-icon-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.kategori-icon-particles span {
  position: absolute;
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, #7c4dff, #651fff);
  border-radius: 50%;
  opacity: 0.5;
  animation: float-particle 4s ease-in-out infinite;
  will-change: transform, opacity;
}

.kategori-icon-particles.lihat-skor span {
  background: linear-gradient(135deg, #00bcd4, #0097a7);
}

.kategori-icon-particles span:nth-child(1) {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}
.kategori-icon-particles span:nth-child(2) {
  top: 5%;
  right: 15%;
  animation-delay: 0.8s;
}
.kategori-icon-particles span:nth-child(3) {
  bottom: 15%;
  left: 5%;
  animation-delay: 1.6s;
}
.kategori-icon-particles span:nth-child(4) {
  bottom: 10%;
  right: 10%;
  animation-delay: 2.4s;
}
.kategori-icon-particles span:nth-child(5) {
  top: 50%;
  left: -5%;
  animation-delay: 3.2s;
  width: 5px;
  height: 5px;
}
.kategori-icon-particles span:nth-child(6) {
  top: 50%;
  right: -5%;
  animation-delay: 4s;
  width: 5px;
  height: 5px;
}

/* ============================================
   KEYFRAME ANIMATIONS - GPU Optimized
   ============================================ */
@keyframes float-particle {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-8px) scale(1.1);
    opacity: 0.8;
  }
}

@keyframes pulse-bg {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.4;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.06);
    opacity: 0.6;
  }
}

@keyframes rotate-ring {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ============================================
   CATEGORY BUTTONS - Performance Optimized
   ============================================ */
.kategori-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kategori-btn {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  will-change: transform;
}

/* Glow Effect - Simplified */
.kategori-btn-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 70%
  );
  transition: width 0.4s ease, height 0.4s ease;
  pointer-events: none;
}

.kategori-btn:hover .kategori-btn-glow {
  width: 250%;
  height: 250%;
}

/* Shimmer Effect */
.kategori-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.kategori-btn:hover::before {
  left: 100%;
}

/* Hover States */
.kategori-btn:hover {
  transform: translateX(6px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.2);
}

.kategori-btn:active {
  transform: translateX(3px) scale(0.98);
}

/* Umum Button */
.kategori-umum {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}
.kategori-umum:hover {
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

/* Senior Button */
.kategori-senior {
  background: linear-gradient(135deg, #00bfa5 0%, #00897b 100%);
  box-shadow: 0 6px 20px rgba(0, 191, 165, 0.35);
}
.kategori-senior:hover {
  box-shadow: 0 10px 30px rgba(0, 191, 165, 0.5);
}

/* Junior Button */
.kategori-junior {
  background: linear-gradient(135deg, #f06292 0%, #ec407a 100%);
  box-shadow: 0 6px 20px rgba(240, 98, 146, 0.35);
}
.kategori-junior:hover {
  box-shadow: 0 10px 30px rgba(240, 98, 146, 0.5);
}

/* Button Icon - NO backdrop-filter for performance */
.kategori-btn-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  transition: transform 0.3s ease, background 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
  will-change: transform;
}

.kategori-btn:hover .kategori-btn-icon {
  background: rgba(255, 255, 255, 0.35);
  transform: rotate(8deg) scale(1.1);
}

.kategori-btn-icon i {
  font-size: 26px;
  color: white;
  transition: transform 0.3s ease;
}

.kategori-btn:hover .kategori-btn-icon i {
  transform: scale(1.1);
}

/* Button Content */
.kategori-btn-content {
  flex: 1;
  text-align: left;
}

.kategori-btn-title {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: white;
  letter-spacing: 1px;
  margin-bottom: 2px;
  transition: letter-spacing 0.3s ease;
}

.kategori-btn:hover .kategori-btn-title {
  letter-spacing: 1.5px;
}

.kategori-btn-desc {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

/* Button Arrow */
.kategori-btn-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.kategori-btn:hover .kategori-btn-arrow {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(5px);
}

.kategori-btn-arrow i {
  font-size: 18px;
  color: white;
  transition: transform 0.3s ease;
}

.kategori-btn:hover .kategori-btn-arrow i {
  animation: arrow-bounce 0.8s ease infinite;
}

@keyframes arrow-bounce {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(3px);
  }
}

/* Animation delays for staggered entrance */
.kategori-umum {
  animation: slideIn 0.4s ease forwards;
  animation-delay: 0.05s;
  opacity: 0;
}
.kategori-senior {
  animation: slideIn 0.4s ease forwards;
  animation-delay: 0.15s;
  opacity: 0;
}
.kategori-junior {
  animation: slideIn 0.4s ease forwards;
  animation-delay: 0.25s;
  opacity: 0;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================
   CANCEL BUTTON STYLING
   ============================================ */
.swal2-cancel.kategori-cancel-btn {
  border-radius: 12px !important;
  padding: 12px 28px !important;
  font-weight: 600 !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  border: 2px solid transparent !important;
}

.swal2-cancel.kategori-cancel-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 5px 15px rgba(108, 117, 125, 0.25) !important;
  border-color: #6c757d !important;
}

/* ============================================
   MODAL TRANSITIONS - Simplified for performance
   ============================================ */
@keyframes modalOpen {
  0% {
    opacity: 0;
    transform: scale(0.85) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modalClose {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.85) translateY(20px);
  }
}

@keyframes backdropOpen {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes backdropClose {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.modal-open-animation {
  animation: modalOpen 0.3s ease forwards;
}

.modal-close-animation {
  animation: modalClose 0.2s ease forwards;
}

.backdrop-open-animation {
  animation: backdropOpen 0.25s ease forwards;
}

.backdrop-close-animation {
  animation: backdropClose 0.2s ease forwards;
}

/* ============================================
   REDUCED MOTION PREFERENCES
   For users who prefer reduced motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .kategori-icon-bg,
  .kategori-icon-ring,
  .kategori-icon-particles span,
  .kategori-umum,
  .kategori-senior,
  .kategori-junior {
    animation: none !important;
    opacity: 1 !important;
  }

  .modal-open-animation,
  .modal-close-animation,
  .backdrop-open-animation,
  .backdrop-close-animation {
    animation: none !important;
  }

  .kategori-btn:hover .kategori-btn-arrow i {
    animation: none !important;
  }
}

/* ============================================
   RESPONSIVE DESIGN
   Mobile optimization for modal
   ============================================ */
@media (max-width: 576px) {
  .swal2-popup.kategori-modal-popup {
    width: 85% !important;
    max-width: 360px !important;
    padding: 20px 15px !important;
  }

  .kategori-title {
    font-size: 22px !important;
  }

  .kategori-icon-wrapper {
    width: 10px !important;
    height: 50px !important;
    margin-bottom: 20px !important;
  }

  .kategori-btn {
    margin-bottom: 10px !important;
    padding: 12px 15px !important;
  }

  .kategori-subtitle {
    margin-bottom: 15px !important;
  }
}
