:root {
    --bg:#faf9fc;
    --upBorder: black;
    --upgradesColor: #34495e;
    --headerColor: #2c3e50;
    --borderSize: 2px;
    --borderCurve: 8px;
    --fontSize: 16px;
    --fontColor: #333;
    --statsColor: lightgrey;
    --offWhite: #FDF4E3;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

html p, h2, h3, span{
  color: var(--offWhite);
}

body {
  height: 100vh;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  background-color: var(--bg);
  color: var(--fontColor);
  overflow: hidden;
}


header {
  height: 60px;
  background: var(--headerColor);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: var(--borderSize) solid var(--upgradesColor);
}

header .user-data {
  position: fixed;
  right: 20px;
}

header .user-data p {
  display: inline;
}

.container {
  display: flex;
  height: calc(100vh - 60px);
}

.main {
  flex: 1;
  will-change: background-position;
  height: calc(100vh - 60px);
  background: #ecf0f1;
  background-image: url("/images/barbells_falling.png");
  background-repeat: repeat;
  background-size:500px auto;
  padding: 20px;
  overflow-y: auto;
 
  animation: barbellsFall 60s linear infinite;
}

.workout-container{
  position: relative;
  z-index: 0;
  top: -30px;
  display: grid;
  grid-template-columns: repeat(2, clamp(300px, 18vw, 700px));
  grid-auto-rows: clamp(300px, 18vw, 700px);
  gap: clamp(16px, 2vw, 32px);

  width: fit-content;
  margin: 8vh auto 0 auto;
}

.info {
  z-index: 2;
}

.action-workout-card{
  width: 100%;
  height: 100%;
  background: #44536d;
  border-radius: 10px;
  transition: transform 0.4s ease-in-out;
}

.action-workout-card:hover {
  transform: scale(1.025);
}

.action-workout-card.expanded {
  transform: scale(1.2);
}

.stats {
  position: absolute;
  z-index: 1;
  right: 31%;
  padding: 15px;
  min-width: 180px;
  background-color: var(--statsColor);
  border-radius: var(--borderCurve);
}

.stats h2, .stats p,
.main h2, .main p,
.sidebar button{
  font-weight: bold;
  background: linear-gradient(
    90deg,
    var(--upgradesColor),
    var(--headerColor),
    blue,
    indigo,
    violet,
    indigo,
    blue,
    var(--headerColor),
    var(--upgradesColor));
  background-size: 400% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow 5s linear infinite;
}

.sidebar {
  width: 30%;
  background: #34495e;
  color: white;
  padding: 20px;
  overflow-y: auto;
  border-left: var(--borderSize) solid #2c3e50;
}

.reps-count {
  right: 80px;
}

.sidebar button {
  width: 80px;
  position: relative;
  left: 85%;
}

.main::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.upgrade {
  padding: 10px;
  margin-top: 8px;
  border: var(--borderSize) solid var(--upBorder);
  user-select: none;
  -webkit-user-select: none;
  border-radius: var(--borderCurve);
  transition: transform 0.4s ease-in-out;
}

.upgrade:hover {
  transform: scale(1.05);
}
.upgrade p {
  font-size: var(--fontSize);
}

.upgrade progress {
  width: calc(100% - var(--fontSize) - var(--fontSize));
  -webkit-appearance: none;
  appearance: none;
  height: 14px;
  border-radius: var(--borderCurve);
  overflow: hidden;
  background-color: var(--offWhite);
}

.reps-count {
  position: relative;
  display: inline-block;
}

#user-reps-floating {
  position: absolute;
  left: 70px;
  top: 0;
  pointer-events: none;
}

.reps-floating {
  position: absolute;
  color: white;
  font-size: 18px;
  font-weight: bold;
  opacity: 1;
  animation: floatUp 0.8s ease-out forwards;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

.upgrade progress::-webkit-progress-value {
    box-shadow: 0 0 8px rgba(0, 200, 255, 0.7);
}

/* Keyframes for the falling barbells animation */

@keyframes barbellsFall {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 0 2000px;
  }
}
/* Keyframe for the stats header */
@keyframes rainbow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}
/* Keyframe for floating number on clicks */
@keyframes floatUp {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(-30px);
    opacity: 0;
  }
}