/* Slider container */
.slider-container {
  position: relative;
  padding: 0;
  width: 100%;
  margin-bottom: 24px;
}/* Root CSS variables for shadcn UI dark theme */
:root {
  --background: 240 10% 3.9%;
  --foreground: 0 0% 98%;
  --card: 240 10% 3.9%;
  --card-foreground: 0 0% 98%;
  --popover: 240 10% 3.9%;
  --popover-foreground: 0 0% 98%;
  --primary: 171 70% 40%;
  --primary-foreground: 0 0% 100%;
  --secondary: 240 3.7% 15.9%;
  --secondary-foreground: 0 0% 98%;
  --muted: 240 3.7% 15.9%;
  --muted-foreground: 240 5% 64.9%;
  --accent: 240 3.7% 15.9%;
  --accent-foreground: 0 0% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 0 0% 98%;
  --border: 240 3.7% 15.9%;
  --input: 240 3.7% 15.9%;
  --ring: 240 4.9% 83.9%;
  --radius: 0.5rem;
}

.grid-container {
  padding: 10px;
  border-radius: 4px;
  background-color: hsl(var(--background));
  overflow-x: auto;
}

.weeks-view {
  width: 4px !important;
  height: 4px !important;
  margin: 1px !important;
}

.days-view {
  width: 3px !important;
  height: 3px !important;
  margin: 1px !important;
  border-radius: 0 !important;
}

/* Font classes */
.font-display {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.03em;
}

.font-text {
  font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.01em;
}

/* General styling */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  animation: fadeIn 0.5s ease-in-out;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.015em;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
}

.counter-box {
  padding: 1.5rem;
}

.counter-value {
  font-weight: 700;
  font-size: 3rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.counter-label {
  font-weight: 500;
  margin-top: 0.5rem;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#timeline-grid {
  min-height: 200px;
  display: grid;
  margin: 0 auto;
  width: fit-content;
}

.time-block {
  width: 10px;
  height: 10px;
  border-radius: 0;
  margin: 2px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

/* Different sizes for different views */
.time-block.years-view {
  width: 14px;
  height: 14px;
  border-radius: 0;
}

.time-block.months-view {
  width: 10px;
  height: 10px;
  border-radius: 0;
}

.time-block.weeks-view {
  width: 6px;
  height: 6px;
  border-radius: 0;
}

.time-block.days-view {
  width: 4px;
  height: 4px;
  border-radius: 0;
  margin: 1px;
}

.time-block-filled {
  background-color: hsl(var(--muted));
}

.time-block-empty {
  background-color: hsl(var(--primary));
}

.time-block:hover {
  transform: scale(1.1);
  z-index: 10;
}

/* Form elements styling for consistency */
input, select, button {
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.3);
}

button {
  cursor: pointer;
}

/* Animation for countdown numbers */
@keyframes countUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.counting-animation {
  animation: countUp 0.8s ease-out forwards;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: hsl(var(--background));
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--muted));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted-foreground));
}

/* Settings panel and toggles */
.toggle-checkbox:checked {
  right: 0;
  border-color: hsl(var(--primary));
}

.toggle-checkbox:checked + .toggle-label {
  background-color: hsl(var(--primary));
}

.toggle-label {
  transition: background-color 0.2s ease;
}

#settings-panel {
  animation: fadeIn 0.2s ease-in-out;
}

#settings-panel.hidden {
  display: none;
}

#close-settings {
  transition: transform 0.2s ease;
}

#close-settings:hover {
  transform: rotate(90deg);
}

/* For the daily mood tracker feature */
/*
input[type="range"] {
  -webkit-appearance: none;
  margin: 10px 0 5px 0;
  height: 6px;
  width: 100%;
}

input[type="range"]:focus {
  outline: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: linear-gradient(to right, #f44336, #ffeb3b, #4caf50);
  border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
  border: 2px solid hsl(var(--background));
  height: 16px;
}
*/

/* For the goal list */
.goal-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid hsl(var(--border));
}

