:root {
  --bg: #eceef4;
  --light: #f8faff;
  --blue: #2b5dff;
  --dark: #121412;
  --muted: rgba(18, 20, 18, 0.48);
  --field: #eceef4;
  --shell-radius: 40px;
  --field-radius: 30px;
  --button-radius: 10px;
  --letter-spacing: -0.02em;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--dark);
  background: var(--bg);
  font-family: "Golos Text", Arial, sans-serif;
  font-weight: 500;
  letter-spacing: var(--letter-spacing);
  line-height: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  letter-spacing: inherit;
}

.site-header {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  width: min(100% - 120px, 1720px);
  margin: 24px auto 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 20px;
}

.header-nav--right {
  justify-content: flex-end;
  gap: 24px;
}

.nav-link--active,
.mobile-menu__accent {
  color: var(--blue);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  font-size: 32px;
  text-transform: lowercase;
}

.logo img {
  display: block;
  max-width: 180px;
  max-height: 42px;
}

.logo span {
  display: none;
}

.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 0 22px;
  border-radius: var(--button-radius);
  background: var(--light);
  font-size: 24px;
  white-space: nowrap;
}

.burger {
  display: none;
  width: 52px;
  height: 45px;
  border: 0;
  border-radius: 10px;
  background: var(--light);
  cursor: pointer;
}

.burger span {
  display: block;
  width: 22px;
  height: 3px;
  margin: 5px auto;
  border-radius: 99px;
  background: var(--dark);
}

.burger.is-open {
  background: var(--blue);
}

.burger.is-open span {
  background: #fff;
}

.mobile-menu {
  display: none;
}

.predictions-shell {
  width: min(100% - 120px, 1720px);
  min-height: calc(100vh - 112px);
  margin: 24px auto 60px;
  padding: 58px 40px 64px;
  border-radius: var(--shell-radius);
  background: var(--light);
}

.predictions-card {
  width: min(100%, 900px);
  min-height: calc(100vh - 234px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.desktop-title {
  display: none;
}

.mobile-title {
  display: none;
}

.prediction-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 320px;
}

.placeholder-carousel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 900px;
  max-width: 100%;
  height: 320px;
}

.placeholder-card {
  position: absolute;
  display: block;
  object-fit: contain;
  border-radius: 24px;
  opacity: 0.45;
  transition: transform 0.45s ease, opacity 0.45s ease, filter 0.45s ease;
}

.placeholder-card--center {
  z-index: 5;
  width: 320px;
  height: 320px;
  opacity: 1;
  filter: none;
}

.placeholder-card--left,
.placeholder-card--right {
  z-index: 4;
  width: 230px;
  height: 230px;
  opacity: 0.5;
  filter: blur(0.2px);
}

.placeholder-card--left {
  transform: translateX(-310px);
}

.placeholder-card--right {
  transform: translateX(310px);
}

.placeholder-card--tiny-left,
.placeholder-card--tiny-right {
  z-index: 3;
  width: 160px;
  height: 160px;
  opacity: 0.25;
  filter: blur(0.5px);
}

.placeholder-card--tiny-left {
  transform: translateX(-560px);
}

.placeholder-card--tiny-right {
  transform: translateX(560px);
}
.placeholder-carousel.is-spinning .placeholder-card--center {
  animation: centerPulse 0.42s ease-in-out infinite alternate;
}

.placeholder-carousel.is-spinning .placeholder-card--left,
.placeholder-carousel.is-spinning .placeholder-card--right {
  animation: sideSlide 0.42s ease-in-out infinite alternate;
}

.prediction-result {
  position: absolute;
  z-index: 7;
  display: block;
  width: 360px;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  border-radius: 24px;
  opacity: 0;
  transform: scale(0.86) translateY(8px);
  pointer-events: none;
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.predictions-card.has-result .placeholder-carousel {
  opacity: 1;
}

.predictions-card.has-result .placeholder-card--center {
  opacity: 0;
  transform: scale(0.92);
}

.predictions-card.has-result .prediction-result {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.prediction-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  margin-top: 30px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  background: var(--field);
  color: var(--dark);
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.18s ease;
}

.prediction-button:hover {
  transform: translateY(-3px);
}

.prediction-button:disabled {
  cursor: wait;
}

@keyframes centerPulse {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.06);
  }
}

