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

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #505667 #1a1e2a;
}

img {
  display: block;
  max-width: 100%;
}

/* Dark compact scrollbar for page-level containers */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: #1a1e2a;
  border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #555d70 0%, #424a5d 100%);
  border-radius: 10px;
  border: 2px solid #1a1e2a;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #636d83 0%, #4d566a 100%);
}

a,
button,
input,
select {
  font: inherit;
  color: inherit;
}

.page {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  --footer-height: 100px;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(620px, 74vh, 860px);
  flex: 1 0 auto;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: #050507 url("../images/artboard-1-200.png") center top/cover no-repeat;
  z-index: -3;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 117, 39, 0.24);
  mix-blend-mode: color-burn;
  z-index: -2;
}

.hero__decor {
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

.hero__decor--ball-left {
  width: clamp(180px, 18.75vw, 360px);
  left: clamp(36%, 42vw, 49%);
  top: clamp(52%, 56vh, 62%);
  transform: rotate(73.4deg);
}

.hero__decor--ball-top {
  width: clamp(72px, 6.8vw, 131px);
  top: clamp(92px, 13vh, 150px);
  left: clamp(43%, 47vw, 53%);
}

.hero__decor--ball-right {
  width: clamp(110px, 11.9vw, 229px);
  right: clamp(-38px, -2.5vw, 12px);
  top: clamp(290px, 42vh, 470px);
}

.hero__decor--trophy {
  width: clamp(140px, 12.1vw, 232px);
  top: clamp(220px, 30vh, 320px);
  left: clamp(50%, 55vw, 62%);
  transform: rotate(-28deg);
}

.hero__girl {
  position: absolute;
  width: clamp(620px, 58vw, 1048px);
  right: clamp(-70px, -1vw, 20px);
  top: clamp(-24px, -1vh, 2px);
  z-index: -1;
}

.header {
  position: relative;
  width: min(1920px, 100%);
  margin: 0 auto;
  padding: clamp(12px, 2.5vh, 30px) clamp(16px, 4vw, 80px);
  display: flex;
  align-items: center;
}

.header__logo {
  width: clamp(95px, 11vw, 187px);
}

.hero__content {
  width: min(1920px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 2.4vh, 36px) clamp(16px, 4vw, 92px) clamp(160px, 24vh, 300px);
}

.hero__title {
  max-width: min(888px, 94vw);
  font-family: var(--font-heading);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(42px, 3.8vw, 54px);
  line-height: 1.18;
  margin-bottom: clamp(22px, 3vh, 34px);
  letter-spacing: 0.01em;
}

.hero__title-highlight {
  background: linear-gradient(90deg, #ff7527 59.6%, #ffb800 92.3%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.form-card {
  width: min(686px, 100%);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 12px;
}

.mobile-register-btn {
  display: none;
  border: 0;
  cursor: pointer;
  position: relative;
  border-radius: 4px;
  background: linear-gradient(163.96deg, #ffb800, #ff7527);
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  text-align: center;
  font-size: 14px;
  color: #000;
  font-family: "Roboto", sans-serif;
}

.mobile-register-btn__text {
  position: relative;
  line-height: 16px;
  font-weight: 700;
}

.mobile-registration-toggle {
  display: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.field-wrap {
  position: relative;
}

.field {
  width: 100%;
  height: 46px;
  border-radius: 9px;
  border: 1px solid var(--color-input-border);
  background: var(--color-input);
  color: var(--color-text);
  font-size: 14px;
  line-height: 1;
  padding: 0 44px 0 16px;
  outline: none;
}

.field--select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

.field::placeholder {
  color: var(--color-text-muted);
}

.field-icon {
  position: absolute;
  width: 24px;
  height: 24px;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.form-grid__full {
  grid-column: 1 / -1;
}

.promo-field-wrap {
  position: relative;
  margin-top: 2px;
  width: fit-content;
}

.promo-input {
  width: 190px;
  height: 24px;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 0 22px 0 0;
  outline: none;
}

.promo-input::placeholder {
  color: var(--color-text-muted);
  opacity: 1;
}

.promo-input__icon {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.agreement {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.2;
  margin-top: 2px;
}

.agreement input {
  appearance: none;
  -webkit-appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 2px solid #495066;
  background: linear-gradient(180deg, #2f3445 0%, #272c3c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.35);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.agreement input::before {
  content: "";
  width: 14px;
  height: 10px;
  border-left: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transform: rotate(-45deg) translate(1px, -1px);
  transition: border-color 0.15s ease;
}

.agreement input:checked {
  border-color: #ff8c29;
  background: linear-gradient(180deg, #3a4052 0%, #2d3344 100%);
}

.agreement input:checked::before {
  border-left-color: #ffb24a;
  border-bottom-color: #ffb24a;
}

.agreement input:focus-visible {
  outline: 2px solid rgba(255, 140, 41, 0.65);
  outline-offset: 2px;
}

.submit-btn {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 9px;
  background: var(--gradient-primary);
  color: #000000;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.submit-btn.is-disabled,
.submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.registration-result {
  display: none;
  width: min(686px, 100%);
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(91, 99, 117, 0.9);
  background:
    linear-gradient(180deg, rgba(48, 53, 66, 0.95) 0%, rgba(34, 39, 51, 0.95) 100%);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.4;
}

.registration-result.is-visible {
  display: block;
}

.registration-result.is-error {
  border-color: rgba(255, 120, 120, 0.9);
  color: #ffb6b6;
}

.registration-result__title {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.registration-result__credentials {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.registration-result__row {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(29, 32, 42, 0.92);
  border: 1px solid rgba(74, 82, 101, 0.7);
}

.registration-result__label {
  color: var(--color-text-muted);
}

.registration-result__value {
  font-weight: 700;
  color: #ffffff;
  font-family: "Roboto", sans-serif;
  letter-spacing: 0.02em;
}

.registration-result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.registration-result__action {
  min-width: 150px;
  height: 40px;
  padding: 0 16px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.registration-result__action:hover {
  transform: translateY(-1px);
}

.registration-result__action--primary {
  background: var(--gradient-primary);
  color: #000;
}

.registration-result__action--secondary {
  border: 1px solid transparent;
  background:
    linear-gradient(#000000, #000000) padding-box,
    linear-gradient(0deg, rgba(255, 117, 39, 1) 0%, rgba(255, 184, 0, 1) 100%) border-box;
  color: #fff;
}

.registration-result a {
  color: inherit;
}

.matches-zone {
  width: min(1920px, 100%);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 80px) 0;
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--footer-height) + 3em);
  z-index: 3;
}

.matches-ribbon {
  position: relative;
  border-radius: 12px;
  overflow: visible;
  min-height: 154px;
  background: var(--gradient-ribbon);
}

.matches-ribbon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-ribbon-overlay);
}

.matches-ribbon__left {
  position: absolute;
  left: clamp(-24px, -1.4vw, -6px);
  bottom: -2px;
  top: -20px;
  width: clamp(280px, 23vw, 450px);
  pointer-events: none;
  z-index: 3;
}

.matches-ribbon__athlete-base {
  position: absolute;
  left: 2px;
  bottom: 0;
  width: 56%;
}

.matches-ribbon__athlete-mid {
  position: absolute;
  left: 33%;
  bottom: -2px;
  width: 38%;
}

.matches-ribbon__athlete-right {
  position: absolute;
  left: 46%;
  bottom: 0;
  width: 42%;
}

.matches-ribbon__ball {
  position: absolute;
  left: 2%;
  top: 20%;
  width: 14%;
}

.matches-list {
  position: relative;
  z-index: 2;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 8px;
  margin-left: min(360px, 20vw);
}

.card {
  position: relative;
  min-height: 142px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--gradient-card);
  border: 1px solid transparent;
  border-image: linear-gradient(180deg, rgba(29, 32, 42, 0) 0%, #363b49 100%) 1;
  padding: 8px;
}

.card__bg {
  position: absolute;
  right: -26px;
  top: -20px;
  width: 117px;
  opacity: 0.9;
}

.card__top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.card__league {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 15px;
  font-weight: 700;
}

.card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card__actions img {
  width: 24px;
  height: 24px;
}

.card__teams {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 4px;
}

.team {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  line-height: 14px;
}

.team__logo {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
}

.team__logo img {
  max-width: 16px;
  max-height: 16px;
}

.card__date {
  color: var(--color-text-muted);
  font-size: 9px;
  line-height: 15px;
  margin-bottom: 4px;
}

.odds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
}

.odd {
  background: var(--color-surface);
  border-radius: 4px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
  background-image: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer {
  width: 100%;
  margin: 0;
  height: 100px;
  background: var(--color-footer);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.footer__bg-ball {
  position: absolute;
  width: 299px;
  right: -76px;
  bottom: -78px;
}

.footer__bg-layer3 {
  position: absolute;
  width: 528px;
  right: -300px;
  top: -240px;
  transform: rotate(125deg);
}

.footer__bg-layer4 {
  position: absolute;
  width: 457px;
  right: -146px;
  top: -150px;
}

.footer__small-ball {
  position: absolute;
  width: 94px;
  right: 550px;
  top: -36px;
  transform: rotate(52deg);
}

.footer__text {
  position: absolute;
  left: clamp(16px, 4vw, 72px);
  top: 50%;
  transform: translateY(-50%);
  text-transform: uppercase;
  font-size: clamp(22px, 1.8vw, 34px);
  line-height: 1.03;
  font-weight: 700;
  background: var(--gradient-accent);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer__btn {
  height: auto;
  padding: 25px 52px;
  border-radius: 12px;
  border: 2px solid transparent;
  background:
    linear-gradient(#000000, #000000) padding-box,
    linear-gradient(0deg, rgba(255, 117, 39, 1) 0%, rgba(255, 184, 0, 1) 100%) border-box;
  color: #fff;
  text-align: center;
  font-family: "Roboto-Bold", sans-serif;
  font-size: 24px;
  line-height: 20px;
  font-weight: 700;
  text-transform: uppercase;
  position: relative;
}

@media (max-width: 1599px) {
  .hero__girl {
    width: clamp(560px, 55vw, 930px);
    right: clamp(-120px, -2vw, -10px);
    top: clamp(-16px, 0.2vh, 12px);
  }
}

@media (max-width: 1199px) {
  .hero {
    min-height: auto;
  }

  .hero__content {
    padding-bottom: 30px;
  }

  .hero__girl {
    right: -220px;
    width: clamp(320px, 56vw, 760px);
    top: 20px;
    opacity: 0.95;
  }

  .form-card {
    width: min(560px, 100%);
  }

  .matches-zone {
    padding-inline: 16px;
  }

  .matches-ribbon {
    min-height: 170px;
  }

  .matches-list {
    margin-left: min(260px, 30vw);
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .footer__text {
    font-size: clamp(16px, 2.1vw, 24px);
  }
}

@media (max-width: 899px) {
  .hero__decor,
  .footer__bg-layer3,
  .footer__bg-layer4,
  .footer__bg-ball,
  .footer__small-ball {
    display: none;
  }

  .page {
    --footer-height: 64px;
  }

  .hero {
    min-height: auto;
    display: flex;
    flex-direction: column;
    padding-bottom: 18px;
  }

  .header {
    order: 1;
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    z-index: 2;
  }

  .header__logo {
    width: 83px;
  }

  .hero__girl {
    order: 3;
    position: relative;
    width: min(352px, calc(100vw - 24px));
    right: auto;
    top: auto;
    bottom: auto;
    margin: 14px auto 8px;
    z-index: 1;
  }

  .hero__content {
    order: 2;
    width: 100%;
    padding: 12px 16px 0;
    text-align: center;
    z-index: 2;
  }

  .hero__title {
    max-width: 343px;
    margin: 0 auto 16px;
    font-size: 20px;
    line-height: 1.315;
  }

  .form-card {
    width: 343px;
    max-width: 100%;
    margin: 0 auto;
    padding: 8px;
  }

  .mobile-register-btn {
    display: flex;
    width: fit-content;
    min-width: 150px;
    margin: 0 auto 12px;
    padding: 8px 24px;
  }

  .form-card {
    display: none;
  }

  .mobile-registration-toggle:checked + .mobile-register-btn {
    display: none;
  }

  .mobile-registration-toggle:checked + .mobile-register-btn + .form-card {
    display: block;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid > :nth-child(1) { order: 1; }
  .form-grid > :nth-child(2) { order: 3; }
  .form-grid > :nth-child(3) { order: 2; }
  .form-grid > :nth-child(4) { order: 4; }
  .form-grid > :nth-child(5) { order: 5; }
  .form-grid > :nth-child(6) { order: 6; }
  .form-grid > :nth-child(7) { order: 7; }

  .promo-field-wrap {
    margin-top: 0;
  }

  .promo-input {
    width: 170px;
    height: 28px;
  }

  .agreement {
    align-items: center;
    gap: 8px;
    margin-top: 0;
    font-size: 14px;
    line-height: 16px;
  }

  .agreement input {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border-width: 1.5px;
    box-shadow: none;
  }

  .agreement span {
    text-align: left;
  }

  .submit-btn {
    height: 46px;
    font-size: 16px;
  }

  .registration-result {
    width: 343px;
    max-width: 100%;
    margin-inline: auto;
    text-align: left;
  }

  .registration-result__title {
    font-size: 16px;
  }

  .registration-result__action {
    width: 100%;
    min-width: 0;
  }

  .hero__decor--ball-left,
  .hero__decor--trophy,
  .hero__decor--ball-right {
    display: block;
  }

  .hero__decor--ball-left {
    width: 95px;
    left: -14px;
    top: auto;
    bottom: 295px;
  }

  .hero__decor--trophy {
    width: 126px;
    left: -44px;
    top: auto;
    bottom: 64px;
    transform: rotate(-28deg);
  }

  .hero__decor--ball-right {
    width: 150px;
    right: -72px;
    top: auto;
    bottom: 36px;
  }

  .matches-zone {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(var(--footer-height) + 8px);
    z-index: 3;
    padding: 0 16px 8px;
    margin: 0;
  }

  .matches-ribbon {
    background: transparent;
    min-height: auto;
    overflow: visible;
    position: relative;
    padding-top: 139px;
    border-radius: 12px;
  }

  .matches-ribbon::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 139px;
    border-radius: 12px;
    background: linear-gradient(214.42deg, #ee9e0a 0%, #fe7802 100%);
  }

  .matches-ribbon::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 156px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(238, 158, 10, 0) 48%, #1d202a 75%);
  }

  .matches-ribbon__left {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: auto;
    width: 100%;
    height: 139px;
    z-index: 3;
    pointer-events: none;
  }

  .matches-ribbon__athlete-base {
    width: 178px;
    left: 14px;
    bottom: 0;
  }

  .matches-ribbon__athlete-mid {
    width: 123px;
    left: 38%;
    bottom: 0;
  }

  .matches-ribbon__athlete-right {
    width: 122px;
    left: auto;
    right: 14px;
    bottom: -2px;
  }

  .matches-ribbon__ball {
    width: 22px;
    left: 121px;
    top: 46px;
  }

  .matches-list {
    margin: 0;
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 8px 0 8px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #4d5467 #202634;
    position: relative;
    z-index: 4;
  }

  .matches-list::-webkit-scrollbar {
    height: 6px;
  }

  .matches-list::-webkit-scrollbar-track {
    background: #202634;
    border-radius: 999px;
  }

  .matches-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #5a6276 0%, #474f62 100%);
    border-radius: 999px;
    border: 1px solid #202634;
  }

  .card {
    min-width: 305px;
    width: 305px;
    min-height: 146px;
    border-radius: 12px;
    scroll-snap-align: start;
  }

  .footer {
    height: 64px;
    min-height: 64px;
    padding: 0 16px;
    justify-content: space-between;
  }

  .footer__text {
    position: static;
    transform: none;
    font-size: 12px;
    line-height: 16px;
    max-width: 154px;
  }

  .footer__btn {
    height: 40px;
    padding: 0 24px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 20px;
  }
}

@media (max-width: 499px) {
  .hero__title {
    font-size: 20px;
    line-height: 1.315;
  }

  .field {
    height: 46px;
  }

  .submit-btn {
    height: 46px;
    font-size: 16px;
  }
}
