/* ============================================================
   落朵机器人 · 生态官网 样式
   品牌: 兴华科技-落朵机器人
   域名: ld.ap100168.com
   ============================================================ */

:root {
  --xh-primary: #2563eb;
  --xh-primary-dark: #1d4ed8;
  --xh-accent: #7c3aed;
  --xh-success: #16a34a;
  --xh-warning: #ea580c;
  --xh-bg: #f8fafc;
  --xh-card: #ffffff;
  --xh-text: #1e293b;
  --xh-text-light: #64748b;
  --xh-border: #e2e8f0;
  --xh-radius: 12px;
  --xh-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --xh-shadow-lg: 0 10px 25px rgba(0,0,0,.08);
  --xh-nav-h: 64px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--xh-bg);
  color: var(--xh-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ===== Nav ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--xh-nav-h); background: rgba(255,255,255,.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--xh-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; color: var(--xh-text); text-decoration: none; }
.nav-logo .logo-icon { width: 36px; height: 36px; background: linear-gradient(135deg, var(--xh-primary), var(--xh-accent)); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: white; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--xh-text-light); text-decoration: none; transition: all .15s; }
.nav-links a:hover { background: var(--xh-bg); color: var(--xh-primary); }
.nav-cta { padding: 8px 20px; background: linear-gradient(135deg, var(--xh-primary), var(--xh-accent)); color: white; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; transition: all .2s; }
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.3); }

