:root {
  color-scheme: dark;
  --page: #090d22;
  --page-soft: #101a38;
  --card: #f8fbff;
  --card-text: #10152b;
  --muted: #647089;
  --cyan: #25e0c0;
  --cyan-dark: #0c9c86;
  --blue: #6578ff;
  --purple: #8c5dff;
  --line: rgba(132, 156, 214, 0.18);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: #050714;
}

body {
  min-width: 320px;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -5%, rgba(101, 120, 255, 0.28), transparent 30rem),
    #050714;
  color: #fff;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

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

.site-shell {
  width: min(100%, 540px);
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: clip;
  background:
    linear-gradient(180deg, rgba(16, 26, 56, 0.95), rgba(9, 13, 34, 0.98) 20rem),
    var(--page);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.38);
}

.hero {
  position: sticky;
  z-index: 5;
  top: 0;
  padding: calc(18px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 18px max(16px, env(safe-area-inset-left));
  text-align: center;
  background: rgba(9, 13, 34, 0.91);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.hero::after {
  position: absolute;
  right: 18%;
  bottom: -1px;
  left: 18%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: #aeb9d8;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero-badge span {
  color: var(--cyan);
  font-size: 0.64rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.55rem, 7.4vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
  background: linear-gradient(92deg, #ffffff 15%, #b8fff2 82%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 10px 0 0;
  color: #bac4df;
  font-size: clamp(0.9rem, 3.6vw, 0.98rem);
  line-height: 1.35;
}

main {
  padding: 16px max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left));
}

.bookmaker-list {
  display: grid;
  gap: 16px;
}

.bookmaker-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 22px;
  background: var(--card);
  color: var(--card-text);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.2);
}

.bookmaker-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--purple));
}

.bookmaker-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "rank logo"
    "stars stars";
  gap: 10px 10px;
  align-items: center;
}

.rank {
  grid-area: rank;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--cyan), #6cf2dc);
  color: #062e2a;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(37, 224, 192, 0.25);
}

.brand-logo-wrap {
  grid-area: logo;
  display: flex;
  min-width: 0;
  height: 42px;
  align-items: center;
  text-decoration: none;
  border-radius: 10px;
}

.brand-logo-wrap:hover .brand-logo {
  opacity: 0.82;
}

.brand-logo-wrap:focus-visible {
  outline: 3px solid rgba(12, 156, 134, 0.55);
  outline-offset: 3px;
}

.brand-logo {
  display: block;
  width: min(100%, 148px);
  max-height: 42px;
  object-fit: contain;
  object-position: left center;
}

