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

:root {
  font-family: 'Montserrat Alternates', Inter, Avenir, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  color: #242424;
  background-color: rgba(255, 255, 255, 0.87);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

html,
body {
  min-height: 100%;
  font-family: 'Montserrat Alternates', sans-serif;
  background-color: #fff;
}

body {
  margin: 0;
  padding-top: 60px;
  background: #fff url('../images/background.png') top center / 100% auto repeat-y;
}

body.dark {
  background-color: #373737;
  color: #fff;
}

main {
  display: block;
  width: min(calc(100% - 100px), 1000px);
  margin: 0 auto;
  padding: 1px 24px 40px;
  background-color: #fff;
}

main.dark {
  background-color: #2f2f2f;
  color: #fff;
}

main.dark section {
  border-color: rgba(255, 255, 255, 0.55);
}

main.dark input[type='text'],
main.dark input[type='number'] {
  background-color: #474747;
  color: #fff;
}

main.dark input::placeholder {
  color: #d1d1d1;
}

main > section + section {
  margin-top: 32px;
}

main,
main > section,
footer {
  scroll-margin-top: 78px;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

.game-guide {
  position: relative;
  z-index: 3;
  width: min(92%, 520px);
  margin: -4px auto 24px;
  color: #373737;
  font-size: 12px;
  text-align: center;
}

.section-title.section-title {
  margin-bottom: 20px;
  line-height: 1.25;
  text-align: center;
}

.game-guide summary {
  width: fit-content;
  margin: 0 auto;
  padding: 7px 14px;
  border-radius: 16px;
  background-color: #000;
  color: #fff;
  cursor: pointer;
  list-style: none;
  line-height: 1;
  user-select: none;
}

.game-guide summary::-webkit-details-marker {
  display: none;
}

.game-guide p {
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(55, 55, 55, 0.14);
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  line-height: 1.45;
}

.game-guide[open]:not(.closing) p {
  animation: guideOpen 0.5s ease;
}

.game-guide.closing p {
  animation: guideClose 0.42s ease forwards;
}

.game-guide[open] summary {
  background-color: #373737;
}

@keyframes guideOpen {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

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

@keyframes guideClose {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-12px);
  }
}

img {
  border-style: none;
}

.container_title {
  max-width: 700px;
  padding-top: 35px;
  width: 100%;
  margin: 36px auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.main_title {
  font-size: 24px;
  white-space: nowrap;
}

.container_birthday {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding-top: 36px;
  padding-bottom: 36px;
  border-top: 1.5px solid black;
  border-bottom: 1.5px solid black;
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
}

.title_birthday {
  font-size: 16px;
}

.input_wraper {
  position: relative;
  width: 215px;
  height: 35px;
  margin-left: -25px;
}

.input_birthday {
  color: #7e7e7e;
  font-size: 12px;
  border-radius: 20px;
  width: 100%;
  height: 100%;
  border: none;
  background-color: #d7d7d7;
  box-shadow: 2px 3px #00000040;
  padding-left: 15px;
  padding-right: 38px;
}

.green,
.green_number_guess,
.green_rock_paper_scissors {
  color: #039900;
}

.red,
.red_number_guess,
.red_rock_paper_scissors {
  color: #990000;
}

#text_birthday {
  width: 260px;
  display: block;
  margin-top: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  transition: opacity 0.2s ease;
}

.container_birthday_inner {
  display: grid;
  grid-template-columns: 215px 260px;
  column-gap: 26px;
  justify-content: center;
  align-items: center;
  margin-top: 36px;
}

.birthday_search_btn,
.number_guess_search_btn {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 37px;
  border: none;
  border-radius: 0 20px 20px 0;
  background-color: black;
}

.icon {
  stroke: white;
  width: 16px;
  height: 16px;
  stroke-width: 3;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 30px;
  margin-bottom: 36px;
}

h1 {
  font-weight: 400;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0;
  color: #000;
  margin-bottom: 36px;
  text-align: center;
  width: 163px;
  height: 20px;
}

.inputs-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.input-wrapper {
  width: 150px;
  height: 35px;
}

input[type='text'] {
  width: 100%;
  height: 100%;
  padding: 0 10px;
  border-radius: 20px;
  background-color: #00000030;
  border: none;
  outline: none;
  font-size: 14px;
  color: #000;
}

input::placeholder {
  text-align: center;
  font-weight: 400;
  font-size: 12px;
  line-height: 1;
  color: #7e7e7e;
}

.buttons-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0 15px;
}

.circle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: black;
  border: none;
  color: white;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 3px 3px 0 0 rgba(0, 0, 0, 0.25);
}

.shadow-input input {
  box-shadow: 3px 3px 0 0 rgba(0, 0, 0, 0.25);
}

.result-input input {
  box-shadow: none;
}

.timecalc-section {
  padding-bottom: 36px;
  border-top: 1.5px solid black;
  border-bottom: 1.5px solid black;
  max-width: 720px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.timecalc-section h1 {
  margin: 36px auto;
  font-weight: 400;
  font-size: 16px;
  line-height: 1;
  color: #000;
  text-align: center;
  width: 100%;
}

.timecalc-search-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 150px;
  height: 35px;
}

.timecalc-search-wrapper input[type='text'] {
  width: 100%;
  height: 100%;
  padding: 0 40px 0 10px;
  border-radius: 20px;
  background-color: #00000030;
  box-shadow: 3px 3px 0 0 rgba(0, 0, 0, 0.25);
  border: none;
  outline: none;
  font-size: 14px;
  color: #000;
}

.timecalc-search-button {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 100%;
  border: none;
  background-color: black;
  color: white;
  border-radius: 0 20px 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timecalc-search-wrapper input::placeholder {
  font-weight: 400;
  font-size: 12px;
  line-height: 1;
  color: #7e7e7e;
}

#timecalc-result {
  font-weight: 400;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
  color: #000;
  width: 76px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.timecalc-input-result-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin-left: -60px;
}

.timecalc-dashed-line {
  width: 100px;
  height: 1px;
  border-top: 1px dashed #000;
}

.h1 {
  font-weight: 400;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0;
  color: #000;
  margin: 0;
  padding: 36px 0;
  width: 100%;
  text-align: center;
}

.dino-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
  --dino-sprite: url('https://raw.githubusercontent.com/chromium/chromium/main/components/neterror/resources/images/default_100_percent/offline/100-offline-sprite.png');
}

.game-field {
  position: relative;
  height: 230px;
  overflow: hidden;
}

.game-field::before {
  content: '';
  position: absolute;
  top: 46px;
  left: var(--dino-cloud-left, 70%);
  width: 46px;
  height: 14px;
  background-image: var(--dino-sprite);
  background-position: -86px -2px;
  background-repeat: no-repeat;
  opacity: 0.9;
  pointer-events: none;
  z-index: 1;
}

.game-field::after {
  display: none;
}

.dino-horizon {
  position: absolute;
  bottom: 44px;
  left: 50%;
  z-index: 1;
  width: min(100%, 600px);
  height: 12px;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-50%);
}

.dino-horizon-piece {
  position: absolute;
  top: 0;
  width: 600px;
  height: 12px;
  background-image: var(--dino-sprite);
  background-position: -2px -54px;
  background-repeat: no-repeat;
}

.dino-horizon-piece:first-child {
  left: 0;
}

.dino-horizon-piece:last-child {
  left: 600px;
}

.ground-image {
  display: none;
}

.dino-score,
.dino-record {
  position: absolute;
  right: 14px;
  z-index: 4;
  color: #5f6666;
  font-size: 11px;
}

.dino-score {
  top: 12px;
}

.dino-record {
  top: 30px;
}

.dino-image {
  position: absolute;
  bottom: 50px;
  left: 17%;
  width: 44px;
  height: 47px;
  background-image: var(--dino-sprite);
  background-position: -848px -2px;
  background-repeat: no-repeat;
  z-index: 3;
}

.dino-image.jump {
  animation: dinoJump 0.96s ease-out;
}

.dino-image:not(.jump) {
  animation: dinoRun 0.24s steps(1) infinite;
}

@keyframes dinoJump {
  0%,
  100% {
    transform: translateY(0);
  }

  48% {
    transform: translateY(-95px);
  }
}

@keyframes dinoRun {
  0% {
    background-position: -936px -2px;
  }

  50% {
    background-position: -980px -2px;
  }
}
.cactus-image1,
.cactus-image2,
.cactus-image3 {
  display: none;
  position: absolute;
  right: -100px;
  bottom: 50px;
  width: 17px;
  height: 35px;
  background-image: var(--dino-sprite);
  background-position: -228px -2px;
  background-repeat: no-repeat;
  z-index: 3;
}

.pterodactyl-image {
  display: none;
  position: absolute;
  right: -120px;
  bottom: 50px;
  width: 46px;
  height: 40px;
  background-image: var(--dino-sprite);
  background-position: -134px -2px;
  background-repeat: no-repeat;
  z-index: 3;
  animation: pterodactylFly 0.45s ease-in-out infinite alternate;
}

@keyframes pterodactylFly {
  from {
    transform: translateY(-4px);
  }

  to {
    transform: translateY(4px);
  }
}

.pterodactyl-image[style*='block'] {
  animation: pterodactylFly 0.45s ease-in-out infinite alternate,
    pterodactylWings 0.35s steps(1) infinite;
}

@keyframes pterodactylWings {
  0% {
    background-position: -134px -2px;
  }

  50% {
    background-position: -180px -2px;
  }
}

.start-btn {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 400;
  border-radius: 20px;
  border: none;
  background-color: #000;
  color: #fff;
}

.dino-modal {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: rgba(37, 37, 37, 0.46);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.dino-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.dino-modal-window {
  width: min(100%, 390px);
  padding: 28px 24px;
  border: 1px solid rgba(88, 184, 178, 0.38);
  border-radius: 18px;
  background-color: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
  text-align: center;
  transform: translateY(14px) scale(0.96);
  transition: transform 0.3s ease;
}

.dino-modal.show .dino-modal-window {
  transform: translateY(0) scale(1);
}

.dino-modal-title {
  color: #373737;
  font-size: 18px;
  font-weight: 600;
}

.dino-modal-score {
  margin-top: 12px;
  color: #5f6666;
  font-size: 13px;
}

.dino-modal-record {
  margin: 10px 0 20px;
  color: #3e9994;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.dino-modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dino-modal-btn {
  padding: 10px 22px;
  border: none;
  border-radius: 18px;
  background-color: #000;
  color: #fff;
  font-size: 12px;
}

.dino-modal-end-btn {
  padding: 10px 18px;
  border: none;
  border-radius: 18px;
  background-color: #eef3f2;
  color: #373737;
  font-size: 12px;
  box-shadow: 0 4px 0 #c9d1cf;
}

@media (max-width: 480px) {
  .dino-modal-window {
    padding: 24px 18px;
    border-radius: 16px;
  }

  .dino-modal-title {
    font-size: 16px;
  }

  .dino-modal-record {
    font-size: 13px;
  }

  .dino-modal-actions {
    flex-direction: column;
  }
}

.football {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding-bottom: 36px;
  border-top: 1.5px solid black;
  border-bottom: 1.5px solid black;
}

.title {
  text-align: center;
  margin: 36px;
  font-weight: 400;
  font-size: 16px;
}

.field {
  position: relative;
  width: 100%;
  max-width: 720px;
  height: 360px;
  margin: 0 auto;
  background-color: #5abb58;
  border: 2px solid #000;
  border-radius: 37px;
  overflow: hidden;
}

.football-difficulty {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 10px;
  border-radius: 14px;
  background-color: rgba(0, 0, 0, 0.58);
  color: #fff;
  font-size: 11px;
}

.football-difficulty select {
  border: none;
  border-radius: 10px;
  padding: 3px 6px;
  background-color: #fff;
  color: #373737;
  font-size: 11px;
  outline: none;
}

.mid-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background-color: white;
  transform: translateX(-50%);
}

.center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  border: 2px solid white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ball {
  position: absolute;
  width: 50px;
  height: 50px;
  background-image: url('../images/football.png');
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  top: 85px;
  left: 92px;
}

.arrow-move {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  transform: translateY(-50%);
  transform-origin: left center;
  pointer-events: none;
}

.arrow-big {
  width: 70px;
  height: 22px;
  background-color: rgba(255, 255, 255, 0.92);
  clip-path: polygon(0% 38%, 68% 38%, 68% 0%, 100% 50%, 68% 100%, 68% 62%, 0% 62%);
}

.gate {
  position: absolute;
  width: 70px;
  height: 130px;
  top: 50px;
  right: -20px;
  border: 3px solid white;
  background: repeating-linear-gradient(45deg, transparent, transparent 5px, white 5px, white 6px);
  transition: top 800ms ease-in-out;
}

.football-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 35px;
  background-color: rgba(0, 0, 0, 0.42);
}

.football-overlay.hidden {
  display: none;
}

.football-play-btn {
  padding: 12px 30px;
  border: none;
  border-radius: 20px;
  background-color: #000;
  color: #fff;
  font-size: 14px;
}

.score-board {
  margin-top: 20px;
  font-weight: 400;
  font-size: 12px;
  text-align: center;
  color: #fff;
  background-color: #000;
  padding: 10px 20px;
  border-radius: 20px;
}

.max-number {
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  border-bottom: 1.5px solid black;
  padding-bottom: 36px;
}

#chart-container {
  position: relative;
  max-width: 680px;
  width: 100%;
  height: 430px;
  margin: 28px auto 18px;
  padding: 50px;
  overflow: visible;
  border: 1px solid rgba(88, 184, 178, 0.22);
  border-radius: 24px;
  background-color: rgba(249, 253, 252, 0.96);
  box-shadow: 0 14px 35px rgba(55, 55, 55, 0.1);
}

