/* =========================
   RESET + PAGE
   ========================= */

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

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;

  display: flex;
  justify-content: center;

  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: #171717;

  background:
    linear-gradient(
      145deg,
      #0c2d57,
      #42152d
    );

  overflow: hidden;
}

button {
  border: none;
  font: inherit;
  cursor: pointer;

  -webkit-tap-highlight-color: transparent;
}


/* =========================
   MAIN PAGE SLIDER
   ========================= */

#all_pages {
  display: flex;
  flex-direction: row;

  justify-content: flex-start;
  align-items: flex-start;

  width: 100vw;
  min-width: 100vw;
  height: 100vh;

  overflow-x: auto;
  overflow-y: hidden;

  scroll-behavior: smooth;
  scrollbar-width: none;
}

#all_pages::-webkit-scrollbar {
  display: none;
}


/* =========================
   BODY MAP PAGE
   ========================= */

#before_page {
  position: relative;

  min-width: 100vw;
  width: 100vw;
  height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;

  background:
    radial-gradient(
      circle at 50% 32%,
      rgba(255, 255, 255, 0.12),
      transparent 34%
    ),
    linear-gradient(
      160deg,
      #17385d,
      #12263f 58%,
      #1c172c
    );
}

.wrapper {
  width: 95%;
  max-width: 500px;

  display: flex;
  justify-content: center;
  align-items: center;
}


/* =========================
   BODY IMAGE + SVG OVERLAY
   ========================= */

.bodyWrapper {
  position: relative;

  width: 89%;
  max-height: 92vh;
}

.bodyImg {
  display: block;

  width: 100%;
  max-height: 92vh;

  object-fit: contain;

  opacity: 1;

  user-select: none;
}

.overlay {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;
}

.overlay polygon {
  cursor: pointer;

  fill-opacity: 0.42;

  /* Same border for every muscle */
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 2;

  vector-effect: non-scaling-stroke;

  outline: none;

  transition:
    fill-opacity 0.18s ease,
    filter 0.18s ease,
    stroke-width 0.18s ease,
    stroke 0.18s ease;
}

.overlay polygon:hover {
  filter: brightness(0.82);

  fill-opacity: 0.55;
}

.overlay polygon.active {
  filter: brightness(1.03);

  stroke: #ffffff;
  stroke-width: 5;

  fill-opacity: 0.78;
}

#backwrapper {
  display: none;
}

.info {
  display: none;

  margin-top: 20px;

  text-align: center;

  font-size: 18px;
  font-weight: 600;
}


/* =========================
   TOP MENUS
   ========================= */

#bodymap_menu,
#exercise_menu {
  position: absolute;

  top: 0;
  left: 0;

  z-index: 30;

  width: 100%;

  min-height: 58px;

  padding: 10px 16px;

  display: flex;

  align-items: center;

  gap: 10px;
}

#bodymap_menu {
  justify-content: space-between;
}

#exercise_menu {
  justify-content: space-between;
}


/* =========================
   FRONT / BACK SWAP
   ========================= */

#swap {
  width: 42px;
  height: 42px;

  border-radius: 50%;

  cursor: pointer;

  background:
    rgba(255, 255, 255, 0.95)
    url("swap.png")
    center / 24px 24px
    no-repeat;

  box-shadow:
    0 5px 16px
    rgba(0, 0, 0, 0.2);

  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

#swap:hover {
  transform: translateY(-1px);

  box-shadow:
    0 7px 20px
    rgba(0, 0, 0, 0.24);
}

#swap:active {
  transform: scale(0.96);
}


/* =========================
   GENERAL BUTTONS
   ========================= */

#backtodiagram,
#favoritesButton,
#Exityt {
  min-height: 40px;

  padding: 8px 15px;

  border-radius: 999px;

  font-size: 14px;
  font-weight: 650;

  background-color: #ffffff;
  color: #1b1b1b;

  box-shadow:
    0 3px 12px
    rgba(0, 0, 0, 0.09);

  transition:
    transform 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

#backtodiagram:hover,
#favoritesButton:hover,
#Exityt:hover {
  background-color: #f0f0f0;

  box-shadow:
    0 5px 15px
    rgba(0, 0, 0, 0.12);
}

#backtodiagram:active,
#favoritesButton:active,
#Exityt:active {
  transform: scale(0.96);
}

#favoritesButton {
  white-space: nowrap;
}


/* =========================
   BODY MAP HEADING
   ========================= */

#mapHeading {
  position: absolute;

  left: 0;
  bottom: 40px;

  width: 100%;

  text-align: center;

  color: white;

  z-index: 10;
}

#mapHeading h1 {
  font-size: 28px;
  font-weight: 750;

  letter-spacing: -0.5px;
}

#mapHeading p {
  margin-top: 5px;

  font-size: 14px;

  opacity: 0.72;
}


/* =========================
   BODY MAP FAVORITES BUTTON
   ========================= */

#bodymap_menu #favoritesButton {
  background:
    rgba(
      255,
      255,
      255,
      0.92
    );

  backdrop-filter: blur(10px);

  font-weight: 650;

  box-shadow:
    0 4px 14px
    rgba(0, 0, 0, 0.15);
}