.goal-checkbox {
  margin-right: 0.75rem;
}

.goal-label {
  flex: 1;
}

.goal-delete {
  color: hsl(var(--destructive));
  cursor: pointer;
  opacity: 0.7;
}

.goal-delete:hover {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .grid-cols-4 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

/* Checkbox styling */
input[type="checkbox"].goal-checkbox {
  appearance: none;
  -webkit-appearance: none;
  background-color: hsl(var(--background));
  border: 1.5px solid hsl(var(--muted-foreground));
  border-radius: 3px;
  cursor: pointer;
  display: inline-block;
  height: 18px;
  position: relative;
  width: 18px;
  transition: all 0.2s ease;
}

input[type="checkbox"].goal-checkbox:checked {
  background-color: hsl(var(--primary));
  border-color: hsl(var(--primary));
}

input[type="checkbox"].goal-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

input[type="checkbox"].goal-checkbox:focus {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* Slider container */
.slider-container {
  position: relative;
  padding: 0;
  width: 100%;
  margin-bottom: 24px;
}

/* Basic Slider Thumb Styling */
input[type="range"].slider-thumb {
  -webkit-appearance: none; /* Override default look */
  appearance: none;
  width: 16px; /* Thumb width */
  height: 16px; /* Thumb height */
  background: hsl(var(--foreground)); /* Thumb color */
  border-radius: 50%; /* Make it round */
  cursor: pointer;
  border: 2px solid hsl(var(--background)); /* Optional border */
  margin-top: -5px; /* Adjust vertical alignment on track if track height is fixed */
}

/* Track styling (Optional - depends on desired look) */
input[type="range"].slider-thumb::-webkit-slider-runnable-track {
  height: 6px;
  background: hsl(var(--muted)); /* Or use a gradient */
  border-radius: 3px;
}

input[type="range"].slider-thumb::-moz-range-track {
  height: 6px;
  background: hsl(var(--muted)); /* Or use a gradient */
  border-radius: 3px;
}

/* Enhanced slider styles */
.slider-container {
  position: relative;
  width: 100%;
  height: 24px;
  padding: 0;
  margin-bottom: 4px;
}

.slider-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: transparent;
  position: relative;
  z-index: 2;
  margin: 8px 0;
}

.slider-progress {
  position: absolute;
  height: 8px;
  background: hsl(var(--primary));
  top: 8px;
  left: 0;
  border-radius: 4px;
  z-index: 1;
  transition: width 0.2s, background-color 0.2s;
}

/* Color variations for different values */
.slider-progress.happy {
  background: hsl(145, 70%, 50%); /* Green for high happiness */
}

.slider-progress.unhappy {
  background: hsl(0, 70%, 50%); /* Red for low happiness */
}

.slider-progress.productive {
  background: hsl(220, 70%, 50%); /* Blue for high productivity */
}

.slider-progress.unproductive {
  background: hsl(40, 70%, 50%); /* Orange for low productivity */
}

/* Thumb styling for different browsers */
.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  border: 2px solid hsl(var(--primary));
  cursor: pointer;
  position: relative;
  z-index: 3;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s, box-shadow 0.1s;
}

.slider-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  border: 2px solid hsl(var(--primary));
  cursor: pointer;
  position: relative;
  z-index: 3;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s, box-shadow 0.1s;
}

/* Track styling for different browsers */
.slider-input::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  background: hsl(var(--muted));
  border-radius: 4px;
  cursor: pointer;
}

.slider-input::-moz-range-track {
  width: 100%;
  height: 8px;
  background: hsl(var(--muted));
  border-radius: 4px;
  cursor: pointer;
}

/* Thumb hover/active states */
.slider-input:hover::-webkit-slider-thumb {
  transform: scale(1.1);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.slider-input:active::-webkit-slider-thumb {
  transform: scale(1.2);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.slider-input:hover::-moz-range-thumb {
  transform: scale(1.1);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.slider-input:active::-moz-range-thumb {
  transform: scale(1.2);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}