body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  line-height: 1.5;
}

.card {
  width: 100%;
  max-width: 400px;
  background-color: #fff;
  border: none;
  border-radius: 12px;
}

label.radio {
  cursor: pointer;
  width: 100%;
}

label.radio input {
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
  pointer-events: none;
}

label.radio span {
  padding: 7px 14px;
  border: 2px solid #eee;
  display: inline-block;
  color: #039be5;
  border-radius: 10px;
  width: 100%;
  height: 48px;
  line-height: 27px;
}

label.radio input:checked + span {
  border-color: #039BE5;
  background-color: #81D4FA;
  color: #fff;
  border-radius: 9px;
  height: 48px;
  line-height: 27px;
}

.form-control {
  margin-top: 10px;
  height: 48px;
  border: 2px solid #eee;
  border-radius: 10px;
}

.form-control:focus {
  box-shadow: none;
  border: 2px solid #039BE5;
}

.agree-text {
  font-size: 12px;
}

.terms {
  font-size: 12px;
  text-decoration: none;
  color: #039BE5;
}

.confirm-button {
  height: 50px;
  border-radius: 10px;
}

/* Ensure navbar toggler is visible on mobile */
.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Elegant offcanvas styling */
.offcanvas {
  width: 300px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-left: none;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.elegant-header {
  background: rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1.5rem;
}

.elegant-header .offcanvas-title {
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
}

.elegant-close {
  filter: invert(1);
  opacity: 0.8;
}

.elegant-close:hover {
  opacity: 1;
}

.elegant-body {
  padding: 2rem 1.5rem;
}

.elegant-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.elegant-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: white !important;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.elegant-link: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;
}

.elegant-link:hover:before {
  left: 100%;
}

.elegant-link:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.elegant-link i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.elegant-link span {
  font-size: 0.95rem;
}

/* Mobile Input Container with Icon Inside */
.mobile-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.mobile-input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #6c757d;
  z-index: 2;
  pointer-events: none;
}

.mobile-input-field {
  height: 48px;
  border: 2px solid #eee;
  border-radius: 10px;
  padding-left: 45px;
  padding-right: 15px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  transition: all 0.3s ease;
}

.mobile-input-field:focus {
  border-color: #039BE5;
  box-shadow: 0 0 0 0.2rem rgba(3, 155, 229, 0.25);
  outline: none;
  transform: translateY(-1px);
}

.mobile-input-field::placeholder {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-weight: 400;
  letter-spacing: normal;
}

.mobile-input-field:focus + .mobile-input-icon {
  color: #039BE5;
}

/* Alternative focus styling for the container */
.mobile-input-container:focus-within .mobile-input-icon {
  color: #039BE5;
}

/* Hindi text styling - Now primary text */
.hindi-text {
  font-family: 'Noto Sans Devanagari', 'Arial Unicode MS', sans-serif;
  font-weight: 500;
  margin-top: 0;
  color: #333;
}

.hindi-text.text-muted {
  color: #6c757d;
}

.hindi-text.text-success {
  color: #28a745 !important;
}

/* Make Hindi text primary for card titles and headings */
.card-title.hindi-text {
  color: #333;
  font-weight: 600;
}

.information.hindi-text {
  color: #333;
  font-weight: 500;
}

.agree-text.hindi-text {
  color: #6c757d;
  font-size: 12px;
}

.terms.hindi-text {
  color: #039BE5;
  font-size: 12px;
}

.otp-input {
  width: 45px !important;
  height: 50px;
  margin: 0 3px;
  border: 2px solid #eee;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
}

/* Responsive OTP inputs for mobile */
@media (max-width: 576px) {
  .otp-input {
    width: 40px !important;
    height: 45px;
    margin: 0 2px;
    font-size: 1rem;
  }
  
  .input-group.justify-content-center {
    flex-wrap: wrap;
    gap: 0.25rem;
  }
}

.otp-input:focus {
  border-color: #039BE5;
  box-shadow: 0 0 0 0.2rem rgba(3, 155, 229, 0.25);
}

.otp-input:valid {
  border-color: #28a745;
  background-color: #f8fff9;
}

