@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
  min-height: 100vh;
}

/* Animasi untuk navbar */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar-animation {
  animation: fadeInDown 0.5s ease-out;
}

/* Efek hover untuk link navbar */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: #3b82f6;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active::after {
  width: 100%;
}

.explanation-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.explanation-content.expanded {
  max-height: 500px;
}

.step-list {
  counter-reset: step-counter;
}

.step-list li {
  counter-increment: step-counter;
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
}

.step-list li:before {
  content: counter(step-counter) '.';
  position: absolute;
  left: 0;
  font-weight: bold;
  color: #4f46e5;
}

.success-popup {
  animation: pop 0.5s ease-out;
}

.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 15px 25px;
  border-radius: 10px;
  font-weight: bold;
  z-index: 100;
  display: none;
}

@keyframes pop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  70% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.hit-effect {
  animation: hit 0.3s ease-out;
}

@keyframes hit {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

input[type='range'] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: #e5e7eb;
  outline: none;
}

input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input[type='range']::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.focus-visible:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.boundary-hit {
  animation: boundaryHit 0.5s ease-out;
}

@keyframes boundaryHit {
  0% {
    background-color: rgba(239, 68, 68, 0.3);
  }
  100% {
    background-color: transparent;
  }
}

/* Style untuk Basketball Game */
.basketball {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff8c00, #ff4500);
  position: relative;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.basketball::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #000;
}

.basketball::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: #000;
  transform: translateY(-50%);
}

.basketball .line {
  position: absolute;
  width: 100%;
  height: 2px;
  background: #000;
  top: 50%;
  left: 0;
  transform: translateY(-50%) rotate(90deg);
}

.basketball .curve {
  position: absolute;
  width: 100%;
  height: 2px;
  background: #000;
  top: 50%;
  left: 0;
  border-radius: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.basketball .curve:nth-child(4) {
  transform: translateY(-50%) rotate(-45deg);
}

.ring {
  position: absolute;
  width: 60px;
  height: 60px;
  border: 4px solid #ff0000;
  border-radius: 50%;
  transform: translate(-50%, 0);
}

.ring::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  width: 80px;
  height: 80px;
  border: 2px dashed rgba(0, 0, 0, 0.2);
  border-radius: 50%;
}

/* Animasi SWISH yang lebih kecil */
.swish {
  position: absolute;
  color: #10b981;
  font-weight: bold;
  font-size: 14px;
  opacity: 0;
  z-index: 100;
  pointer-events: none;
  animation: swish 1.5s ease-out;
}

@keyframes swish {
  0% {
    transform: translateY(0) scale(0.8);
    opacity: 0;
  }
  20% {
    transform: translateY(-15px) scale(1);
    opacity: 1;
  }
  80% {
    transform: translateY(-25px) scale(0.9);
    opacity: 0.7;
  }
  100% {
    transform: translateY(-35px) scale(0.8);
    opacity: 0;
  }
}

/* Style untuk slider yang reusable */
.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: #e5e7eb;
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.range-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Style untuk tombol basketball */
.btn-basketball {
  background: linear-gradient(135deg, #ff8c00, #ff4500);
  color: white;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-basketball:hover {
  background: linear-gradient(135deg, #ff4500, #e03e00);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-basketball:active {
  transform: translateY(0);
}
