/**
 * Modes Section Styles
 */

.modes {
  padding: 80px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== Header ===== */

.modes__header {
  display: flex;
  align-items: center;
  gap: 42px;
  margin-top: 80px;
}

.modes__title {
  font-family: var(--subfont);
  font-weight: 700;
  font-size: 48px;
  text-transform: uppercase;
  height: 48px;
  text-wrap: nowrap;
  color: #ffffff;
}

.modes__line {
  width: 100%;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.15);
}

.modes__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  margin-top: 16px;
  margin-bottom: 50px;
}

.modes__logo-img {
  width: 29px;
  height: 53px;
  transform: rotate(90deg);
}

/* ===== Cards Container ===== */

.modes__list {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 80px;

  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  /*padding: 0 72px;*/
}

.modes__list::-webkit-scrollbar {
  display: none;
}

/* ===== Card ===== */

.mode-card {
  /*flex: 1;*/
  border-radius: 16px;
  position: relative;
  min-width: 337px;
  flex: 1 1 337px;
}

.mode-card:first-child {
  margin-left: 72px;
}

.mode-card:last-child {
  margin-right: 72px;
}

.mode-card__body {
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  background-color: #121212;
  height: 662px;
  border: 1px solid #ffffff26;
  transition: border-radius 200ms ease-out 200ms;
}

.mode-card__body::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;

  height: 414px;
  width: 100%;

  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #121212 100%);
  pointer-events: none;
  z-index: 0;
}

/* ===== Badge ===== */

.mode-card__badge {
  position: absolute;
  top: 0;
  left: 0;
  width: 59px;
  background-color: rgba(46, 255, 171, 0.06);
  transition: width 300ms ease-out;
}

.mode-card__badge-inner {
  width: 59px;
  height: 54px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom-right-radius: 6px;
  background: #ffcd29;
  user-select: none;
}

.mode-card__badge-img {
  width: 32px;
  height: 32px;
}

.mode-card__bg {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 76%;
}

.mode-card__bg--rating {
  top: 22%;
  background: url(../../img/rating_bg.png) center / cover no-repeat;
}

.mode-card__bg--play4fun {
  top: 22%;
  background: url(../../img/play4fun_bg.png) center / cover no-repeat;
}

.mode-card__bg--skillLab {
  top: 22%;
  background: url(../../img/skillLab_bg.png) center / cover no-repeat;
}

.mode-card__bg--challengeArena {
  top: 20.5%;
  background: url(../../img/challengeArena_bg.png) center / cover no-repeat;
}

.mode-card__bg--tournaments {
  top: 20.5%;
  background: url(../../img/tournaments_bg.png) center / cover no-repeat;
}

.mode-card__overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition:
    transform 300ms ease-out,
    opacity 300ms ease-out;
}

.mode-card__overlay--rating {
  top: 22%;
  background: url(../../img/rating_bg-overlay.png) center / cover no-repeat;
}

.mode-card__overlay--play4fun {
  top: 22%;
  background: url(../../img/play4fun_bg-overlay.png) center / cover no-repeat;
}

.mode-card__overlay--skillLab {
  top: 22%;
  background: url(../../img/skillLab_bg-overlay.png) center / cover no-repeat;
}

.mode-card__overlay--challengeArena {
  top: 20.5%;
  background: url(../../img/challengeArena_bg-overlay.png) center / cover no-repeat;
}

.mode-card__overlay--tournaments {
  top: 20.5%;
  background: url(../../img/tournaments_bg-overlay.png) center / cover no-repeat;
}

.mode-card:hover .mode-card__overlay {
  opacity: 1;
}

.mode-card:hover .mode-card__overlay--rating {
  transform: translateY(-10px) scale(1.8);
}

.mode-card:hover .mode-card__overlay--play4fun {
  transform: translateY(-70px) translateX(-65px) scale(1.5);
}

.mode-card:hover .mode-card__overlay--skillLab {
  transform: translateY(-30px) translateX(50px) scale(1.4);
}

.mode-card:hover .mode-card__overlay--challengeArena {
  transform: translateY(-100px) translateX(15px) scale(1.6);
}