/* ===== Hero ===== */
.hero {
  padding: 140px 40px 80px;
  text-align: center;
  background: linear-gradient(180deg, #eff6ff 0%, var(--xh-bg) 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -30%; right: -10%; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(37,99,235,.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: ''; position: absolute; bottom: -20%; left: -5%; width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(124,58,237,.06) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-badge {
  display: inline-block; padding: 6px 16px; background: var(--xh-primary);
  color: white; border-radius: 20px; font-size: 12px; font-weight: 600;
  letter-spacing: 1px; margin-bottom: 20px; position: relative; z-index: 1;
}
.hero h1 { font-size: 52px; font-weight: 900; letter-spacing: -1px; margin-bottom: 16px; position: relative; z-index: 1; line-height: 1.2; }
.hero h1 .gradient { background: linear-gradient(135deg, var(--xh-primary), var(--xh-accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 18px; color: var(--xh-text-light); max-width: 640px; margin: 0 auto 32px; position: relative; z-index: 1; }
.hero-actions { display: flex; gap: 12px; justify-content: center; position: relative; z-index: 1; flex-wrap: wrap; }
.btn { padding: 12px 28px; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all .2s; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; border: none; }
.btn-primary { background: linear-gradient(135deg, var(--xh-primary), var(--xh-accent)); color: white; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,99,235,.3); }
.btn-outline { background: white; border: 1.5px solid var(--xh-border); color: var(--xh-text); }
.btn-outline:hover { border-color: var(--xh-primary); color: var(--xh-primary); }
.btn-lg { padding: 14px 36px; font-size: 16px; }

/* ===== Stats ===== */
.stats-bar {
  display: flex; justify-content: center; gap: 60px; padding: 40px;
  max-width: 800px; margin: -30px auto 40px; position: relative; z-index: 2;
  background: white; border-radius: var(--xh-radius); box-shadow: var(--xh-shadow-lg);
}
.stat-item { text-align: center; }
.stat-item .num { font-size: 32px; font-weight: 800; color: var(--xh-primary); }
.stat-item .label { font-size: 13px; color: var(--xh-text-light); margin-top: 4px; }

/* ===== Section ===== */
.section { padding: 80px 40px; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 32px; font-weight: 800; margin-bottom: 12px; }
.section-header p { font-size: 16px; color: var(--xh-text-light); max-width: 560px; margin: 0 auto; }
.section-label { font-size: 12px; font-weight: 700; color: var(--xh-primary); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 8px; }

/* ===== Features ===== */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.feature-card {
  background: var(--xh-card); border-radius: var(--xh-radius);
  padding: 28px; box-shadow: var(--xh-shadow); transition: all .2s;
  border: 1px solid var(--xh-border);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--xh-shadow-lg); border-color: var(--xh-primary); }
.feature-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 16px; }
.feature-icon.blue { background: #dbeafe; color: #2563eb; }
.feature-icon.purple { background: #ede9fe; color: #7c3aed; }
.feature-icon.green { background: #dcfce7; color: #16a34a; }
.feature-icon.amber { background: #fef3c7; color: #d97706; }
.feature-icon.rose { background: #ffe4e6; color: #e11d48; }
.feature-icon.cyan { background: #cffafe; color: #0891b2; }
.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--xh-text-light); line-height: 1.6; }

/* ===== Pricing ===== */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.pricing-card {
  background: var(--xh-card); border-radius: var(--xh-radius);
  padding: 32px 24px; text-align: center; box-shadow: var(--xh-shadow);
  border: 2px solid var(--xh-border); transition: all .2s; position: relative;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--xh-shadow-lg); }
.pricing-card.featured { border-color: var(--xh-primary); box-shadow: 0 0 0 4px rgba(37,99,235,.1); }
.pricing-card.featured::before { content: '推荐'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--xh-primary); color: white; padding: 4px 16px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.pricing-card .plan-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.pricing-card .plan-desc { font-size: 13px; color: var(--xh-text-light); margin-bottom: 20px; }
.pricing-card .price { font-size: 42px; font-weight: 900; color: var(--xh-primary); }
.pricing-card .price span { font-size: 14px; font-weight: 400; color: var(--xh-text-light); }
.pricing-card ul { list-style: none; text-align: left; margin: 20px 0; }
.pricing-card ul li { padding: 8px 0; font-size: 14px; border-bottom: 1px solid var(--xh-border); display: flex; align-items: center; gap: 8px; }
.pricing-card ul li::before { content: '✓'; color: var(--xh-success); font-weight: 700; }

/* ===== DIY Steps ===== */
.steps-list { display: grid; gap: 16px; max-width: 700px; margin: 0 auto; }
.step { display: flex; gap: 20px; align-items: flex-start; padding: 20px; background: var(--xh-card); border-radius: var(--xh-radius); box-shadow: var(--xh-shadow); }
.step-num { width: 44px; height: 44px; background: linear-gradient(135deg, var(--xh-primary), var(--xh-accent)); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex-shrink: 0; }
.step-content h4 { font-size: 16px; margin-bottom: 4px; }
.step-content p { font-size: 13px; color: var(--xh-text-light); }
.step-content code { background: #f1f5f9; padding: 2px 8px; border-radius: 4px; font-size: 12px; color: var(--xh-primary); }

/* ===== Compatible Brands ===== */
.brands-grid { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.brand-tag { padding: 10px 20px; background: var(--xh-card); border: 1px solid var(--xh-border); border-radius: 8px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }

/* ===== CTA ===== */
.cta-section {
  text-align: center; padding: 80px 40px;
  background: linear-gradient(135deg, #1e3a5f, #2563eb, #7c3aed);
  color: white; border-radius: 24px; margin: 0 40px 80px; max-width: 1100px;
  margin-left: auto; margin-right: auto;
}
.cta-section h2 { font-size: 32px; margin-bottom: 12px; }
.cta-section p { opacity: .85; margin-bottom: 28px; font-size: 16px; }
.btn-white { background: white; color: var(--xh-primary); }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,255,255,.2); }

/* ===== Footer ===== */
.footer {
  background: var(--xh-text); color: rgba(255,255,255,.7);
  padding: 60px 40px 30px; text-align: center;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; max-width: 1000px; margin: 0 auto 40px; text-align: left; }
.footer-col h4 { color: white; font-size: 14px; margin-bottom: 12px; }
.footer-col a { display: block; color: rgba(255,255,255,.6); font-size: 13px; text-decoration: none; padding: 4px 0; transition: .15s; }
.footer-col a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; font-size: 12px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 32px; }
  .nav-links { display: none; }
  .navbar { padding: 0 16px; }
  .section { padding: 48px 16px; }
  .stats-bar { flex-wrap: wrap; gap: 24px; margin: -20px 16px 32px; padding: 24px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .cta-section { margin: 0 16px 40px; padding: 48px 24px; }
}

/* ===== Animation ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate { animation: fadeUp .6s ease-out both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }

/* ===== 右上角导航登录区 ===== */
#nav-auth-area { display: flex; align-items: center; gap: 8px; }
.nav-login-btn {
  padding: 8px 16px; border: 1.5px solid var(--xh-border); border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--xh-text); text-decoration: none;
  transition: all .15s; background: white;
}
.nav-login-btn:hover { border-color: var(--xh-primary); color: var(--xh-primary); }
.nav-user-dropdown {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: 8px; cursor: pointer; transition: all .15s;
}
.nav-user-dropdown:hover { background: var(--xh-bg); }
.nav-user-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--xh-primary), var(--xh-accent));
  color: white; display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.user-dropdown-menu {
  position: absolute; top: calc(var(--xh-nav-h) - 4px); right: 40px;
  background: white; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.15);
  min-width: 180px; padding: 8px; z-index: 1001; border: 1px solid var(--xh-border);
}
.user-dropdown-menu a {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-radius: 8px; font-size: 13px; color: var(--xh-text); text-decoration: none; transition: .1s;
}
.user-dropdown-menu a:hover { background: var(--xh-bg); }