#myChart {
  position: relative;
  z-index: 1;
  width: 100% !important;
  height: 330px !important;
}

.inputs {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 36px;
}

input[type='number'] {
  width: 160px;
  padding: 10px 20px;
  border-radius: 20px;
  background-color: #edf2f1;
  box-shadow: 3px 3px 0 0 rgba(88, 184, 178, 0.26);
  border: 1px solid transparent;
  outline: none;
  font-weight: 400;
  font-size: 12px;
  text-align: center;
  transition: border-color 0.3s, box-shadow 0.3s;
}

input[type='number']:focus {
  border-color: rgba(62, 153, 148, 0.7);
  box-shadow: 3px 3px 0 0 rgba(62, 153, 148, 0.35);
}

.result {
  display: flex;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin-right: auto;
  font-weight: 400;
  font-size: 12px;
  margin-left: auto;
  margin-bottom: 36px;
  padding: 9px 16px;
  border-radius: 18px;
  background-color: rgba(237, 242, 241, 0.92);
  text-align: center;
}

#max-number {
  margin-left: 4px;
  color: #3e9994;
  font-weight: 600;
}

.container_number_guess {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  padding-top: 36px;
  padding-bottom: 36px;
  border-bottom: 1.5px solid black;
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

.title_number_guess {
  font-size: 16px;
}

.container_number_guess_inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 36px;
}

.input_wraper_number_guess {
  position: relative;
  width: 150px;
  height: 35px;
  display: flex;
  flex-direction: row;
  margin-right: 200px;
}

.input_number_guess {
  color: #7e7e7e;
  font-size: 12px;
  border-radius: 20px;
  width: 100%;
  height: 100%;
  border: none;
  background-color: #d7d7d7;
  box-shadow: 2px 3px #00000040;
  padding-left: 10px;
  padding-right: 35px;
}

#text_number_guess {
  font-size: 12px;
  transition: opacity 0.3s ease;
  margin-top: 8px;
  display: inline-block;
  min-width: 200px;
}

.container_main_number_guess {
  display: flex;
}

.container_attempt {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  gap: 10px;
  position: absolute;
  right: 0;
  top: 60px;
  margin-right: 30px;
}

.team-section {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.team-section::before,
.team-section::after {
  content: '';
  display: block;
  height: 1px;
  background: black;
  margin: 0 auto;
}

.team-title {
  text-align: center;
  font-weight: 400;
  font-size: 16px;
  margin: 36px;
}

.slider {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.slides {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
}

.slide {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 220px;
}
.slide.active {
  display: flex;
  animation: teamSlideIn 1.5s ease;
}

@keyframes teamSlideIn {
  from {
    opacity: 0;
    transform: translateX(16px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}
.arrow {
  position: absolute;
  top: 72px;
  width: 28px;
  height: 52px;
  border: none;
  background: none;
  color: #373737;
  z-index: 2;
  padding: 0;
}

.arrow.left {
  left: -120px;
  transform: rotate(180deg);
}

.arrow.right {
  right: -120px;
}

.arrow img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.member-photo {
  width: 170px;
  height: 165px;
  border-radius: 20px;
  background-color: #d9d9d9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 20px;
}

.member-initials {
  font-size: 42px;
  font-weight: 500;
  color: #373737;
}

.member-name {
  font-weight: 400;
  font-size: 14px;
  margin-top: 20px;
  text-align: center;
}

.member-role {
  font-weight: 400;
  font-size: 12px;
  margin: 12px;
  text-align: center;
  font-style: italic;
}

.member-info {
  font-weight: 400;
  font-size: 12px;
  margin-bottom: 24px;
  line-height: 1.3;
  text-align: center;
}

.container_rock_paper_scissors {
  max-width: 700px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  padding-top: 36px;
  padding-bottom: 36px;
  border-bottom: 1.5px solid black;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

.title_rock_paper_scissors {
  font-size: 16px;
  margin-bottom: 36px;
}

.container_rock_paper_scissors_inner {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  text-align: center;
}

.images_rock_paper_scissors ul {
  display: flex;
  gap: 38px;
  justify-content: center;
}

.images_rock_paper_scissors ul li {
  display: flex;
  align-items: center;
  justify-content: center;
}

.images_rock_paper_scissors svg,
.images_rock_paper_scissors img {
  border-radius: 20px;
  padding: 10px;
  width: 60px;
  height: 60px;
  background-color: black;
  stroke: none;
  fill: white;
}

.images_rock_paper_scissors button {
  border: none;
  border-radius: 20px;
}

.images_rock_paper_scissors button:hover svg,
.images_rock_paper_scissors button:hover img {
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

#text_rock_paper_scissors {
  font-size: 12px;
  margin-top: 36px;
  text-align: center;
  display: flex;
  justify-content: center;
}

.btn_continue {
  color: white;
  background-color: black;
  border-radius: 20px;
  font-size: 12px;
  padding: 10px 20px;
  border: none;
}

.btn_continue {
  margin-top: 15px;
  padding: 10px;
}

.btn_continue:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.container_results_rock_paper_scissors {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  gap: 10px;
  position: absolute;
  right: 0;
  top: 100px;
}

.comp_answer,
.my_answer {
  display: none;
  border-radius: 20px;
  padding: 10px;
  width: 60px;
  height: 60px;
  background-color: black;
  stroke: none;
  fill: white;
  margin-top: 36px;
}

.round_result_rock_paper_scissors {
  min-height: 40px;
  margin-top: 36px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.round_result_rock_paper_scissors.win {
  color: #039900;
}

.round_result_rock_paper_scissors.lose {
  color: #990000;
}

.round_result_rock_paper_scissors.draw {
  color: #373737;
}

.container_answers {
  display: flex;
  justify-content: center;
  gap: 35px;
}

.compare {
  margin-top: 60px;
  font-size: 25px;
  text-align: center;
  font-weight: 500;
}

.left_block_rock_paper_scissors {
  display: flex;
  flex-direction: column;
}

.like {
  position: absolute;
  font-size: 20px;
  animation: floatLike 1s ease-out forwards;
  pointer-events: none;
}

@keyframes floatLike {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-50px) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translateY(-100px) scale(0.8);
  }
}

.scientists {
  color: #373737;
  margin: 30px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 950px;
  padding: 36px 24px;
  border-top: 1.5px solid #373737;
}

.scientists-title {
  color: #373737;
  font-weight: 400;
  font-size: 18px;
}

.scientists-list {
  display: grid;
  grid-template-columns: repeat(4, 112px);
  justify-content: center;
  width: 100%;
  gap: 16px;
  margin: 4px auto 12px;
}

.scientists-item {
  background: linear-gradient(145deg, #454545, #2f2f2f);
  color: white;
  border: none;
  width: 112px;
  height: 112px;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.16);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  opacity: 1;
  animation: scientistCardIn 0.38s ease backwards;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.scientists-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 13px 20px rgba(0, 0, 0, 0.2);
}

.scientists-item p {
  animation: scientistTextIn 0.3s ease;
}

.scientists-ful-name {
  font-weight: 500;
  line-height: 1.25;
}

.scientists-live {
  color: #d4d4d4;
  font-size: 11px;
}

@keyframes scientistCardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }

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

@keyframes scientistTextIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

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

.scientists-btn-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: center;
  width: min(100%, 760px);
  max-width: 950px;
  gap: 12px;
  color: #373737;
}

.scientists-btn-item {
  width: 100%;
}

.scientists-btn-item:last-child {
  grid-column: 1 / -1;
  justify-self: center;
  width: 62%;
}

.scientists-wide-item {
  grid-column: 1 / -1;
  justify-self: center;
  width: 62%;
}

.scientists-reset-item {
  grid-column: 1 / -1;
  justify-self: center;
  width: 28%;
  min-width: 150px;
}

.scientists-btn {
  background: #373737;
  color: white;
  width: 100%;
  min-height: 45px;
  border: none;
  border-radius: 16px;
  font-size: 12px;
  line-height: 1.25;
  box-shadow: 0 5px 0 #202020;
  padding: 9px 13px;
  transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.scientists-btn:hover {
  color: white;
  background: rgb(65, 65, 65);
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #202020;
}

.scientists-btn:active {
  color: white;
  background: rgb(75, 75, 75);
  transform: translateY(3px);
  box-shadow: 0 2px 0 #202020;
}

.scientists-btn.scientists-btn-active {
  background: #3e9994;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(132, 204, 200, 0.3), 0 5px 0 #28746f;
}

.scientists-reset-btn {
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 14px;
  font-size: 11px;
  background: #eef3f2;
  color: #373737;
  box-shadow: 0 4px 0 #c9d1cf;
}

footer {
  transition: background 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 200px;
  background-color: white;
  color: #373737;
  margin-top: 10px;
}

footer.dark {
  background-color: #373737;
  color: white;
}

footer #footer-main-btn {
  background: url('../images/favicon.png') no-repeat center/contain;
}

footer.dark #footer-main-btn {
  background: url('../images/favicon.png') no-repeat center/contain;
}

footer .footer-contacts {
  color: #373737;
}

footer.dark .footer-contacts {
  color: white;
}

footer .subscribe-submit {
  background: #373737;
  color: white;
  border: none;
}

footer.dark .subscribe-submit {
  background: #575757;
  color: white;
}

footer #subscribe-modal-window {
  background: white;
  color: #373737;
}

footer.dark #subscribe-modal-window {
  background: #373737;
  color: white;
}

header ul {
  display: flex;
  flex-direction: row;
  gap: 40px;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

header button {
  background: none;
  border: none;
  font-size: 12px;
}

.our-team {
  border-bottom: none !important;
  border-top: none !important;
}

.filter-menu {
  display: none;
}

header {
  background-color: white;
  color: #373737;
  transition: background 0.3s;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  position: fixed;
  top: 0;
  width: 100%;
  border-bottom: 1px solid #373737;
}

header.dark {
  background-color: #373737;
  color: white;
  border-bottom: 1px solid white;
}

header.dark button {
  background-color: #373737;
  color: white;
}

header.dark .header-main-btn {
  background: url('../images/favicon.png') no-repeat center/contain;
}

header.dark .theme-btn {
  background: #575757;
}

header.dark .interact-filter::after {
  border-left: 1px solid white;
  border-bottom: 1px solid white;
}

header.dark .filter-menu {
  background: url('../images/arrow-right.png') no-repeat center/contain;
}

header #games-filter button {
  color: #373737;
  font-size: 13px;
  background: none;
}

header.dark #games-filter {
  background: #373737;
  border: 1px solid white;
}

header.dark #games-filter button {
  color: white;
}

header #filter-menu-modal-window {
  background: white;
  border: 2px solid #373737;
}

header.dark #filter-menu-modal-window {
  background: #373737;
  border: 2px solid white;
}

header #filter-menu-modal-window button {
  background: none;
  color: #373737;
}

header.dark #filter-menu-modal-window button {
  background: none;
  color: white;
}

@media (min-width: 1280px) {
  .header-main-btn {
    margin-right: 31px;
    background: url('../images/favicon.png') no-repeat center/contain;
    width: 103px;
    height: 41px;
  }

  .interact-filter::after {
    content: '';
    display: inline-block;
    margin-left: 6px;
    width: 6px;
    height: 6px;
    border-left: 1px solid #373737;
    border-bottom: 1px solid #373737;
    transform: rotate(-45deg) translateY(-3px);
  }

  #games-filter {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 120px;
    height: 108px;
    position: absolute;
    top: 100%;
    right: -11px;
    border: 1px solid #373737;
    border-radius: 7px;
    background: white;
    transition: opacity 0.3s, transform 0.3s;
  }

  #games-filter.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
  }

  #interacts {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
  }

  .contacts {
    margin-right: 361px;
  }

  .theme-btn {
    appearance: none;
    width: 40px;
    height: 20px;
    background: #ccc;
    border-radius: 36px;
    position: relative;
    cursor: pointer;
    outline: none;
    transition: background 0.3s;
  }

  .theme-btn::before {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background: white url('../images/sun.svg') no-repeat center/contain;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
  }

  .theme-btn:checked::before {
    transform: translateX(20px);
    background: #373737 url('../images/moon.svg') no-repeat center/contain;
  }

  .welcome-modal {
    display: flex;
    position: fixed;
    z-index: 99;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(37, 37, 37, 0.3);
    justify-content: center;
    align-items: center;
    font-size: 16px;
  }

  .welcome-modal-window {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40%;
    height: 40%;
    background-color: white;
    gap: 20px;
    color: #373737;
    border-radius: 10px;
  }

  .welcome-modal-window p {
    text-align: center;
    margin-bottom: 5%;
  }

  #name-input {
    display: flex;
    margin-top: -5%;
    width: 70%;
    height: 10%;
    border-radius: 10px;
  }

  #welcome-modal-submit {
    background-color: #373737;
    color: white;
    width: 25%;
    height: 11%;
    border-radius: 15px;
  }

  #filter-menu-modal {
    display: none;
  }

  #nav {
    display: flex;
    flex-direction: row;
    gap: 185px;
    justify-content: center;
    align-items: center;
  }

  #footer-main-btn {
    width: 165px;
    height: 63px;
    border: none;
  }

  .footer-contacts {
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  #subscribe-form {
    font-size: 10px;
    display: flex;
    flex-direction: row;
    gap: 20px;
  }

  #subscribe-form input {
    width: 157px;
    height: 35px;
    border-radius: 7px;
    border: 1px solid #373737;
    text-align: center;
  }

  .subscribe-submit {
    width: 107px;
    height: 35px;
    border-radius: 7px;
  }

  #subscribe-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: rgba(37, 37, 37, 0.4);
    justify-content: center;
    align-items: center;
  }

  #subscribe-modal-window {
    display: flex;
    width: 30%;
    height: 25%;
    z-index: 3;
    font-size: 20px;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 20px;
    position: relative;
  }

  #subscribe-modal-window .icon {
    position: absolute;
    width: 30px;
    height: 30px;
  }

  .icon.top-left {
    top: 65px;
    left: 60px;
  }

  .icon.bottom-left {
    bottom: 65px;
    left: 60px;
  }

  .icon.top-right {
    top: 65px;
    right: 60px;
  }

  .icon.bottom-right {
    bottom: 65px;
    right: 60px;
  }

  .describe {
    margin-top: 10px;
    font-size: 6px;
  }
}

