:root {
  color-scheme: light;
  --ink: #111820;
  --muted: #66727d;
  --line: rgba(255, 255, 255, 0.68);
  --glass: rgba(255, 255, 255, 0.46);
  --glass-strong: rgba(255, 255, 255, 0.62);
  --blue: #2377ff;
  --mint: #25c7a9;
  --rose: #ff6f91;
  --amber: #ffb84d;
  --shadow: 0 28px 80px rgba(31, 45, 60, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  font-family: "SF Pro Display", "Aptos", "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(rgba(249, 252, 255, 0.52), rgba(237, 248, 245, 0.58)),
    url("./assets/frost-backdrop.png") center / cover fixed,
    linear-gradient(135deg, #f7fbff 0%, #eefaf7 46%, #fff7f6 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-shell {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: 22px;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.wash {
  position: absolute;
  width: 42vw;
  min-width: 340px;
  aspect-ratio: 1.25;
  filter: blur(18px);
  opacity: 0.54;
}

.wash-a {
  top: 4%;
  left: -10%;
  background: linear-gradient(135deg, rgba(35, 119, 255, 0.4), rgba(37, 199, 169, 0.2));
  clip-path: polygon(14% 20%, 90% 8%, 78% 82%, 20% 92%);
}

.wash-b {
  top: 18%;
  right: -12%;
  background: linear-gradient(135deg, rgba(255, 111, 145, 0.38), rgba(255, 184, 77, 0.26));
  clip-path: polygon(20% 8%, 94% 26%, 70% 88%, 8% 74%);
}

.wash-c {
  left: 28%;
  bottom: -18%;
  background: linear-gradient(135deg, rgba(37, 199, 169, 0.34), rgba(35, 119, 255, 0.2));
  clip-path: polygon(22% 8%, 88% 22%, 78% 84%, 12% 92%);
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.36;
  background-image:
    linear-gradient(rgba(17, 24, 32, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 32, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 88%);
}

.topbar,
.glass-panel {
  border: 1px solid var(--line);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(155%);
  -webkit-backdrop-filter: blur(24px) saturate(155%);
}

.topbar {
  position: sticky;
  top: 22px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: 10px;
}

.brand,
.nav-links,
.hero-actions,
.spotlight-head,
.featured-app,
.comment-toolbar,
.auth-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 900;
}

.brand-mark,
.app-icon {
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--mint));
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.nav-links {
  gap: 6px;
  color: var(--muted);
}

.nav-links a,
.icon-button,
.button,
.comment-form button,
.auth-actions button {
  min-height: 42px;
  border-radius: 9px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.nav-links a {
  padding: 10px 12px;
}

.nav-links a:hover,
.icon-button:hover,
.button.ghost:hover {
  background: rgba(255, 255, 255, 0.52);
}

.icon-button,
.button.ghost {
  border: 1px solid rgba(17, 24, 32, 0.1);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.34);
}

.icon-button {
  padding: 0 14px;
  font-weight: 800;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
  gap: 44px;
  align-items: center;
  max-width: 1180px;
  min-height: calc(100vh - 110px);
  margin: 0 auto;
  padding: 62px 0 48px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(3.1rem, 8vw, 7rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
}

.hero-text,
.section-copy p,
.software-card p,
.deploy-band p,
.mini-comments p,
.comment-body,
.meta {
  color: var(--muted);
  line-height: 1.72;
}

.hero-text {
  max-width: 650px;
  font-size: 1.08rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 0;
  font-weight: 900;
}

.button.primary,
.comment-form button,
.auth-actions button:first-child {
  color: white;
  background: linear-gradient(135deg, #111820, var(--blue));
}

.button:hover,
.icon-button:hover,
.comment-form button:hover,
.auth-actions button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(35, 119, 255, 0.18);
}

.spotlight {
  padding: 18px;
  border-radius: 10px;
}

.spotlight-head {
  gap: 8px;
  padding-bottom: 18px;
}

.spotlight-head strong {
  margin-left: auto;
  color: var(--muted);
}

.traffic-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

.red {
  background: var(--rose);
}

.yellow {
  background: var(--amber);
}

.green {
  background: var(--mint);
}

.search-card,
.mini-comments p {
  border: 1px solid rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.38);
}

.search-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 10px;
  color: var(--muted);
}

