:root{
  --color: #1e92e0;
  --color_hover: #64bfd6;
}
.custom-gradient-bg {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
}
*{
  font-family: 'Poppins', sans-serif;
}
.h-font{
  font-family: 'Merienda', cursive;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.custom-bg{
  background-color: var(--color);
  border: 1px solid var(--color);
}
.custom-bg:hover{
  background-color: var(--color_hover);
  border-color: var(--color_hover);
}

.h-line{
  width: 150px;
  margin: 0 auto;
  height: 1.7px;
}

.custom-alert{
  position: fixed;
  top: 80px;
  right: 25px;
  z-index: 1111;
}

/* Modal Improvements for Mobile and Desktop */
.modal-dialog {
  max-width: 450px;
  margin: 1rem auto;
}

.modal-dialog.modal-lg {
  max-width: 650px;
}

.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #dee2e6;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-body {
  padding: 1.25rem;
}

.modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

/* Form Label Improvements */
.form-label {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: #333;
}

.form-control, .form-select {
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}

.form-control:focus, .form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
}

small.text-muted {
  font-size: 0.75rem;
  display: block;
  margin-top: 0.25rem;
}

.mb-3 {
  margin-bottom: 0.85rem !important;
}

.mb-4 {
  margin-bottom: 1.15rem !important;
}

/* Button Improvements */
.btn {
  font-size: 0.9rem;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 500;
}

.btn-dark {
  background-color: #2c3e50;
  border-color: #2c3e50;
}

.btn-dark:hover {
  background-color: #1a252f;
  border-color: #1a252f;
}

/* Mobile Responsive */
@media (max-width: 576px) {
  .modal-dialog {
    max-width: 95%;
    margin: 0.5rem auto;
    max-height: calc(100vh - 1rem);
  }

  .modal-dialog.modal-lg {
    max-width: 95%;
    max-height: calc(100vh - 1rem);
  }

  .modal-content {
    max-height: calc(100vh - 1rem);
    overflow-y: auto;
  }

  .modal-dialog-scrollable .modal-body {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
  }

  .modal-header {
    padding: 0.85rem 1rem;
    flex-shrink: 0;
  }

  .modal-title {
    font-size: 1rem;
  }

  .modal-title i {
    font-size: 1.3rem !important;
  }

  .modal-body {
    padding: 1rem;
    overflow-y: auto;
  }

  .form-label {
    font-size: 0.85rem;
  }

  .form-control, .form-select {
    font-size: 0.85rem;
    padding: 0.45rem 0.65rem;
  }

  small.text-muted {
    font-size: 0.7rem;
  }

  .btn {
    font-size: 0.85rem;
    padding: 0.45rem 1rem;
  }

  .mb-3 {
    margin-bottom: 0.6rem !important;
  }

  .col-md-6.mb-3 {
    margin-bottom: 0.6rem !important;
  }

  .col-md-12.mb-3 {
    margin-bottom: 0.6rem !important;
  }

  textarea.form-control {
    font-size: 0.85rem !important;
  }

  /* Reduce spacing in registration form */
  #registerModal .modal-body {
    padding: 0.85rem;
  }

  #registerModal .form-label {
    margin-bottom: 0.3rem;
  }

  #registerModal small.text-muted {
    font-size: 0.68rem;
    margin-top: 0.2rem;
  }

  #registerModal .valid-feedback,
  #registerModal .invalid-feedback {
    font-size: 0.68rem;
    margin-top: 0.15rem;
  }

  #registerModal .input-group .btn-outline-secondary {
    padding: 0.45rem 0.6rem;
    font-size: 0.85rem;
  }

  /* Make modal scrollable with smooth scrolling */
  .modal-dialog-scrollable .modal-content {
    -webkit-overflow-scrolling: touch;
  }

  /* Hide scrollbar but keep functionality on iOS */
  .modal-body::-webkit-scrollbar {
    width: 4px;
  }

  .modal-body::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 4px;
  }
}

/* Input Group Styling */
.input-group .btn-outline-secondary {
  border-color: #ced4da;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
}

.input-group .btn-outline-secondary:hover {
  background-color: #f8f9fa;
  border-color: #ced4da;
  color: #495057;
}

/* Validation Feedback Styling */
.valid-feedback,
.invalid-feedback {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: none;
}

.form-control.is-valid,
.form-control.is-invalid {
  background-image: none;
}

.form-control.is-valid ~ .valid-feedback {
  display: block;
  color: #28a745;
}

.form-control.is-invalid ~ .invalid-feedback {
  display: block;
  color: #dc3545;
}

.form-control.is-valid {
  border-color: #28a745;
}

.form-control.is-invalid {
  border-color: #dc3545;
}

.form-control.is-valid:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
}

.form-control.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

/* Error Modal Customization */
#loginErrorModal .modal-dialog {
  max-width: 400px;
}

#loginErrorModal .modal-body {
  padding: 1.5rem;
}

@media (max-width: 576px) {
  #loginErrorModal .modal-dialog {
    max-width: 90%;
  }

  #loginErrorModal .modal-body {
    padding: 1rem;
  }

  #loginErrorModal .modal-body i {
    font-size: 3rem !important;
  }

  #loginErrorModal h5 {
    font-size: 1rem;
  }

  #loginErrorModal p {
    font-size: 0.85rem;
  }
}
