/* Custom styles for Workout Tracker */

/* Base dark theme */
:root {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --accent-primary: #3b82f6;
  --accent-secondary: #60a5fa;
  --border-color: #404040;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
  body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
  }

  .bg-white {
    background-color: var(--bg-secondary) !important;
  }

  .text-gray-700, .text-gray-600, .text-gray-900 {
    color: var(--text-primary) !important;
  }

  .text-gray-500 {
    color: var(--text-secondary) !important;
  }

  .border-gray-300, .border-gray-200 {
    border-color: var(--border-color) !important;
  }

  .bg-gray-50, .bg-gray-100 {
    background-color: var(--bg-primary) !important;
  }

  .bg-gray-200 {
    background-color: var(--bg-secondary) !important;
  }

  input, select, textarea {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
  }

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

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

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

  ::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
  }
}

/* Modern UI Elements */
.card {
  background: var(--bg-secondary);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.progress-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--bg-primary);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: width 0.5s ease-in-out;
}

/* Better mobile tables */
@media (max-width: 640px) {
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  
  .container {
    padding: 0.5rem;
  }
  
  body {
    font-size: 14px;
  }
}

/* Touch-friendly inputs and buttons */
@media (max-width: 768px) {
  input, select, textarea, button {
    font-size: 16px !important;
    min-height: 44px;
  }
  
  button {
    padding: 0.75rem 1.5rem !important;
  }
  
  select {
    height: 3rem;
  }
}

/* Animation effects */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Glassmorphism effect */
.glass {
  background: rgba(45, 45, 45, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Better focus states */
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* Custom button styles */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Status indicators */
.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}

.status-active {
  background-color: var(--success-color);
  box-shadow: 0 0 8px var(--success-color);
}

.status-pending {
  background-color: var(--warning-color);
  box-shadow: 0 0 8px var(--warning-color);
}

/* Loading spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--bg-secondary);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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