/* =========================
   EXERCISE RESULTS PAGE
   ========================= */

#next_page {
  position: relative;

  min-width: 100vw;
  width: 100vw;
  height: 100vh;

  padding-top: 66px;
  padding-bottom: 12px;

  display: flex;
  flex-direction: column;

  justify-content: flex-start;
  align-items: center;

  background-color: #f5f6f8;
}


/* =========================
   TITLE / COUNT
   ========================= */

#Topic {
  width: 93%;
  max-width: 720px;

  margin: 4px 0 8px;

  padding: 4px 2px;
}

#muscleName {
  font-size:
    clamp(
      22px,
      5vw,
      30px
    );

  line-height: 1.15;

  font-weight: 750;

  letter-spacing: -0.02em;
}

#excerciseNo {
  margin-top: 4px;

  font-size: 14px;

  line-height: 1.3;

  font-weight: 500;

  color: #747474;
}


/* =========================
   FILTER / GENRE CHIPS
   ========================= */

#genre {
  width: 93%;
  max-width: 720px;

  margin-top: 2px;

  padding: 6px 2px 9px;

  display: flex;

  justify-content: flex-start;
  align-items: center;

  gap: 8px;

  overflow-x: auto;
  overflow-y: hidden;

  scrollbar-width: none;
}

#genre::-webkit-scrollbar {
  display: none;
}

#genre p {
  flex: 0 0 auto;

  padding: 7px 13px;

  border:
    1px solid
    #dedede;

  border-radius: 999px;

  cursor: pointer;

  font-size: 13px;
  font-weight: 600;

  text-transform: capitalize;

  background-color: #ffffff;

  color: #505050;

  transition:
    background-color 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}

#genre p:hover {
  background-color: #eeeeee;
}

#genre p:active {
  transform: scale(0.97);
}

#genre p.activeGenre {
  border-color: #171717;

  background-color: #171717;

  color: #ffffff;
}


/* =========================
   VIDEO LIST
   ========================= */

#MenuContainer {
  width: 93%;
  max-width: 720px;

  min-height: 20px;

  flex: 1;

  padding:
    2px
    2px
    20px;

  display: flex;

  flex-direction: column;

  align-items: center;
  justify-content: flex-start;

  overflow-x: hidden;
  overflow-y: auto;

  border-radius: 18px;

  scroll-behavior: smooth;

  scrollbar-width: thin;
}

.youtube_profile {
  position: relative;

  width: 100%;

  margin: 7px 0;

  padding: 10px;

  display: flex;
  flex-direction: column;

  background-color: #ffffff;

  border:
    1px solid
    #e7e7e7;

  border-radius: 16px;

  cursor: pointer;

  box-shadow:
    0 3px 12px
    rgba(
      20,
      20,
      20,
      0.06
    );

  transition:
    transform 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.youtube_profile:hover {
  background-color: #fbfbfb;

  border-color: #dcdcdc;

  box-shadow:
    0 7px 20px
    rgba(
      20,
      20,
      20,
      0.09
    );
}

.youtube_profile:active {
  transform: scale(0.985);
}


/* =========================
   VIDEO CARD CONTENT
   ========================= */

.createthumbnail {
  width: 100%;

  display: block;

  aspect-ratio: 16 / 9;

  object-fit: cover;

  border-radius: 12px;

  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

.youtube_profile:hover
.createthumbnail {
  opacity: 0.94;
}

.create_channel_name {
  margin-top: 9px;

  padding-right: 48px;

  font-size: 13px;

  line-height: 1.35;

  font-weight: 500;

  color: #777777;
}

.create_video_title {
  margin-top: 3px;

  padding-right: 48px;

  font-size: 16px;

  line-height: 1.35;

  font-weight: 700;

  color: #1b1b1b;
}

.create_tag {
  width: fit-content;

  margin-top: 8px;

  padding:
    5px
    9px;

  border-radius: 999px;

  font-size: 12px;

  line-height: 1;

  font-weight: 650;

  text-transform: capitalize;

  background-color: #eeeeee;

  color: #4b4b4b;
}


/* =========================
   FAVORITE BUTTON
   ========================= */

.favorite_button {
  position: absolute;

  right: 15px;
  bottom: 12px;

  width: 38px;
  height: 38px;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 0;

  margin: 0;

  border:
    1px solid
    #e4e4e4;

  border-radius: 50%;

  font-size: 23px;

  line-height: 1;

  background-color: #ffffff;

  color: #cc2347;

  box-shadow:
    0 2px 9px
    rgba(0, 0, 0, 0.08);

  transition:
    transform 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.favorite_button:hover {
  background-color: #fff1f4;

  box-shadow:
    0 4px 12px
    rgba(
      0,
      0,
      0,
      0.11
    );
}

.favorite_button:active {
  transform: scale(0.9);
}


/* =========================
   FAVORITES EMPTY STATE
   ========================= */

.favorites_empty {
  width: 100%;
  max-width: 460px;

  margin:
    45px
    auto
    0;

  padding:
    28px
    22px;

  border:
    1px dashed
    #d7d7d7;

  border-radius: 18px;

  text-align: center;

  font-size: 15px;

  line-height: 1.55;

  font-weight: 500;

  color: #777777;

  background-color: #ffffff;
}


/* =========================
   YOUTUBE PLAYER
   ========================= */

#youtube_video_container {
  position: absolute;

  inset: 0;

  z-index: 50;

  width: 100%;
  height: 100%;

  padding: 16px;

  display: none;

  flex-direction: column;

  justify-content: center;
  align-items: center;

  gap: 14px;

  background-color:
    rgba(
      10,
      10,
      14,
      0.96
    );
}

#Exityt {
  align-self: flex-end;

  background-color: #ffffff;

  color: #171717;
}

#youtube_player {
  width: 100%;

  max-width: 900px;

  display: flex;

  justify-content: center;
  align-items: center;
}

