:root {
  color-scheme: dark;
  --page: #1c1e24;
  --page-soft: #252830;
  --card: #2a2d35;
  --card-text: #f4f5f7;
  --muted: #9aa3ad;
  --green: #1d8a40;
  --green-bright: #2bb85a;
  --green-dark: #14662e;
  --ink: #121318;
  --line: rgba(255, 255, 255, 0.08);
  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: #1c1e24;
}

body {
  min-width: 320px;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -5%, rgba(29, 138, 64, 0.12), transparent 30rem),
    #1c1e24;
  color: #f4f5f7;
  -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, #1c1e24, #181a20 20rem),
    var(--page);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.45);
}

.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(28, 30, 36, 0.94);
  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(--green), transparent);
}

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

.hero-badge span {
  color: var(--green);
  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 20%, var(--green-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 10px 0 0;
  color: var(--muted);
  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 var(--line);
  border-radius: 22px;
  background: var(--card);
  color: var(--card-text);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.28);
}

.bookmaker-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  content: "";
  background: var(--green);
}

.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: var(--green);
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(29, 138, 64, 0.22);
}

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

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

.brand-logo-wrap:focus-visible {
  outline: 3px solid rgba(29, 138, 64, 0.55);
  outline-offset: 3px;
}

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

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

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

.bonus-box {
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(29, 138, 64, 0.16), rgba(29, 138, 64, 0.06)),
    #32363f;
  border: 1px solid rgba(29, 138, 64, 0.22);
}

.bonus-value {
  display: block;
  margin-bottom: 7px;
  color: var(--green-bright);
  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: var(--muted);
  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: var(--green);
  color: #fff;
  font-size: clamp(0.95rem, 3.6vw, 1.05rem);
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(29, 138, 64, 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(29, 138, 64, 0.28);
  border-radius: 22px;
  color: var(--muted);
  text-align: center;
}

footer {
  display: grid;
  margin-top: 12px;
  padding: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
  text-align: left;
  border-top: 2px solid var(--green);
}

.footer-notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
}

.footer-age {
  display: grid;
  width: 48px;
  height: 48px;
  flex: none;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.footer-notice p {
  margin: 0;
  max-width: 36ch;
}

.footer-notice p + p {
  margin-top: 6px;
  color: #cfd3da;
}

.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(29, 138, 64, 0.28);
  border-radius: 14px;
  background: #252830;
  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 {
    height: 46px;
  }

  .brand-logo {
    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 var(--line);
    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-wrap {
    height: 46px;
  }

  .brand-logo {
    max-width: min(100%, 178px);
    max-height: 46px;
  }

  .bonus-box {
    padding: 20px;
  }

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

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

  footer {
    grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.7fr);
    align-items: stretch;
    padding-top: 0;
  }

  .footer-notice {
    padding: 28px 20px 28px 40px;
  }

  .footer-links {
    margin: 0;
    padding: 12px 40px 28px 8px;
  }
}

@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(29, 138, 64, 0.7);
  outline-offset: 3px;
}

.footer-links {
  display: grid;
  width: 100%;
  margin: 8px 0 0;
  padding: 0 max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  gap: 0;
}

.footer-links a {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 2px;
  border-top: 1px solid var(--line);
  color: #f4f5f7;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  text-align: left;
  text-decoration: none;
  transition: color 160ms ease;
}

.footer-links a::after {
  color: var(--green);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  content: "›";
}

.footer-links a:hover {
  color: var(--green);
}

.footer-links a:focus-visible,
.doc-nav a:focus-visible {
  outline: 3px solid rgba(29, 138, 64, 0.7);
  outline-offset: 3px;
}

.doc-nav a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 2px solid var(--green);
  color: #f4f5f7;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.doc-nav a:hover {
  color: var(--green);
  border-bottom-color: var(--green);
}

.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: 36px;
}

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

.document-card {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(22px, 5vw, 42px);
  border: 1px solid var(--line);
  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: var(--muted);
  font-size: 14px;
}

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

.warning-box {
  margin: 24px 0;
  padding: 18px;
  border-radius: 16px;
  background: #32363f;
  border: 1px solid rgba(29, 138, 64, 0.22);
}

.warning-box p {
  color: var(--card-text);
}
