@font-face {
  font-family: "Max Sans";
  src: url("assets/fonts/MaxSans-Regular.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Max Sans";
  src: url("assets/fonts/MaxSans-Medium.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 500;
}

@font-face {
  font-family: "Max Sans";
  src: url("assets/fonts/MaxSans-DemiBold.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 600;
}

:root {
  color-scheme: dark;
  --ink: #0d0e12;
  --surface: #17181c;
  --surface-raised: #222329;
  --text: #ffffff;
  --muted: rgba(231, 231, 231, 0.56);
  --muted-strong: rgba(255, 255, 255, 0.76);
  --blue: #1385ff;
  --cyan: #44cfff;
  --violet: #833cf5;
  --orange: #ff7a00;
  --orange-bright: #ff9d00;
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 72px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--ink);
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  color: var(--text);
  background: var(--ink);
  font-family: "Max Sans", "TT Commons", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

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

img,
svg {
  display: block;
}

.page-shell {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 28%, rgba(126, 60, 245, 0.18), transparent 28rem),
    radial-gradient(circle at 0% 64%, rgba(19, 133, 255, 0.16), transparent 25rem),
    linear-gradient(155deg, #111219 0%, #0d0e12 48%, #0d0e12 100%);
}

.page-shell::before {
  position: fixed;
  inset: 68px 0 0;
  z-index: 0;
  content: "";
  color: rgba(83, 103, 205, 0.27);
  background: currentColor;
  -webkit-mask: url("assets/img/space-pattern.svg") repeat;
  mask: url("assets/img/space-pattern.svg") repeat;
  -webkit-mask-size: 280px 280px;
  mask-size: 280px 280px;
  pointer-events: none;
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(68px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 18px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(23, 24, 28, 0.92);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}

.channel-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  gap: 9px;
  border-radius: 12px;
  outline: none;
}

.channel-brand__mark {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 5px 10px rgba(56, 108, 255, 0.22));
}

.channel-brand__name {
  min-width: 0;
  margin-top: -1px;
  overflow: hidden;
  font-size: 23px;
  font-weight: 600;
  line-height: 26px;
  letter-spacing: -0.7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 18px 16px calc(22px + env(safe-area-inset-bottom));
}

.channel-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  transition:
    opacity 0.5s ease,
    transform 0.6s cubic-bezier(0.2, 0.75, 0.2, 1);
}

.is-ready .channel-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.showcase {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: #102899;
  isolation: isolate;
}

.showcase__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
  transform: scale(1.025);
}

.showcase__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(4, 9, 34, 0.03) 32%, rgba(12, 13, 19, 0.86) 100%),
    linear-gradient(90deg, rgba(7, 15, 57, 0.18), transparent 45%, rgba(62, 20, 111, 0.13));
}

.promo-pill {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 8px 22px rgba(6, 10, 31, 0.3);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.promo-pill--discount {
  top: 12px;
  right: 12px;
  flex-direction: column;
  align-items: flex-start;
  min-width: 72px;
  padding: 8px 11px 7px;
  background: linear-gradient(145deg, rgba(255, 114, 0, 0.94), rgba(255, 57, 39, 0.9));
  transform: rotate(2deg);
}

.promo-pill--discount span {
  font-size: 21px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.8px;
}

.promo-pill small {
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
}

.channel-card__body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 22px 22px;
}

.avatar-wrap {
  position: relative;
  z-index: 3;
  width: 92px;
  height: 92px;
  margin-top: -46px;
  padding: 3px;
  border-radius: 27px;
  background: linear-gradient(140deg, #1fc5ff, #4d4aff 48%, #c341ff);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.38),
    0 0 0 5px var(--surface);
}

.channel-avatar {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  object-fit: cover;
}

.channel-meta {
  margin-top: 13px;
  text-align: center;
}

.channel-meta__type {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border: 1px solid rgba(63, 155, 255, 0.18);
  border-radius: 999px;
  color: #8fbdff;
  background: rgba(27, 128, 255, 0.08);
  font-size: 11px;
  font-weight: 500;
}

h1 {
  max-width: 290px;
  margin: 9px auto 0;
  font-size: clamp(24px, 7vw, 28px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.75px;
  text-wrap: balance;
}

.handle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.channel-description {
  max-width: 320px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
}

.benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.benefit {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  padding: 2px 8px 2px 2px;
}

.benefit + .benefit {
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.benefit__icon {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: #8ec5ff;
  background: linear-gradient(145deg, rgba(17, 132, 255, 0.22), rgba(116, 58, 245, 0.2));
}

.benefit__icon--orange {
  color: #ffae3c;
  background: rgba(255, 122, 0, 0.12);
}

.benefit__icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.benefit > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.benefit strong,
.benefit small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.benefit strong {
  color: rgba(255, 255, 255, 0.94);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}

.benefit small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
}

.cta {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr 24px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  margin-top: 16px;
  padding: 4px 14px 4px 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  color: white;
  background:
    radial-gradient(136% 141% at 100% 100%, #a424d4 0%, #7040fa 25%, #0879f8 75%, #4e9def 100%);
  box-shadow:
    0 13px 30px rgba(39, 91, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-size: 16px;
  font-weight: 600;
  outline: none;
  transition:
    transform 0.2s ease,
    filter 0.2s ease,
    box-shadow 0.2s ease;
}

.cta::before {
  position: absolute;
  inset: -30% auto -30% -40%;
  width: 35%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-18deg);
  animation: button-shimmer 4.8s 1.8s ease-in-out infinite;
  pointer-events: none;
}

.cta > img {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  filter: drop-shadow(0 5px 8px rgba(8, 20, 98, 0.28));
}

.cta > span {
  text-align: center;
}

.cta__arrow {
  justify-self: end;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  opacity: 0.76;
}

.cta:hover {
  filter: saturate(1.08) brightness(1.06);
}

.cta:active {
  transform: scale(0.982);
}

.cta:focus-visible,
.channel-brand:focus-visible {
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px #62a7ff;
}

.safe-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 11px 0 0;
  color: rgba(231, 231, 231, 0.48);
  font-size: 10.5px;
  line-height: 1.25;
  text-align: center;
}

.safe-note svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: #58d08b;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

.app-note {
  max-width: 320px;
  margin: 14px auto 0;
  color: rgba(231, 231, 231, 0.45);
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
}

@keyframes button-shimmer {
  0%,
  73% {
    left: -40%;
  }
  100% {
    left: 130%;
  }
}

@media (max-width: 360px) {
  .main {
    padding-right: 10px;
    padding-left: 10px;
  }

  .channel-card {
    border-radius: 26px;
  }

  .channel-card__body {
    padding-right: 16px;
    padding-left: 16px;
  }

  .benefit {
    gap: 6px;
  }

  .benefit__icon {
    width: 31px;
    height: 31px;
  }

}

@media (min-width: 700px) {
  .main {
    display: flex;
    min-height: calc(100svh - 68px - env(safe-area-inset-top));
    flex-direction: column;
    justify-content: center;
    padding-top: 26px;
    padding-bottom: 34px;
  }

  .channel-card {
    border-radius: 34px;
  }
}

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