/* WindCloud — GitHub Pages */
:root {
  --bg: #060b14;
  --bg-elevated: rgba(15, 23, 42, 0.72);
  --border: rgba(148, 163, 184, 0.12);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --sky: #38bdf8;
  --indigo: #6366f1;
  --violet: #8b5cf6;
  --glow: rgba(56, 189, 248, 0.35);
  --radius: 16px;
  --radius-lg: 24px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: "Outfit", var(--font);
  --max: 1120px;
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

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

.container {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

/* Background */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 20% -10%, rgba(56, 189, 248, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 20%, rgba(99, 102, 241, 0.14), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(139, 92, 246, 0.1), transparent 55%),
    var(--bg);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black, transparent);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 18s ease-in-out infinite;
}

.orb-1 {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -80px;
  background: rgba(56, 189, 248, 0.22);
}

.orb-2 {
  width: 360px;
  height: 360px;
  top: 30%;
  right: -100px;
  background: rgba(99, 102, 241, 0.18);
  animation-delay: -6s;
}

.orb-3 {
  width: 280px;
  height: 280px;
  bottom: 10%;
  left: 35%;
  background: rgba(139, 92, 246, 0.12);
  animation-delay: -12s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(24px, -18px) scale(1.04); }
  66% { transform: translate(-16px, 12px) scale(0.98); }
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}

.nav.scrolled {
  background: rgba(6, 11, 20, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.brand img { width: 36px; height: 36px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--sky), var(--indigo));
  color: #fff;
  box-shadow: 0 8px 32px var(--glow);
}

.btn-primary:hover {
  box-shadow: 0 12px 40px rgba(56, 189, 248, 0.45);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(148, 163, 184, 0.25);
}

.btn-sm { padding: 8px 16px; font-size: 0.8125rem; }

.btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 48px) 0 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: start;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--sky);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 12px var(--sky);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero h1 .gradient {
  background: linear-gradient(135deg, #fff 20%, var(--sky) 60%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff, var(--sky));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 32px 48px;
}

.glass-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.glass-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.4), transparent 40%, rgba(99, 102, 241, 0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.card-title {
  font-weight: 600;
  font-size: 0.9375rem;
}

.status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #4ade80;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
}

.node-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  margin: 0 -2px 0 0;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.05);
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.35) transparent;
}

.node-list::-webkit-scrollbar { width: 4px; }

.node-list::-webkit-scrollbar-track {
  background: transparent;
}

.node-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.35);
}

.node-list::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.55);
}

.node-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s, background 0.2s;
}

.node-item.active {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.06);
}

.node-flag {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 1.125rem;
  background: rgba(255, 255, 255, 0.06);
}

.node-info { flex: 1; min-width: 0; }

.node-name {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.node-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.node-ping {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #4ade80;
}

.speed-bar {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.speed-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.speed-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.speed-fill {
  height: 100%;
  width: 30%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sky), var(--indigo));
  transition: width 1.2s ease;
}

.floating-chip {
  position: absolute;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  animation: chipFloat 6s ease-in-out infinite;
}

.chip-1 { top: -8px; right: -72px; animation-delay: 0s; }
.chip-2 { bottom: 16px; left: -80px; animation-delay: -3s; }

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

/* Sections */
section { padding: 96px 0; }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-desc {
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 48px;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.15));
  color: var(--sky);
}

.feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Platforms */
.platforms {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.platform-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
}

.platform-item:hover {
  background: rgba(56, 189, 248, 0.06);
  border-color: rgba(56, 189, 248, 0.2);
}

.platform-icon {
  width: 40px;
  height: 40px;
  color: var(--text-muted);
}

.platform-item span {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}

/* Referral */
.referral-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(99, 102, 241, 0.08)),
    var(--bg-elevated);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.referral-highlight {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--sky), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 16px 0;
}

.referral-perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.referral-perks li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.referral-perks svg {
  width: 20px;
  height: 20px;
  color: #4ade80;
  flex-shrink: 0;
  margin-top: 2px;
}

.invite-panel {
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
}

.invite-panel label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.invite-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.invite-row:last-child { margin-bottom: 0; }

.invite-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.875rem;
  outline: none;
}

.invite-input:focus {
  border-color: rgba(56, 189, 248, 0.4);
}

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  padding: 12px 24px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(74, 222, 128, 0.4);
  color: #4ade80;
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s;
  z-index: 200;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Domains */
.domain-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
}

.domain-pills-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 4px;
}

.domain-pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--sky);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  transition: background 0.2s, border-color 0.2s;
}

.domain-pill:hover {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.35);
}

.domain-pill-primary {
  color: #fff;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(99, 102, 241, 0.35));
  border-color: rgba(56, 189, 248, 0.45);
}

.domain-pill-primary:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.45), rgba(99, 102, 241, 0.45));
}

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

.domain-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}

.domain-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-2px);
}

.domain-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.domain-host {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.domain-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--sky);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.domain-badge-alt {
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.2);
}

.domain-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex: 1;
}

.link-domains {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-domains a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sky);
}

.link-domains a::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sky);
  flex-shrink: 0;
}

.link-card-static {
  cursor: default;
}

.link-card-static:hover {
  transform: none;
}

.invite-mirrors {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.invite-mirrors a {
  font-size: 0.8125rem;
  font-family: ui-monospace, "Cascadia Code", monospace;
  color: var(--sky);
}

.invite-mirrors a:hover {
  text-decoration: underline;
}

/* Links */
.links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}

.link-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-2px);
}

.link-card h3 {
  font-size: 1rem;
  font-weight: 700;
}

.link-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex: 1;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sky);
}

/* Footer */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text); }

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (min-width: 961px) {
  .hero-visual {
    align-self: start;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .glass-card {
    height: var(--hero-card-max, auto);
    max-height: var(--hero-card-max, none);
    overflow: hidden;
  }
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: -1; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .domains-grid { grid-template-columns: 1fr; }
  .platforms { grid-template-columns: repeat(3, 1fr); }
  .referral-box { grid-template-columns: 1fr; padding: 32px; }
  .links-grid { grid-template-columns: 1fr; }

  .node-list {
    max-height: min(320px, 48vh);
  }
}

@media (max-width: 640px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 16px;
    background: rgba(6, 11, 20, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 14px 16px;
    border-radius: 12px;
  }

  .nav-toggle { display: block; }
  .nav-cta { display: none; }

  .domains-grid { grid-template-columns: 1fr; }
  .domain-pills { margin-bottom: 32px; }
  .platforms { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 24px; }
  .floating-chip { display: none; }
  .invite-row { flex-direction: column; }
}
