:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --gutter: clamp(18px, 4vw, 64px);
  --muted: rgba(255, 255, 255, .68);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: #05050b; scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: #fff;
  background:
    radial-gradient(ellipse at 6% 34%, rgba(247, 30, 42, .13), transparent 36%),
    radial-gradient(ellipse at 94% 38%, rgba(38, 102, 255, .15), transparent 38%),
    #05050b;
  overflow-x: hidden;
}

a { color: inherit; }

.arena { min-height: 100svh; padding: 18px 0 22px; }

.sitebar,
footer {
  width: min(calc(100% - var(--gutter) * 2), 1440px);
  margin-inline: auto;
}

.sitebar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 4px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .14em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 25px;
  height: 25px;
  border: 2px solid rgba(255,255,255,.88);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(255,255,255,.28), inset 0 0 10px rgba(255,255,255,.22);
}

.brand-mark::after {
  position: absolute;
  top: 10px;
  left: 4px;
  width: 13px;
  height: 2px;
  content: "";
  background: #fff;
  border-radius: 3px;
  transform: rotate(-35deg);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255,255,255,.72);
  font-size: 12px;
  letter-spacing: .02em;
}

.status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #70f2ba;
  box-shadow: 0 0 12px rgba(112,242,186,.8);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.battle-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
  min-height: min(860px, calc(100svh - 112px));
  margin-top: 8px;
  overflow: hidden;
  background: #070913;
}

.battle-stage::before,
.battle-stage::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  pointer-events: none;
}

.battle-stage::before {
  background:
    radial-gradient(ellipse at 46% 50%, rgba(255, 90, 56, .42), transparent 35%),
    radial-gradient(ellipse at 54% 50%, rgba(75, 113, 255, .44), transparent 38%),
    linear-gradient(100deg, #17080f 0%, #110b18 46%, #070b1c 54%, #071126 100%);
}

.battle-stage::after {
  z-index: 1;
  background: linear-gradient(90deg, rgba(230, 22, 32, .08), transparent 46%, transparent 54%, rgba(39, 91, 255, .1));
}

.impact-rays {
  position: absolute;
  z-index: 1;
  inset: -35%;
  pointer-events: none;
  opacity: .56;
  background: repeating-conic-gradient(from 1deg at 50% 50%, rgba(255, 135, 105, .2) 0deg .42deg, transparent .42deg 5.6deg, rgba(115, 170, 255, .2) 5.6deg 6.02deg, transparent 6.02deg 11.2deg);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, rgba(0,0,0,.76) 40%, transparent 72%);
  mask-image: radial-gradient(ellipse at center, #000 0%, rgba(0,0,0,.76) 40%, transparent 72%);
}

.side {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto auto auto;
  align-content: stretch;
  gap: clamp(14px, 2vh, 22px);
  min-width: 0;
  padding: clamp(28px, 4.5vw, 66px) clamp(24px, 6.4vw, 104px) clamp(34px, 5vw, 68px);
}

.side-all {
  background: linear-gradient(115deg, rgba(255, 33, 40, .13), rgba(255, 33, 40, .025) 68%, transparent);
}

.side-android {
  background: linear-gradient(245deg, rgba(35, 91, 255, .16), rgba(35, 91, 255, .025) 68%, transparent);
}

.side-label {
  display: flex;
  align-items: center;
  gap: 13px;
  color: rgba(255,255,255,.9);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.side-label span:first-child {
  color: rgba(255,255,255,.53);
  font-size: 11px;
  letter-spacing: .08em;
}

.app-mark {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  overflow: visible;
}

.app-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 8px rgba(104,154,255,.3));
}

.app-mark.happ-mark img { filter: drop-shadow(0 0 8px rgba(255,70,87,.38)); }
.app-mark.elbrus-mark img { filter: drop-shadow(0 0 8px rgba(66,149,255,.38)); }

.object-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  margin: 0 -7%;
  perspective: 850px;
}

.object-wrap img {
  position: relative;
  z-index: 1;
  display: block;
  width: min(116%, 560px);
  max-height: clamp(250px, 47vh, 500px);
  object-fit: contain;
  mix-blend-mode: screen;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,.25));
  transition: transform .65s cubic-bezier(.2,.8,.2,1), filter .65s ease;
}