.stars {
  grid-area: stars;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  color: #7080a4;
  font-size: clamp(1.2rem, 5.4vw, 1.45rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

.stars .filled {
  color: var(--blue);
}

.bonus-box {
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(37, 224, 192, 0.15), rgba(101, 120, 255, 0.08)),
    #edf9f8;
  border: 1px solid rgba(37, 224, 192, 0.14);
}

.bonus-value {
  display: block;
  margin-bottom: 7px;
  color: var(--cyan-dark);
  font-size: clamp(1.45rem, 7vw, 2.35rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.bonus-description {
  display: block;
  color: #525f73;
  font-size: clamp(0.88rem, 3.4vw, 0.98rem);
  line-height: 1.35;
}

.offer-button {
  display: flex;
  width: 100%;
  min-height: 52px;
  margin-top: 12px;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(100deg, #27dabe, #6578ff 58%, #835fff);
  color: #fff;
  font-size: clamp(0.95rem, 3.6vw, 1.05rem);
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(76, 93, 220, 0.22);
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

.offer-button::after {
  margin-left: 10px;
  content: "→";
  font-size: 1.25rem;
}

.offer-button:active {
  transform: translateY(2px);
  filter: brightness(0.94);
}

.empty-state {
  padding: 40px 20px;
  border: 1px dashed rgba(169, 186, 235, 0.28);
  border-radius: 22px;
  color: #b9c5e5;
  text-align: center;
}

footer {
  padding: 32px max(16px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  color: #8793b3;
  font-size: 0.86rem;
  line-height: 1.55;
  text-align: center;
}

footer p {
  margin: 0;
}

footer p + p {
  display: flex;
  flex-wrap: wrap;
  margin-top: 8px;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

footer strong {
  color: #b5c1df;
}

footer span {
  width: 1px;
  height: 16px;
  background: #586483;
}

.toast {
  position: fixed;
  z-index: 20;
  right: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: 16px;
  max-width: 480px;
  margin: auto;
  padding: 13px 16px;
  border: 1px solid rgba(135, 156, 219, 0.25);
  border-radius: 14px;
  background: #192446;
  color: #f8faff;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 360px) {
  .hero {
    padding-right: 20px;
    padding-left: 20px;
  }

  .bookmaker-card {
    padding: 16px;
  }

  .rank {
    width: 42px;
    height: 42px;
  }
}

@media (min-width: 390px) {
  .bookmaker-top {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "rank logo stars";
    min-height: 46px;
  }

  .stars {
    justify-content: flex-end;
  }

  .offer-button {
    min-height: 56px;
  }
}

@media (min-width: 430px) {
  .site-shell {
    width: min(100%, 540px);
  }

  .hero {
    padding: calc(22px + env(safe-area-inset-top)) 24px 22px;
  }

  main {
    padding: 20px 16px 6px;
  }

  .bookmaker-card {
    padding: 18px;
    border-radius: 24px;
  }

  .rank {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    font-size: 1.08rem;
  }

  .brand-logo-wrap,
  .brand-logo {
    height: 46px;
    max-height: 46px;
  }

  .bonus-box {
    padding: 18px;
    border-radius: 18px;
  }

  .offer-button {
    min-height: 58px;
    margin-top: 14px;
    border-radius: 18px;
  }
}

@media (min-width: 768px) {
  body {
    padding: 24px;
  }

  .site-shell {
    width: min(100%, 1180px);
    min-height: calc(100vh - 48px);
    border: 1px solid rgba(133, 151, 207, 0.16);
    border-radius: 32px;
  }

  .hero {
    top: 24px;
    padding: 32px 40px 28px;
    border-radius: 32px 32px 0 0;
  }

  .hero h1 {
    font-size: 2.55rem;
  }

  .hero p {
    margin-top: 12px;
    font-size: 1.05rem;
  }

  main {
    padding: 30px 30px 8px;
  }

  .bookmaker-list {
    grid-template-columns: minmax(0, 700px);
    justify-content: center;
    gap: 22px;
  }

  .bookmaker-card {
    display: flex;
    min-height: 305px;
    flex-direction: column;
    padding: 22px;
    border-radius: 26px;
  }

  .brand-logo {
    width: min(100%, 158px);
  }

  .bonus-box {
    padding: 20px;
  }

  .offer-button {
    margin-top: auto;
    transform: translateY(14px);
  }

  .offer-button:active {
    transform: translateY(16px);
  }

  footer {
    padding-top: 50px;
  }
}

@media (min-width: 1280px) {
  .site-shell {
    width: min(100%, 1240px);
    border-radius: 36px;
  }

  .hero {
    border-radius: 36px 36px 0 0;
  }

  main {
    padding-right: 38px;
    padding-left: 38px;
  }

  .bookmaker-list {
    gap: 26px;
  }
}

@media (min-width: 1440px) {
  .site-shell {
    width: min(100%, 1320px);
  }
}

@media (hover: hover) and (pointer: fine) {
  .bookmaker-card {
    transition: transform 180ms ease, box-shadow 180ms ease;
  }

  .bookmaker-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.27);
  }

  .offer-button:hover {
    filter: brightness(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

.offer-button:focus-visible {
  outline: 3px solid rgba(37, 224, 192, 0.7);
  outline-offset: 3px;
}

.footer-links {
  display: grid;
  width: min(100%, 440px);
  margin: 22px auto 0;
  gap: 10px;
}

.footer-links a,
.doc-nav a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(37, 224, 192, 0.32);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(37, 224, 192, 0.16), rgba(101, 120, 255, 0.12));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 22px rgba(5, 8, 22, 0.28);
  color: #edf7ff;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.footer-links a::before,
.doc-nav a::before {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(37, 224, 192, 0.8);
  content: "";
}

.footer-links a:hover,
.doc-nav a:hover {
  border-color: rgba(37, 224, 192, 0.75);
  background: linear-gradient(100deg, rgba(39, 218, 190, 0.34), rgba(101, 120, 255, 0.4));
  color: #fff;
  transform: translateY(-1px);
}

.footer-links a:focus-visible,
.doc-nav a:focus-visible {
  outline: 3px solid rgba(37, 224, 192, 0.7);
  outline-offset: 3px;
}

@media (min-width: 430px) {
  .footer-links {
    grid-template-columns: 1fr 1fr;
  }

  .footer-links a {
    white-space: nowrap;
  }
}

.doc-page .hero {
  text-align: left;
}

.doc-page .hero h1 {
  font-size: clamp(1.8rem, 7vw, 2.8rem);
}

.doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.doc-nav a {
  min-height: 42px;
  padding: 8px 14px;
  font-size: 0.82rem;
}

.doc-wrap {
  padding: 8px 16px 40px;
}

.document-card {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(22px, 5vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 24px;
  background: var(--card);
  color: var(--card-text);
}

.document-card h2 {
  margin: 28px 0 8px;
  font-size: 1.2rem;
}

.document-card h2:first-child {
  margin-top: 0;
}

.document-card p,
.document-card li {
  color: #525f73;
  font-size: 14px;
}

.document-card a {
  color: var(--cyan-dark);
  font-weight: 700;
}

.warning-box {
  margin: 24px 0;
  padding: 18px;
  border-radius: 16px;
  background: #edf9f8;
}