.mode-card:hover .mode-card__overlay--tournaments {
  transform: translateY(-35px) translateX(-5px) scale(1.3);
}

.mode-card:hover .mode-card__badge-inner {
  background-color: #2cff80;
}

/* ===== Content ===== */

.mode-card__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 50px;
  padding-left: 32px;
  padding-right: 37px;
  z-index: 1;
}

.mode-card__content {
  z-index: 1;
  position: relative;
}

.mode-card__title {
  font-family: var(--subfont);
  font-size: 32px;
  font-weight: 600;
  line-height: 116%;
  text-transform: uppercase;
  color: #ffffff;
}

.mode-card__text {
  font-family: var(--userfont);
  font-weight: 400;
  font-size: 20px;
  line-height: 150%;
  color: #ffffff;
}

.mode-card__button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 26px;
  z-index: 4;
  cursor: pointer;
  user-select: none;
  width: 100%;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  height: 80px;
  opacity: 0;
  position: relative;
  transition:
    height 300ms ease-out,
    opacity 300ms ease-out;
}

.mode-card__button-bg {
  position: absolute;
  background-color: #2cff80;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  transition: height 300ms ease-out;
}

.mode-card__button-label {
  font-family: var(--subfont);
  font-size: 26px;
  line-height: 26px;
  font-weight: 600;
  text-transform: uppercase;
  color: #000000;
  z-index: 1;
}

.mode-card__button-icon {
  z-index: 1;
}

.mode-card:hover .mode-card__button {
  opacity: 1;
}

.mode-card:hover .mode-card__button-bg {
  height: 80px;
}

.mode-card:hover .mode-card__body {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  transition: none;
}

.mode-card:hover .mode-card__badge {
  width: 100%;
}

@media (max-width: 768px) {
  .modes__line {
    display: none;
  }

  .modes__header {
    margin-top: 40px;
    display: flex;
    justify-content: center;
  }

  .modes__title {
    font-size: 24px;
    height: 24px;
    color: #ffffff;
  }

  .modes__logo {
    margin-top: 0;
    margin-bottom: 32px;
  }

  .modes__logo-img {
    width: 20px;
    height: 44px;
  }

  .modes__list {
    gap: 12px;
    padding: 0 32px;
    margin-bottom: 32px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    justify-content: flex-start;
  }

  .modes__list::-webkit-scrollbar {
    display: none;
  }

  .mode-card {
    border-radius: 8px;
    min-width: auto;
  }

  .mode-card:first-child {
    margin-left: 0;
  }

  .mode-card:last-child {
    margin-right: 0;
  }

  .mode-card__body {
    width: 200px;
    height: 321px;
    border-radius: 8px 8px 0 0;
  }

  .mode-card__badge {
    width: 32px;
  }

  .mode-card__badge-inner {
    width: 32px;
    height: 32px;
    border-bottom-right-radius: 3.25px;
  }

  .mode-card__badge-img {
    width: 17.36px;
    height: 17.36px;
  }

  .mode-card__content {
    gap: 12px;
    padding: 0 16px 32px 16px;
  }

  .mode-card__title {
    font-size: 18px;
    line-height: 116%;
  }

  .mode-card__text {
    font-size: 16px;
    line-height: 150%;
  }

  .mode-card__button {
    justify-content: space-between;
    height: 48px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    gap: 0;
    padding: 0 16px;
    opacity: 1;
  }

  .mode-card__button-bg {
    height: 48px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
  }

  .mode-card__button-label {
    font-size: 16px;
    line-height: 16px;
  }

  .mode-card__button-icon {
    width: 24px;
    height: 24px;
  }

  .mode-card__overlay {
    opacity: 1;
  }

  .mode-card__overlay--rating {
    transform: translateY(-10px) scale(2);
  }

  .mode-card__overlay--play4fun {
    transform: translateY(-50px) translateX(-65px) scale(1.7);
  }

  .mode-card__overlay--skillLab {
    transform: translateY(-20px) translateX(30px) scale(1.4);
  }

  .mode-card__overlay--challengeArena {
    transform: translateY(-50px) translateX(15px) scale(1.6);
  }

  .mode-card__overlay--tournaments {
    transform: translateY(-15px) translateX(-5px) scale(1.3);
  }
}