@media (min-width: 800px) and (max-width: 1279px) {
  .header-main-btn {
    margin-right: 31px;
    background: url('../images/favicon.png') no-repeat center/contain;
    width: 103px;
    height: 41px;
  }

  .interact-filter::after {
    content: '';
    display: inline-block;
    margin-left: 6px;
    width: 6px;
    height: 6px;
    border-left: 1px solid #373737;
    border-bottom: 1px solid #373737;
    transform: rotate(-45deg) translateY(-3px);
  }

  #games-filter {
    transition: opacity 0.3s, transform 0.3s;
    border-radius: 7px;
    display: flex;
    position: absolute;
    top: 100%;
    right: -11px;
    width: 120px;
    height: 112px;
    gap: 5px;
    flex-direction: column;
    text-align: center;
    justify-content: center;
    align-items: center;
    background: white;
    border: 1px solid #373737;
    opacity: 1;
    transform: translateY(0);
  }

  #games-filter.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
  }

  #interacts {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
  }

  .theme-btn {
    appearance: none;
    width: 40px;
    height: 20px;
    background: #ccc;
    border-radius: 36px;
    position: relative;
    cursor: pointer;
    outline: none;
    transition: background 0.3s;
  }

  .theme-btn::before {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background: white url('../images/sun.svg') no-repeat center/contain;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
  }

  .theme-btn:checked::before {
    transform: translateX(20px);
    background: #373737 url('../images/moon.svg') no-repeat center/contain;
  }

  .welcome-modal {
    display: flex;
    position: fixed;
    z-index: 99;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(37, 37, 37, 0.3);
    justify-content: center;
    align-items: center;
    font-size: 16px;
  }

  .welcome-modal-window {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 55%;
    height: 35%;
    background-color: white;
    gap: 20px;
    color: #373737;
    border-radius: 10px;
  }

  .welcome-modal-window p {
    text-align: center;
    margin-bottom: 5%;
    font-size: 15px;
  }

  #name-input {
    display: flex;
    margin-top: -5%;
    width: 80%;
    height: 10%;
    border-radius: 15px;
  }

  #welcome-modal-submit {
    background-color: #373737;
    color: white;
    width: 25%;
    height: 11%;
    border-radius: 10px;
  }

  #filter-menu-modal {
    display: none;
  }

  #nav {
    display: flex;
    flex-direction: row;
    gap: 55px;
    justify-content: center;
    align-items: center;
  }

  #footer-main-btn {
    width: 125px;
    height: 63px;
    border: none;
  }

  .footer-contacts {
    font-size: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  #subscribe-form {
    font-size: 10px;
    display: flex;
    flex-direction: row;
    gap: 20px;
  }

  #subscribe-form input {
    width: 127px;
    height: 35px;
    border-radius: 7px;
    border: 1px solid #373737;
    text-align: center;
  }

  .subscribe-submit {
    width: 93px;
    height: 35px;
    border-radius: 7px;
  }

  #subscribe-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: rgba(37, 37, 37, 0.4);
    justify-content: center;
    align-items: center;
  }

  #subscribe-modal-window {
    display: flex;
    width: 35%;
    height: 15%;
    z-index: 3;
    font-size: 20px;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 20px;
  }

  .describe {
    margin-top: 10px;
    font-size: 6px;
  }
}

@media (max-width: 768px) {
  main {
    width: calc(100% - 72px);
    padding-right: 14px;
    padding-left: 14px;
  }

  main > section + section {
    margin-top: 24px;
  }

  .main_title {
    font-size: 20px;
  }

  .title_birthday,
  .title_number_guess,
  .title_rock_paper_scissors,
  .title {
    font-size: 14px;
  }

  .scientists {
    padding: 28px 16px;
  }

  .scientists-list {
    grid-template-columns: repeat(3, 100px);
    gap: 12px;
  }

  .scientists-item {
    width: 100px;
    height: 100px;
    font-size: 11px;
  }

  .scientists-btn-list {
    gap: 10px;
  }

  .container_birthday {
    padding-top: 24px;
    padding-bottom: 24px;
    min-width: 0;
  }

  .input_wraper {
    width: 200px;
    height: 32px;
    margin-left: 0;
  }

  input.input_birthday {
    font-size: 10px;
    padding-right: 38px;
    border-radius: 16px;
  }

  .birthday_search_btn {
    width: 33px;
    height: 34px;
  }

  #text_birthday {
    width: auto;
    font-size: 11px;
    text-align: center;
    margin-top: 12px;
  }

  .container_birthday_inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
  }

  .inputs-row {
    flex-direction: column;
    gap: 15px;
  }

  .buttons-group {
    grid-template-columns: repeat(4, 1fr);
    margin: 0;
  }

  .input-wrapper {
    width: 100%;
    max-width: 250px;
  }

  .circle-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .timecalc-input-result-row {
    flex-direction: column;
    gap: 20px;
    margin-left: 0;
  }

  .timecalc-search-wrapper {
    width: 200px;
    height: 40px;
  }

  #timecalc-result {
    font-size: 14px;
    width: auto;
    justify-content: center;
  }

  .timecalc-dashed-line {
    width: 60px;
  }

  .timecalc-section h1 {
    font-size: 18px;
  }

  .h1 {
    font-size: 14px;
    padding: 24px 0;
  }

  .game-field {
    height: 200px;
  }

  .game-field::after {
    bottom: 29px;
  }

  .dino-horizon {
    bottom: 24px;
  }

  .game-field::before {
    top: 38px;
    left: 64%;
  }

  .dino-image {
    bottom: 30px;
    width: 44px;
    height: 47px;
    left: 16%;
  }

  .cactus-image1,
  .cactus-image2,
  .cactus-image3 {
    bottom: 30px;
    width: 17px;
    height: 35px;
  }

  .pterodactyl-image {
    bottom: 30px;
    width: 46px;
    height: 40px;
  }

  .start-btn {
    font-size: 11px;
    padding: 8px 16px;
  }

  .field {
    width: 100%;
    height: 180px;
  }

  .center-circle {
    width: 60px;
    height: 60px;
  }

  .ball {
    width: 40px;
    height: 40px;
    top: 70px;
    left: 70px;
  }

  .gate {
    width: 55px;
    height: 100px;
    right: -15px;
    top: 40px;
  }

  .score-board,
  .result {
    font-size: 11px;
  }

  #chart-container {
    max-width: 92%;
    height: 370px;
    padding: 42px 34px;
    border-radius: 20px;
  }

  #myChart {
    height: 286px !important;
  }

  .score-board {
    padding: 8px 16px;
  }

  .inputs {
    gap: 15px;
    flex-wrap: wrap;
  }

  input[type='number'] {
    width: 140px;
    padding: 8px 16px;
    font-size: 11px;
  }

  .container_number_guess {
    flex-direction: column;
    align-items: center;
    padding-top: 24px;
    padding-bottom: 24px;
    width: 100%;
    height: auto;
  }

  .container_number_guess_inner {
    margin-top: 0;
    gap: 20px;
  }

  .input_wraper_number_guess {
    margin-right: 0;
    width: 180px;
  }

  .container_main_number_guess {
    flex-direction: column;
    align-items: center;
  }

  .container_attempt {
    position: static;
    margin: 0;
    text-align: center;
  }

  #text_number_guess {
    min-width: auto;
    text-align: center;
    margin: 12px;
  }

  .slider {
    max-width: 300px;
  }

  .slides {
    gap: 24px;
  }

  .arrow {
    top: 48px;
    width: 22px;
    height: 44px;
  }

  .arrow.left {
    left: -45px;
  }

  .arrow.right {
    right: -45px;
  }

  .member-photo {
    width: 120px;
    height: 120px;
  }

  .member-name {
    font-size: 13px;
    margin-top: 12px;
  }

  .member-role {
    font-size: 11px;
    margin: 10px;
  }

  .member-info {
    font-size: 11px;
    margin-bottom: 14px;
  }

  .container_rock_paper_scissors {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .images_rock_paper_scissors ul {
    gap: 32px;
  }

  .images_rock_paper_scissors svg,
  .images_rock_paper_scissors img {
    width: 55px;
  }

  #text_rock_paper_scissors {
    font-size: 11px;
    margin-top: 26px;
  }

  .btn_continue {
    font-size: 11px;
  }

  .container_results_rock_paper_scissors {
    font-size: 11px;
    right: -34px;
  }
}

@media (min-width: 480px) and (max-width: 799px) {
  footer {
    height: 15%;
  }

  #nav {
    display: flex;
    flex-direction: row;
    gap: 5px;
    justify-content: center;
    align-items: center;
  }

  #footer-main-btn {
    width: 75px;
    height: 63px;
    border: none;
  }

  .footer-contacts {
    font-size: 7px;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  #subscribe-form {
    display: flex;
    flex-direction: row;
    gap: 10px;
  }

  #subscribe-form input {
    width: 80px;
    height: 25px;
    border-radius: 7px;
    border: 1px solid #373737;
    text-align: center;
    font-size: 7px;
  }

  .subscribe-submit {
    width: 80px;
    height: 25px;
    border-radius: 7px;
    font-size: 9px;
  }

  .header-main-btn {
    background: url('../images/favicon.png') no-repeat center/contain;
    width: 93px;
    height: 41px;
    margin-left: 40px;
  }

  #games-filter,
  .interact-filter,
  .our-team,
  .contacts,
  .user-hello {
    display: none;
  }

  .filter-menu {
    margin-left: -70px;
    display: flex;
    width: 30px;
    height: 30px;
    background: url('../images/arrow-right.png') no-repeat center/contain;
  }

  .theme-btn {
    appearance: none;
    width: 40px;
    height: 20px;
    background: #ccc;
    border-radius: 36px;
    position: relative;
    cursor: pointer;
    outline: none;
    transition: background 0.3s;
  }

  .theme-btn::before {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background: white url('../images/sun.svg') no-repeat center/contain;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
  }

  .theme-btn:checked::before {
    transform: translateX(20px);
    background: #373737 url('../images/moon.svg') no-repeat center/contain;
  }
}

