body {
    font-family: "Pixelify Sans", sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100dvh;
    width: 100%;
    margin: 0;
    background: #DCC9B6;
}

@font-face {
    font-family: "ByteBounce";
    src: url(ByteBounce.ttf);
}

.card {
  background: white;
  border-radius: 25px;
  padding: 40px 30px;
  margin: auto;
  width: 700px;
  text-align: center;
  position: relative;
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
}

#progress-section {
  margin: 20px auto;
  width: 80%;
}
#time { margin: 30px 0; }
#start-btn, #reset-btn {
  box-shadow: 0 3px 6px rgba(0,0,0,.1);
}

.bear-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 300px;
  height: 300px;
  overflow: hidden;
  margin: 0;
}

#bear-img {
  width: 300px;
  height: auto;
  object-fit: contain;
  transform: translate(7px, 20px);
  /* border: 7px solid #ABC4AB;
  border-radius: 50%; */
}


#reset-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #ABC4AB;
  background: white;
  color: #ABC4AB;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

#reset-btn:hover {
  background: #ABC4AB;
  color: white;
}

p {
    font-size: 1rem;
    margin: 0;
}

#progress-text {
    font-size: 0.75rem;
    margin-bottom: 10px;
    color: grey;
}

#current-stretch-name {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

#time {
    font-size: 5rem;
    margin: 20px;
    color: #ABC4AB;
}

#start-btn {
  width: 60px;
  height: 60px;
  margin: 0;
  border-radius: 50%;
  font-size: 1.5rem;
  border: none;
  background: #ABC4AB;
  color: white;
  cursor: pointer;
  transition: 0.2s ease;
}

#start-btn:hover {
  background: #95b495;
}

#progress-section {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 80%;
  margin: 0 auto;
}

#progress-container {
  flex: 1;
  height: 14px;
  background-color: #f3e4d4;
  border-radius: 999px;
  overflow: hidden;
}

#progress-section p {
  margin: 0;
  min-width: 40px;
  text-align: right;
  color: grey;
}

#instructions {
    color: grey;
    margin-top: 10px;
}


@keyframes countdown {
  from { width: 0%; }
  to { width: 100%; }
}

#progress-bar {
  height: 100%;
  background-color: #ABC4AB;
  border-radius: 999px;
  width: 0%; /* always starts empty */
}

/* Animation triggers */
#progress-bar.animate {
  animation: countdown 60s linear forwards;
  animation-play-state: running;
}

#progress-bar.animate.paused {
  animation-play-state: paused;
}

/* Tablet styles */
@media (max-width: 900px) {
  .card {
    width: 90%;
    height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 10px;
  }
  .bear-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    width: 120px;
    height: 120px;
    overflow: hidden;
    position: relative;
  }
  #bear-img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    transform: scale(1.2);
  }
  #time {
    font-size: 3rem;
  }
  #start-btn {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  #reset-btn {
    width: 25px;
    height: 25px;
    font-size: 0.7rem;
  }
  #progress-section {
    margin-bottom: 30px;
    width: 80%;
  }
  #progress-text {
    font-size: 0.75rem;
    margin-bottom: 5px;
  }
  #progress-container {
  flex: 1;
  width: 100%;
  height: 13px;
  background-color: #f3e4d4;
  border-radius: 999px;
  overflow: hidden;
  }

  #progress-section p {
    margin: 0;
    min-width: 40px;
    text-align: right;
    color: grey;
  }
  @keyframes countdown {
  from { width: 0%; }
  to { width: 100%; }
  }

  #progress-bar {
    height: 100%;
    background-color: #ABC4AB;
    border-radius: 999px;
    width: 0%; /* always starts empty */
  }
  #progress-bar.animate {
    animation: countdown 60s linear forwards;
    animation-play-state: running;
  }

  #progress-bar.animate.paused {
    animation-play-state: paused;
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  .card {
    width: 90%;
    display: flex;
    margin: 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 80vh;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
  }
  h1 {
    padding: 0 10px;
    margin: 30px auto;
    font-size: 1.75rem;
  }
  #progress-section {
    margin-bottom: 30px;
    width: 80%;
  }
  #progress-text {
    font-size: 0.75rem;
  }
  #progress-container {
  flex: 1;
  width: 100%;
  height: 10px;
  background-color: #f3e4d4;
  border-radius: 999px;
  overflow: hidden;
  }

  #progress-section p {
    margin: 0;
    min-width: 40px;
    text-align: right;
    color: grey;
  }
  @keyframes countdown {
  from { width: 0%; }
  to { width: 100%; }
  }

  #progress-bar {
    height: 100%;
    background-color: #ABC4AB;
    border-radius: 999px;
    width: 0%; /* always starts empty */
  }
  #progress-bar.animate {
    animation: countdown 60s linear forwards;
    animation-play-state: running;
  }

  #progress-bar.animate.paused {
    animation-play-state: paused;
  }
  .bear-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    width: 120px;
    height: 120px;
    overflow: hidden;
    position: relative;
  }
  #bear-img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    transform: scale(1.4);
  }
  #time {
    font-size: 2rem;
    margin: 10px 0;
  }
  #start-btn {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  #reset-btn {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
    top: 13px;
    right: 15px;
  }
  #current-stretch-name {
    font-size: 1rem;
  }
  #instructions {
    padding-left: 20px;
    padding-right: 20px;
    font-size: 0.75rem;
  }
}