/* === 全局 === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-hover: rgba(255, 255, 255, 0.10);
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --accent: #58a6ff;
  --accent2: #7c3aed;
  --accent3: #f97316;
  --green: #3fb950;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, #0c0f1d 0%, #111827 30%, #0f1424 60%, #0d1117 100%);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* === 背景装饰光球 === */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

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

.orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent2), transparent);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent), transparent);
  bottom: -150px;
  left: -150px;
  animation-delay: -7s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent3), transparent);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(-40px, -30px) scale(1.02); }
}

/* === 容器 === */
.container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === 玻璃卡片 === */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: var(--glass-hover);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* === 导航 === */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  margin-bottom: 2rem;
}

.nav-brand {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

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

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

/* === Hero === */
.hero {
  text-align: center;
  padding: 3rem 0 5rem;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: rgba(88, 166, 255, 0.12);
  border: 1px solid rgba(88, 166, 255, 0.25);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 50%, var(--accent3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 2.5rem;
}

/* === 链接生成卡片 === */
.link-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem;
}

.input-group {
  display: flex;
  gap: 0.75rem;
}

.input-group input {
  flex: 1;
  padding: 0.9rem 1.2rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.input-group input::placeholder {
  color: var(--text-secondary);
}

.input-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

#generateBtn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 1.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

#generateBtn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(88, 166, 255, 0.3);
}

#generateBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-icon {
  font-size: 1.1rem;
}

.link-features {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.25rem;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* === 结果框 === */
.result-box {
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  background: rgba(63, 185, 80, 0.06);
  border: 1px solid rgba(63, 185, 80, 0.2);
  border-radius: 12px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-url {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.result-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.result-url a {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}

.copy-btn {
  padding: 0.25rem 0.75rem;
  background: rgba(63, 185, 80, 0.15);
  border: 1px solid rgba(63, 185, 80, 0.25);
  border-radius: 6px;
  color: var(--green);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: rgba(63, 185, 80, 0.25);
}

.result-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  word-break: break-all;
}

/* === Section 通用 === */
.section-title {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.section-desc {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-size: 1.05rem;
}

/* === 功能特性 === */
.features {
  padding: 3rem 0 5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  padding: 2rem 1.5rem;
  text-align: center;
}

.feature-card .feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* === 安全承诺 === */
.security {
  padding: 2rem 0 5rem;
}

.security-card {
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.security-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(63, 185, 80, 0.08), transparent);
  pointer-events: none;
}

.security-content {
  position: relative;
  z-index: 1;
}

.security-content h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.security-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.security-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.security-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.security-check {
  font-size: 1.2rem;
  color: var(--green);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.security-item strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.security-item p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* === 预览功能展示 === */
.preview-section {
  padding: 2rem 0 5rem;
}

.preview-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.preview-card {
  padding: 1.5rem;
  text-align: center;
  width: 220px;
}

.preview-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.preview-arrow {
  font-size: 1.5rem;
  color: var(--text-secondary);
}

.preview-card code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--accent);
}

/* === 预览示例浏览器框 === */
.preview-example {
  max-width: 680px;
  margin: 0 auto;
  overflow: hidden;
}

.preview-example-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--glass-border);
}

.browser-dots {
  display: flex;
  gap: 0.4rem;
}

.browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.browser-dots span:nth-child(1) { background: #f85149; }
.browser-dots span:nth-child(2) { background: #d29922; }
.browser-dots span:nth-child(3) { background: #3fb950; }

.browser-url {
  flex: 1;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.lock-icon {
  margin-right: 0.3rem;
}

.preview-example-body {
  padding: 2rem;
}

.shield-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 1rem;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 100px;
  font-size: 0.85rem;
  color: #60a5fa;
  margin-bottom: 1.5rem;
}

.preview-target-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.preview-target-url {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  word-break: break-all;
  font-size: 0.9rem;
  color: #f0f6fc;
  margin-bottom: 1rem;
}

.domain-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: rgba(63, 185, 80, 0.15);
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--green);
  margin-right: 0.5rem;
  vertical-align: middle;
}

.preview-safety {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.safety-check {
  font-size: 0.82rem;
  color: var(--green);
}

.preview-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.btn-primary {
  padding: 0.65rem 1.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(88, 166, 255, 0.3);
}

.btn-ghost {
  padding: 0.65rem 1.5rem;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-primary);
}

.preview-tip {
  font-size: 0.8rem;
  color: #d29922;
  padding: 0.75rem;
  background: rgba(210, 153, 34, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(210, 153, 34, 0.15);
}

/* === Footer === */
footer {
  padding: 2rem 0 3rem;
  text-align: center;
}

.footer-card {
  padding: 2rem;
  text-align: center;
}

.footer-brand {
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.footer-slogan {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.footer-copy {
  color: var(--text-secondary);
  font-size: 0.78rem;
  opacity: 0.7;
}

/* === 响应式 === */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .input-group {
    flex-direction: column;
  }

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

  .security-items {
    grid-template-columns: 1fr;
  }

  .preview-demo {
    flex-direction: column;
  }

  .preview-arrow {
    transform: rotate(90deg);
  }

  .preview-actions {
    flex-direction: column;
  }

  .section-title {
    font-size: 1.6rem;
  }
}