@media (max-width: 480px) {
  .section-title.section-title {
    margin-bottom: 14px;
  }

  main {
    width: calc(100% - 48px);
    padding-right: 10px;
    padding-left: 10px;
  }

  .main_title {
    font-size: 18px;
    white-space: normal;
    text-align: center;
  }

  .container_birthday {
    padding-top: 16px;
    padding-bottom: 16px;
    border-top: 1px solid black;
    border-bottom: 1px solid black;
    min-width: 0;
    align-items: center;
    margin: 0 auto;
  }

  .title_birthday,
  .title_number_guess,
  .title_rock_paper_scissors,
  .title {
    font-size: 13px;
  }

  .input_wraper {
    min-width: 225px;
    height: 30px;
    margin-left: 0;
  }

  #text_birthday {
    width: auto;
    white-space: normal;
    text-align: center;
    margin-top: 0;
  }

  .container_birthday_inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .birthday_search_btn {
    width: 38px;
    height: 31px;
  }

  h1 {
    font-size: 14px;
    width: auto;
    height: auto;
  }

  .inputs-row {
    flex-direction: column;
    gap: 12px;
  }

  .buttons-group {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 0;
  }

  .input-wrapper {
    width: 100%;
    max-width: 200px;
  }

  .circle-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  input[type='text'] {
    font-size: 13px;
    padding: 0 8px;
  }

  input::placeholder {
    font-size: 11px;
  }

  .timecalc-input-result-row {
    flex-direction: column;
    gap: 16px;
    margin-left: 0;
  }

  .timecalc-search-wrapper {
    width: 180px;
    height: 38px;
  }

  .timecalc-search-wrapper input[type='text'] {
    font-size: 13px;
    padding: 0 35px 0 10px;
  }

  .timecalc-search-button {
    width: 35px;
  }

  #timecalc-result {
    font-size: 13px;
    width: auto;
    justify-content: center;
    text-align: center;
  }

  .timecalc-dashed-line {
    width: 50px;
  }

  .timecalc-section h1 {
    font-size: 16px;
    margin: 24px 0;
  }

  .h1 {
    font-size: 12px;
    padding: 16px 0;
  }

  .game-field {
    height: 160px;
  }

  .game-field::after {
    bottom: 25px;
  }

  .dino-horizon {
    bottom: 20px;
  }

  .game-field::before {
    top: 34px;
    left: 56%;
  }

  .dino-score {
    top: 8px;
    right: 10px;
    font-size: 10px;
  }

  .dino-image {
    bottom: 26px;
    width: 44px;
    height: 47px;
    left: 15%;
  }

  .cactus-image1,
  .cactus-image2,
  .cactus-image3 {
    bottom: 26px;
    width: 17px;
    height: 35px;
  }

  .pterodactyl-image {
    bottom: 26px;
    width: 46px;
    height: 40px;
  }

  .start-btn {
    font-size: 10px;
    padding: 6px 12px;
  }

  .field {
    height: 150px;
  }

  .football-difficulty {
    top: 8px;
    right: 10px;
    gap: 4px;
    padding: 4px 5px 4px 7px;
    font-size: 9px;
  }

  .football-difficulty select {
    padding: 2px 4px;
    font-size: 9px;
  }

  .center-circle {
    width: 45px;
    height: 45px;
  }

  .ball {
    width: 30px;
    height: 30px;
    top: 60px;
    left: 50px;
  }

  .gate {
    width: 40px;
    height: 80px;
    right: -10px;
    top: 35px;
  }

  .score-board {
    font-size: 10px;
    padding: 6px 12px;
  }

  .inputs {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  input[type='number'] {
    width: 80%;
    max-width: 240px;
    font-size: 12px;
  }

  .result {
    font-size: 12px;
    text-align: center;
    padding: 0 10px;
  }

  #chart-container {
    max-width: 100%;
    height: 300px;
    padding: 28px 16px 32px;
    margin-top: 20px;
    border-radius: 18px;
  }

  #myChart {
    height: 240px !important;
  }

  .container_number_guess_inner {
    gap: 20px;
  }

  .input_wraper_number_guess {
    min-width: 180px;
    height: 32px;
  }

  .number_guess_search_btn {
    width: 34px;
    height: 32px;
  }

  .team-title {
    font-size: 14px;
    margin: 20px 0;
  }

  .slider {
    max-width: 260px;
  }

  .slides {
    justify-content: center;
    gap: 18px;
  }

  .arrow {
    top: 32px;
    width: 18px;
    height: 36px;
  }

  .arrow.left {
    left: -28px;
  }

  .arrow.right {
    right: -28px;
  }

  .member-photo {
    width: 90px;
    height: 90px;
  }

  .member-initials {
    font-size: 28px;
  }

  .member-name {
    font-size: 12px;
    margin-top: 10px;
  }

  .member-role {
    font-size: 10px;
    margin: 9px;
  }

  .member-info {
    font-size: 10px;
    margin-bottom: 10px;
  }

  .container_rock_paper_scissors {
    padding-top: 18px;
    padding-bottom: 18px;
    flex-direction: column;
    align-items: center;
  }

  .container_rock_paper_scissors_inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
  }

  .images_rock_paper_scissors ul {
    gap: 30px;
  }

  .images_rock_paper_scissors svg,
  .images_rock_paper_scissors img {
    width: 50px;
    height: 50px;
  }

  #text_rock_paper_scissors {
    font-size: 11px;
    margin-top: 18px;
  }

  .container_answers {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
  }

  .container_answers svg,
  .my_answer,
  .comp_answer {
    margin-top: 0;
  }

  .compare {
    font-size: 18px;
    margin-top: 0;
  }

  .container_results_rock_paper_scissors {
    position: static;
    align-items: center;
    margin-top: 15px;
    font-size: 11px;
    gap: 7px;
  }

  .btn_continue {
    font-size: 10px;
    margin-top: 10px;
    align-self: center;
  }

  .scientists {
    padding: 24px 12px;
    gap: 16px;
  }

  .scientists-title {
    font-size: 15px;
  }

  .scientists-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .scientists-item {
    width: 100%;
    height: 84px;
    padding: 7px 5px;
    border-radius: 7px;
    font-size: 10px;
  }

  .scientists-live {
    font-size: 9px;
  }

  .scientists-btn-list {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 8px;
  }

  .scientists-btn-item {
    width: 100%;
  }

  .scientists-btn-item:last-child {
    width: 100%;
  }

  .scientists-wide-item {
    width: 100%;
  }

  .scientists-reset-item {
    width: 58%;
    min-width: 150px;
  }

  .scientists-btn {
    border-radius: 10px;
    font-size: 10px;
    min-height: 40px;
    padding: 8px 10px;
  }

  #nav {
    display: flex;
    flex-direction: row;
    gap: 5px;
    justify-content: center;
    align-items: center;
  }

  #footer-main-btn {
    width: 75px;
    height: 63px;
    border: none;
  }

  .footer-contacts {
    font-size: 7px;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  #subscribe-form {
    display: flex;
    flex-direction: row;
    gap: 10px;
  }

  #subscribe-form input {
    width: 70px;
    height: 22px;
    border-radius: 7px;
    border: 1px solid #373737;
    text-align: center;
    font-size: 7px;
  }

  .subscribe-submit {
    width: 70px;
    height: 22px;
    border-radius: 7px;
    font-size: 9px;
  }

  .header-main-btn {
    background: url('../images/favicon.png') no-repeat center/contain;
    width: 83px;
    height: 41px;
    margin-left: 40px;
  }

  #games-filter,
  .interact-filter,
  .our-team,
  .contacts,
  .user-hello {
    display: none;
  }

  .filter-menu {
    margin-left: -70px;
    display: flex;
    width: 30px;
    height: 30px;
    background: url('../images/arrow-right.png') no-repeat center/contain;
  }

  .theme-btn {
    appearance: none;
    width: 40px;
    height: 20px;
    background: #ccc;
    border-radius: 36px;
    position: relative;
    cursor: pointer;
    outline: none;
    transition: background 0.3s;
  }

  .theme-btn::before {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background: white url('../images/sun.svg') no-repeat center/contain;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
  }

  .theme-btn:checked::before {
    transform: translateX(20px);
    background: #373737 url('../images/moon.svg') no-repeat center/contain;
  }
}

/* Footer */
footer {
  min-height: 145px;
  height: auto;
  margin-top: 0;
  padding: 28px 24px;
}

footer #nav {
  display: grid;
  grid-template-columns: 165px 190px minmax(270px, 1fr);
  align-items: center;
  justify-content: center;
  gap: 54px;
  width: min(100%, 720px);
  margin: 0 auto;
}

footer #footer-main-btn {
  width: 145px;
  height: 58px;
  padding-left: 61px;
  border: none;
  background: url('../images/favicon.png') no-repeat left center / 52px;
  color: #373737;
  text-align: left;
  cursor: pointer;
}

footer.dark #footer-main-btn {
  background: url('../images/favicon.png') no-repeat left center / 52px;
  color: #000;
  filter: invert(1);
}

.footer-logo-title,
.footer-logo-subtitle {
  display: block;
}

.footer-logo-title {
  font-size: 16px;
  line-height: 1.1;
}

.footer-logo-subtitle {
  margin-top: 5px;
  padding-left: 14px;
  font-family: 'Brush Script MT', cursive;
  font-size: 16px;
  line-height: 1;
}

footer .footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #373737;
  font-size: 10px;
  line-height: 1.25;
}

footer #subscribe-form {
  display: flex;
  align-items: center;
  gap: 20px;
}

footer #subscribe-form input {
  width: 157px;
  height: 35px;
  padding: 0 12px;
  border: none;
  border-radius: 18px;
  background-color: #d7d7d7;
  color: #373737;
  font-size: 10px;
  text-align: center;
}

footer #subscribe-form input::placeholder {
  font-size: 10px;
}

footer .subscribe-submit {
  width: 107px;
  height: 35px;
  border: none;
  border-radius: 18px;
  font-size: 10px;
  cursor: pointer;
}

footer .describe {
  margin-top: 9px;
  font-size: 6px;
  line-height: 1.25;
}

footer #subscribe-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  align-items: center;
  justify-content: center;
  background: rgba(37, 37, 37, 0.4);
}

footer #subscribe-modal-window {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(90%, 430px);
  min-height: 180px;
  border-radius: 18px;
  font-size: 18px;
  text-align: center;
}

footer #subscribe-modal-window .icon {
  position: absolute;
  width: 30px;
  height: 30px;
}

@media (max-width: 768px) {
  footer {
    padding: 24px 18px;
  }

  footer #nav {
    grid-template-columns: 130px 150px minmax(220px, 1fr);
    gap: 24px;
    width: min(100%, 610px);
  }

  footer #footer-main-btn {
    width: 126px;
    height: 52px;
    padding-left: 53px;
    background-size: 45px;
  }

  footer.dark #footer-main-btn {
    background-size: 45px;
  }

  .footer-logo-title,
  .footer-logo-subtitle {
    font-size: 14px;
  }

  footer .footer-contacts {
    font-size: 8px;
  }

  footer #subscribe-form {
    gap: 10px;
  }

  footer #subscribe-form input {
    width: 125px;
    height: 30px;
    font-size: 9px;
  }

  footer .subscribe-submit {
    width: 88px;
    height: 30px;
    font-size: 9px;
  }
}

@media (max-width: 620px) {
  footer {
    padding: 24px 16px;
  }

  footer #nav {
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
    text-align: center;
  }

  footer #footer-main-btn {
    margin: 0 auto;
  }

  footer .footer-contacts {
    align-items: center;
    font-size: 9px;
  }

  footer #subscribe-form {
    justify-content: center;
  }

  footer .describe {
    font-size: 6px;
    text-align: center;
  }
}

/* Shared spacing and form controls */
main > section + section {
  margin-top: 36px;
}

.section-title.section-title {
  margin-bottom: 16px;
}

.game-guide {
  margin: 0 auto 24px;
}

.container_birthday_inner {
  column-gap: 20px;
  margin-top: 0;
}

.inputs-row {
  gap: 16px;
}

.inputs {
  gap: 16px;
  margin-bottom: 24px;
}

.timecalc-input-result-row {
  gap: 28px;
  margin-left: 0;
}

.container_number_guess_inner {
  gap: 0;
}

.scientists {
  gap: 0;
}

.scientists-list {
  margin: 0 auto 24px;
}

main input[type='text'],
main input[type='number'] {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 18px;
  outline: none;
  background-color: #edf2f1;
  box-shadow: 3px 3px 0 rgba(55, 55, 55, 0.16);
  color: #373737;
  font-size: 12px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

main input[type='number'] {
  appearance: textfield;
}

main input[type='number']::-webkit-inner-spin-button,
main input[type='number']::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

main input[type='text']:focus,
main input[type='number']:focus {
  border-color: rgba(62, 153, 148, 0.72);
  box-shadow: 3px 3px 0 rgba(62, 153, 148, 0.3);
}

.result-input input[readonly] {
  background-color: #f5f7f7;
  box-shadow: none;
}

main input::placeholder {
  color: #7e7e7e;
  font-size: 11px;
  text-align: center;
}

.input_birthday,
.input_number_guess {
  padding-right: 42px;
  padding-left: 12px;
}

.input_wraper,
.input-wrapper,
.input_wraper_number_guess,
.timecalc-search-wrapper {
  height: 36px;
}

.input_wraper {
  margin-left: 0;
}

.birthday_search_btn,
.number_guess_search_btn,
.timecalc-search-button {
  width: 38px;
  height: 36px;
  border-radius: 0 18px 18px 0;
}

.timecalc-search-wrapper input[type='text'] {
  padding-right: 44px;
  padding-left: 12px;
}

.container_main_number_guess {
  display: grid;
  grid-template-columns: 150px minmax(200px, 1fr);
  gap: 28px;
  align-items: center;
}

.input_wraper_number_guess {
  margin-right: 0;
}

#text_number_guess {
  margin-top: 0;
}

