body {
  padding-top: 1rem;
  padding-bottom: 2rem;
  font-family: 'Arial', sans-serif;
}

/* Loading screen styling */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f8f9fa;
  z-index: 9999;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
}

.screen {
  min-height: 80vh;
  padding: 1rem;
}

.form-range {
  cursor: pointer;
}

/* Make sure form labels stand out */
.form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* Improve spacing and readability */
.mb-4 {
  margin-bottom: 2rem !important;
}

/* Make cards more attractive */
.card {
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Make result values stand out */
.display-6 {
  font-weight: bold;
  color: #0d6efd;
}

/* Styling for compressed before/after/delta display */
.fw-bold {
  font-weight: 600 !important;
}

/* Arrow symbol styling */
td .d-block {
  margin-top: 3px;
  font-size: 0.9rem;
}

/* Enhance table readability */
.table > tbody > tr > td {
  vertical-align: middle;
}

/* Button styling */
.btn-primary {
  padding: 0.5rem 1.5rem;
}

/* Sound test button styling */
#test-sound {
  font-size: 0.85rem;
  padding: 0.3rem 0.7rem;
}

/* Display for selected activity in post-survey */
#post-q2-display {
  padding: 0.375rem 0.75rem;
  font-weight: 500;
  background-color: #f8f9fa;
}

/* Make the comparison sections visually distinct */
.border-top {
  border-top: 1px solid #dee2e6 !important;
  padding-top: 1.5rem;
}

.mt-4 {
  margin-top: 1.8rem !important;
}

/* Timer styling */
#timer-display {
  font-size: 3rem;
  font-weight: bold;
  color: #198754;
}

#timer-duration {
  max-width: 120px;
  margin: 0 auto 10px;
  text-align: center;
}

/* Login/Register styling */
#login-screen, #register-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  width: 100%;
}

/* Card styling for auth screens */
.screen .card {
  border-radius: 0.75rem;
  border: none;
}

.screen .card-body {
  padding: 2.5rem;
}

/* Form control styling */
.form-control-lg {
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
}

.form-control-lg:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.btn-lg {
  padding: 0.75rem 1rem;
  font-size: 1.1rem;
  border-radius: 0.5rem;
}

/* Shadow styling */
.shadow {
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.08) !important;
}

/* Form validation styling */
.form-control.is-invalid {
  border-color: #dc3545;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-valid {
  border-color: #198754;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Email validation helper text */
.invalid-feedback {
  display: none;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  color: #dc3545;
}

.is-invalid ~ .invalid-feedback {
  display: block;
}


/* Exercise animation styling */
.exercise-animation-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 250px;
}

.exercise-animation-item {
  text-align: center;
  transition: all 0.5s ease-in-out;
}

.animation-gif {
  max-height: 200px;
  border: 1px solid #dee2e6;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.exercise-illustration {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.exercise-illustration svg {
  width: 100%;
  max-width: 250px;
  height: 200px;
  background-color: white;
  border-radius: 6px;
}

.animation-text {
  font-weight: 500;
  color: #0d6efd;
  margin-top: 10px;
}

/* SVG Animation Styling */
.animation-container {
  width: 100%;
  max-width: 250px;
  margin: 0 auto;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  background-color: #f8f9fa;
  padding: 15px;
}

.exercise-svg {
  width: 100%;
  height: auto;
}

/* Push-up animation */
@keyframes push-up {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes push-down {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.pushup-up {
  animation: push-up 2s infinite;
}

.pushup-down {
  animation: push-down 2s infinite;
}

/* Squat animation */
@keyframes squat-up {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes squat-down {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.squat-up {
  animation: squat-up 3s infinite;
}

.squat-down {
  animation: squat-down 3s infinite;
}

/* Breathing circle animation - already using SVG animate tag */

.text-primary {
  color: #0d6efd !important;
}

/* Google Sign-in button styling */
#google-signin, #google-signup {
  background-color: white;
  color: #757575;
  font-weight: 500;
  border: 1px solid #dadce0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: background-color 0.3s, box-shadow 0.3s;
}

#google-signin:hover, #google-signup:hover {
  background-color: #f8f9fa;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

#google-signin:focus, #google-signup:focus {
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.2);
  border-color: #4285f4;
}

#google-signin img, #google-signup img {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

/* Mobile optimization */
@media (max-width: 576px) {
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .display-6 {
    font-size: 1.5rem;
  }
  
  #timer-display {
    font-size: 2.5rem;
  }
  
  .screen .card-body {
    padding: 1.5rem;
  }
  
  /* Improve button spacing on mobile */
  .btn {
    margin-bottom: 0.5rem;
  }
  
  /* Better form control sizing on mobile */
  .form-control {
    font-size: 16px; /* Prevents iOS zoom on focus */
  }
}

/* Additional breakpoint for small phones */
@media (max-width: 400px) {
  .screen .card-body {
    padding: 1.25rem;
  }
  
  .form-control-lg, .btn-lg {
    font-size: 0.95rem;
    padding: 0.6rem 0.8rem;
  }
}

/* User info display styling */
#user-info {
  font-size: 0.9rem;
  color: #6c757d;
}

#user-email {
  font-weight: 500;
  max-width: 150px;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

@media (max-width: 576px) {
  #user-email {
    max-width: 100px;
  }
}

/* Terms of Service checkbox styling */
#auto-id-tos-container {
  margin-bottom: 1.5rem !important;
}

#auto-id-tos-container .form-check-input {
  margin-right: 0.5rem;
  /* Outline the checkbox for better visibility */
  border: 2px solid #0d6efd;
  border-radius: 0.25rem;
  transform: scale(1.1);
}

#auto-id-tos-container .form-check-input:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
  transform: scale(1.1);
}

#auto-id-tos-container .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  border-color: #0d6efd;
}

#auto-id-tos-container .form-check-label {
  font-size: 0.95rem;
  color: #495057;
  cursor: pointer;
  margin-left: 0.25rem;
}

#auto-id-tos-container .form-check-label a {
  color: #0d6efd;
  font-weight: 500;
}

#auto-id-tos-container .form-check-label a:hover {
  color: #0b5ed7;
  text-decoration: underline !important;
}

/* Disabled start button styling */
#start-survey:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
