/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: #1a1a2e; background: #fafbff; line-height: 1.6; min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: #667eea; text-decoration: none; transition: color .2s; }
a:hover { color: #764ba2; }
img { max-width: 100%; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-title {
  text-align: center; font-size: 2rem; font-weight: 700; margin-bottom: 12px;
  background: linear-gradient(135deg, #667eea, #764ba2); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.section-desc { text-align: center; color: #666; font-size: 1.1rem; margin-bottom: 48px; }
.section-more { text-align: center; margin-top: 40px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 24px; border-radius: 8px; font-size: 0.95rem; font-weight: 500;
  border: none; cursor: pointer; transition: all .25s; text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2); color: #fff;
  box-shadow: 0 4px 15px rgba(102,126,234,.3);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 25px rgba(102,126,234,.45); transform: translateY(-1px);
  color: #fff;
}
.btn-outline {
  background: transparent; color: #667eea; border: 1.5px solid #667eea;
}
.btn-outline:hover { background: rgba(102,126,234,.08); color: #764ba2; border-color: #764ba2; }
.btn-ghost { background: rgba(255,255,255,.15); color: #fff; backdrop-filter: blur(4px); border: 1.5px solid rgba(255,255,255,.3); }
.btn-ghost:hover { background: rgba(255,255,255,.25); color: #fff; }
.btn-sm { padding: 6px 16px; font-size: 0.85rem; }
.btn-lg { padding: 14px 36px; font-size: 1.1rem; }
.btn-block { width: 100%; }

/* ===== Navbar ===== */
.navbar {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px); border-bottom: 1px solid rgba(0,0,0,.06);
}
.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; height: 64px;
}
.nav-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.2rem; color: #1a1a2e; margin-right: 40px; }
.nav-logo:hover { color: #1a1a2e; }
.logo-icon { font-size: 1.4rem; background: linear-gradient(135deg, #667eea, #764ba2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.logo-text em { font-style: normal; font-weight: 400; color: #666; font-size: .9rem; margin-left: 4px; }
.nav-links { display: flex; gap: 32px; flex: 1; }
.nav-links a { color: #555; font-size: .95rem; font-weight: 500; padding: 4px 0; position: relative; }
.nav-links a::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: linear-gradient(90deg, #667eea, #764ba2); transition: width .3s; border-radius: 1px; }
.nav-links a:hover, .nav-links a.active { color: #667eea; }
.nav-links a.active::after, .nav-links a:hover::after { width: 100%; }
.nav-actions { display: flex; gap: 12px; align-items: center; }
.nav-user { display: flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 20px; background: rgba(102,126,234,.08); }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 600; }
.user-balance { font-size: .9rem; font-weight: 600; color: #667eea; }
.nav-mobile-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #333; }
.nav-mobile { display: none; flex-direction: column; padding: 16px 24px; border-top: 1px solid #eee; }
.nav-mobile a { padding: 12px 0; color: #333; border-bottom: 1px solid #f5f5f5; }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 520px; display: flex; align-items: center; justify-content: center;
  overflow: hidden; text-align: center; padding: 80px 24px;
}
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #5a67d8 100%);
}
.hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.08) 0%, transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(118,75,162,.3) 0%, transparent 40%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-content { position: relative; z-index: 1; color: #fff; }
.hero-content h1 { font-size: 3.2rem; font-weight: 800; margin-bottom: 20px; letter-spacing: -1px; line-height: 1.2; }
.hero-subtitle { font-size: 1.25rem; opacity: .9; margin-bottom: 36px; line-height: 1.8; }
.hero-actions { display: flex; gap: 16px; justify-content: center; margin-bottom: 40px; }
.hero-stats-mini { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; font-size: .9rem; opacity: .85; }
.hero-stats-mini b { font-weight: 700; }

/* ===== Cards Grid ===== */
.card-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ===== Capability Cards ===== */
.capability-card {
  background: #fff; border-radius: 16px; padding: 32px 24px; text-align: center;
  border: 1px solid rgba(0,0,0,.06); transition: all .3s; position: relative; overflow: hidden;
}
.capability-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(102,126,234,.12); border-color: rgba(102,126,234,.2); }
.capability-icon { width: 64px; height: 64px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; margin: 0 auto 20px; }
.capability-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.capability-card p { color: #666; font-size: .9rem; line-height: 1.6; margin-bottom: 16px; }
.capability-price { font-size: .85rem; color: #667eea; font-weight: 600; margin-bottom: 12px; }
.capability-link { font-size: .9rem; font-weight: 500; }

/* ===== Workflow ===== */
.workflow { background: #fff; }
.workflow-steps { display: flex; align-items: flex-start; justify-content: center; gap: 16px; }
.workflow-step {
  text-align: center; flex: 1; max-width: 220px; position: relative;
  padding: 24px 16px; border-radius: 16px; transition: all .3s;
}
.workflow-step:hover { background: rgba(102,126,234,.04); }
.step-number {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700; margin: 0 auto 16px;
}
.step-icon { font-size: 2.4rem; margin-bottom: 16px; }
.workflow-step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.workflow-step p { color: #666; font-size: .88rem; }
.workflow-arrow { font-size: 1.5rem; color: #ccc; margin-top: 60px; }

/* ===== Platform Stats ===== */
.platform-stats {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff;
  padding: 60px 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-value { font-size: 2.4rem; font-weight: 800; margin-bottom: 8px; }
.stat-label { font-size: .95rem; opacity: .85; }

/* ===== Model Cards ===== */
.model-card {
  background: #fff; border-radius: 16px; padding: 24px; border: 1px solid rgba(0,0,0,.06);
  transition: all .3s; cursor: pointer; display: flex; flex-direction: column;
}
.model-card:hover { box-shadow: 0 8px 30px rgba(102,126,234,.1); border-color: rgba(102,126,234,.2); }
.model-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.model-type-badge {
  padding: 4px 12px; border-radius: 20px; font-size: .75rem; font-weight: 600;
}
.model-type-badge.type-tts { background: #e3f2fd; color: #1565c0; }
.model-type-badge.type-clone { background: #fce4ec; color: #c62828; }
.model-type-badge.type-image { background: #e8f5e9; color: #2e7d32; }
.model-type-badge.type-video { background: #fff3e0; color: #e65100; }
.model-type-badge.type-llm { background: #f3e5f5; color: #6a1b9a; }
.model-type-badge.type-asr { background: #e0f7fa; color: #00695c; }
.model-price-tag { font-size: .85rem; font-weight: 700; color: #667eea; }
.model-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.model-desc { color: #666; font-size: .88rem; line-height: 1.5; flex: 1; margin-bottom: 16px; }
.model-card-footer { display: flex; justify-content: space-between; align-items: center; }
.model-nodes { font-size: .8rem; color: #999; }

/* Model Detail */
.model-detail {
  margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee;
  text-align: left;
}
.model-detail-section { margin-bottom: 20px; }
.model-detail-section h4 { font-size: .95rem; font-weight: 600; margin-bottom: 12px; color: #333; }
.param-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.param-table td { padding: 6px 12px; border-bottom: 1px solid #f0f0f0; }
.param-table td:first-child { color: #666; font-weight: 500; width: 40%; }
.model-detail pre { border-radius: 8px; overflow-x: auto; font-size: .8rem; }
.model-detail code { font-family: 'JetBrains Mono', 'Fira Code', monospace; }

/* ===== Filter Bar ===== */
.filter-bar { margin-bottom: 32px; }
.search-input {
  width: 100%; padding: 12px 20px; border: 1.5px solid #e0e0e0; border-radius: 12px;
  font-size: .95rem; outline: none; transition: border-color .2s; margin-bottom: 16px;
  background: #fff;
}
.search-input:focus { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,.1); }
.filter-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-tag {
  padding: 6px 18px; border-radius: 20px; font-size: .85rem; font-weight: 500;
  background: #f5f5f5; color: #666; border: none; cursor: pointer; transition: all .2s;
}
.filter-tag:hover { background: #e8e8e8; }
.filter-tag.active { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }

/* ===== Page Header ===== */
.page-header {
  background: linear-gradient(135deg, #667eea15, #764ba215);
  padding: 40px 0 32px; margin-bottom: 32px; border-bottom: 1px solid rgba(0,0,0,.05);
}
.page-header h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; }
.page-header p { color: #666; font-size: 1rem; }

/* ===== Image Cards ===== */
.image-card {
  background: #fff; border-radius: 12px; border: 1px solid rgba(0,0,0,.06);
  margin-bottom: 16px; transition: all .3s;
}
.image-card:hover { box-shadow: 0 4px 20px rgba(102,126,234,.08); border-color: rgba(102,126,234,.15); }
.image-card-main { display: flex; align-items: center; gap: 20px; padding: 24px; }
.image-icon { font-size: 2.2rem; flex-shrink: 0; width: 56px; text-align: center; }
.image-info { flex: 1; }
.image-info h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.image-info p { color: #666; font-size: .88rem; margin-bottom: 8px; }
.image-meta { display: flex; gap: 16px; flex-wrap: wrap; }
.image-meta-item { font-size: .8rem; color: #888; }

/* ===== Task Cards ===== */
.task-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.task-card {
  background: #fff; border-radius: 12px; border: 1px solid rgba(0,0,0,.06);
  margin-bottom: 12px; padding: 20px 24px; cursor: pointer; transition: all .3s;
}
.task-card:hover { border-color: rgba(102,126,234,.2); box-shadow: 0 4px 16px rgba(102,126,234,.06); }
.task-card-row { display: flex; justify-content: space-between; align-items: center; }
.task-info { display: flex; flex-direction: column; }
.task-name { font-weight: 600; font-size: 1rem; }
.task-model { font-size: .8rem; color: #888; margin-top: 2px; }
.task-meta { display: flex; gap: 20px; align-items: center; font-size: .85rem; }
.task-status {
  padding: 4px 12px; border-radius: 12px; font-size: .78rem; font-weight: 600;
}
.status-running { background: #e3f2fd; color: #1565c0; }
.status-queued { background: #fff3e0; color: #e65100; }
.status-completed { background: #e8f5e9; color: #2e7d32; }
.status-failed { background: #fce4ec; color: #c62828; }
.task-time { color: #888; }
.task-duration { color: #666; }
.task-cost { font-weight: 600; color: #667eea; }
.task-detail { margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee; }
.task-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.task-detail h4 { font-size: .95rem; font-weight: 600; margin-bottom: 12px; }
.task-detail pre { border-radius: 8px; font-size: .8rem; overflow-x: auto; }
.result-placeholder { padding: 24px; background: #f8f9fa; border-radius: 8px; text-align: center; font-size: 1.2rem; margin-bottom: 12px; }

/* ===== Account ===== */
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 48px; }
.balance-card {
  background: linear-gradient(135deg, #667eea, #764ba2); color: #fff;
  border-radius: 20px; padding: 40px; text-align: center;
}
.balance-label { font-size: .95rem; opacity: .85; margin-bottom: 8px; }
.balance-value { font-size: 3rem; font-weight: 800; margin-bottom: 24px; }
.balance-card .btn { background: rgba(255,255,255,.2); border: 1.5px solid rgba(255,255,255,.4); }
.balance-card .btn:hover { background: rgba(255,255,255,.3); }
.account-info-card {
  background: #fff; border-radius: 20px; padding: 32px; border: 1px solid rgba(0,0,0,.06);
}
.account-info-card h3 { font-size: 1.1rem; margin-bottom: 20px; }
.info-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f5f5f5; font-size: .9rem; }
.info-row span:first-child { color: #888; }
.info-row span:last-child { font-weight: 500; }

.expense-section { background: #fff; border-radius: 20px; padding: 32px; border: 1px solid rgba(0,0,0,.06); }
.expense-section h2 { font-size: 1.2rem; margin-bottom: 24px; }

/* ===== Data Table ===== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 12px 16px; background: #f8f9fa; font-size: .85rem; color: #666; font-weight: 600; }
.data-table td { padding: 14px 16px; border-bottom: 1px solid #f0f0f0; font-size: .9rem; }
.data-table tr:hover td { background: rgba(102,126,234,.02); }
.data-table th:first-child { border-radius: 8px 0 0 8px; }
.data-table th:last-child { border-radius: 0 8px 8px 0; }

/* ===== Auth Pages ===== */
.page-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #f8f9ff; }
.auth-container { width: 100%; max-width: 420px; padding: 24px; text-align: center; }
.auth-logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.3rem; color: #1a1a2e; margin-bottom: 32px; }
.auth-card {
  background: #fff; border-radius: 20px; padding: 40px; box-shadow: 0 4px 24px rgba(0,0,0,.06);
  text-align: left;
}
.auth-card h2 { font-size: 1.5rem; margin-bottom: 8px; }
.auth-subtitle { color: #888; font-size: .9rem; margin-bottom: 28px; }
.auth-error { color: #c62828; font-size: .85rem; margin-bottom: 16px; padding: 10px; background: #fce4ec; border-radius: 8px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: .9rem; color: #888; }

/* ===== Forms ===== */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: .88rem; font-weight: 600; color: #333; margin-bottom: 6px; }
.form-input, .form-select {
  width: 100%; padding: 10px 16px; border: 1.5px solid #e0e0e0; border-radius: 10px;
  font-size: .95rem; outline: none; transition: all .2s; background: #fff;
}
.form-input:focus, .form-select:focus { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,.1); }
textarea.form-input { resize: vertical; font-family: inherit; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  backdrop-filter: blur(4px);
}
.modal {
  background: #fff; border-radius: 20px; width: 100%; max-width: 560px;
  max-height: 80vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 24px 28px 0; }
.modal-header h2 { font-size: 1.3rem; }
.modal-close { background: none; border: none; font-size: 1.8rem; cursor: pointer; color: #999; padding: 0 4px; line-height: 1; }
.modal-close:hover { color: #333; }
.modal-body { padding: 24px 28px; }
.modal-footer { padding: 0 28px 24px; display: flex; justify-content: flex-end; gap: 12px; }

/* ===== Recharge ===== */
.recharge-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.recharge-btn {
  padding: 16px 8px; border-radius: 12px; border: 1.5px solid #e0e0e0; background: #fff;
  cursor: pointer; text-align: center; transition: all .2s;
}
.recharge-btn:hover { border-color: #667eea; }
.recharge-btn.active { border-color: #667eea; background: rgba(102,126,234,.06); }
.recharge-value { display: block; font-size: 1.2rem; font-weight: 700; color: #333; }
.recharge-bonus { display: block; font-size: .75rem; color: #667eea; margin-top: 4px; }
.recharge-summary { text-align: center; margin-top: 16px; font-size: .95rem; }
.recharge-total { font-size: 1.3rem; font-weight: 700; color: #667eea; }
.cost-estimate { font-size: 1.2rem; font-weight: 700; color: #667eea; padding: 8px 0; }

/* ===== CTA ===== */
.cta-section { padding: 60px 0; }
.cta-box {
  background: linear-gradient(135deg, #667eea15, #764ba215); border-radius: 24px;
  padding: 60px 40px; text-align: center;
}
.cta-box h2 { font-size: 1.8rem; margin-bottom: 12px; }
.cta-box p { color: #666; margin-bottom: 28px; font-size: 1.05rem; }

/* ===== Footer ===== */
.footer { background: #1a1a2e; color: #fff; padding: 60px 0 0; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { color: rgba(255,255,255,.6); font-size: .9rem; margin-top: 12px; }
.footer-slogan { font-size: .85rem; }
.footer-links h4 { font-size: .95rem; margin-bottom: 16px; font-weight: 600; }
.footer-links a { display: block; color: rgba(255,255,255,.6); font-size: .88rem; margin-bottom: 10px; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; text-align: center; }
.footer-bottom p { color: rgba(255,255,255,.4); font-size: .85rem; }

/* ===== Toast ===== */
.toast {
  position: fixed; top: 80px; right: 24px; z-index: 300; padding: 14px 24px;
  border-radius: 12px; font-size: .9rem; font-weight: 500;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
}
.toast-success { background: #e8f5e9; color: #2e7d32; }
.toast-error { background: #fce4ec; color: #c62828; }
.toast-info { background: #e3f2fd; color: #1565c0; }
.toast-enter-active, .toast-leave-active { transition: all .3s; }
.toast-enter-from, .toast-leave-to { opacity: 0; transform: translateX(20px); }

/* ===== Empty State ===== */
.empty-state { text-align: center; padding: 60px 24px; color: #999; }
.empty-state p { margin-bottom: 20px; font-size: 1rem; }

/* ===== Page container spacing ===== */
.page { padding-bottom: 40px; }
.page > .container { padding-top: 8px; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .workflow-steps { flex-wrap: wrap; }
  .workflow-arrow { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .account-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .nav-mobile-toggle { display: block; margin-left: auto; }
  .nav-mobile { display: flex; }
  .hero-content h1 { font-size: 2.2rem; }
  .hero-stats-mini { flex-direction: column; gap: 8px; }
  .card-grid-4, .card-grid-3 { grid-template-columns: 1fr; }
  .task-card-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .task-meta { flex-wrap: wrap; gap: 8px; }
  .task-detail-grid { grid-template-columns: 1fr; }
  .image-card-main { flex-direction: column; text-align: center; }
  .recharge-amounts { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}