@media (max-width: 768px) {
  main > section + section {
    margin-top: 28px;
  }

  .timecalc-input-result-row {
    gap: 20px;
  }

  .container_main_number_guess {
    display: flex;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  main > section + section {
    margin-top: 22px;
  }

  .section-title.section-title {
    margin-bottom: 12px;
  }

  .game-guide {
    margin-bottom: 18px;
  }

  .inputs-row,
  .inputs {
    gap: 12px;
  }

  .timecalc-input-result-row {
    gap: 16px;
  }

  .input_wraper,
  .input-wrapper,
  .input_wraper_number_guess,
  .timecalc-search-wrapper {
    max-width: 100%;
    min-width: 0;
    height: 34px;
  }

  .birthday_search_btn,
  .number_guess_search_btn,
  .timecalc-search-button {
    width: 36px;
    height: 34px;
  }

  main input[type='text'],
  main input[type='number'] {
    min-height: 34px;
    font-size: 12px;
  }
}

/* Button animations */
button,
.timecalc-search-button,
.game-guide summary {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

button:not(.arrow):not(.birthday_search_btn):not(.number_guess_search_btn):hover {
  transform: translateY(-2px) scale(1.02);
}

button:not(.arrow):not(.birthday_search_btn):not(.number_guess_search_btn):active {
  transform: translateY(1px) scale(0.98);
}

.birthday_search_btn:hover,
.number_guess_search_btn:hover {
  transform: translateY(-50%) scale(1.06);
}

.birthday_search_btn:active,
.number_guess_search_btn:active {
  transform: translateY(-50%) scale(0.95);
}

.timecalc-search-button:hover {
  transform: scale(1.06);
}

.timecalc-search-button:active {
  transform: scale(0.95);
}

.arrow.left:hover {
  transform: rotate(180deg) scale(1.12);
}

.arrow.left:active {
  transform: rotate(180deg) scale(0.93);
}

.arrow.right:hover {
  transform: scale(1.12);
}

.arrow.right:active {
  transform: scale(0.93);
}

.game-guide summary:hover {
  transform: translateY(-2px);
}

.game-guide summary:active {
  transform: translateY(1px) scale(0.98);
}

button:focus-visible,
.timecalc-search-button:focus-visible,
.game-guide summary:focus-visible {
  outline: 2px solid #3e9994;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  button,
  .timecalc-search-button,
  .game-guide summary {
    transition: none;
  }
}

/* Rock paper scissors result modal */
.rock-paper-scissors-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: rgba(37, 37, 37, 0.46);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.rock-paper-scissors-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.rock-paper-scissors-modal-window {
  width: min(100%, 390px);
  padding: 28px 24px;
  border: 1px solid rgba(88, 184, 178, 0.38);
  border-radius: 18px;
  background-color: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
  text-align: center;
  transform: translateY(14px) scale(0.96);
  transition: transform 0.3s ease;
}

.rock-paper-scissors-modal.show .rock-paper-scissors-modal-window {
  transform: translateY(0) scale(1);
}

.rock-paper-scissors-modal-title {
  color: #373737;
  font-size: 14px;
}

.rock-paper-scissors-modal-result {
  margin: 14px 0 20px;
  color: #3e9994;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.rock-paper-scissors-modal-btn {
  padding: 10px 22px;
  border: none;
  border-radius: 18px;
  background-color: #000;
  color: #fff;
  font-size: 12px;
}

@media (max-width: 480px) {
  .rock-paper-scissors-modal-window {
    padding: 24px 18px;
    border-radius: 16px;
  }

  .rock-paper-scissors-modal-result {
    font-size: 16px;
  }
}

/* Number guess */
.container_number_guess {
  flex-direction: column;
  gap: 16px;
  padding: 32px 18px;
}

.container_number_guess_inner {
  width: 100%;
  gap: 0;
}

.number-guess-range {
  margin-bottom: 18px;
  color: #6b7473;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}

.container_main_number_guess {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

.input_wraper_number_guess {
  flex: 0 0 190px;
  width: 190px;
}

.input_wraper_number_guess .input_number_guess {
  width: 100%;
}

#text_number_guess {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 280px);
  height: 64px;
  margin: 0;
  padding: 7px 12px;
  border-radius: 18px;
  background-color: #f5f7f7;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
}

#text_number_guess:empty::before {
  color: #7e7e7e;
  content: 'Тут з’явиться підказка';
}

.container_attempt {
  position: static;
  margin: 0;
  padding: 7px 14px;
  border-radius: 16px;
  background-color: #373737;
  color: #fff;
  font-size: 11px;
}

.count_attempts {
  color: #8edbd6;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 480px) {
  .container_number_guess {
    gap: 14px;
    padding: 24px 12px;
  }

  .number-guess-range {
    margin-bottom: 14px;
    font-size: 10px;
  }

  .container_main_number_guess {
    flex-direction: column;
    gap: 12px;
  }

  .input_wraper_number_guess {
    flex-basis: auto;
    width: min(100%, 190px);
  }

  #text_number_guess {
    width: min(100%, 240px);
    height: 74px;
    font-size: 10px;
  }
}

/* Number guess result modal */
.number-guess-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: rgba(37, 37, 37, 0.46);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.number-guess-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.number-guess-modal-window {
  width: min(100%, 390px);
  padding: 28px 24px;
  border: 1px solid rgba(88, 184, 178, 0.38);
  border-radius: 18px;
  background-color: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
  text-align: center;
  transform: translateY(14px) scale(0.96);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.number-guess-modal.show .number-guess-modal-window {
  transform: translateY(0) scale(1);
}

.number-guess-modal.lose .number-guess-modal-window {
  border-color: rgba(232, 113, 94, 0.55);
}

.number-guess-modal-title {
  color: #3e9994;
  font-size: 18px;
  font-weight: 600;
}

.number-guess-modal.lose .number-guess-modal-title {
  color: #c65c4c;
}

.number-guess-modal-text {
  margin: 12px 0 20px;
  color: #5f6666;
  font-size: 13px;
  line-height: 1.4;
}

.number-guess-modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.number-guess-modal-new-game,
.number-guess-modal-close {
  padding: 10px 16px;
  border: none;
  border-radius: 18px;
  color: #fff;
  font-size: 12px;
}

.number-guess-modal-new-game {
  background-color: #000;
}

.number-guess-modal-close {
  background-color: #6b7473;
}

@media (max-width: 480px) {
  .number-guess-modal-window {
    padding: 24px 18px;
    border-radius: 16px;
  }

  .number-guess-modal-title {
    font-size: 16px;
  }

  .number-guess-modal-actions {
    flex-direction: column;
  }
}

/* Rock paper scissors animations */
.images_rock_paper_scissors button.selected {
  animation: rockPaperScissorsChoice 0.5s ease;
}

.images_rock_paper_scissors button.selected img {
  box-shadow: 0 0 0 4px rgba(88, 184, 178, 0.42);
}

.my_answer {
  animation: playerAnswerIn 0.42s ease;
}

.comp_answer {
  animation: computerAnswerIn 0.42s ease;
}

.round_result_rock_paper_scissors.thinking {
  color: #6b7473;
  animation: computerThinking 0.85s ease-in-out infinite alternate;
}

@keyframes rockPaperScissorsChoice {
  0% {
    transform: translateY(0) scale(1);
  }

  45% {
    transform: translateY(-8px) scale(1.08);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes playerAnswerIn {
  from {
    opacity: 0;
    transform: translateX(-22px) scale(0.84);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes computerAnswerIn {
  from {
    opacity: 0;
    transform: translateX(22px) scale(0.84);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes computerThinking {
  from {
    opacity: 0.48;
    transform: scale(0.98);
  }

  to {
    opacity: 1;
    transform: scale(1.02);
  }
}

@media (prefers-reduced-motion: reduce) {
  .images_rock_paper_scissors button.selected,
  .my_answer,
  .comp_answer,
  .round_result_rock_paper_scissors.thinking {
    animation: none;
  }
}

/* Responsive polish for many screen widths */
img,
svg,
canvas {
  max-width: 100%;
}

.container_birthday,
.timecalc-section,
.dino-container,
.football,
.max-number,
.team-section,
.scientists,
.container_number_guess,
.container_rock_paper_scissors {
  max-width: 100%;
}

.container_rock_paper_scissors {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 170px);
  gap: clamp(16px, 4vw, 36px);
  align-items: start;
  justify-content: center;
  padding-inline: clamp(12px, 3vw, 24px);
  overflow: hidden;
}

.container_rock_paper_scissors_inner,
.left_block_rock_paper_scissors {
  width: 100%;
  min-width: 0;
}

.container_results_rock_paper_scissors {
  position: static;
  width: 100%;
  min-width: 0;
  margin-top: 88px;
  align-items: flex-start;
}

.images_rock_paper_scissors ul {
  flex-wrap: wrap;
  gap: clamp(18px, 5vw, 38px);
}

.images_rock_paper_scissors button {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 70px;
  padding: 12px;
}

.images_rock_paper_scissors button p {
  font-size: clamp(11px, 2.6vw, 14px);
  line-height: 1.15;
}

.btn_continue,
.scientists-btn,
.game-guide summary,
main button {
  overflow-wrap: anywhere;
}

.images_rock_paper_scissors svg,
.images_rock_paper_scissors img,
.my_answer,
.comp_answer {
  width: clamp(46px, 13vw, 60px);
  height: clamp(46px, 13vw, 60px);
}

.container_answers {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 7vw, 35px);
}

.compare {
  margin-top: 36px;
}

@media (max-width: 1400px) {
  main {
    width: min(calc(100% - 96px), 1000px);
  }
}

@media (max-width: 1180px) {
  main {
    width: min(calc(100% - 84px), 960px);
    padding-inline: 22px;
  }

  header ul {
    gap: 28px;
  }
}

@media (max-width: 1024px) {
  main {
    width: calc(100% - 72px);
  }

  .inputs-row,
  .inputs {
    flex-wrap: wrap;
  }

  .field {
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  main {
    width: calc(100% - 64px);
    padding-inline: 18px;
  }

  .container_rock_paper_scissors {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .container_results_rock_paper_scissors {
    margin-top: 0;
    align-items: center;
    text-align: center;
  }

  .btn_continue {
    align-self: center;
  }
}

@media (max-width: 768px) {
  main {
    width: calc(100% - 56px);
    padding-inline: 14px;
  }

  .container_birthday_inner,
  .timecalc-input-result-row,
  .inputs-row,
  .container_main_number_guess {
    width: 100%;
  }

  .team-section .slider {
    width: min(100%, 320px);
  }

  .scientists-btn-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  main {
    width: calc(100% - 44px);
    padding-inline: 12px;
  }

  .container_rock_paper_scissors {
    padding-inline: 10px;
  }

  .container_results_rock_paper_scissors {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
  }

  .score_rock_paper_scissors,
  .btn_continue {
    flex-basis: 100%;
  }

  .football-difficulty {
    max-width: calc(100% - 16px);
  }
}

@media (max-width: 540px) {
  main {
    width: calc(100% - 34px);
    padding-inline: 10px;
  }

  .images_rock_paper_scissors ul {
    gap: 18px;
  }

  .container_answers {
    gap: 24px;
    margin-top: 18px;
  }

  .compare {
    margin-top: 18px;
  }

  .scientists-list {
    grid-template-columns: repeat(3, minmax(58px, 1fr));
  }
}

@media (max-width: 480px) {
  main {
    width: calc(100% - 28px);
    padding-inline: 8px;
  }

  .title_rock_paper_scissors {
    margin-bottom: 14px;
  }

  .images_rock_paper_scissors ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 12px;
  }

  .images_rock_paper_scissors button {
    min-width: 0;
    width: 100%;
  }

  .images_rock_paper_scissors svg,
  .images_rock_paper_scissors img,
  .my_answer,
  .comp_answer {
    width: 52px;
    height: 52px;
    padding: 9px;
    border-radius: 17px;
  }

  .container_answers {
    flex-direction: row;
    gap: 22px;
  }

  .container_results_rock_paper_scissors {
    font-size: 11px;
  }

  .btn_continue {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
  }
}

@media (max-width: 390px) {
  main {
    width: calc(100% - 18px);
    padding-inline: 7px;
  }

  .main_title {
    font-size: 16px;
  }

  .images_rock_paper_scissors ul {
    gap: 8px;
  }

  .images_rock_paper_scissors svg,
  .images_rock_paper_scissors img,
  .my_answer,
  .comp_answer {
    width: 48px;
    height: 48px;
    padding: 8px;
  }

  .container_answers {
    gap: 18px;
  }

  .scientists-btn-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 340px) {
  main {
    width: calc(100% - 10px);
    padding-inline: 6px;
  }

  .images_rock_paper_scissors button p {
    font-size: 10px;
  }

  .images_rock_paper_scissors svg,
  .images_rock_paper_scissors img,
  .my_answer,
  .comp_answer {
    width: 44px;
    height: 44px;
    padding: 7px;
  }
}

/* Mobile burger menu */
.filter-menu {
  position: relative;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(55, 55, 55, 0.14);
  border-radius: 12px;
  background: #f3f7f7;
  box-shadow: 0 8px 22px rgba(55, 55, 55, 0.12);
}

.filter-menu span {
  position: absolute;
  left: 10px;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background-color: #373737;
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}

.filter-menu span:nth-child(1) {
  top: 12px;
}

.filter-menu span:nth-child(2) {
  top: 18px;
}

.filter-menu span:nth-child(3) {
  top: 24px;
}

.filter-menu.active span:nth-child(1) {
  top: 18px;
  transform: rotate(45deg);
}

.filter-menu.active span:nth-child(2) {
  opacity: 0;
}

.filter-menu.active span:nth-child(3) {
  top: 18px;
  transform: rotate(-45deg);
}

header.dark .filter-menu {
  border-color: rgba(255, 255, 255, 0.22);
  background: #474747;
}

header.dark .filter-menu span {
  background-color: #fff;
}

#filter-menu-modal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

#filter-menu-modal.show {
  opacity: 1;
  pointer-events: auto;
}

#filter-menu-modal-window {
  transform: translateY(-8px) scale(0.98);
  transition: transform 0.22s ease;
}

#filter-menu-modal.show #filter-menu-modal-window {
  transform: translateY(0) scale(1);
}

.burger-theme-control {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 42px;
  padding: 6px 8px 6px 12px;
  border-radius: 12px;
  background: #f3f7f7;
  color: #373737;
  font-size: 13px;
}

.burger-theme-control .theme-btn {
  flex-shrink: 0;
}

@media (max-width: 799px) {
  header nav {
    width: 100%;
  }

  header ul {
    justify-content: space-between;
    width: min(100% - 28px, 680px);
    margin: 0 auto;
    gap: 14px;
  }

  .header-main-btn {
    margin-left: 0 !important;
  }

  .desktop-theme-item {
    display: none;
  }

  .filter-menu {
    display: flex !important;
    margin-left: 0 !important;
    background-image: none !important;
  }

  #filter-menu-modal {
    display: flex;
    position: fixed;
    inset: 60px 0 auto 0;
    z-index: 98;
    justify-content: center;
    padding: 12px 18px 0;
    background: transparent;
  }

  #filter-menu-modal-window {
    display: grid !important;
    width: min(100%, 320px);
    height: auto;
    max-height: calc(100vh - 84px);
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
    overflow-y: auto;
    border: 1px solid rgba(55, 55, 55, 0.14) !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 16px 42px rgba(55, 55, 55, 0.18);
    backdrop-filter: blur(12px);
    color: #373737;
  }

  #filter-menu-modal-window button {
    width: 100%;
    min-height: 38px;
    border-radius: 12px;
    background: #f3f7f7 !important;
    color: #373737 !important;
    font-size: 13px !important;
    box-shadow: none;
  }

  #filter-menu-modal-window button:hover {
    background: #e8f2f1 !important;
  }

  .burger-theme-control {
    display: flex;
  }

  header.dark #filter-menu-modal-window {
    border-color: rgba(255, 255, 255, 0.2) !important;
    background: rgba(55, 55, 55, 0.96) !important;
  }

  header.dark #filter-menu-modal-window button {
    background: #474747 !important;
    color: #fff !important;
  }

  header.dark .burger-theme-control {
    background: #474747;
    color: #fff;
  }
}

@media (max-width: 390px) {
  header ul {
    width: calc(100% - 18px);
    gap: 8px;
  }

  .filter-menu {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }
}

/* Dark theme content colors */
body.dark {
  color: #eef3f2;
}

main.dark {
  background-color: #2f2f2f;
  color: #eef3f2;
}

