
:root {
  --bg: #100926;
  --bg-2: #180f39;
  --surface: #1c1347;
  --surface-2: #241a56;
  --gold: #f6c945;
  --gold-2: #ffe08a;
  --gold-deep: #d0912a;
  --violet: #8b6dff;
  --violet-2: #b49bff;
  --cyan: #3fd0ea;
  --ink: #140b30;
  --paper: #f3f0ff;
  --muted: #b3a7dd;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(246, 201, 69, 0.35);
  --danger: #ff8f8f;
  --font-en: "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--paper);
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
  font-variant-emoji: text;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 600px at 82% -8%, rgba(139, 109, 255, 0.28), transparent 60%),
    radial-gradient(900px 520px at 8% 4%, rgba(246, 201, 69, 0.12), transparent 55%),
    radial-gradient(1000px 700px at 50% 108%, rgba(63, 208, 234, 0.12), transparent 60%),
    linear-gradient(180deg, #130b2e 0%, #0d0722 100%);
  background-attachment: fixed;
}

button,
input {
  font: inherit;
}

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

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

b {
  font-weight: inherit;
}

.shell {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

/* ---------- Nav ---------- */
.nav {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brandMark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 4px 16px rgba(246, 201, 69, 0.4));
}

.brandName {
  font: 800 23px/1 var(--font-en);
  letter-spacing: -0.5px;
  color: var(--paper);
}

.brandName b {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

.navLink {
  font-size: 14px;
  font-weight: 700;
  padding-bottom: 5px;
  color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
  transition: color 180ms ease;
}

.navLink:hover {
  color: var(--gold);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(440px, 0.95fr);
  gap: clamp(56px, 8vw, 108px);
  align-items: center;
  padding-block: 76px 84px;
}

.heroCopy {
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-2);
  background: rgba(246, 201, 69, 0.07);
  position: relative;
  z-index: 1;
}

.liveDot {
  width: 8px;
  height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(63, 208, 234, 0.18), 0 0 10px var(--cyan);
}

h1 {
  margin: 24px 0 22px;
  max-width: 650px;
  font-size: clamp(54px, 6.2vw, 86px);
  line-height: 1;
  letter-spacing: -3px;
  font-weight: 900;
  color: #fff;
}

h1 span {
  display: block;
  width: max-content;
  max-width: 100%;
  margin-top: 12px;
  padding: 2px 16px 12px;
  border-radius: 16px;
  background: linear-gradient(120deg, var(--violet), var(--gold));
  box-shadow: 0 14px 40px rgba(139, 109, 255, 0.4);
  -webkit-background-clip: border-box;
}

