:root {
  color-scheme: dark;
  --bg: #050609;
  --panel: #10131c;
  --panel-strong: #171b27;
  --text: #f8fbff;
  --muted: #a7afc2;
  --line: rgba(255, 255, 255, 0.12);
  --cyan: #15dfff;
  --blue: #2798ff;
  --violet: #8b4dff;
  --pink: #ff3cac;
  --lime: #b8ff43;
  --red: #ff4b5f;
  --radius: 8px;
  --header-height: 76px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
  color: var(--text);
  overflow-x: hidden;
}

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

button,
input {
  font: inherit;
}

.site-shell {
  min-height: 100svh;
  padding-bottom: 88px;
}

.top-bar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 6, 9, 0.82);
  backdrop-filter: blur(18px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-mark img,
.footer img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 22px rgba(21, 223, 255, 0.35);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 520px;
  height: 46px;
  padding: 0 14px;
  justify-self: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.search-icon {
  width: 15px;
  height: 15px;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  position: relative;
  flex: 0 0 auto;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  right: -6px;
  bottom: -3px;
  border-radius: 999px;
  background: var(--cyan);
  transform: rotate(45deg);
}

.search-box input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search-box input::placeholder {
  color: #778196;
}

.quick-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.avatar-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.message-dot {
  width: 18px;
  height: 14px;
  display: block;
  border: 2px solid var(--text);
  border-radius: 5px;
  position: relative;
}

.message-dot::after {
  content: "";
  position: absolute;
  top: -7px;
  right: -8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 14px var(--red);
}

.avatar-button {
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--violet));
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  padding: calc(var(--header-height) + 40px) clamp(20px, 5vw, 80px) 54px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(0, 0, 0, 0.82) 0%, rgba(5, 6, 9, 0.34) 48%, rgba(5, 6, 9, 0.88) 100%),
    url("assets/core-loop-logo.png") center right 8% / min(64vw, 720px) auto no-repeat;
  opacity: 0.34;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.pulse-ring {
  position: absolute;
  width: 54vmin;
  aspect-ratio: 1;
  border: 3px solid rgba(21, 223, 255, 0.28);
  border-radius: 50%;
  animation: ringDrift 9s linear infinite;
}

.ring-one {
  top: 20%;
  right: 8%;
  border-color: rgba(21, 223, 255, 0.34);
}

.ring-two {
  right: -10%;
  bottom: 12%;
  border-color: rgba(255, 60, 172, 0.24);
  animation-duration: 12s;
  animation-direction: reverse;
}

.motion-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--lime), transparent, var(--pink), transparent);
  opacity: 0.45;
  animation: trackSlide 4.5s linear infinite;
}

.hero-copy,
.hero-device,
.section-pad,
.footer {
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 700px;
  animation: revealUp 700ms ease-out both;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  max-width: 760px;
  font-size: clamp(54px, 13vw, 144px);
  line-height: 0.86;
  font-weight: 900;
}