main.dark .main_title,
main.dark .section-title,
main.dark .title,
main.dark .title_birthday,
main.dark .title_number_guess,
main.dark .title_rock_paper_scissors,
main.dark .team-title,
main.dark .scientists-title,
main.dark .member-name,
main.dark .score_rock_paper_scissors,
main.dark .computer_score_rock_paper_scissors,
main.dark .my_score_rock_paper_scissors,
main.dark .draw_score_rock_paper_scissors,
main.dark .result,
main.dark .number-guess-range,
main.dark .text_attempt,
main.dark #timecalc-result,
main.dark .dino-score,
main.dark .dino-record,
main.dark .score-board,
main.dark .football-difficulty {
  color: #eef3f2;
}

main.dark .game-guide {
  color: #d7dfde;
}

main.dark .game-guide p {
  border-color: rgba(255, 255, 255, 0.14);
  background-color: rgba(71, 71, 71, 0.96);
  color: #dce5e3;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

main.dark .game-guide summary,
main.dark .circle-btn,
main.dark .birthday_search_btn,
main.dark .timecalc-search-button,
main.dark .number_guess_search_btn,
main.dark .start-btn,
main.dark .btn_continue,
main.dark .football-play-btn,
main.dark .subscribe-submit {
  background-color: #f1f5f4;
  color: #2f2f2f;
}

main.dark .icon {
  stroke: #2f2f2f;
}

main.dark .container_birthday,
main.dark .timecalc-section,
main.dark .football,
main.dark .max-number,
main.dark .container_number_guess,
main.dark .container_rock_paper_scissors,
main.dark .team-section::before,
main.dark .team-section::after {
  border-color: rgba(255, 255, 255, 0.42);
}

main.dark .timecalc-dashed-line {
  border-color: rgba(255, 255, 255, 0.48);
}

main.dark input[type='text'],
main.dark input[type='number'],
main.dark .timecalc-search-wrapper input[type='text'] {
  background-color: #464646;
  color: #eef3f2;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.28);
}

main.dark input::placeholder {
  color: #bfc9c7;
}

main.dark input[type='text']:focus,
main.dark input[type='number']:focus {
  border-color: rgba(132, 204, 200, 0.82);
  box-shadow: 3px 3px 0 rgba(132, 204, 200, 0.22);
}

main.dark .football-difficulty {
  background-color: rgba(47, 47, 47, 0.86);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

main.dark .football-difficulty select {
  background-color: #f1f5f4;
  color: #2f2f2f;
}

main.dark .member-role,
main.dark .member-info,
main.dark .dino-modal-score,
main.dark .rock-paper-scissors-modal-title,
main.dark .number-guess-modal-text {
  color: #c9d3d1;
}

main.dark .member-photo {
  background-color: #565656;
}

main.dark .member-initials {
  color: #eef3f2;
}

main.dark .dash {
  background-color: #666;
}

main.dark .dash.active {
  background-color: #cdd7d5;
}

main.dark .round_result_rock_paper_scissors.draw,
main.dark .round_result_rock_paper_scissors.thinking {
  color: #c9d3d1;
}

main.dark .images_rock_paper_scissors img,
main.dark .my_answer,
main.dark .comp_answer {
  border: 1px solid rgba(132, 204, 200, 0.34);
  background-color: #171717;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

main.dark .scientists {
  color: #eef3f2;
}

main.dark .scientists-title {
  color: #eef3f2;
}

main.dark .scientists-item {
  background: linear-gradient(145deg, #f1f5f4, #d6dfdd);
  color: #2f2f2f;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.24);
}

main.dark .scientists-live {
  color: #56615f;
}

main.dark .scientists-btn {
  background: #f1f5f4;
  color: #2f2f2f;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
}

main.dark .scientists-btn:hover {
  background: #dfe8e6;
  color: #2f2f2f;
}

main.dark #chart-container {
  background-color: #f7faf9;
}

main.dark .dino-modal-window,
main.dark .rock-paper-scissors-modal-window,
main.dark .number-guess-modal-window {
  background-color: #3b3b3b;
  color: #eef3f2;
  border-color: rgba(132, 204, 200, 0.28);
}

main.dark .dino-modal-title {
  color: #eef3f2;
}

main.dark .dino-modal-btn,
main.dark .dino-modal-end-btn,
main.dark .rock-paper-scissors-modal-btn,
main.dark .number-guess-modal-new-game,
main.dark .number-guess-modal-close {
  background-color: #f1f5f4;
  color: #2f2f2f;
}

main.dark .dino-modal-end-btn {
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.28);
}

footer.dark .describe,
footer.dark .footer-logo-title,
footer.dark .footer-logo-subtitle {
  color: #eef3f2;
}

/* Category filter states */
[hidden] {
  display: none !important;
}

#games-filter button.filter-active,
#filter-menu-modal-window button.filter-active {
  background: #3e9994 !important;
  color: #fff !important;
}

#games-filter button.filter-active:hover,
#filter-menu-modal-window button.filter-active:hover {
  background: #328984 !important;
  color: #fff !important;
}

header.dark #games-filter button.filter-active,
header.dark #filter-menu-modal-window button.filter-active {
  background: #84ccc8 !important;
  color: #2f2f2f !important;
}

/* Calculator and time calculator polish */
.calculator-section {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding-bottom: 36px;
  border-bottom: 1.5px solid black;
}

.calculator-panel {
  width: 100%;
  margin-top: 0;
  padding-top: 36px;
}

.calculator-panel .game-guide,
.timecalc-section .game-guide {
  margin-bottom: 28px;
}

.calculator-panel .inputs-row {
  width: 100%;
}

.calculator-panel .input-wrapper,
.timecalc-search-wrapper {
  transition: transform 0.25s ease, filter 0.25s ease;
}

.calculator-panel .input-wrapper:focus-within,
.timecalc-search-wrapper:focus-within {
  transform: translateY(-2px);
  filter: drop-shadow(0 8px 14px rgba(62, 153, 148, 0.14));
}

.calculator-panel input[type='text'],
.timecalc-search-wrapper input[type='text'] {
  transition: background-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.calculator-panel input[type='text']:focus,
.timecalc-search-wrapper input[type='text']:focus {
  background-color: #e5efee;
  box-shadow: 3px 3px 0 rgba(62, 153, 148, 0.35);
}

.calculator-panel .circle-btn,
.timecalc-search-button {
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.calculator-panel .circle-btn:hover,
.timecalc-search-button:hover {
  transform: translateY(-2px);
  background-color: #3e9994;
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.18);
}

.calculator-panel .circle-btn:active,
.timecalc-search-button:active {
  transform: translateY(1px) scale(0.96);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.22);
}

.calculator-panel .circle-btn.active {
  background-color: #3e9994;
  box-shadow: 0 0 0 4px rgba(132, 204, 200, 0.28), 3px 3px 0 rgba(0, 0, 0, 0.2);
}

.result-input input {
  text-align: center;
  font-weight: 500;
}

.result-input input.result-ready {
  color: #137a55;
  background-color: #e7f4ef;
  animation: calculatorResultPop 0.45s ease;
}

.result-input input.result-error {
  color: #a43838;
  background-color: #fae8e5;
  animation: calculatorResultShake 0.35s ease;
}

.timecalc-section {
  padding-top: 36px;
}

.timecalc-section h1 {
  margin-top: 0;
}

.timecalc-input-result-row {
  margin-left: 0;
}

.timecalc-dashed-line {
  width: 120px;
  height: 2px;
  border: none;
  background-image: repeating-linear-gradient(
    90deg,
    #9ca6a4 0 8px,
    transparent 8px 14px
  );
  background-size: 28px 2px;
  animation: timecalcLineFlow 1.4s linear infinite;
}

#timecalc-result {
  width: auto;
  min-width: 170px;
  min-height: 35px;
  height: auto;
  padding: 10px 14px;
  border-radius: 20px;
  background-color: #f3f5f4;
  justify-content: center;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(55, 55, 55, 0.08);
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

#timecalc-result.timecalc-ready {
  color: #137a55;
  background-color: #e7f4ef;
  transform: translateY(-2px);
  animation: calculatorResultPop 0.45s ease;
}

#timecalc-result.timecalc-error {
  color: #a43838;
  background-color: #fae8e5;
  animation: calculatorResultShake 0.35s ease;
}

main.dark .calculator-section {
  border-color: rgba(255, 255, 255, 0.42);
}

main.dark .calculator-panel input[type='text']:focus,
main.dark .timecalc-search-wrapper input[type='text']:focus {
  background-color: #505857;
}

main.dark .calculator-panel .circle-btn.active,
main.dark .calculator-panel .circle-btn:hover,
main.dark .timecalc-search-button:hover {
  background-color: #84ccc8;
  color: #2f2f2f;
}

main.dark .result-input input.result-ready,
main.dark #timecalc-result.timecalc-ready {
  color: #dff8ef;
  background-color: rgba(46, 116, 87, 0.72);
}

main.dark .result-input input.result-error,
main.dark #timecalc-result.timecalc-error {
  color: #ffe5df;
  background-color: rgba(136, 60, 51, 0.72);
}

main.dark #timecalc-result {
  background-color: #464646;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

main.dark .timecalc-dashed-line {
  background-image: repeating-linear-gradient(
    90deg,
    rgba(238, 243, 242, 0.7) 0 8px,
    transparent 8px 14px
  );
}

@keyframes calculatorResultPop {
  0% {
    transform: scale(0.94);
  }

  55% {
    transform: scale(1.04);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes calculatorResultShake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

@keyframes timecalcLineFlow {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 28px 0;
  }
}

@media (max-width: 768px) {
  .calculator-section,
  .timecalc-section {
    padding-bottom: 30px;
  }

  .calculator-panel {
    padding-top: 30px;
  }

  .calculator-panel .inputs-row {
    gap: 14px;
  }

  .timecalc-input-result-row {
    flex-direction: column;
    gap: 18px;
  }

  .timecalc-dashed-line {
    width: 90px;
  }

  #timecalc-result {
    min-width: 210px;
  }
}

@media (max-width: 480px) {
  .calculator-section,
  .timecalc-section {
    padding-bottom: 24px;
  }

  .calculator-panel {
    padding-top: 24px;
  }

  .calculator-panel .game-guide,
  .timecalc-section .game-guide {
    margin-bottom: 22px;
  }

  .calculator-panel .inputs-row {
    gap: 12px;
  }

  .calculator-panel .input-wrapper,
  .timecalc-search-wrapper {
    max-width: 230px;
    width: 100%;
  }

  .timecalc-dashed-line {
    width: 70px;
  }

  #timecalc-result {
    width: min(100%, 250px);
    min-width: 0;
    line-height: 1.25;
  }
}

/* Birthday year game polish */
.container_birthday {
  position: relative;
}

.container_birthday .game-guide {
  margin-bottom: 28px;
}

.input_wraper {
  transition: transform 0.25s ease, filter 0.25s ease;
}

.input_wraper:focus-within {
  transform: translateY(-2px);
  filter: drop-shadow(0 8px 14px rgba(62, 153, 148, 0.14));
}

.input_birthday {
  transition: background-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.input_birthday:focus {
  background-color: #e5efee;
  box-shadow: 3px 3px 0 rgba(62, 153, 148, 0.35);
}

.birthday_search_btn {
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.birthday_search_btn:hover {
  background-color: #3e9994;
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.18);
}

#text_birthday {
  min-height: 35px;
  padding: 10px 14px;
  border-radius: 20px;
  background-color: #f3f5f4;
  box-shadow: inset 0 0 0 1px rgba(55, 55, 55, 0.08);
  opacity: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  transform: translateY(6px) scale(0.96);
}

#text_birthday.birthday-show {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: birthdayMessagePop 0.42s ease;
}

#text_birthday.birthday-success {
  color: #137a55;
  background-color: #e7f4ef;
}

#text_birthday.birthday-neutral {
  color: #315f8f;
  background-color: #e7f0fb;
}

#text_birthday.birthday-error {
  color: #a43838;
  background-color: #fae8e5;
  animation: birthdayMessageShake 0.35s ease;
}

main.dark .input_birthday:focus {
  background-color: #505857;
}

main.dark .birthday_search_btn:hover {
  background-color: #84ccc8;
  color: #2f2f2f;
}

main.dark #text_birthday {
  background-color: #464646;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

main.dark #text_birthday.birthday-success {
  color: #dff8ef;
  background-color: rgba(46, 116, 87, 0.72);
}

main.dark #text_birthday.birthday-neutral {
  color: #e3efff;
  background-color: rgba(55, 93, 132, 0.72);
}

main.dark #text_birthday.birthday-error {
  color: #ffe5df;
  background-color: rgba(136, 60, 51, 0.72);
}

@keyframes birthdayMessagePop {
  0% {
    transform: translateY(6px) scale(0.94);
  }

  60% {
    transform: translateY(-2px) scale(1.03);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes birthdayMessageShake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

@media (max-width: 768px) {
  .container_birthday .game-guide {
    margin-bottom: 22px;
  }

  #text_birthday {
    width: min(100%, 300px);
    min-height: 34px;
    white-space: normal;
    line-height: 1.25;
  }
}

@media (max-width: 480px) {
  .container_birthday .game-guide {
    margin-bottom: 18px;
  }

  .input_wraper {
    width: min(100%, 230px);
    min-width: 0;
  }

  #text_birthday {
    width: min(100%, 260px);
    padding: 9px 12px;
  }
}

/* Unified button hover states */
main button:not(.arrow),
footer button,
#games-filter button,
#filter-menu-modal-window button,
.game-guide summary {
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease !important;
}

#show-all {
  align-self: center;
  width: 92px !important;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 10px !important;
  line-height: 1.1;
}

#filter-menu-modal-window #show-all-mobile {
  justify-self: center;
  width: 74% !important;
  min-height: 32px;
  font-size: 11px !important;
}