@keyframes sideSlide {
  from {
    opacity: 0.42;
  }

  to {
    opacity: 0.7;
  }
}

@media (max-width: 900px) {
  :root {
    --shell-radius: 20px;
    --field-radius: 16px;
  }

  body {
    overflow-x: hidden;
    background: #eceef4;
  }

  .site-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 40px);
    max-width: 430px;
    margin-top: 28px;
  }

  .header-nav,
  .desktop-title,
  .header-nav--right {
    display: none;
  }

  .logo {
    justify-content: center;
    min-width: auto;
    font-size: 20px;
  }

  .logo img {
    max-width: 94px;
    max-height: 26px;
  }

  .burger {
    position: absolute;
    right: 0;
    display: block;
  }

  .mobile-menu {
    position: absolute;
    top: 82px;
    left: 50%;
    z-index: 8;
    display: flex;
    flex-direction: column;
    gap: 26px;
    width: calc(100% - 40px);
    max-width: none;
    padding: 28px 32px 32px;
    border-radius: 16px;
    background: var(--light);
    font-size: 24px;
    transform: translateX(-50%) translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
  }

  .mobile-menu.is-open {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu__accent {
    margin-top: 20px;
  }

  .mobile-menu__accent + .mobile-menu__accent {
    margin-top: 0;
  }

  .predictions-shell {
    width: calc(100% - 40px);
    max-width: 430px;
    min-height: calc(100vh - 104px);
    margin-top: 40px;
    margin-bottom: 0;
    padding: 0 0 38px;
    border-radius: 0;
    background: transparent;
  }

  .predictions-card {
    width: 100%;
    min-height: auto;
    justify-content: flex-start;
  }

  .mobile-title {
    display: block;
    margin: 0 0 32px;
    text-align: center;
  }

  .mobile-title h1 {
    margin: 0 0 6px;
    color: var(--blue);
    font-size: 24px;
    line-height: 1;
  }

  .mobile-title p {
    width: min(100%, 300px);
    margin: 0 auto;
    color: var(--muted);
    font-size: 16px;
    line-height: 1;
  }

  .prediction-stage {
    min-height: 132px;
  }

  .placeholder-carousel {
    width: 100%;
    height: 132px;
  }

  .placeholder-card--center {
    width: 130px;
    height: 130px;
    border-radius: 16px;
  }

  .placeholder-card--left,
  .placeholder-card--right {
    width: 90px;
    height: 90px;
    border-radius: 14px;
  }

  .placeholder-card--left {
    transform: translateX(-108px);
  }

  .placeholder-card--right {
    transform: translateX(108px);
  }

  .placeholder-card--tiny-left,
  .placeholder-card--tiny-right {
    width: 58px;
    height: 58px;
    border-radius: 10px;
  }

  .placeholder-card--tiny-left {
    transform: translateX(-180px);
  }

  .placeholder-card--tiny-right {
    transform: translateX(180px);
  }

  .prediction-result {
    width: min(100%, 330px);
    max-height: none;
    border-radius: 30px;
  }

  .predictions-card.has-result .placeholder-carousel {
    display: none;
  }

  .predictions-card.has-result .prediction-stage {
    min-height: auto;
    margin-top: 10px;
  }

  .predictions-card.has-result .prediction-result {
    position: static;
    display: block;
    width: min(100%, 330px);
    margin: 0 auto;
    border-radius: 30px;
  }

  .prediction-button {
    width: 100%;
    min-height: 82px;
    margin-top: 24px;
    padding: 0 24px;
    border-radius: 999px;
    font-size: 22px;
    text-align: center;
    background: #E5E9F3;
    
  }

  .predictions-card.has-result .prediction-button {
    margin-top: 28px;
  }
}

@media (max-width: 380px) {
  .site-header,
  .predictions-shell {
    width: calc(100% - 32px);
  }

  .mobile-menu {
    width: calc(100% - 32px);
  }

  .mobile-title {
    margin-bottom: 96px;
  }

  .placeholder-card--tiny-left {
    transform: translateX(-160px);
  }

  .placeholder-card--tiny-right {
    transform: translateX(160px);
  }

  .prediction-button {
    min-height: 76px;
    font-size: 28px;
  }
}
