:root {
  --background: #090b10;
  --card: rgba(18, 22, 32, 0.82);
  --card-light: rgba(255, 255, 255, 0.08);
  --text: #f8fbff;
  --muted: #a9b7c8;
  --accent: #66f76f;
  --accent-dark: #36d94a;
  --hot: #ff4fb8;
  --gold: #ffd166;
  --cyan: #47d7ff;
  --border: rgba(255, 255, 255, 0.12);
  --danger: #ff6b6b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 79, 184, 0.28), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(71, 215, 255, 0.22), transparent 28rem),
    linear-gradient(135deg, #090b10, #121726 48%, #10170f);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.app {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 60px 0;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 28px;
}

.tracker-card,
.workout-list-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 30px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.tracker-card::before {
  content: "";
  position: absolute;
  inset: -45% -30% auto auto;
  width: 260px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: conic-gradient(from 130deg, var(--accent), var(--cyan), var(--hot), var(--accent));
  filter: blur(18px);
  opacity: 0.55;
  animation: pulseGlow 6s ease-in-out infinite;
}

.tracker-card > *,
.workout-list-card > * {
  position: relative;
  z-index: 1;
}

.tracker-card h1,
.workout-list-card h2 {
  margin-top: 0;
}

.tracker-card h1 {
  margin-bottom: 12px;
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  line-height: 0.88;
  text-transform: uppercase;
  text-wrap: balance;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(102, 247, 111, 0.5);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(102, 247, 111, 0.1);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tracker-card p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

form {
  display: grid;
  gap: 14px;
}

label {
  font-weight: 700;
  margin-top: 8px;
  color: #dfe7f1;
}

input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(8, 11, 17, 0.75);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(102, 247, 111, 0.15);
  transform: translateY(-1px);
}

button {
  margin-top: 14px;
  min-height: 52px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  color: #06120b;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(102, 247, 111, 0.22);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 18px 34px rgba(71, 215, 255, 0.22);
}

.workout-list-card {
  min-height: 420px;
}

.workout-list-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  margin-bottom: 24px;
}

.section-subtitle {
  margin: -6px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.summary div {
  min-width: 105px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(8, 11, 17, 0.72);
}

.summary span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.summary strong {
  display: block;
  margin-top: 4px;
  color: var(--gold);
  font-size: 1.1rem;
}

.filter-bar {
  margin-bottom: 20px;
}

.filter-bar label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.filter-bar input {
  width: 100%;
}

.clear-all-button {
  min-height: auto;
  width: 100%;
  margin: 0 0 20px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
  box-shadow: none;
}

.clear-all-button:hover {
  background: var(--danger);
  color: white;
}

.empty-message {
  color: var(--muted);
  text-align: center;
  margin-top: 50px;
  padding: 44px 20px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.workout-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(102, 247, 111, 0.13), rgba(71, 215, 255, 0.07)),
    var(--card-light);
  box-shadow: inset 4px 0 0 var(--accent);
  animation: slideIn 0.28s ease both;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.workout-item:hover {
  border-color: rgba(102, 247, 111, 0.45);
  transform: translateX(3px);
}

.workout-item h3 {
  margin: 0 0 8px;
  font-size: 1.18rem;
}

.workout-item p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.delete-button {
  min-height: auto;
  margin: 0;
  padding: 10px 14px;
  background: rgba(255, 107, 107, 0.14);
  border: 1px solid rgba(255, 107, 107, 0.45);
  color: white;
  box-shadow: none;
}

.delete-button:hover {
  background: var(--danger);
}

@keyframes pulseGlow {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }

  50% {
    transform: scale(1.12) rotate(18deg);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 800px) {
  .app {
    grid-template-columns: 1fr;
    padding: 28px 0;
  }

  .workout-list-header {
    flex-direction: column;
  }

  .summary {
    justify-content: start;
  }
}