main button:not(.arrow):not(.birthday_search_btn):not(.number_guess_search_btn):not(.timecalc-search-button):hover,
footer button:hover,
#games-filter button:hover,
#filter-menu-modal-window button:hover,
.game-guide summary:hover {
  background-color: #3e9994 !important;
  color: #fff !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.18) !important;
}

main button:not(.arrow):not(.birthday_search_btn):not(.number_guess_search_btn):not(.timecalc-search-button):active,
footer button:active,
#games-filter button:active,
#filter-menu-modal-window button:active,
.game-guide summary:active {
  background-color: #328984 !important;
  color: #fff !important;
  transform: translateY(1px) scale(0.98) !important;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2) !important;
}

.birthday_search_btn:hover,
.number_guess_search_btn:hover {
  background-color: #3e9994 !important;
  transform: translateY(calc(-50% - 2px)) scale(1.02) !important;
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.18) !important;
}

.birthday_search_btn:active,
.number_guess_search_btn:active {
  background-color: #328984 !important;
  transform: translateY(calc(-50% + 1px)) scale(0.96) !important;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2) !important;
}

.timecalc-search-button:hover {
  background-color: #3e9994 !important;
  color: #fff !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.18) !important;
}

.timecalc-search-button:active {
  background-color: #328984 !important;
  color: #fff !important;
  transform: translateY(1px) scale(0.96) !important;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2) !important;
}

main.dark button:not(.arrow):not(.birthday_search_btn):not(.number_guess_search_btn):not(.timecalc-search-button):hover,
footer.dark button:hover,
header.dark #games-filter button:hover,
header.dark #filter-menu-modal-window button:hover,
main.dark .game-guide summary:hover,
main.dark .birthday_search_btn:hover,
main.dark .number_guess_search_btn:hover,
main.dark .timecalc-search-button:hover {
  background-color: #84ccc8 !important;
  color: #2f2f2f !important;
}

main.dark button:not(.arrow):not(.birthday_search_btn):not(.number_guess_search_btn):not(.timecalc-search-button):active,
footer.dark button:active,
header.dark #games-filter button:active,
header.dark #filter-menu-modal-window button:active,
main.dark .game-guide summary:active,
main.dark .birthday_search_btn:active,
main.dark .number_guess_search_btn:active,
main.dark .timecalc-search-button:active {
  background-color: #6ebbb6 !important;
  color: #2f2f2f !important;
}

.scientists-btn.scientists-btn-active,
.scientists-btn.scientists-btn-active:hover {
  background: #3e9994 !important;
  color: #fff !important;
  box-shadow: 0 0 0 4px rgba(132, 204, 200, 0.3), 0 5px 0 #28746f !important;
}

.scientists-reset-btn:not(.scientists-btn-active):not(:hover):not(:active) {
  background: #eef3f2 !important;
  color: #373737 !important;
  box-shadow: 0 4px 0 #c9d1cf !important;
}

main.dark .scientists-btn.scientists-btn-active,
main.dark .scientists-btn.scientists-btn-active:hover {
  background: #84ccc8 !important;
  color: #2f2f2f !important;
  box-shadow: 0 0 0 4px rgba(132, 204, 200, 0.24), 0 5px 0 #4d8f8a !important;
}

main.dark .scientists-reset-btn:not(.scientists-btn-active):not(:hover):not(:active) {
  background: #f1f5f4 !important;
  color: #2f2f2f !important;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.28) !important;
}

/* Football game final polish */
.field {
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  overflow: hidden;
}

.football-difficulty {
  touch-action: auto;
}

.football-difficulty select {
  cursor: pointer;
}

.football-stop-btn {
  position: absolute;
  top: 14px;
  left: 18px;
  z-index: 3;
  display: none;
  min-height: 30px;
  padding: 7px 14px;
  border: none;
  border-radius: 14px;
  background-color: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 11px;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.18);
}

.field.football-started .football-stop-btn {
  display: block;
}

.football-stop-btn:hover {
  background-color: #3e9994 !important;
  color: #fff !important;
}

.football-stop-btn:active {
  background-color: #328984 !important;
  color: #fff !important;
}

.ball {
  z-index: 3;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.18));
}

.arrow-big {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(132, 204, 200, 0.9));
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.24));
}

.field.football-aiming .arrow-big {
  background: linear-gradient(90deg, #fff, #ffd166);
}

.field.football-shooting {
  cursor: wait;
}

.gate {
  z-index: 2;
}

.football-overlay {
  backdrop-filter: blur(2px);
}

.football-overlay.hidden {
  pointer-events: none;
}

.score-board {
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.score-board-goal {
  background-color: #3e9994;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 18px rgba(62, 153, 148, 0.28);
  animation: footballScorePop 0.45s ease;
}

main.dark .score-board-goal {
  background-color: #84ccc8;
  color: #2f2f2f;
}

main.dark .football-stop-btn {
  background-color: rgba(241, 245, 244, 0.94);
  color: #2f2f2f;
}

@keyframes footballScorePop {
  0% {
    transform: translateY(0) scale(0.96);
  }

  55% {
    transform: translateY(-3px) scale(1.08);
  }

  100% {
    transform: translateY(-2px) scale(1.05);
  }
}

@media (max-width: 768px) {
  .field {
    height: clamp(260px, 52vw, 340px);
  }

  .football-difficulty {
    right: 12px;
    top: 12px;
  }

  .football-stop-btn {
    top: 12px;
    left: 12px;
  }

  .gate {
    width: 58px;
    height: 108px;
  }
}

@media (max-width: 480px) {
  .field {
    height: clamp(240px, 74vw, 310px);
    border-radius: 24px;
  }

  .football-overlay {
    border-radius: 22px;
  }

  .football-difficulty {
    left: 10px;
    right: 10px;
    justify-content: center;
    width: auto;
    max-width: none;
  }

  .football-stop-btn {
    top: 48px;
    left: 50%;
    min-height: 28px;
    padding: 6px 12px;
    font-size: 10px;
    transform: translateX(-50%);
  }

  .football-stop-btn:hover {
    transform: translateX(-50%) translateY(-2px) scale(1.02) !important;
  }

  .football-stop-btn:active {
    transform: translateX(-50%) translateY(1px) scale(0.98) !important;
  }

  .ball {
    width: 36px;
    height: 36px;
  }

  .arrow-big {
    height: 18px;
  }

  .gate {
    width: 42px;
    height: 88px;
    right: -12px;
  }

  .score-board {
    margin-top: 14px;
  }
}

/* Subscribe flow */
.subscribe-header-btn {
  min-width: 116px;
  min-height: 32px;
  padding: 8px 16px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, #111, #3e9994);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(62, 153, 148, 0.28);
}

.subscribe-pulse {
  animation: subscribePulse 1.2s ease-in-out infinite;
}

.welcome-modal {
  display: none !important;
  position: fixed;
  inset: 0;
  z-index: 80;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: rgba(37, 37, 37, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.welcome-modal.show {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
}

.welcome-modal-window {
  width: min(100%, 430px) !important;
  min-height: 268px;
  height: auto !important;
  padding: 38px 70px 34px;
  border: 1px solid rgba(62, 153, 148, 0.26);
  border-radius: 18px;
  background: #fff;
  color: #373737;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
  transform: translateY(14px) scale(0.96);
  transition: transform 0.25s ease;
}

.welcome-modal.show .welcome-modal-window {
  transform: translateY(0) scale(1);
}

.welcome-modal-window p {
  margin-bottom: 22px !important;
  font-size: 12px;
  line-height: 1.18;
}

#name-input {
  width: min(100%, 145px) !important;
  min-height: 32px;
  margin: -8px auto 14px !important;
  padding: 0 14px;
  border: none;
  border-radius: 20px;
  background-color: #d7d7d7;
  text-align: center;
  outline: none;
  font-size: 12px;
}

#welcome-modal-submit {
  width: auto !important;
  min-width: 92px;
  min-height: 32px;
  padding: 8px 18px;
  border: none;
  border-radius: 18px;
  background-color: #000;
  color: #fff;
  font-size: 12px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.28);
}

.welcome-modal-close,
.subscribe-modal-close {
  position: absolute;
  top: 20px;
  right: 22px;
  width: 18px;
  height: 18px;
  border: none;
  background: transparent;
  box-shadow: none !important;
}

.welcome-modal-close::before,
.welcome-modal-close::after,
.subscribe-modal-close::before,
.subscribe-modal-close::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background-color: currentColor;
}

.welcome-modal-close::before,
.subscribe-modal-close::before {
  transform: rotate(45deg);
}

.welcome-modal-close::after,
.subscribe-modal-close::after {
  transform: rotate(-45deg);
}

.modal-icon,
footer #subscribe-modal-window .icon {
  position: absolute;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.modal-icon.top-left,
footer #subscribe-modal-window .icon.top-left {
  top: 94px;
  left: 36px;
}

.modal-icon.bottom-left,
footer #subscribe-modal-window .icon.bottom-left {
  bottom: 46px;
  left: 72px;
}

.modal-icon.top-right,
footer #subscribe-modal-window .icon.top-right {
  top: 94px;
  right: 36px;
}

.modal-icon.bottom-right,
footer #subscribe-modal-window .icon.bottom-right {
  right: 74px;
  bottom: 46px;
}

.subscribe-side-hint {
  position: fixed;
  right: 18px;
  top: 132px;
  z-index: 34;
  width: min(260px, calc(100vw - 36px));
  padding: 14px;
  border: 1px solid rgba(62, 153, 148, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: #373737;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 24px));
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.subscribe-side-hint.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.subscribe-side-hint p {
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 1.35;
}

.subscribe-side-hint-btn {
  min-height: 32px;
  padding: 8px 14px;
  border: none;
  border-radius: 16px;
  background-color: #000;
  color: #fff;
  font-size: 11px;
}

.subscribe-input-error {
  animation: subscribeInputShake 0.35s ease;
  box-shadow: 0 0 0 3px rgba(164, 56, 56, 0.2) !important;
}

body.dark .subscribe-side-hint,
header.dark .welcome-modal-window,
body.dark .welcome-modal-window {
  background: #3b3b3b;
  color: #eef3f2;
  border-color: rgba(132, 204, 200, 0.28);
}

footer #subscribe-modal-window {
  width: min(90%, 396px) !important;
  min-height: 244px !important;
  border-radius: 18px !important;
  font-size: 20px !important;
  overflow: hidden;
}

footer #subscribe-modal-window p {
  font-size: 20px;
  line-height: 1.2;
}

header.dark .subscribe-header-btn {
  background: linear-gradient(135deg, #f1f5f4, #84ccc8);
  color: #2f2f2f;
}

body.dark #name-input {
  background-color: #505857;
  color: #eef3f2;
}

@keyframes subscribePulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(62, 153, 148, 0.42), 0 6px 18px rgba(62, 153, 148, 0.28);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 0 7px rgba(62, 153, 148, 0), 0 9px 22px rgba(62, 153, 148, 0.36);
    transform: scale(1.04);
  }
}

@keyframes subscribeInputShake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

@media (max-width: 799px) {
  .user-hello.subscribe-header-btn {
    display: none;
  }
}

@media (max-width: 620px) {
  .subscribe-side-hint {
    right: 12px;
    top: auto;
    bottom: 18px;
  }
}

@media (max-width: 480px) {
  .welcome-modal-window {
    min-height: 230px;
    padding: 42px 48px 28px;
  }

  .modal-icon,
  footer #subscribe-modal-window .icon {
    width: 23px;
    height: 23px;
  }

  .modal-icon.top-left,
  footer #subscribe-modal-window .icon.top-left {
    left: 20px;
  }

  .modal-icon.top-right,
  footer #subscribe-modal-window .icon.top-right {
    right: 20px;
  }

  .modal-icon.bottom-left,
  footer #subscribe-modal-window .icon.bottom-left {
    left: 30px;
  }

  .modal-icon.bottom-right,
  footer #subscribe-modal-window .icon.bottom-right {
    right: 30px;
  }
}

/* Modal exact placement */
.welcome-modal-window {
  position: relative;
  width: min(100%, 980px) !important;
  min-height: 536px;
  padding: 78px 150px 76px;
  border: none;
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
}

.welcome-modal-window p:first-of-type {
  width: min(100%, 670px);
  margin: 0 0 74px !important;
  font-size: 22px;
  line-height: 1.18;
  text-align: center;
}

.welcome-modal-window p:nth-of-type(2) {
  margin: 0 0 28px !important;
  font-size: 22px;
  line-height: 1.1;
  text-align: center;
}

#name-input {
  width: 288px !important;
  height: 60px;
  min-height: 60px;
  margin: 0 0 30px !important;
  padding: 0 22px;
  border-radius: 30px;
  font-size: 21px;
  text-align: left;
}

#welcome-modal-submit {
  min-width: 180px;
  min-height: 58px;
  padding: 0 34px;
  border-radius: 29px;
  font-size: 22px;
  box-shadow: 6px 5px 0 rgba(0, 0, 0, 0.28);
}

.welcome-modal-close,
.subscribe-modal-close {
  top: 50px;
  right: 50px;
  width: 34px;
  height: 34px;
  color: #000;
}

.welcome-modal-close::before,
.welcome-modal-close::after,
.subscribe-modal-close::before,
.subscribe-modal-close::after {
  top: 16px;
  width: 34px;
  height: 2px;
}

.modal-icon {
  width: 50px;
  height: 50px;
}

.modal-icon.top-left {
  top: 265px;
  left: 76px;
}

.modal-icon.bottom-left {
  left: 146px;
  bottom: 94px;
}

.modal-icon.top-right {
  top: 262px;
  right: 76px;
}

