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

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #a855f7;
  --accent: #f43f5e;
  --bg-dark: #000000;
  --bg-medium: #0a0a0a;
  --bg-light: #1a1a1a;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --card-bg: rgba(20, 20, 20, 0.8);
  --card-border: rgba(255, 255, 255, 0.1);
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --gradient-secondary: linear-gradient(135deg, #f43f5e 0%, #ec4899 100%);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* 流星背景动画 */
.bg-animation {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  background: #000000;
  overflow: hidden;
}

.meteor {
  position: absolute;
  width: 3px;
  height: 3px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 10px 3px rgba(255, 255, 255, 0.8);
  animation: meteorFall linear infinite;
}

.meteor::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  width: 150px;
  height: 2px;
  background: linear-gradient(270deg, var(--tail-color, rgba(255, 255, 255, 0.9)), transparent);
  transform: translateY(-50%) rotate(var(--angle));
  transform-origin: right center;
}

@keyframes meteorFall {
  to {
    transform: translate(var(--tx), var(--ty));
    opacity: 0;
  }
}

/* 导航栏 */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  background: rgba(0, 0, 0, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #f43f5e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  background-position: 0% 50%;
  animation: logoShift 6s ease-in-out infinite;
  letter-spacing: 0.05em;
}

@keyframes logoShift {
  0%, 100% {
    background-position: 0% 50%;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.3));
  }
  50% {
    background-position: 100% 50%;
    filter: drop-shadow(0 0 15px rgba(244, 63, 94, 0.4));
  }
}

.nav-buttons {
  display: flex;
  gap: 1rem;
}

/* 主要内容区域 */
.main-content {
  margin-top: 80px;
  min-height: calc(100vh - 80px);
}

/* Hero Section */
.hero {
  padding: 6rem 4rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
  animation: heroFloat 20s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.1); }
}

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

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 30%, #f43f5e 60%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroGlow 4s ease-in-out infinite;
  background-size: 200% 200%;
  background-position: 0% 50%;
}

@keyframes heroGlow {
  0%, 100% { 
    filter: brightness(1) drop-shadow(0 0 20px rgba(99, 102, 241, 0.3));
    background-position: 0% 50%;
  }
  50% { 
    filter: brightness(1.3) drop-shadow(0 0 30px rgba(168, 85, 247, 0.4));
    background-position: 100% 50%;
  }
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* 打字光标效果 */
.typing-cursor {
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background: #ffffff;
  margin-left: 2px;
  animation: cursorBlink 1s infinite, cursorGlow 2s ease-in-out infinite;
  vertical-align: text-bottom;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

@keyframes cursorBlink {
  0% { opacity: 0; }
  20% { opacity: 1; }
  50% { opacity: 1; }
  70% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes cursorGlow {
  0%, 100% { 
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    transform: scaleY(1);
  }
  50% { 
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    transform: scaleY(1.1);
  }
}

/* 卡片样式 */
.card {
  background: rgba(20, 20, 20, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  width: 100%;
}

/* 卡片内容布局 */
.card-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.card-content.single-column {
  grid-template-columns: 1fr;
}

.card-header {
  grid-column: 1 / -1;
  margin-bottom: 1rem;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: left 0.6s;
}

.card:hover::before {
  left: 100%;
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-light);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2);
}

/* 按钮样式 */
.btn {
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 48px;
  letter-spacing: 0.025em;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-light);
  border: 1px solid var(--primary-light);
  box-shadow: 0 4px 14px 0 rgba(129, 140, 248, 0.1);
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-primary:hover {
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.1);
}

.btn-secondary:hover {
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 8px 25px rgba(129, 140, 248, 0.2);
  border-color: var(--primary);
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:active {
  transform: translateY(-1px) scale(1.01);
}

/* 垂直布局 */
.grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 4rem 6rem;
}

/* 输入框样式 */
.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.input-group input[type="text"] {
  width: 100%;
  padding: 1rem;
  background: rgba(30, 30, 30, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s;
}

.input-group input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: rgba(30, 30, 30, 0.9);
}

/* 自定义API Key输入框特殊样式 */
#customApiKeyGroup {
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.5s ease-in-out;
}

#customApiKeyGroup label {
  color: var(--primary-light);
  font-weight: 600;
}

#customApiKey {
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
}

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

/* 复选框样式 */
.checkbox-group {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(30, 30, 30, 0.4);
  border-radius: 12px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s;
}

.checkbox-group label:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-light);
}

.checkbox-group input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--primary);
  cursor: pointer;
}

/* 代码块样式 */
.code-block {
  background: rgba(15, 15, 15, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  overflow-x: auto;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 1.5rem 0;
}

/* 状态指示器 */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 24px;
  color: #22c55e;
  font-size: 0.9rem;
  font-weight: 500;
}

.status-indicator.loading {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

/* 加载动画 */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* 页脚样式 */
.footer {
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 4rem;
  text-align: center;
}

.footer-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.copyright {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.icp {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0;
}

.icp a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.icp a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 1rem;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .grid {
    padding: 2rem 1rem 4rem;
  }

  .card {
    padding: 2rem;
  }
  
  .card-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-content {
    padding: 0 1rem;
  }
}

@media (max-width: 1024px) {
  .card-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  .hero {
    padding: 6rem 3rem 4rem;
  }
  
  .grid {
    padding: 2rem 3rem 6rem;
  }
  
  .footer-content {
    padding: 0 3rem;
  }
}

/* Hero 按钮组 */
.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* 特殊效果类 */
.gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #f43f5e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  background-position: 0% 50%;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.glass-effect {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.neon-border {
  position: relative;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 12px;
}

