* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #7c3aed;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: var(--gray-800);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-buttons {
  display: flex;
  gap: 0.5rem;
}

.nav-btn {
  padding: 0.5rem;
  border: none;
  background: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  color: var(--gray-600);
}

.nav-btn:hover {
  background: var(--gray-100);
  color: var(--primary);
}

/* Main Content */
main {
  padding: 2rem 0;
}

.hero {
  text-align: center;
  margin-bottom: 3rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 900;
  color: white;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
}

/* Form Card */
.form-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 2rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gray-700);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all 0.2s;
  background: var(--gray-50);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: white;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Loading State */
.loading {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Results */
.results {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.results.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.results-title {
  font-size: 2rem;
  font-weight: 700;
  color: white;
}

.results-actions {
  display: flex;
  gap: 1rem;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.workout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.workout-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.workout-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.workout-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 1.5rem;
  text-align: center;
}

.workout-day {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.workout-focus {
  font-size: 0.9rem;
  opacity: 0.9;
}

.workout-exercises {
  padding: 1.5rem;
}

.exercise-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  transition: all 0.2s;
}

.exercise-item:hover {
  background: var(--secondary);
}

.exercise-item:hover .exercise-name{
  color: #f3f4f6;
}

.exercise-item:hover .exercise-details{
  color: var(--gray-300);
}

.exercise-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.exercise-name {
  font-weight: 600;
  color: var(--gray-700);
}

.exercise-details {
  font-size: 0.9rem;
  color: var(--gray-500);
}

/* Nutrition Card */
.nutrition-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.nutrition-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.nutrition-icon {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, var(--success), var(--accent));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.nutrition-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
}

.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.nutrition-item {
  background: var(--gray-50);
  padding: 1rem;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--success);
}

.nutrition-item-title {
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.nutrition-item-desc {
  font-size: 0.9rem;
  color: var(--gray-600);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: white;
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: var(--shadow-xl);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-400);
  padding: 0.5rem;
  border-radius: var(--radius-md);
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-600);
}

.modal-body {
  padding: 1.5rem;
}

a{
  text-decoration: none;
  color: inherit;
}


/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
      font-size: 2rem;
  }

  .form-grid {
      grid-template-columns: 1fr;
  }

  .workout-grid {
      grid-template-columns: 1fr;
  }

  .nutrition-grid {
      grid-template-columns: 1fr;
  }

  .results-header {
      flex-direction: column;
      gap: 1rem;
      text-align: center;
  }

  .results-actions {
      flex-wrap: wrap;
      justify-content: center;
  }
}

/* Animations */
.fadeIn {
  animation: fadeIn 0.5s ease-in-out;
}

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

/* Dark mode styles */
.dark-mode {
  --gray-50: #1f2937;
  --gray-200: #4b5563;
  --gray-700: linear-gradient(135deg, #111827 0%, #020e24 50%, #111827 100%);
  --gray-600: #d1d1d1;
  --white: #1f2937;
}

body.dark-mode {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.dark-mode header {
  background: #1f2937;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(221, 221, 221, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.dark-mode .nav-btn {
  color: #ebebeb;
}

.dark-mode .nav-btn:hover {
  background: #142031;
  color: var(--primary);
}

.dark-mode .form-card,
.dark-mode .workout-card,
.dark-mode .nutrition-card {
  background: var(--gray-800);
  color: var(--gray-100);
}

.dark-mode .form-input {
  background: var(--gray-700);
  border-color: var(--gray-600);
  color: var(--gray-100);
}

.dark-mode .exercise-item:hover {
  background: var(--gray-700);
}

.dark-mode .nutrition-item {
  background: var(--gray-700);
}

.dark-mode .modal-content {
  background: var(--gray-800);
  color: var(--gray-100);
}