kbd {
  padding: 4px 8px;
  border-radius: 7px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
}

.featured-app {
  gap: 16px;
  margin: 20px 0;
  padding: 22px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.44);
}

.app-icon {
  width: 66px;
  height: 66px;
  border-radius: 15px;
  font-size: 2rem;
  font-weight: 900;
}

.featured-app h2 {
  margin-bottom: 6px;
  font-size: 1.55rem;
}

.mini-comments {
  display: grid;
  gap: 12px;
}

.mini-comments p {
  margin: 0;
  padding: 14px;
  border-radius: 10px;
}

.software-section,
.comments-section {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 32px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 70px 0;
}

.section-copy {
  position: sticky;
  top: 124px;
}

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

.software-card,
.comment-workspace,
.deploy-band,
.auth-card {
  border-radius: 10px;
}

.software-card {
  padding: 20px;
}

.software-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.software-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  font-weight: 900;
}

.software-card:nth-child(2n) .software-icon {
  background: linear-gradient(135deg, var(--blue), var(--mint));
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag,
.account-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #31505c;
  background: rgba(255, 255, 255, 0.48);
  font-size: 0.82rem;
  font-weight: 800;
}

.comment-workspace {
  padding: 20px;
}

.comment-toolbar {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.comment-toolbar label,
.auth-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid rgba(17, 24, 32, 0.1);
  border-radius: 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  outline: none;
}

select,
input {
  min-height: 46px;
  padding: 0 13px;
}

textarea {
  resize: vertical;
  padding: 13px;
}

select:focus,
input:focus,
textarea:focus {
  border-color: rgba(35, 119, 255, 0.56);
  box-shadow: 0 0 0 4px rgba(35, 119, 255, 0.12);
}

.comment-list {
  display: grid;
  gap: 12px;
  min-height: 120px;
}

.comment-item {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.36);
}

.comment-item strong {
  display: block;
  margin-bottom: 5px;
}

.comment-body {
  margin-bottom: 0;
}

.meta {
  margin-bottom: 8px;
  font-size: 0.84rem;
}

.comment-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.comment-form button {
  min-height: 48px;
  border: 0;
  font-weight: 900;
}

.deploy-band {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 30px;
  align-items: center;
  max-width: 1180px;
  margin: 70px auto;
  padding: 32px;
  border: 1px solid var(--line);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(155%);
}

.auth-dialog {
  width: min(480px, calc(100vw - 28px));
  border: 0;
  padding: 0;
  background: transparent;
}

.auth-dialog::backdrop {
  background: rgba(18, 28, 38, 0.28);
  backdrop-filter: blur(10px);
}

.auth-card {
  position: relative;
  display: grid;
  gap: 15px;
  padding: 26px;
}

.auth-card h2 {
  font-size: 2.1rem;
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
}

.auth-actions {
  gap: 10px;
}

.auth-actions button {
  flex: 1;
  border: 0;
  font-weight: 900;
}

.auth-actions button:last-child {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
}

.auth-message {
  min-height: 26px;
  margin: 0;
  color: var(--blue);
  font-weight: 800;
}

@media (max-width: 900px) {
  .site-shell {
    padding: 14px;
  }

  .topbar {
    top: 14px;
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .hero,
  .software-section,
  .comments-section,
  .deploy-band {
    grid-template-columns: 1fr;
  }

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

  .section-copy {
    position: static;
  }
}

@media (max-width: 620px) {
  h1 {
    font-size: 3rem;
  }

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

  .comment-toolbar {
    display: grid;
  }

  .icon-button {
    width: 100%;
  }
}
