/* 
 * AEON Design System v2.0
 * 欧美风 · 极简 · 精致
 * 
 * Design Principles:
 * - Ample whitespace, clean layouts
 * - Typography-driven hierarchy
 * - Subtle elevations and shadows
 * - Purposeful accent colors
 * - Mobile-first responsive
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* ── Brand ── */
  --primary: #6366f1;
  --primary-light: #a5b4fc;
  --primary-dark: #4f46e5;
  --primary-bg: #eef2ff;
  
  /* ── Accents ── */
  --accent: #06b6d4;
  --success: #10b981;
  --success-bg: #d1fae5;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-bg: #fee2e2;
  
  /* ── Text ── */
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;
  
  /* ── Surfaces ── */
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  
  /* ── Elevation ── */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-md: 0 10px 15px rgba(0,0,0,0.05), 0 4px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 25px rgba(0,0,0,0.08), 0 10px 10px rgba(0,0,0,0.04);
  --shadow-xl: 0 25px 50px rgba(0,0,0,0.12);
  
  /* ── Radius ── */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  
  /* ── Typography ── */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; overflow-y: scroll; }

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================================================================
   LAYOUT
   =================================================================== */

.page-wrapper {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 32px;
  width: 100%;
}

@media (max-width: 768px) {
  .page-wrapper { padding: 24px 16px; }
}

.section { padding: 64px 0; }
.section-sm { padding: 32px 0; }
.section-lg { padding: 96px 0; }

/* ===================================================================
   TYPOGRAPHY
   =================================================================== */

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

p { margin-bottom: 1rem; color: var(--text-secondary); }
.lead { font-size: 1.125rem; line-height: 1.7; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }

/* ===================================================================
   NAVIGATION
   =================================================================== */

.navbar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  padding: 0 32px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar > * {
  max-width: 1120px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.03em;
}

.navbar-brand .subtitle {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}

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

.navbar-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
  position: relative;
  padding: 4px 0;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transition: width 0.2s ease;
}

.navbar-links a:hover { color: var(--primary); }
.navbar-links a:hover::after { width: 100%; }
.navbar-links a.active { color: var(--primary); }
.navbar-links a.active::after { width: 100%; }

@media (max-width: 768px) {
  .navbar { height: 56px; padding: 0 16px; }
  .navbar-links { gap: 12px; }
  .navbar-links a { font-size: 13px; }
  .navbar-links .btn { display: none; }
}

/* ===================================================================
   BUTTONS
   =================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-inverse);
  box-shadow: 0 1px 3px rgba(99,102,241,0.3);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(99,102,241,0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--primary-bg);
  color: var(--primary);
}
.btn-secondary:hover {
  background: #ddd6fe;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary-bg);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 10px 16px;
}
.btn-ghost:hover { background: var(--bg-subtle); color: var(--text); }

.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: var(--radius); }
.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }

/* ===================================================================
   FORMS
   =================================================================== */

.input-group { margin-bottom: 20px; }

.input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.input {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-card);
  transition: all 0.2s;
  outline: none;
}

.input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

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

select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* ===================================================================
   CARDS
   =================================================================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: var(--shadow);
}

/* ===================================================================
   STAT CARDS
   =================================================================== */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow); }

.stat-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

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

/* ===================================================================
   TABLE
   =================================================================== */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-card);
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }

thead th {
  text-align: left;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg); }

/* ===================================================================
   BADGE
   =================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-green { background: var(--success-bg); color: #065f46; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-purple { background: var(--primary-bg); color: var(--primary-dark); }

/* ===================================================================
   HERO (Landing)
   =================================================================== */

.hero {
  position: relative;
  padding: 100px 24px 80px;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #6366f1 100%);
  color: var(--text-inverse);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(255,255,255,0.05) 0%, transparent 50%);
}

.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }

.hero h1 {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  line-height: 1.1;
}

.hero p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 40px;
  line-height: 1.7;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-actions .btn-outline {
  color: var(--text-inverse);
  border-color: rgba(255,255,255,0.4);
}
.hero-actions .btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.6);
}

@media (max-width: 768px) {
  .hero { padding: 60px 20px 48px; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
}

/* ===================================================================
   FEATURE GRID
   =================================================================== */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px 32px;
}

.feature-card {
  padding: 40px 28px;
  text-align: center;
}

.feature-card .icon { font-size: 2.5rem; margin-bottom: 16px; display: block; }
.feature-card h3 { margin-bottom: 8px; font-size: 1.125rem; }
.feature-card p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.7; }

@media (max-width: 768px) {
  .feature-grid { padding: 40px 16px; gap: 16px; }
}

/* ===================================================================
   PRICING
   =================================================================== */

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

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow);
}

.pricing-card .popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--text-inverse);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

.pricing-card .plan-name { font-size: 1.125rem; font-weight: 700; }

.pricing-card .plan-price {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.03em;
  margin: 12px 0;
}

.pricing-card .plan-price span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-card .plan-features { list-style: none; margin: 20px 0 28px; }
.pricing-card .plan-features li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===================================================================
   AUTH PAGES
   =================================================================== */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 24px;
}

.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 48px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
}

.auth-logo { text-align: center; margin-bottom: 36px; }

.auth-logo .brand-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  display: block;
}

.auth-logo h1 { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.auth-logo p { font-size: 0.875rem; color: var(--text-muted); margin-top: 4px; margin-bottom: 0; }

.auth-footer {
  text-align: center;
  margin-top: 28px;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ===================================================================
   FOOTER
   =================================================================== */

.site-footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
}

/* ===================================================================
   TOAST / ALERT
   =================================================================== */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
}

.alert-success { background: var(--success-bg); color: #065f46; }
.alert-info { background: #dbeafe; color: #1e40af; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-error { background: var(--danger-bg); color: #991b1b; }

/* ===================================================================
   ANIMATIONS
   =================================================================== */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.4s ease-out; }

/* ===================================================================
   RESPONSIVE UTILITIES
   =================================================================== */

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}