/* Success message styling */
.text-success {
  color: #28a745 !important;
}

/* Form transition animations */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Ensure forms are properly hidden/shown */
#otpForm, #appointmentForm {
  transition: opacity 0.3s ease;
}

#otpForm {
  display: flex !important;
}

#appointmentForm {
  display: none !important;
}

#appointmentForm.show {
  display: flex !important;
}

/* Mobile form specific styling */
#mobileForm .form-control {
  height: 48px;
  border: 2px solid #eee;
  border-radius: 10px;
}

#mobileForm .form-control:focus {
  box-shadow: none;
  border: 2px solid #039BE5;
}

/* OTP verification form styling */
#otpVerificationForm .otp-input {
  border: 2px solid #eee;
  border-radius: 8px;
}

#otpVerificationForm .otp-input:focus {
  border-color: #039BE5;
  box-shadow: 0 0 0 0.2rem rgba(3, 155, 229, 0.25);
}

/* Loading state for buttons */
.btn.loading {
  position: relative;
  color: transparent !important;
}

.btn.loading:after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Dashboard Styles */
.sticky-top {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stats-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.job-card-item {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  overflow: hidden;
}

.job-card-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.urgent-job {
  border-left: 4px solid #dc3545;
}

.urgent-job .card-header {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
}

.job-card-item .card-header {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.company-logo {
  width: 40px;
  height: 40px;
  background: #e3f2fd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.job-details {
  font-size: 0.9rem;
}

.job-details i {
  width: 16px;
}

.skills .badge {
  font-size: 0.75rem;
  padding: 0.4em 0.6em;
}

/* Mobile App Optimizations */
@media (max-width: 768px) {
  .container-fluid {
    padding: 0.75rem;
  }
  
  /* Make cards responsive */
  .card {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }
  
  /* Container adjustments for forms */
  .container.d-flex.justify-content-center {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Typography for mobile */
  h2 {
    font-size: 1.5rem;
    font-weight: 600;
  }
  
  h5 {
    font-size: 1.1rem;
    font-weight: 500;
  }
  
  h6 {
    font-size: 1rem;
    font-weight: 500;
  }
  
  .hindi-text {
    font-size: 0.95rem;
    line-height: 1.4;
  }
  
  /* Card adjustments */
  .stats-card {
    margin-bottom: 0.75rem;
  }
  
  .stats-card .card-body {
    padding: 1rem;
  }
  
  .stats-card h4 {
    font-size: 1.5rem;
    font-weight: 600;
  }
  
  .job-card-item {
    margin-bottom: 1rem;
  }
  
  .job-card-item .card-header {
    padding: 0.75rem;
  }
  
  .job-card-item .card-body {
    padding: 1rem;
  }
  
  .job-card-item .card-footer {
    padding: 0.75rem;
  }
  
  /* Search and filter */
  .input-group,
  .search-container {
    width: 100% !important;
    margin-bottom: 0.75rem;
  }
  
  .search-input {
    height: 44px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .form-select {
    width: 100% !important;
    height: 44px;
    font-size: 16px;
  }
  
  .d-flex.gap-2 {
    flex-direction: column;
  }
  
  /* Button adjustments */
  .btn {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
  
  .btn-sm {
    font-size: 0.8rem;
    padding: 0.375rem 0.5rem;
  }
}

@media (max-width: 576px) {
  .navbar-brand span {
    display: none;
  }
  
  /* Extra small screens */
  .container-fluid {
    padding: 0.5rem;
  }
  
  h2 {
    font-size: 1.3rem;
  }
  
  h5 {
    font-size: 1rem;
  }
  
  h6 {
    font-size: 0.9rem;
  }
  
  .hindi-text {
    font-size: 0.9rem;
  }
  
  /* Card adjustments for small screens */
  .stats-card .card-body {
    padding: 0.75rem;
  }
  
  .stats-card h4 {
    font-size: 1.3rem;
  }
  
  .job-card-item .card-header {
    padding: 0.5rem;
  }
  
  .job-card-item .card-body {
    padding: 0.75rem;
  }
  
  .job-card-item .card-footer {
    padding: 0.5rem;
  }
  
  .card-footer .btn {
    font-size: 0.8rem;
    padding: 0.375rem 0.5rem;
  }
  
  .job-details {
    font-size: 0.8rem;
  }
  
  .skills .badge {
    font-size: 0.7rem;
    padding: 0.25em 0.4em;
  }
  
  /* Search input for small screens */
  .search-input {
    height: 42px;
    font-size: 16px;
  }
  
}

/* Web App specific styles */
@media (max-width: 992px) {
  .offcanvas {
    width: 280px;
  }
}

/* Dark mode support for future */
@media (prefers-color-scheme: dark) {
  .stats-card,
  .job-card-item {
    background-color: #2d3748;
    color: #e2e8f0;
  }
  
  .job-card-item .card-header {
    background-color: #4a5568;
    border-bottom-color: #4a5568;
  }
}

/* Loading states */
.loading-card {
  opacity: 0.6;
  pointer-events: none;
}

.loading-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Animation for new job cards */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.job-card {
  animation: slideInUp 0.5s ease forwards;
}

.job-card:nth-child(1) { animation-delay: 0.1s; }
.job-card:nth-child(2) { animation-delay: 0.2s; }
.job-card:nth-child(3) { animation-delay: 0.3s; }
.job-card:nth-child(4) { animation-delay: 0.4s; }
.job-card:nth-child(5) { animation-delay: 0.5s; }
.job-card:nth-child(6) { animation-delay: 0.6s; }

/* Mobile App Touch Targets */
@media (max-width: 768px) {
  /* Ensure minimum touch target size */
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .navbar-toggler {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Better spacing for touch */
  .card-footer .d-flex.gap-2 {
    gap: 0.5rem !important;
  }
  
  .card-footer .btn {
    flex: 1;
    min-height: 40px;
  }
  
  /* Improve text readability */
  .card-text {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  .company-logo {
    width: 36px;
    height: 36px;
  }
  
  .company-logo i {
    font-size: 16px;
  }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  .search-input,
  .mobile-input-field,
  .form-control,
  .form-select,
  input[type="text"],
  input[type="email"],
  input[type="tel"] {
    font-size: 16px !important; /* Prevents zoom on iOS */
  }
  
  /* Prevent zoom on focus for iOS */
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Additional mobile optimizations for app conversion */
@media (max-width: 768px) {
  /* Improve touch interactions */
  a, button, input, select, textarea {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  }
  
  /* Better scrolling */
  body {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Prevent text size adjustment */
  html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
  }
  
  /* Modal adjustments for mobile */
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }
  
  .modal-content {
    border-radius: 12px;
  }
  
  /* Offcanvas full width on very small screens */
  @media (max-width: 400px) {
    .offcanvas {
      width: 100% !important;
    }
  }
}

/* Search Container Styling */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
}


.search-input {
  height: 48px;
  border: 2px solid #eee;
  border-radius: 10px;
  padding-left: 15px;
  padding-right: 15px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: #039BE5;
  box-shadow: 0 0 0 0.2rem rgba(3, 155, 229, 0.25);
  outline: none;
}


/* Make sure navbar is responsive */
@media (max-width: 991.98px) {
  .navbar-collapse {
    display: none;
  }
}

/* Ensure proper spacing on mobile */
@media (max-width: 576px) {
  .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    margin: 0 auto !important;
    max-width: 100%;
  }
  
  .card {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 12px;
  }
  
  .card-body {
    padding: 1.5rem 1rem;
  }
  
  /* Better spacing for form containers */
  #otpForm,
  #appointmentForm {
    padding: 0.5rem;
  }
  
  /* Radio button adjustments */
  label.radio span {
    padding: 6px 12px;
    height: 44px;
    line-height: 30px;
    font-size: 0.9rem;
  }
  
  /* Form control adjustments */
  .form-control {
    height: 44px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .mobile-input-field {
    height: 44px;
    font-size: 16px;
  }
  
  .confirm-button {
    height: 48px;
    font-size: 16px;
  }
}