/* Modern Styling */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  min-height: 100vh;
  padding: 2rem;
  margin: 0;
  color: #2d3436;
}

.container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  max-width: 1200px;
  margin: 0 auto;
}

h1 {
  color: #2d3436;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-align: center;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: center;
  justify-content: center;
}

label {
  font-weight: 600;
  color: #495057;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

select, input {
  background: #ffffff;
  border: 2px solid #e0e0e0;
  border-radius: 0.75rem;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 200px;
}

select:focus, input:focus {
  outline: none;
  border-color: #4dabf7;
  box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.2);
}

button {
  background: linear-gradient(135deg, #4dabf7 0%, #339af0 100%);
  border: none;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(51, 154, 240, 0.3);
}
#customRange {
  display: flex;
  flex-wrap: nowrap;  /* Boshqa satrga o'tishiga yo'l qo'ymaydi */
  justify-content: space-between; /* Elementlarni teng masofada joylashtirish */
  gap: 10px; /* Elementlar o'rtasidagi bo'shliq */
  background: #f8f9fa;
  padding: 15px;
  border-radius: 10px;
  margin-top: 15px;
  border: 1px solid #dee2e6;
  width: 68%;
  align-items: center; /* Vertikal tekislash */
}

#customRange label,
#customRange input,
#customRange button {
  margin: 0; /* Bo'sh joylarni olib tashlash */
  /* Flex itemlarga teng o'lcham berish */
}
#customRange label {
  padding-left: 10px;
}
#applyRange {
  padding: 5px 10px; /* Button uchun joy */
}

.hidden {
  display: none;
}

/* Custom range divni ko'rsatish */
.show {
  display: block;
}


.chart-container {
  width: 80%; 
  margin: 0 auto;
  max-width: 800px; 
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  position: relative;
  margin-top: 2rem;
}

canvas {
  width: 100%; 
  height: 400px; 
}

@media (max-width: 768px) {
  .container {
    padding: 1.5rem;
    border-radius: 1rem;
  }
  
  .controls {
    flex-direction: column;
  }
  
  select, input {
    max-width: 100%;
  }
  
  #customRange {
    flex-direction: column;
    align-items: stretch;
  }
  
  h1 {
    font-size: 2rem;
  }
}

#totalAmount {
  color: #333;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  margin-top: 10px;
}