.object-network img {
  max-height: clamp(300px, 60vh, 560px);
  filter: drop-shadow(0 0 26px rgba(255,31,42,.24));
}

.object-mountain img {
  filter: brightness(1.2) drop-shadow(0 0 24px rgba(54,100,255,.55));
  animation-delay: -2.2s;
}

.object-wrap:hover img { transform: translateY(-8px) rotate(0) scale(1.1); }

.object-glow {
  position: absolute;
  width: min(82%, 360px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,72,61,.32), rgba(255,72,61,.07) 42%, transparent 72%);
  filter: blur(28px);
}

.object-mountain .object-glow {
  background: radial-gradient(circle, rgba(89,112,255,.58), rgba(89,112,255,.1) 45%, transparent 74%);
}

.side-copy {
  max-width: 420px;
  margin: 0;
  color: #fff;
  font-size: clamp(17px, 1.6vw, 22px);
  font-weight: 600;
  line-height: 1.4;
  text-wrap: balance;
}

.recommendation-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 12px;
  padding: 7px 11px;
  border: 1px solid rgba(132, 170, 255, .42);
  border-radius: 999px;
  background: rgba(42, 91, 205, .23);
  box-shadow: 0 0 24px rgba(53, 116, 255, .12), inset 0 1px rgba(255, 255, 255, .08);
  color: #dce7ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .025em;
  line-height: 1.2;
  vertical-align: middle;
}

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

.platforms a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 45px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 9px;
  background: rgba(7,8,14,.3);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.platforms a:hover {
  border-color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.11);
  transform: translateY(-2px);
}

.platforms a.device-primary { border-color: rgba(255,255,255,.75); background: rgba(255,255,255,.14); box-shadow: 0 0 20px rgba(255,255,255,.12); }

.platforms small {
  color: rgba(255,255,255,.64);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}

.action span { font-size: 19px; }

.action:hover {
  filter: brightness(1.12);
  transform: translateY(-3px);
}

.action-red {
  background: linear-gradient(105deg, #e92d3a, #bf204e);
  box-shadow: 0 12px 30px rgba(216,31,52,.23);
}

.action-blue {
  background: linear-gradient(105deg, #315bdb, #5138bb);
  box-shadow: 0 12px 30px rgba(49,91,219,.23);
}

.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  padding: 0;
  margin: 0;
  color: rgba(255,255,255,.8);
  font-size: 12px;
  list-style: none;
}

.feature-list li::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 8px 1px 0;
  border-radius: 50%;
  content: "";
  background: #8bb1ff;
  box-shadow: 0 0 10px #638eff;
}