.hero-line {
  max-width: 560px;
  color: #dfe7ff;
  font-size: clamp(18px, 2.3vw, 28px);
  line-height: 1.25;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-action,
.secondary-action,
.text-link,
.friend-row button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.primary-action {
  padding: 0 24px;
  color: #031014;
  background: var(--lime);
  box-shadow: 0 0 28px rgba(184, 255, 67, 0.3);
}

.secondary-action,
.text-link {
  padding: 0 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.primary-action:hover,
.secondary-action:hover,
.text-link:hover,
.friend-row button:hover,
.game-card:hover {
  transform: translateY(-3px);
}

.hero-device {
  width: min(100%, 372px);
  justify-self: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 36px;
  background: linear-gradient(180deg, rgba(20, 24, 36, 0.94), rgba(7, 9, 14, 0.94));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  animation: floatDevice 5s ease-in-out infinite;
}

.device-top,
.mini-banner,
.friend-row,
.reward-pop {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.device-top {
  padding: 8px 8px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.device-top strong {
  color: #050609;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--lime);
}

.device-logo {
  width: 100%;
  aspect-ratio: 1.4;
  object-fit: cover;
  border-radius: 26px;
  filter: saturate(1.12) contrast(1.08);
}

.mini-banner {
  margin: 12px 0;
  min-height: 86px;
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(21, 223, 255, 0.28), rgba(139, 77, 255, 0.34)),
    #121722;
}

.mini-banner span {
  max-width: 112px;
  color: var(--text);
  font-size: 22px;
  line-height: 0.95;
  font-weight: 900;
}

.mini-banner strong {
  color: var(--lime);
  font-size: 12px;
  text-transform: uppercase;
}

.mini-games {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.mini-game {
  aspect-ratio: 0.82;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 45%),
    linear-gradient(160deg, var(--pink), var(--blue));
}

.mini-game:nth-child(2) {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 45%),
    linear-gradient(160deg, var(--lime), var(--blue));
}

.mini-game:nth-child(3) {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 45%),
    linear-gradient(160deg, var(--violet), var(--red));
}

.win-toast {
  position: absolute;
  top: 96px;
  right: -12px;
  padding: 12px 16px;
  border-radius: 999px;
  color: #050609;
  background: var(--lime);
  font-weight: 900;
  box-shadow: 0 0 30px rgba(184, 255, 67, 0.38);
  animation: popWin 2.4s ease-in-out infinite;
}

.section-pad {
  padding: 74px clamp(20px, 5vw, 80px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(32px, 6vw, 72px);
  line-height: 0.95;
  font-weight: 900;
}

.carousel-controls {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.round-control {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  position: relative;
}

.round-control::before {
  content: "";
  position: absolute;
  inset: 15px 13px 15px 17px;
  border-left: 3px solid var(--text);
  border-bottom: 3px solid var(--text);
  transform: rotate(45deg);
}

.round-control.next::before {
  inset: 15px 17px 15px 13px;
  transform: rotate(225deg);
}

.game-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 27vw);
  gap: 16px;
  overflow-x: auto;
  padding: 2px 0 20px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.game-rail::-webkit-scrollbar {
  display: none;
}

.game-card {
  min-height: 340px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  scroll-snap-align: start;
  transition: transform 180ms ease, border-color 180ms ease;
}

.game-card:hover {
  border-color: rgba(21, 223, 255, 0.65);
}

.game-tag {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #031014;
  background: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.game-art {
  height: 210px;
  border-radius: 18px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.game-art::before,
.game-art::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 8px;
  border: 6px solid rgba(255, 255, 255, 0.72);
  transform: rotate(18deg);
}

.game-art::after {
  inset: auto 20% 20% auto;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.45);
}

.neon-runner .game-art {
  background: linear-gradient(145deg, #0a1b3a, #18e0ff 55%, #ff3cac);
}

.pop-blast .game-art {
  background: linear-gradient(145deg, #ff4b5f, #ffe156 55%, #15dfff);
}

.orbit-hop .game-art {
  background: linear-gradient(145deg, #2c0f68, #8b4dff 55%, #b8ff43);
}

.rhythm-duel .game-art {
  background: linear-gradient(145deg, #071013, #15dfff 45%, #ff3cac);
}

.turbo-tiles .game-art {
  background: linear-gradient(145deg, #132100, #b8ff43 48%, #2798ff);
}

.game-card h3 {
  margin-bottom: 6px;
  font-size: 21px;
  line-height: 1;
}

.game-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 700;
}

.social-zone {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 0.7fr);
  gap: clamp(28px, 6vw, 92px);
  align-items: center;
  background: linear-gradient(180deg, transparent, rgba(39, 152, 255, 0.08), transparent);
}

.social-copy p:not(.eyebrow) {
  max-width: 520px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
  font-weight: 700;
}

.chat-stack {
  display: grid;
  gap: 12px;
}

.friend-row,
.bubble,
.reward-pop,
.feature-block {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(16, 19, 28, 0.9);
  backdrop-filter: blur(14px);
}

.friend-row {
  gap: 12px;
  padding: 14px;
}

.friend-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #031014;
  background: var(--cyan);
  font-weight: 900;
}

.friend-row strong,
.reward-pop strong {
  display: block;
  margin-bottom: 4px;
}

.friend-row p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.friend-row button {
  min-height: 38px;
  border: 0;
  padding: 0 15px;
  color: #031014;
  background: var(--lime);
  cursor: pointer;
}

.bubble {
  width: fit-content;
  max-width: min(330px, 90%);
  padding: 14px 16px;
  color: #dbe6ff;
  font-weight: 800;
}

.bubble.outgoing {
  justify-self: end;
  color: #061016;
  background: var(--cyan);
}

.reward-pop {
  padding: 18px;
  border-color: rgba(184, 255, 67, 0.42);
}

.reward-pop span {
  color: var(--lime);
  font-weight: 900;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.feature-block {
  min-height: 246px;
  padding: 22px;
}

.feature-index {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
}

.feature-block h3 {
  margin: 44px 0 10px;
  font-size: 24px;
}

.feature-block p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 700;
}

.footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 34px clamp(20px, 5vw, 80px) 120px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.footer p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.footer a {
  color: var(--cyan);
  font-weight: 900;
}

.bottom-tabs {
  position: fixed;
  z-index: 25;
  left: 50%;
  bottom: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(440px, calc(100% - 28px));
  min-height: 66px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 12, 18, 0.88);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
}

.tab-link {
  display: grid;
  place-items: center;
  gap: 4px;
  min-width: 0;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.tab-link.active {
  color: #031014;
  background: var(--cyan);
}

.tab-icon {
  width: 18px;
  height: 18px;
  position: relative;
}

.play-icon {
  border-left: 14px solid currentColor;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}

.inbox-icon {
  border: 2px solid currentColor;
  border-radius: 5px;
}

.me-icon {
  border: 2px solid currentColor;
  border-radius: 50%;
}

.friends-icon::before,
.friends-icon::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.friends-icon::before {
  left: 1px;
  top: 1px;
}

.friends-icon::after {
  right: 0;
  bottom: 0;
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatDevice {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes popWin {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.08) rotate(2deg);
  }
}

@keyframes ringDrift {
  from {
    transform: rotate(0deg) scale(0.98);
  }
  to {
    transform: rotate(360deg) scale(1.04);
  }
}

@keyframes trackSlide {
  from {
    transform: translateX(-18%);
  }
  to {
    transform: translateX(18%);
  }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 68px;
  }

  .top-bar {
    grid-template-columns: auto 1fr auto;
    gap: 9px;
    padding: 11px 12px;
  }

  .brand-mark span {
    display: none;
  }

  .brand-mark img,
  .footer img {
    width: 38px;
    height: 38px;
  }

  .search-box {
    height: 42px;
    padding: 0 12px;
  }

  .quick-actions {
    gap: 7px;
  }

  .icon-button,
  .avatar-button {
    width: 38px;
    height: 38px;
  }

  .hero {
    align-content: center;
    padding: calc(var(--header-height) + 34px) 18px 54px;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.56), rgba(5, 6, 9, 0.96)),
      url("assets/core-loop-logo.png") center 16% / 118vw auto no-repeat;
    opacity: 0.32;
  }

  h1 {
    font-size: clamp(48px, 18vw, 76px);
  }

  .hero-line {
    font-size: 18px;
  }

  .hero-device {
    width: min(100%, 330px);
  }

  .section-pad {
    padding: 58px 18px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .game-rail {
    grid-auto-columns: minmax(206px, 74vw);
  }

  .social-zone {
    grid-template-columns: 1fr;
  }

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

  .feature-block {
    min-height: 190px;
  }

  .feature-block h3 {
    margin-top: 28px;
  }

  .footer {
    grid-template-columns: auto 1fr;
    padding-bottom: 116px;
  }

  .footer a {
    grid-column: 2;
  }
}

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