/* ===== 登录面板 (右上角滑出) ===== */
.login-panel-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 9999; display: flex; align-items: flex-start; justify-content: flex-end;
  backdrop-filter: blur(2px);
}
.login-panel {
  background: white; width: 400px; max-width: 95vw; height: 100vh; overflow-y: auto;
  box-shadow: -10px 0 40px rgba(0,0,0,.15); padding: 40px 32px;
  animation: panelSlideIn .25s ease-out; position: relative;
}
@keyframes panelSlideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.login-panel-close {
  position: absolute; top: 16px; right: 16px; background: var(--xh-bg);
  border: none; width: 32px; height: 32px; border-radius: 50%;
  font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--xh-text-light);
}
.login-panel-close:hover { background: var(--xh-border); }
.login-panel-icon {
  width: 52px; height: 52px; background: linear-gradient(135deg, var(--xh-primary), var(--xh-accent));
  border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px; color: white; margin-bottom: 8px;
}
.login-panel h3 { font-size: 18px; margin-bottom: 4px; }
.login-panel-error {
  background: #fef2f2; color: #dc2626; padding: 10px 14px; border-radius: 8px;
  font-size: 13px; margin-bottom: 16px; display: none;
}
.login-tab-content { animation: fadeUp .3s ease-out; }

.social-login-btns { display: flex; gap: 10px; justify-content: center; }
.social-btn {
  padding: 10px 20px; border: 1.5px solid var(--xh-border); border-radius: 8px;
  background: white; font-size: 13px; cursor: pointer; transition: .15s;
  display: flex; align-items: center; gap: 6px;
}
.social-btn:hover { border-color: var(--xh-primary); }
.social-btn.wechat:hover { border-color: #07c160; background: #f0fdf4; }

/* 微信扫码旋转动画 */
@keyframes qr-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
#wechat-qrcode-loading div:first-child { animation: qr-spin 1s linear infinite; }
#wechat-qrcode-container { position: relative; }
#wechat-qrcode-canvas { display: block; margin: 0 auto; border-radius: 8px; }

/* ===== 用户自助面板 ===== */
#portal-content h4 { font-size: 16px; margin-bottom: 12px; }
.portal-card {
  padding: 14px; background: var(--xh-bg); border-radius: 10px; margin-bottom: 10px;
  border: 1px solid var(--xh-border);
}

.badge-portal {
  display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; margin-left: 6px;
}
.badge-portal.active { background: #dcfce7; color: #166534; }
.badge-portal.expired { background: #fee2e2; color: #991b1b; }

@media (max-width: 768px) {
  .login-panel { width: 100vw; }
}

/* 通用表单（复用） */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--xh-text); margin-bottom: 4px; }
.form-group input, .form-group select {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--xh-border);
  border-radius: 8px; font-size: 14px; transition: all .15s; background: var(--xh-bg);
}
.form-group input:focus, .form-group select:focus {
  outline: none; border-color: var(--xh-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); background: white;
}
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; }

/* 云服务器购买按钮 */
.cloud-links { display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }
.cloud-btn {
  display:inline-flex; align-items:center; gap:6px;
  padding:10px 18px; border-radius:10px; font-size:14px; font-weight:600;
  text-decoration:none; transition:all .2s; border:1.5px solid transparent;
}
.cloud-btn:active { transform:scale(0.97); }
.cloud-btn.tencent {
  background:#0052d9; color:#fff; border-color:#0052d9;
}
.cloud-btn.tencent:hover { background:#003d99; }
.cloud-btn.aliyun {
  background:#ff6a00; color:#fff; border-color:#ff6a00;
}
.cloud-btn.aliyun:hover { background:#cc5500; }
