/* Custom styles for the 律眠 app */

/* Base styles */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Time inputs styling */
.time-input {
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
}

/* Monospace font class */
.font-geist-mono {
  font-family: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Monaco, Consolas, monospace;
}

/* Animations */
@keyframes pulse {
  0% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.8;
  }
}

.pulse-animation {
  animation: pulse 2s infinite ease-in-out;
}

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

.slide-in {
  animation: slideIn 0.3s ease-out forwards;
}

/* Sleep quality indicator colors */
#sleepQualityIndicator.excellent {
  background-color: rgba(76, 175, 80, 0.2);
  color: #4CAF50;
}

#sleepQualityIndicator.good {
  background-color: rgba(187, 222, 251, 0.2);
  color: #BBDEFB;
}

#sleepQualityIndicator.average {
  background-color: rgba(255, 152, 0, 0.2);
  color: #FF9800;
}

#sleepQualityIndicator.poor {
  background-color: rgba(244, 67, 54, 0.2);
  color: #F44336;
}

/* Progress bar animation */
#habitProgressBar {
  transition: width 0.8s ease-in-out;
}

/* Focus states */
button:focus, input:focus {
  outline: 2px solid rgba(187, 222, 251, 0.5);
  outline-offset: 2px;
}

/* Modal animations */
#successModal, #failureModal {
  transition: opacity 0.3s ease-out;
}

/* Streak badge styling */
#streakBadge {
  transition: all 0.3s ease;
}

#streakBadge:hover {
  transform: scale(1.05);
}

.streak-count {
  font-weight: 600;
  color: #4CAF50;
}

/* Success and failure buttons hover effects */
#successBtn:hover, #failureBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#successBtn:active, #failureBtn:active {
  transform: translateY(0);
}

/* Sleep metrics bars */
.metric .bg-[#BBDEFB], .metric .bg-[#D1C4E9], .metric .bg-[#4CAF50] {
  transition: width 1s ease-out;
}
