/* Calculator Styles */
#calculator {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  margin: 40px auto;
  max-width: 600px;
  font-family: "BBC Reith Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Slider Container */
#slider-container {
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

/* Custom Range Slider */
#slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 10px;
  background: linear-gradient(to right, #fff 0%, #f0f0f0 100%);
  outline: none;
  opacity: 0.9;
  transition: opacity 0.2s;
  margin-bottom: 20px;
  cursor: pointer;
}

#slider:hover {
  opacity: 1;
}

/* Chrome, Safari, Edge, Opera */
#slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
  transition: all 0.3s ease;
}

#slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

#slider::-webkit-slider-thumb:active {
  transform: scale(1.1);
}

/* Firefox */
#slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
  transition: all 0.3s ease;
}

#slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

#slider::-moz-range-thumb:active {
  transform: scale(1.1);
}

/* Current Value Display */
#current-value {
  color: #ffffff;
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  padding: 15px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  margin-top: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  letter-spacing: 1px;
}

/* Results Container */
.result {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 20px 25px;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.result:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.result:last-child {
  margin-bottom: 0;
}

.result font {
  color: #333333;
  font-size: 16px;
  font-weight: 500;
  flex: 1;
}

.result span {
  color: #667eea;
  font-size: 24px;
  font-weight: 700;
  white-space: nowrap;
  margin-left: 15px;
  text-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

/* Animation for result updates */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.result span {
  animation: pulse 0.5s ease;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  #calculator {
    padding: 25px;
    margin: 20px 15px;
    border-radius: 15px;
  }

  #slider-container {
    padding: 15px;
  }

  #current-value {
    font-size: 26px;
    padding: 12px;
  }

  .result {
    padding: 15px 18px;
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  .result font {
    font-size: 14px;
  }

  .result span {
    font-size: 20px;
    margin-left: 0;
  }

  #slider {
    height: 6px;
  }

  #slider::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
  }

  #slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
  }
}

@media screen and (max-width: 480px) {
  #calculator {
    padding: 20px;
    margin: 15px 10px;
  }

  #current-value {
    font-size: 22px;
  }

  .result {
    padding: 12px 15px;
  }

  .result font {
    font-size: 13px;
  }

  .result span {
    font-size: 18px;
  }
}

/* Add smooth transitions */
#calculator * {
  transition: all 0.3s ease;
}

/* Loading state (optional) */
#calculator.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Success state animation (optional) */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#calculator {
  animation: slideIn 0.6s ease-out;
}