#youtube_player iframe {
  width: 100%;

  aspect-ratio: 16 / 9;

  height: auto;

  border: 0;

  border-radius: 14px;

  background-color: #000000;

  box-shadow:
    0 14px 40px
    rgba(
      0,
      0,
      0,
      0.34
    );
}


/* =========================
   MUSCLE COLORS
   ========================= */


/* =========================
   CHEST
   ========================= */

#all_chest {
  fill: #ff4d67;
}

polygon#only_upper_chest {
  fill: #fd0505;
}

polygon#middle_chest {
  fill: rgb(0, 130, 0);
}

polygon#lower_chest {
  fill: rgb(255, 223, 31);
}


/* =========================
   ABS
   ========================= */

#all_abs {
  fill: #a56bff;
}

polygon#only_upper_abs {
  fill: rgb(34, 0, 255);
}

#middle_abs {
  fill: #6f8cff;
}

polygon#lower_abs {
  fill: #fd0505;
}


/* =========================
   CORE
   ========================= */

polygon#obliques {
  fill: rgb(136, 255, 0);
}

#serratus {
  fill: #9ad83f;
}


/* =========================
   LEGS
   ========================= */

polygon#all_legs {
  fill: #057bfd;
}


/* =========================
   ARMS
   ========================= */

#forearms {
  fill: #c46bff;
}

#full_arms {
  fill: #f05cff;
}


/* =========================
   BACK
   ========================= */

polygon#lats {
  fill: green;
}

polygon#lower_back {
  fill: #fd0505;
}

polygon#middle_back {
  fill: rgb(0, 191, 255);
}

polygon#traps {
  fill: rgb(34, 0, 255);
}


/* =========================
   RESPONSIVE
   ========================= */

@media only screen
and (orientation: portrait) {

  .bodyWrapper {
    width: 100%;
  }
}


@media (max-width: 480px) {

  #bodymap_menu,
  #exercise_menu {
    min-height: 56px;

    padding:
      8px
      12px;
  }

  #swap {
    width: 40px;
    height: 40px;

    background-size:
      22px
      22px;
  }

  #next_page {
    padding-top: 60px;
  }

  #Topic,
  #genre,
  #MenuContainer {
    width: 94%;
  }

  #muscleName {
    font-size: 24px;
  }

  .youtube_profile {
    padding: 9px;

    border-radius: 14px;
  }

  .createthumbnail {
    border-radius: 10px;
  }

  .create_video_title {
    font-size: 15px;
  }

  .favorite_button {
    right: 13px;
    bottom: 11px;

    width: 36px;
    height: 36px;

    font-size: 22px;
  }

  #youtube_video_container {
    padding: 12px;
  }

  #youtube_player iframe {
    border-radius: 10px;
  }
}


@media (min-width: 760px) {

  #Topic,
  #genre,
  #MenuContainer {
    max-width: 760px;
  }

  #exercise_menu {
    padding-left:
      max(
        20px,
        calc(
          (100vw - 760px) / 2
        )
      );

    padding-right:
      max(
        20px,
        calc(
          (100vw - 760px) / 2
        )
      );
  }
}

/* =========================
   SHOULDERS
   ========================= */

#frontal_anterior_deltoids {
  fill: #ff7043;
}

#medial_deltoid {
  fill: #ffa726;
}

#full_shoulder {
  fill: #ffca28;
}

#rear_delts {
  fill: #ab47bc;
}

#rotator_cuffs {
  fill: #26a69a;
}


/* =========================
   ARMS
   ========================= */

#biceps {
  fill: #ec407a;
}

#triceps {
  fill: #ef5350;
}

#forearms {
  fill: #c46bff;
}

#full_arms {
  fill: #f05cff;
}


/* =========================
   LEGS
   ========================= */

#only_quads {
  fill: #42a5f5;
}

#hamstring {
  fill: #7e57c2;
}

#glutes {
  fill: #8d6e63;
}

#calves {
  fill: #29b6f6;
}


/* =========================
   BACK
   ========================= */

#full_back {
  fill: #5c6bc0;
}

#lats {
  fill: green;
}

#middle_back {
  fill: rgb(0, 191, 255);
}

#lower_back {
  fill: #fd0505;
}

#traps {
  fill: rgb(34, 0, 255);
}