.split-flash {
  position: absolute;
  z-index: 4;
  top: -7%;
  bottom: -7%;
  left: calc(50% - 18px);
  width: 36px;
  pointer-events: none;
  background: linear-gradient(180deg, #fff 0%, #ff8b71 15%, #fff 35%, #d5e1ff 57%, #fff 76%, #9bbdff 100%);
  clip-path: polygon(48% 0, 100% 0, 58% 16%, 91% 27%, 41% 44%, 72% 54%, 26% 70%, 63% 81%, 0 100%, 35% 78%, 5% 68%, 52% 50%, 21% 42%, 69% 25%, 38% 17%);
  filter: drop-shadow(0 0 10px #fff) drop-shadow(0 0 28px rgba(95,139,255,.88)) drop-shadow(0 0 30px rgba(255,60,54,.75));
  opacity: .96;
}

footer {
  padding-top: 15px;
  color: rgba(255,255,255,.43);
  font-size: 11px;
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .65s ease var(--reveal-delay, 0ms), transform .65s cubic-bezier(.2,.8,.2,1) var(--reveal-delay, 0ms);
}

.reveal.is-visible { opacity: 1; transform: translateY(0); }

#happ.reveal { transition-delay: 70ms; }
#elbrus.reveal { transition-delay: 140ms; }
footer.reveal { transition-delay: 180ms; }

.mobile-app-switch { display: none; }

@keyframes float-object {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

@keyframes rays-turn { to { transform: rotate(360deg); } }

@media (min-width: 1500px) {
  .battle-stage { border-radius: 4px; }
}

@media (max-width: 900px) {
  .side { padding-inline: clamp(22px, 4vw, 42px); }
  .platforms a { padding-inline: 10px; }
}

@media (max-width: 700px) {
  .arena { padding-top: 10px; }
  .sitebar { min-height: 46px; }
  .battle-stage {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    margin-top: 8px;
  }
  .side {
    grid-template-rows: auto clamp(165px, 28svh, 220px) auto auto auto;
    gap: 14px;
    min-height: 0;
    padding: 20px clamp(20px, 6vw, 38px) 24px;
  }
  .side.mobile-hidden { display: none; }
  .battle-stage:has(.side.mobile-hidden) .split-flash { display: none; }
  .side-all { background: linear-gradient(155deg, rgba(255, 35, 42, .23), rgba(255, 35, 42, .04) 72%); }
  .side-android { background: linear-gradient(205deg, rgba(35, 91, 255, .24), rgba(35, 91, 255, .04) 72%); }
  .object-wrap { margin: -2% -5%; }
  .object-wrap img { width: min(100%, 300px); max-height: 210px; animation: none; }
  .side-copy { max-width: 360px; font-size: 19px; }
  .platforms { gap: 8px; }
  .platforms a { min-height: 46px; }
  .feature-list { gap: 10px 18px; }
  .split-flash {
    top: calc(50% - 13px);
    bottom: auto;
    left: -3%;
    width: 106%;
    height: 27px;
    background: linear-gradient(90deg, #ff756b 0%, #fff 35%, #f8faff 58%, #83aaff 100%);
    clip-path: polygon(0 41%, 19% 49%, 28% 0, 41% 43%, 54% 11%, 67% 46%, 81% 5%, 88% 46%, 100% 36%, 100% 62%, 87% 58%, 79% 100%, 66% 61%, 53% 89%, 40% 58%, 27% 100%, 18% 57%, 0 67%);
    filter: drop-shadow(0 0 8px #fff) drop-shadow(0 0 22px rgba(95,139,255,.9)) drop-shadow(0 0 22px rgba(255,60,54,.8));
  }
  .mobile-app-switch { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; width: min(calc(100% - var(--gutter) * 2), 520px); margin: 10px auto; padding: 5px; border: 1px solid rgba(255,255,255,.15); border-radius: 14px; background: rgba(11,13,24,.88); }
  .mobile-app-switch button { display: grid; grid-template-columns: 34px auto; grid-template-rows: 30px auto; gap: 2px 5px; align-items: center; justify-content: center; min-height: 52px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: rgba(255,255,255,.72); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; transition: background .2s ease, color .2s ease, transform .16s ease; }
  .mobile-app-switch .choice-name { grid-column: 2; grid-row: 1; }
  .mobile-app-switch .app-mark { grid-column: 1; grid-row: 1; width: 28px; height: 28px; }
  .mobile-app-switch button[aria-selected="true"]:first-child { background: linear-gradient(105deg,#e92d3a,#bf204e); color: #fff; }
  .mobile-app-switch button[aria-selected="true"]:last-child { background: linear-gradient(105deg,#315bdb,#5138bb); color: #fff; }
  .mobile-app-switch button:active { transform: scale(.97); }
  .mobile-app-switch small { grid-column: 1 / -1; grid-row: 2; color: rgba(255,255,255,.75); font-size: 10px; font-weight: 600; }
  .side-label { font-size: 10px; }
  .impact-rays { opacity: .22; }
  .object-network img { max-height: 220px; }
  .side-copy { font-size: 17px; }
  .recommendation-badge { margin-top: 8px; }
  .platforms { gap: 7px; }
  .platforms a { min-height: 42px; }
  .action { min-height: 48px; }
  footer { padding-top: 14px; }
}

@media (max-width: 390px) {
  .side { padding-inline: 18px; }
  .platforms a { font-size: 11px; }
  .platforms small { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