.neon-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--gradient-primary);
  border-radius: 12px;
  z-index: -1;
  opacity: 0.5;
  filter: blur(8px);
}

.neon-border::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: var(--gradient-primary);
  border-radius: 12px;
  z-index: -2;
}

/* API 结果容器 */
.api-result-container {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
}

.api-result-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
  animation: shimmer 2s infinite;
}

/* API 结果解析展示 */
.api-parsed-result {
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.api-parsed-result h4 {
  color: var(--primary-light);
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.api-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.api-data-item {
  background: rgba(30, 30, 30, 0.6);
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.api-data-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.api-data-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  word-break: break-all;
}

/* 折叠面板 */
.collapsible {
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 1rem;
}

.collapsible-header {
  padding: 0.75rem 1rem;
  background: rgba(30, 30, 30, 0.8);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s ease;
}

.collapsible-header:hover {
  background: rgba(40, 40, 40, 0.8);
}

.collapsible-title {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.collapsible-icon {
  color: var(--text-muted);
  transition: transform 0.3s ease;
  transform: rotate(0deg);
}

.collapsible-icon.expanded {
  transform: rotate(90deg);
}

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.collapsible-content.expanded {
  max-height: 500px;
}

.collapsible-body {
  padding: 1rem;
}

/* API Key 展示样式 */
.key-display {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.1));
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 12px;
  padding: 1rem;
  font-family: 'Fira Code', monospace;
  word-break: break-all;
  position: relative;
  overflow: hidden;
}

.key-display::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 2s infinite;
}

/* 动画增强 */
@keyframes slideInUp { 
  from { opacity:0; transform:translateY(40px) } 
  to { opacity:1; transform:translateY(0) } 
}
@keyframes scaleIn { 
  from { opacity:0; transform:scale(0.8) } 
  to { opacity:1; transform:scale(1) } 
}

.anim-slide-up{ animation:slideInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both }
.anim-scale{ animation:scaleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both }
.anim-delay-4{ animation-delay: 0.8s }

/* 增强动画样式 */
@keyframes fadeIn { 
  from { opacity:0; transform:translateY(12px) scale(0.98) } 
  to { opacity:1; transform:translateY(0) scale(1) } 
}
@keyframes slideInLeft { 
  from { opacity:0; transform:translateX(-20px) scale(0.95) } 
  to { opacity:1; transform:translateX(0) scale(1) } 
}
@keyframes slideInRight { 
  from { opacity:0; transform:translateX(20px) scale(0.95) } 
  to { opacity:1; transform:translateX(0) scale(1) } 
}
@keyframes pop { 
  0% { transform:scale(0.9); opacity:0; }
  50% { transform:scale(1.02); }
  100% { transform:scale(1); opacity:1; }
}
@keyframes typewriter { 
  from { width:0; opacity:0.7 } 
  to { width:100%; opacity:1 } 
}
@keyframes spin { 
  to { transform: rotate(360deg) } 
}
@keyframes pulse { 
  0%, 100% { opacity:1; }
  50% { opacity:0.6; }
}
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px rgba(15, 111, 255, 0.3); }
  50% { box-shadow: 0 0 20px rgba(15, 111, 255, 0.6), 0 0 30px rgba(15, 111, 255, 0.3); }
}

.anim-fade{ animation:fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both }
.anim-slide{ animation:slideInLeft 0.7s cubic-bezier(0.16, 1, 0.3, 1) both }
.anim-slide-right{ animation:slideInRight 0.7s cubic-bezier(0.16, 1, 0.3, 1) both }
.anim-user{ animation:pop 0.5s cubic-bezier(0.16, 1, 0.3, 1) both }
.anim-key{ animation:fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both }
.anim-delay-1{ animation-delay: 0.2s }
.anim-delay-2{ animation-delay: 0.4s }
.anim-delay-3{ animation-delay: 0.6s }
.anim-pulse{ animation:pulse 2s infinite }
.anim-float{ animation:float 3s ease-in-out infinite }
.anim-glow{ animation:glow 2s ease-in-out infinite }

/* Key 展示的打字动画容器 */
.key-wrap{overflow:hidden;white-space:nowrap;display:inline-block;border-radius:6px;background:#eef6ff;padding:6px 10px}
.key-text{display:inline-block;font-family:monospace;letter-spacing:1px}
.typewriter-mask{display:inline-block;overflow:hidden;vertical-align:top}

/* 增强Spinner样式 */
.spinner{width:20px;height:20px;border:3px solid rgba(15, 111, 255, 0.2);border-top-color:var(--accent);border-radius:50%;animation:spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;display:inline-block;vertical-align:middle;box-shadow:0 0 10px rgba(15, 111, 255, 0.3)}
.api-result-container{background:linear-gradient(135deg, #071024 0%, #0a1929 100%);padding:12px;border-radius:10px;color:#dbeafe;border:1px solid rgba(15, 111, 255, 0.2);position:relative;overflow:hidden}
.api-result-container::before{content:'';position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg, transparent, rgba(15, 111, 255, 0.1), transparent);animation:shimmer 2s infinite}