.heroLead {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

/* ---------- Download card ---------- */
.downloadCard {
  position: relative;
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  color: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  padding: 30px;
  box-shadow:
    0 30px 70px rgba(8, 4, 24, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.downloadCard::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 28px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(246, 201, 69, 0.6), transparent 40%, rgba(139, 109, 255, 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.modeTabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 24px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
}

.modeTabs button {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.modeTabs button.active {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(246, 201, 69, 0.35);
}

.cardTopline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
}

.stepLabel {
  color: var(--gold);
  direction: ltr;
  font-variant-numeric: tabular-nums;
}

.urlField {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 7px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 15px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.urlField:focus-within,
.urlField.valid {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(246, 201, 69, 0.16);
}

.urlField.invalid {
  border-color: #e06a61;
}

.urlField input {
  min-width: 0;
  height: 55px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--paper);
  padding: 0 13px;
  text-align: left;
  font-size: 14px;
}

.urlField input::placeholder {
  color: #7d729f;
}

.usernameField {
  grid-template-columns: auto 1fr;
}

.usernameField input {
  padding-inline-start: 0;
}

.atSign {
  align-self: center;
  padding-inline-start: 13px;
  color: var(--gold);
  direction: ltr;
  font: 800 18px/1 var(--font-en);
}

.pasteButton {
  align-self: stretch;
  min-width: 72px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--paper);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: background 180ms ease, color 180ms ease;
}

.pasteButton:hover {
  background: var(--gold);
  color: var(--ink);
}

.fieldMeta {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 11px;
  padding-inline: 4px;
}

.validNote {
  color: var(--gold);
  white-space: nowrap;
}

.submitButton {
  width: 100%;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 15px;
  padding: 0 22px;
  background: linear-gradient(120deg, var(--gold-2), var(--gold) 55%, var(--gold-deep));
  color: var(--ink);
  cursor: pointer;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(246, 201, 69, 0.3);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.submitButton:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(246, 201, 69, 0.45);
  filter: brightness(1.04);
}

.submitButton:disabled {
  cursor: wait;
  opacity: 0.72;
}

.buttonArrow {
  font: 700 27px/1 var(--font-en);
}

.loader {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(20, 11, 48, 0.28);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.privacyLine {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.lockIcon {
  width: 11px;
  height: 9px;
  display: inline-block;
  border: 1px solid currentColor;
  border-radius: 2px;
  position: relative;
}

.lockIcon::before {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border: 1px solid currentColor;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  top: -6px;
  left: 1px;
}

/* ---------- Messages / result ---------- */
.message {
  margin-top: 18px;
  padding: 13px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.message > span {
  flex: 0 0 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-weight: 900;
}

.message p {
  margin: 0;
}

.errorMessage {
  background: rgba(224, 106, 97, 0.12);
  color: var(--danger);
  border: 1px solid rgba(224, 106, 97, 0.32);
}

.result {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.resultHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.resultKicker {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.result h2 {
  margin: 5px 0 0;
  font-size: 16px;
  line-height: 1.5;
}

.readyCheck {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--ink);
  font-weight: 900;
}

.videoPreview {
  display: block;
  width: 100%;
  max-height: 380px;
  border-radius: 14px;
  background: #000;
  border: 1px solid var(--line);
}

.downloadButton {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--paper);
  font-size: 14px;
  font-weight: 900;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.downloadButton:hover {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--ink);
  border-color: var(--gold);
}

.saveHint {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 10px;
}

/* ---------- Stories ---------- */
.storiesSection {
  scroll-margin-top: 28px;
  margin-bottom: 96px;
  padding: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  box-shadow: 0 30px 70px rgba(8, 4, 24, 0.5);
}

.profileHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.profileIdentity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 17px;
}

.profileAvatar {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  object-fit: cover;
  border: 2px solid var(--gold);
  border-radius: 22px;
  background: var(--bg-2);
}

.fallbackAvatar {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--ink);
  font-size: 27px;
  font-weight: 900;
}

.resultsLabel {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.profileIdentity h2 {
  margin: 4px 0 2px;
  overflow: hidden;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profileUsername {
  width: max-content;
  margin: 0;
  color: var(--violet-2);
  font: 700 13px/1.4 var(--font-en);
}

.storyCount {
  flex: 0 0 auto;
  display: grid;
  text-align: center;
}

.storyCount strong {
  font: 900 39px/1 var(--font-en);
  color: var(--gold);
}

.storyCount span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.profileBio {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-line;
}

.storyGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.storyCard {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.28);
  transition: border-color 180ms ease, transform 180ms ease;
}

.storyCard:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
}

.storyMedia {
  position: relative;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  background: #090a08;
}

.storyMedia video,
.storyMedia img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.storyIndex,
.storyType {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 7px 9px;
  border-radius: 999px;
  color: white;
  background: rgba(10, 6, 26, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  font-size: 9px;
  font-weight: 900;
}

.storyIndex {
  right: 12px;
  direction: ltr;
  color: var(--gold);
  font-family: var(--font-en);
}

.storyType {
  left: 12px;
}

.storyDownload {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  color: var(--paper);
  font-size: 13px;
  font-weight: 900;
  transition: background 180ms ease, color 180ms ease;
}

.storyDownload:hover {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--ink);
}

.storyDownload span:last-child {
  font: 900 20px/1 var(--font-en);
}

.emptyStories {
  display: grid;
  justify-items: center;
  padding: 70px 20px 44px;
  text-align: center;
}

.emptyStories > span {
  font-size: 42px;
  color: var(--violet-2);
}

.emptyStories h3 {
  margin: 16px 0 7px;
}

.emptyStories p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- How ---------- */
.how {
  border-top: 1px solid var(--line);
  padding-block: 82px 94px;
}

.sectionHeading {
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: end;
  gap: 40px;
  margin-bottom: 42px;
}

.sectionHeading p {
  margin: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

.sectionHeading h2 {
  margin: 0;
  font-size: clamp(35px, 4vw, 55px);
  letter-spacing: -2px;
  line-height: 1.1;
  color: #fff;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-strong);
}

.steps li {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 24px 24px;
  border-inline-start: 1px solid var(--line);
}

.steps li:last-child {
  border-inline-start: 0;
}

.stepNumber {
  color: var(--gold);
  direction: ltr;
  font: 800 12px/1 var(--font-en);
}

.steps h3 {
  margin: 0 0 8px;
  font-size: 21px;
  color: #fff;
}

.steps p {
  margin: 0;
  max-width: 260px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

/* ---------- Footer ---------- */
.footer {
  min-height: 160px;
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  align-items: center;
  gap: 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.footerBrand {
  color: #fff;
  font: 800 24px/1 var(--font-en);
  letter-spacing: -0.5px;
}

.footerBrand b {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer p {
  max-width: 590px;
  margin: 0;
  line-height: 1.8;
}

/* ---------- Follow CTA + footer links ---------- */
.followCta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px 0 0;
  padding: 13px 16px;
  border-radius: 13px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(120deg, rgba(246, 201, 69, 0.14), rgba(139, 109, 255, 0.16));
  color: var(--paper);
  font-size: 14px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.followCta:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 12px 30px rgba(246, 201, 69, 0.22);
}

.followCta b {
  color: var(--gold);
  direction: ltr;
  display: inline-block;
}

.followGhost {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: var(--gold);
  filter: drop-shadow(0 2px 6px rgba(246, 201, 69, 0.4));
}

.followArrow {
  color: var(--gold);
  font: 800 15px/1 var(--font-en);
}

/* Compact follow CTA inside each story card (above its save button). */
.storyCard .followCta {
  margin: 8px 8px 0;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 11.5px;
  gap: 7px;
}

.storyCard .followCta .followGhost {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

.storyCard .followCta .followArrow {
  font-size: 13px;
}

.footerLinks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footerLink {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  color: var(--paper);
  font-size: 12.5px;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.footerLink svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.footerLink.tg svg { fill: #34aadf; }
.footerLink.snap svg { fill: var(--gold); }

.footerLink:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.05);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 46px;
    padding-block: 62px 90px;
  }

  .heroCopy {
    max-width: 690px;
  }

  .downloadCard {
    width: min(100%, 610px);
    justify-self: center;
  }

  .storyGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sectionHeading {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .footer {
    grid-template-columns: 1fr 2fr;
    padding-block: 34px;
  }

  .footer > span {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 28px, 1180px);
  }

  .nav {
    height: 74px;
  }

  .navLink {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-block: 48px 76px;
  }

  h1 {
    margin-top: 20px;
    font-size: clamp(46px, 14.8vw, 67px);
    letter-spacing: -2px;
  }

  .heroLead {
    font-size: 15px;
  }

  .downloadCard {
    padding: 20px;
    border-radius: 22px;
  }

  .urlField {
    grid-template-columns: 1fr 62px;
  }

  .usernameField {
    grid-template-columns: auto 1fr;
  }

  .pasteButton {
    min-width: 0;
  }

  .fieldMeta {
    font-size: 10px;
  }

  .storiesSection {
    margin-bottom: 66px;
    padding: 20px;
    border-radius: 22px;
  }

  .profileHeader {
    align-items: flex-start;
  }

  .profileAvatar {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
    border-radius: 18px;
  }

  .storyGrid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .storyCard {
    width: min(100%, 390px);
    justify-self: center;
  }

  .how {
    padding-block: 64px;
  }

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

  .steps li {
    min-height: 148px;
    border-inline-start: 0;
    border-top: 1px solid var(--line);
  }

  .steps li:first-child {
    border-top: 0;
  }

  .footer {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .footer > span {
    grid-column: auto;
  }
}

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