:root {
  color-scheme: dark;
  --bg: #050505;
  --surface: #0d0d0f;
  --surface-hover: #151518;
  --text: #f5f5f7;
  --muted: #8e8e93;
  --line: rgba(255, 255, 255, 0.11);
  --gold: #ffd76a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang HK", "Noto Sans HK", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
}

.hero {
  position: relative;
  min-height: 390px;
  padding:
    max(14px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    42px
    max(24px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 203, 82, 0.05), transparent 34%),
    #050505;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, transparent, #000 50%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 50%, transparent);
}

.hero-glow {
  position: absolute;
  z-index: -1;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.09;
  pointer-events: none;
}

.hero-glow-gold {
  left: -130px;
  bottom: -180px;
  background: #ffb400;
}

.hero-glow-red {
  right: -150px;
  bottom: -190px;
  background: #ff453a;
}

.topbar {
  width: min(1120px, 100%);
  min-height: 48px;
  margin: 0 auto 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #171000;
  background: linear-gradient(145deg, #fff1a2, #dfa120);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.7), 0 8px 28px rgba(255, 183, 35, 0.15);
  font-family: Arial, sans-serif;
}

.topbar-label {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #8a8a90;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.13em;
}

.hero-content {
  width: min(1120px, 100%);
  margin: auto;
}

.eyebrow {
  margin: 0 0 17px;
  color: #85858b;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
}

.eyebrow span {
  margin-right: 9px;
  color: #d6d6da;
}

h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(52px, 7vw, 86px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.072em;
}

h1 span {
  display: block;
  color: transparent;
  background: linear-gradient(90deg, #ffffff 0%, #ffd469 53%, #ff675d 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-copy {
  max-width: 650px;
  margin: 20px 0 0;
  color: #9a9aa0;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.015em;
}

.tools {
  padding:
    30px
    max(24px, env(safe-area-inset-right))
    34px
    max(24px, env(safe-area-inset-left));
  background: #080809;
}

.tools-header {
  width: min(1120px, 100%);
  margin: 0 auto 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.tools-header p {
  margin: 0 0 5px;
  color: #6e6e73;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
}

.tools-header h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
  letter-spacing: -0.052em;
}

.tools-header > span {
  color: #626267;
  font-size: 11px;
}

.feed-grid {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.feed-card {
  --accent: #fff;
  position: relative;
  min-width: 0;
  min-height: 118px;
  padding: 14px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 85% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 35%),
    var(--surface);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
  -webkit-user-select: none;
  user-select: none;
}

.feed-card::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
  opacity: 0.8;
}

.accent-ice { --accent: #e9f5ff; }
.accent-gold { --accent: #ffbf36; }
.accent-violet { --accent: #a386ff; }
.accent-red { --accent: #ff5148; }
.accent-blue { --accent: #409cff; }
.accent-orange { --accent: #ff8145; }
.accent-pink { --accent: #ff64ae; }
.accent-green { --accent: #42d982; }
.accent-cyan { --accent: #39d9e7; }
.accent-lime { --accent: #a8df50; }

.feed-number {
  align-self: start;
  padding-top: 3px;
  color: var(--accent);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 10px;
  font-weight: 650;
}

.feed-main,
.feed-title {
  min-width: 0;
  display: block;
}

.feed-title {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.feed-title strong {
  min-width: 0;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-title em {
  flex: 0 0 auto;
  color: #a5a5ab;
  font-size: 11px;
  font-weight: 540;
  font-style: normal;
}

.feed-description {
  margin-top: 5px;
  display: block;
  overflow: hidden;
  color: #d0d0d5;
  font-size: 14px;
  font-weight: 560;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-url {
  margin-top: 7px;
  display: block;
  overflow: hidden;
  color: color-mix(in srgb, var(--accent) 86%, #d2d2d7);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 10.5px;
  font-weight: 620;
  line-height: 1.1;
  letter-spacing: 0.005em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.open-link {
  width: 54px;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.055);
}

.open-link small {
  color: #9a9aa0;
  font-size: 8px;
}

.open-link b {
  margin-top: 1px;
  color: #f5f5f7;
  font-size: 18px;
  font-weight: 450;
}

.feed-card:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

footer {
  min-height: 64px;
  padding:
    12px
    max(24px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #5d5d62;
  background: #050505;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.07em;
}

footer .brand-mark {
  width: 24px;
  height: 24px;
  font-size: 11px;
}

body.is-verifying {
  overflow: hidden;
}

.verify-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  min-height: 100vh;
  min-height: 100dvh;
  padding:
    max(22px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(22px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  display: grid;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.76);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.verify-overlay.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.verify-panel {
  position: relative;
  width: min(100%, 340px);
  overflow: hidden;
  padding: 38px 26px 24px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 24px;
  color: var(--text);
  text-align: center;
  background: #111113;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.56),
    inset 0 1px rgba(255, 255, 255, 0.05);
  transform: translateY(10px) scale(0.985);
  transition: transform 0.22s ease;
}

.verify-overlay.is-open .verify-panel {
  transform: translateY(0) scale(1);
}

.verify-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #8e8e93;
  background: transparent;
  font: 300 23px/1 -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  cursor: pointer;
}

.verify-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 20px;
  display: block;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: #f5f5f7;
  border-right-color: var(--gold);
  border-radius: 50%;
  animation: verify-spin 0.8s linear infinite;
  transition: opacity 0.18s ease;
}

.verify-overlay.is-ready .verify-spinner {
  opacity: 0;
  animation-play-state: paused;
}

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

.verify-panel h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.verify-copy {
  min-height: 22px;
  margin: 10px 0 24px;
  color: #a4a4aa;
  font-size: 13px;
  line-height: 1.6;
}

.verify-copy strong {
  display: inline-block;
  min-width: 1ch;
  color: #ffffff;
  font-size: 15px;
}

.verify-confirm {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 15px;
  color: #15120a;
  background: linear-gradient(135deg, #ffe8a0, var(--gold));
  box-shadow: 0 10px 28px rgba(255, 215, 106, 0.12);
  font: 700 14px/1 -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang HK", sans-serif;
  cursor: pointer;
}

.verify-confirm:disabled {
  color: #77777d;
  background: #252528;
  box-shadow: none;
  cursor: wait;
}

.verify-close:focus-visible,
.verify-confirm:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .feed-card:hover {
    z-index: 2;
    border-color: color-mix(in srgb, var(--accent) 45%, rgba(255, 255, 255, 0.15));
    background:
      radial-gradient(circle at 85% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 38%),
      var(--surface-hover);
    transform: translateY(-2px);
  }

  .feed-card:hover .open-link {
    color: #050505;
    background: var(--accent);
    border-color: var(--accent);
  }

  .feed-card:hover .open-link small,
  .feed-card:hover .open-link b {
    color: #050505;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 280px;
    padding:
      max(10px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      20px
      max(14px, env(safe-area-inset-left));
  }

  .topbar {
    min-height: 42px;
    margin-bottom: 18px;
  }

  .eyebrow {
    margin-bottom: 12px;
    font-size: 8px;
  }

  h1 {
    max-width: 360px;
    font-size: clamp(39px, 11.6vw, 51px);
    line-height: 0.97;
  }

  .hero-copy {
    max-width: 355px;
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.42;
  }

  .tools {
    padding:
      14px
      max(10px, env(safe-area-inset-right))
      16px
      max(10px, env(safe-area-inset-left));
  }

  .tools-header {
    margin-bottom: 10px;
  }

  .tools-header h2 {
    font-size: 27px;
  }

  .tools-header > span {
    display: none;
  }

  .feed-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .feed-card {
    min-height: 82px;
    padding: 8px 9px 8px 12px;
    grid-template-columns: 23px minmax(0, 1fr) 44px;
    gap: 9px;
    border-radius: 16px;
  }

  .feed-card::before {
    top: 12px;
    bottom: 12px;
  }

  .feed-number {
    font-size: 8px;
  }

  .feed-title {
    gap: 7px;
  }

  .feed-title strong {
    font-size: 15px;
  }

  .feed-title em {
    font-size: 9px;
  }

  .feed-description {
    margin-top: 3px;
    font-size: 11.5px;
  }

  .feed-url {
    margin-top: 5px;
    font-size: 9px;
  }

  .open-link {
    width: 44px;
    min-height: 44px;
    border-radius: 12px;
  }

  .open-link small {
    display: none;
  }

  .open-link b {
    margin: 0;
    font-size: 17px;
  }

  footer {
    min-height: 48px;
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
}

@supports (-webkit-touch-callout: none) {
  .hero,
  .tools,
  footer {
    -webkit-transform: translateZ(0);
  }

  .feed-card {
    -webkit-backface-visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
