:root {
  --primary: #1976D2;
  --primary-dark: #1565C0;
  --primary-light: #42A5F5;
  --success: #4CAF50;
  --error: #F44336;
  --warning: #FFC107;
  --text: #1a1a2e;
  --text-secondary: #666666;
  --text-muted: #999999;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --bg-dark: #1a1a2e;
  --border: #e0e0e0;
  --border-light: #f0f0f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
}

.nav-brand:hover {
  color: var(--primary);
}

.brand-icon {
  font-size: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(25, 118, 210, 0.05);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
}

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

.btn-block {
  width: 100%;
}

/* Hero Section */
.hero {
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(25,118,210,0.03) 0%, rgba(102,126,234,0.03) 50%, rgba(118,75,162,0.03) 100%);
  z-index: -1;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: 20%;
  right: 10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(25,118,210,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(25, 118, 210, 0.1);
  color: var(--primary);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 32px;
  line-height: 1.7;
}

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

.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border-light);
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(25, 118, 210, 0.1);
  color: var(--primary);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* Features */
.features {
  padding: 80px 0;
  background: var(--bg-alt);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  background: white;
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition);
  border: 1px solid var(--border-light);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.feature-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Architecture */
.architecture {
  padding: 80px 0;
}

.arch-diagram {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 48px;
}

.arch-layer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.arch-node {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  min-width: 180px;
}

.node-mobile { border-top: 3px solid #667eea; }
.node-server { border-top: 3px solid #43e97b; }
.node-desktop { border-top: 3px solid #4facfe; }

.node-icon {
  font-size: 36px;
}

.node-info h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.node-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.arch-connections {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.arch-line {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, #764ba2 100%);
  border-radius: 2px;
}

.arch-protocol {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Tech Stack */
.tech {
  padding: 80px 0;
  background: var(--bg-alt);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.tech-category {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border-light);
}

.tech-category h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--primary);
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  padding: 6px 12px;
  background: rgba(25, 118, 210, 0.08);
  color: var(--primary-dark);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

/* CTA */
.cta {
  padding: 80px 0;
}

.cta-card {
  background: linear-gradient(135deg, #1976D2 0%, #764ba2 100%);
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  text-align: center;
  color: white;
}

.cta-card h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-card p {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 32px;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-card .btn-primary {
  background: white;
  color: var(--primary);
}

.cta-card .btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
}

.cta-card .btn-outline {
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
}

.cta-card .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
  color: white;
}

/* Footer */
.footer {
  padding: 48px 0 24px;
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.8);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  color: white;
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: white;
}

.footer-copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* Register Page */
.register-section {
  padding: 140px 0 80px;
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
}

.register-card {
  max-width: 440px;
  margin: 0 auto;
  background: white;
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
}

.register-header {
  text-align: center;
  margin-bottom: 36px;
}

.register-header h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.register-header p {
  font-size: 14px;
  color: var(--text-secondary);
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.form-group .optional {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 12px;
}

.form-group input {
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  transition: all var(--transition);
  background: var(--bg);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.form-group input.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

.form-error {
  font-size: 12px;
  color: var(--error);
  min-height: 16px;
}

.form-success {
  text-align: center;
  padding: 20px;
  background: rgba(76, 175, 80, 0.1);
  border-radius: var(--radius-sm);
}

.success-icon {
  width: 48px;
  height: 48px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  margin: 0 auto 12px;
}

.register-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
}

.register-footer a {
  color: var(--primary);
  text-decoration: none;
}

.register-footer a:hover {
  text-decoration: underline;
}

/* Loader */
.btn-loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
  .nav-links .nav-link:not(.btn) {
    display: none;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-stats {
    gap: 20px;
  }

  .stat-num {
    font-size: 22px;
  }

  .section-title {
    font-size: 28px;
  }

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

  .arch-layer {
    flex-direction: column;
  }

  .arch-connections {
    flex-direction: row;
  }

  .arch-line {
    width: 2px;
    height: 40px;
  }

  .cta-card {
    padding: 40px 24px;
  }

  .cta-card h2 {
    font-size: 24px;
  }

  .register-card {
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 28px;
  }

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

  .hero-actions .btn {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}
