﻿

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
    /* Default: Dark Theme */
    --bg-primary: #111827; /* Very Dark Blue (near-black navy) */
    --bg-secondary: #1f2937; /* Dark Charcoal Blue */
    --bg-input: #374151; /* Charcoal Slate */
    --text-primary: #f3f4f6; /* Very Light Gray */
    --text-secondary: #d1d5db; /* Light Gray */
    --accent: #9333ea; /* Medium Purple */
    --accent-hover: #a855f7; /* Bright Purple / Lavender Violet */
    --accent-active: #7e22ce; /* Deep Purple / Violet Indigo */
    --border: #4b5563; /* Dark Gray Slate */
}

/* Light Theme */
.theme-light {
    --bg-primary: #ffffff;
    --bg-secondary: #f3f4f6;
    --bg-input: #e5e7eb;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-active: #4f46e5;
    --border: #d1d5db;
}

/* Solarized Theme */
.theme-solarized {
    --bg-primary: #fdf6e3;
    --bg-secondary: #eee8d5;
    --bg-input: #e1dbcd;
    --text-primary: #657b83;
    --text-secondary: #93a1a1;
    --accent: #b58900;
    --accent-hover: #cb9e00;
    --accent-active: #9c7a00;
    --border: #d4c89f;
}

/* Nord Theme */
.theme-nord {
    --bg-primary: #2e3440;
    --bg-secondary: #3b4252;
    --bg-input: #434c5e;
    --text-primary: #eceff4;
    --text-secondary: #d8dee9;
    --accent: #88c0d0;
    --accent-hover: #81a1c1;
    --accent-active: #5e81ac;
    --border: #4c566a;
}

/* Dracula Theme */
.theme-dracula {
    --bg-primary: #282a36;
    --bg-secondary: #44475a;
    --bg-input: #6272a4;
    --text-primary: #f8f8f2;
    --text-secondary: #bd93f9;
    --accent: #ff79c6;
    --accent-hover: #ff92d0;
    --accent-active: #ff4ecb;
    --border: #6272a4;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
}

.container {
  min-height: 100vh;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}

.workout-card {
  max-width: 48rem;
  margin: 0 auto;
  background-color: var(--bg-secondary);
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  padding-bottom: calc(6rem + env(safe-area-inset-bottom));
  position: relative;
}

.header {
  margin-bottom: 2rem;
  text-align: center;
}

.title h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.filter-button {
  padding: 0.625rem 1rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.filter-button:hover {
  background-color: var(--accent);
  border-color: var(--accent);
}

.filter-button.active {
  background-color: var(--accent);
  border-color: var(--accent);
}

.selected-exercise-preview {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: var(--bg-input);
  border-radius: 0.5rem;
  text-align: center;
}

.selected-exercise-preview.empty {
    border: 2px dashed var(--border);
    color: var(--text-secondary);
}

.purple-box {
    border: 1px solid var(--accent);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--bg-input);
    border-radius: 0.5rem;
    text-align: center;
}

.exercises-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.exercise-group {
  background-color: var(--bg-input);
  padding: 1.25rem;
  border-radius: 0.75rem;
}

.exercise-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.exercise-item {
    padding: 0.75rem;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.bg-text-ewo {
    background-color: var(--bg-input);
    color: var(--text-primary);
    cursor: pointer;
    text-align: center;
    border: none;
}

.exercise-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.exercise-item.selected {
  background-color: var(--accent);
  border-color: var(--accent);
}

.action-buttons {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background-color: var(--bg-secondary);
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 10;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  max-width: 48rem;
  margin: 0 auto;
}

.submit-button {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--accent);
  color: white;
  font-weight: 500;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s;
}

.submit-button:hover {
  background-color: var(--accent-hover);
}

.submit-button:active {
  background-color: var(--accent-active);
}

.save-button {
  composes: submit-button;
  background-color: #10b981;
}

.save-button:hover {
  background-color: #059669;
}

.save-button:active {
  background-color: #047857;
}

.optionss {
    background-color: var(--accent-hover);
    border: solid purple 1px;
    border-radius: 10px;
    color: white;
}

.conBtn {
    color: white;
    background-color: transparent;
    border: solid 2px var(--accent-hover);
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 10px;
}

.remove-btn {
    background: transparent;
    color: #fff;
    border: #f87171 solid 2px;
    border-radius: 6px;
    padding: 4px 14px;
    margin-left: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.remove-btn:hover {
    background: #dc2626;
    border: #dc2626 solid 2px;
}

@media (max-width: 640px) {
    .container {
    padding: 0.5rem;
  }

  .workout-card {
    padding: 1rem;
    padding-bottom: calc(6rem + env(safe-area-inset-bottom));
  }

  .filter-buttons {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .filter-button {
    flex: 1;
    min-width: calc(33.333% - 0.5rem);
    text-align: center;
  }

  .exercise-list {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    padding: 0.75rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }
}