.modal-icon.bottom-right {
  right: 146px;
  bottom: 94px;
}

footer #subscribe-modal-window {
  width: min(90%, 396px) !important;
  min-height: 209px !important;
  border-radius: 18px !important;
}

@media (max-width: 1020px) {
  .welcome-modal-window {
    width: calc(100vw - 28px) !important;
    min-height: 520px;
    padding-inline: 120px;
  }
}

@media (max-width: 720px) {
  .welcome-modal-window {
    min-height: 430px;
    padding: 58px 72px 48px;
  }

  .welcome-modal-window p:first-of-type {
    margin-bottom: 46px !important;
    font-size: 16px;
  }

  .welcome-modal-window p:nth-of-type(2) {
    margin-bottom: 20px !important;
    font-size: 16px;
  }

  #name-input {
    width: 230px !important;
    height: 48px;
    min-height: 48px;
    font-size: 16px;
  }

  #welcome-modal-submit {
    min-width: 140px;
    min-height: 46px;
    font-size: 16px;
  }

  .welcome-modal-close,
  .subscribe-modal-close {
    top: 28px;
    right: 30px;
  }

  .modal-icon {
    width: 34px;
    height: 34px;
  }

  .modal-icon.top-left {
    top: 232px;
    left: 28px;
  }

  .modal-icon.bottom-left {
    left: 58px;
    bottom: 58px;
  }

  .modal-icon.top-right {
    top: 232px;
    right: 28px;
  }

  .modal-icon.bottom-right {
    right: 58px;
    bottom: 58px;
  }
}

/* Modal compact final */
.welcome-modal.is-closing {
  opacity: 0;
  pointer-events: none;
}

.welcome-modal.is-closing .welcome-modal-window {
  transform: translateY(14px) scale(0.96);
}

.welcome-modal-window {
  width: min(100%, 820px) !important;
  min-height: 444px;
  padding: 56px 116px 52px;
  border-radius: 22px;
}

.welcome-modal-window p:first-of-type {
  width: min(100%, 610px);
  margin: 0 0 58px !important;
  font-size: 18px;
  line-height: 1.25;
}

.welcome-modal-window p:nth-of-type(2) {
  margin: 0 0 24px !important;
  font-size: 18px;
  line-height: 1.15;
}

#name-input {
  width: 250px !important;
  height: 48px;
  min-height: 48px;
  margin: 0 0 28px !important;
  padding: 0 20px;
  border-radius: 24px;
  font-size: 18px;
}

#welcome-modal-submit {
  min-width: 154px;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 24px;
  font-size: 18px;
  box-shadow: 5px 4px 0 rgba(0, 0, 0, 0.25);
}

.welcome-modal-close,
.subscribe-modal-close {
  top: 32px;
  right: 38px;
  width: 28px;
  height: 28px;
}

.welcome-modal-close::before,
.welcome-modal-close::after,
.subscribe-modal-close::before,
.subscribe-modal-close::after {
  top: 13px;
  width: 28px;
}

.modal-icon {
  width: 42px;
  height: 42px;
}

.modal-icon.top-left {
  top: 226px;
  left: 70px;
}

.modal-icon.top-right {
  top: 226px;
  right: 70px;
}

.modal-icon.bottom-left {
  left: 130px;
  bottom: 76px;
}

.modal-icon.bottom-right {
  right: 130px;
  bottom: 76px;
}

footer #subscribe-modal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}

footer #subscribe-modal.show {
  opacity: 1;
  pointer-events: auto;
}

footer #subscribe-modal.is-closing {
  opacity: 0;
  pointer-events: none;
}

footer #subscribe-modal-window {
  transform: translateY(14px) scale(0.96);
  transition: transform 250ms ease;
}

footer #subscribe-modal.show #subscribe-modal-window {
  transform: translateY(0) scale(1);
}

footer #subscribe-modal.is-closing #subscribe-modal-window {
  transform: translateY(14px) scale(0.96);
}

@media (max-width: 900px) {
  .welcome-modal-window {
    width: calc(100vw - 28px) !important;
    min-height: 430px;
    padding: 54px 88px 48px;
  }

  .welcome-modal-window p:first-of-type {
    margin-bottom: 46px !important;
    font-size: 16px;
  }

  .welcome-modal-window p:nth-of-type(2) {
    margin-bottom: 20px !important;
    font-size: 16px;
  }

  .modal-icon.top-left {
    left: 42px;
  }

  .modal-icon.top-right {
    right: 42px;
  }

  .modal-icon.bottom-left {
    left: 76px;
  }

  .modal-icon.bottom-right {
    right: 76px;
  }
}

@media (max-width: 560px) {
  .welcome-modal-window {
    min-height: 382px;
    padding: 48px 34px 36px;
    border-radius: 18px;
  }

  .welcome-modal-window p:first-of-type {
    width: 100%;
    margin-bottom: 30px !important;
    font-size: 13px;
  }

  .welcome-modal-window p:nth-of-type(2) {
    margin-bottom: 16px !important;
    font-size: 14px;
  }

  #name-input {
    width: 220px !important;
    height: 42px;
    min-height: 42px;
    margin-bottom: 22px !important;
    font-size: 14px;
  }

  #welcome-modal-submit {
    min-width: 126px;
    min-height: 42px;
    font-size: 14px;
  }

  .welcome-modal-close,
  .subscribe-modal-close {
    top: 22px;
    right: 24px;
    width: 22px;
    height: 22px;
  }

  .welcome-modal-close::before,
  .welcome-modal-close::after,
  .subscribe-modal-close::before,
  .subscribe-modal-close::after {
    top: 10px;
    width: 22px;
  }

  .modal-icon {
    width: 28px;
    height: 28px;
  }

  .modal-icon.top-left {
    top: 202px;
    left: 18px;
  }

  .modal-icon.top-right {
    top: 202px;
    right: 18px;
  }

  .modal-icon.bottom-left {
    left: 42px;
    bottom: 52px;
  }

  .modal-icon.bottom-right {
    right: 42px;
    bottom: 52px;
  }
}

/* Modal backdrop final */
.welcome-modal,
footer #subscribe-modal {
  background: rgba(20, 20, 20, 0.34);
  backdrop-filter: blur(3px);
}

.welcome-modal-window,
footer #subscribe-modal-window {
  background: rgba(255, 255, 255, 0.96);
}

body.dark .welcome-modal,
footer.dark #subscribe-modal {
  background: rgba(0, 0, 0, 0.48);
}

body.dark .welcome-modal-window,
footer.dark #subscribe-modal-window {
  background: rgba(55, 55, 55, 0.96);
}

/* Subscribe disabled final */
#subscribe-form.is-subscribed {
  opacity: 0.72;
}

#subscribe-form.is-subscribed input,
#subscribe-form.is-subscribed button,
.subscribe-header-btn:disabled {
  cursor: default;
}

#subscribe-form.is-subscribed input {
  color: #6d6d6d;
}

#subscribe-form.is-subscribed .subscribe-submit {
  background: #8b8b8b;
  box-shadow: none;
}

/* Language switcher */
.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(55, 55, 55, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.language-btn {
  min-width: 32px;
  height: 26px;
  padding: 0 8px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #373737;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.language-btn:hover {
  transform: translateY(-1px);
  background: rgba(132, 204, 200, 0.25);
}

.language-btn:active {
  transform: translateY(1px) scale(0.96);
}

.language-btn.active {
  background: #000;
  color: #fff;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.18);
}

.burger-language-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(132, 204, 200, 0.12);
  color: #373737;
  font-size: 13px;
}

header.dark .language-switcher,
body.dark .language-switcher {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

header.dark .language-btn,
body.dark .language-btn {
  color: #eef3f2;
}

header.dark .language-btn.active,
body.dark .language-btn.active {
  background: #f1f5f4;
  color: #2f2f2f;
}

header.dark .burger-language-control {
  background: rgba(255, 255, 255, 0.08);
  color: #eef3f2;
}

@media (max-width: 799px) {
  .desktop-language-item {
    display: none;
  }
}

@media (min-width: 800px) {
  .burger-language-control {
    display: none;
  }
}

/* Language layout stability */
header nav > ul > li {
  flex: 0 0 auto;
}

.interact-filter {
  width: 112px;
  min-height: 32px;
  white-space: nowrap;
  text-align: center;
}

.our-team {
  width: 118px;
  min-height: 32px;
  text-align: center;
}

.contacts {
  width: 92px;
  min-height: 32px;
  text-align: center;
}

.desktop-language-item {
  width: 122px;
  display: flex;
  justify-content: center;
}

.desktop-theme-item {
  width: 46px;
  display: flex;
  justify-content: center;
}

.subscribe-header-btn {
  width: 148px;
  min-width: 148px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
}

#games-filter {
  width: 152px !important;
}

#games-filter button {
  width: 100%;
  min-height: 30px;
  padding: 4px 8px;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

.language-switcher {
  width: 112px;
  justify-content: space-between;
}

.language-btn {
  flex: 0 0 32px;
}

.main_title,
.section-title.section-title,
.title,
.team-title,
.scientists-title,
.title_rock_paper_scissors,
.title_number_guess,
.title_birthday,
.h1 {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
  text-wrap: balance;
}

.game-guide {
  min-height: 38px;
}

.game-guide summary {
  width: 190px;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  white-space: normal;
}

.game-guide[open] {
  min-height: 132px;
}

.game-guide p {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.25;
}

.scientists-btn,
#filter-menu-modal-window button,
.btn_continue,
.football-play-btn,
.football-stop-btn,
.rock-paper-scissors-modal-btn,
.number-guess-modal-new-game,
.dino-modal-btn,
.dino-modal-end-btn,
.subscribe-submit,
#welcome-modal-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.16;
  white-space: normal;
}

.scientists-btn {
  height: 58px;
  min-height: 58px;
  padding-block: 8px;
}

.scientists-reset-btn {
  height: 42px;
  min-height: 42px;
}

.btn_continue {
  width: 174px;
  min-height: 42px;
}

.football-play-btn,
.football-stop-btn {
  min-width: 112px;
  min-height: 38px;
}

.football-difficulty {
  min-width: 190px;
}

.score-board,
.container_results_rock_paper_scissors,
.dino-stats {
  min-width: 150px;
}

#text_birthday,
#text_number_guess,
#text_rock_paper_scissors,
#timecalc-result,
.result,
.number-guess-modal-title,
.number-guess-modal-text,
.rock-paper-scissors-modal-result,
.dino-modal-score,
.dino-modal-record {
  min-height: 24px;
  line-height: 1.25;
}

#timecalc-result {
  width: 150px;
}

.member-name,
.member-role,
.member-info {
  min-height: 24px;
}

.member-info {
  min-height: 48px;
}

@media (max-width: 799px) {
  .interact-filter,
  .our-team,
  .contacts,
  .desktop-language-item,
  .desktop-theme-item,
  .subscribe-header-btn {
    width: auto;
    min-width: 0;
  }

  #filter-menu-modal-window button {
    min-height: 44px;
  }

  .burger-language-control {
    min-height: 50px;
  }

  .burger-language-control .language-switcher {
    flex: 0 0 112px;
  }
}

@media (max-width: 560px) {
  .main_title,
  .section-title.section-title,
  .title,
  .team-title,
  .scientists-title,
  .title_rock_paper_scissors,
  .title_number_guess,
  .title_birthday,
  .h1 {
    min-height: 38px;
  }

  .game-guide summary {
    width: 170px;
  }

  .game-guide[open] {
    min-height: 150px;
  }

  .scientists-btn {
    height: 60px;
    min-height: 60px;
  }
}

/* Header language stability */
@media (min-width: 1280px) {
  header nav {
    width: 100%;
  }

  header nav > ul {
    display: grid !important;
    grid-template-columns: 110px 126px 126px 96px 122px 48px 156px;
    gap: 22px !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
  }

  header nav > ul > li {
    width: 100%;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  header nav > ul > li:last-child {
    display: none;
  }

  .header-main-btn {
    margin: 0 !important;
  }

  .contacts {
    margin-right: 0 !important;
  }
}

@media (min-width: 800px) and (max-width: 1279px) {
  header nav {
    width: 100%;
  }

  header nav > ul {
    display: grid !important;
    grid-template-columns: 100px 116px 112px 84px 112px 44px 140px;
    gap: 12px !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
  }

  header nav > ul > li {
    width: 100%;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  header nav > ul > li:last-child {
    display: none;
  }

  .header-main-btn {
    margin: 0 !important;
  }

  .contacts {
    margin-right: 0 !important;
  }
}

@media (min-width: 800px) {
  .interact-filter,
  .our-team,
  .contacts,
  .subscribe-header-btn {
    height: 36px;
    max-height: 36px;
    overflow: hidden;
  }

  .interact-filter {
    width: 126px;
  }

  .our-team {
    width: 126px;
  }

  .contacts {
    width: 96px;
  }

  .subscribe-header-btn {
    width: 156px;
    min-width: 156px;
    padding: 6px 10px;
    font-size: 11px;
    text-wrap: balance;
  }

  .desktop-language-item,
  .language-switcher {
    width: 122px;
    min-width: 122px;
  }

  .desktop-theme-item {
    width: 48px;
    min-width: 48px;
  }

  #interacts {
    width: 126px;
  }

  #games-filter {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) translateY(0);
  }

  #games-filter.hidden {
    transform: translateX(-50%) translateY(-10px);
  }
}

@media (min-width: 800px) and (max-width: 1279px) {
  .interact-filter,
  #interacts {
    width: 116px;
  }

  .our-team {
    width: 112px;
  }

  .contacts {
    width: 84px;
  }

  .subscribe-header-btn {
    width: 140px;
    min-width: 140px;
  }

  .desktop-language-item,
  .language-switcher {
    width: 112px;
    min-width: 112px;
  }
}
