/* =========================================
   Asolica 文档页样式
   ========================================= */

body {
  font-family: var(--font);
  background: linear-gradient(165deg, #FFF5EC 0%, #FFF0E0 20%, #F3F7FF 50%, #ECEFFF 80%, #FAFAFA 100%);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.06); }
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 130px 24px 80px;
  position: relative;
}

.ambient-glow {
  position: absolute !important;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  animation: pulseGlow 8s ease-in-out infinite;
}
.ambient-glow.blue { width: 500px; height: 500px; background: rgba(37, 99, 235, 0.12); top: 5%; left: -5%; }
.ambient-glow.orange { width: 450px; height: 450px; background: rgba(249, 115, 22, 0.1); bottom: 15%; right: -5%; animation-delay: -3s; }

.page-header {
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
  text-align: left;
  border-bottom: 1px dashed rgba(226, 232, 240, 0.8);
  padding-bottom: 24px;
}
.page-header h1 {
  font-size: clamp(32px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 12px;
}
.page-header p {
  font-size: 15px;
  color: var(--text-2);
  max-width: 700px;
  line-height: 1.65;
}

.workspace {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 40px;
  position: relative;
  z-index: 5;
  align-items: start;
}

.sidebar-card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  padding: 28px 18px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.02);
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
.sidebar-card::-webkit-scrollbar { width: 4px; }
.sidebar-card::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.08); border-radius: 2px; }

.menu-category { margin-bottom: 28px; }
.menu-category:last-child { margin-bottom: 0; }
.category-title {
  font-size: 11px; font-weight: 800; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 1.5px;
  padding-left: 12px; margin-bottom: 12px;
}
.menu-list { display: flex; flex-direction: column; gap: 6px; }
.menu-item {
  font-size: 13.5px; font-weight: 600; color: var(--text-2);
  padding: 10px 14px 10px 22px; border-radius: 12px;
  cursor: pointer; transition: all 0.25s var(--ease-out);
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; text-align: left; position: relative;
}
.menu-item::before {
  content: ''; position: absolute; left: 6px; top: 50%;
  transform: translateY(-50%) scaleY(0.3);
  width: 3px; height: 14px; background: var(--primary);
  border-radius: 2px; opacity: 0; transition: all 0.25s var(--ease-out);
}
.menu-item svg { width: 12px; height: 12px; opacity: 0; transform: translateX(-4px); transition: all 0.25s var(--ease-out); stroke-width: 2.5; }
.menu-item:hover { color: var(--text); background: rgba(15, 23, 42, 0.03); }
.menu-item:hover::before { opacity: 0.4; transform: translateY(-50%) scaleY(0.7); }
.menu-item.active { color: var(--primary); background: rgba(37, 99, 235, 0.06); font-weight: 700; }
.menu-item.active::before { opacity: 1; transform: translateY(-50%) scaleY(1); }
.menu-item.active svg { opacity: 0.6; transform: translateX(0); }

.content-area { flex: 1; min-width: 0; }
.content-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 28px;
  padding: 48px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-lg);
  display: none;
  animation: contentFadeIn 0.4s var(--ease-out) forwards;
  position: relative;
  overflow: hidden;
}
.content-card.active { display: block; }
.content-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0.9;
}
@keyframes contentFadeIn {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}
.content-card h2 { font-size: 24px; font-weight: 800; color: var(--text); margin-bottom: 12px; letter-spacing: -0.6px; line-height: 1.3; }
.content-card .card-intro { font-size: 15px; color: var(--text-2); line-height: 1.8; margin-bottom: 24px; }
.content-card p { font-size: 15px; color: var(--text-2); line-height: 1.8; text-align: justify; margin-top: 14px; }
.content-card p:first-of-type { margin-top: 0; }

.content-card .solution {
  background: rgba(15, 23, 42, 0.02);
  border-left: 4px solid var(--primary);
  padding: 20px 24px; border-radius: 8px;
  font-size: 14px; color: var(--text); line-height: 1.7; margin-top: 20px;
  border-top: 1px solid rgba(15, 23, 42, 0.01);
  border-right: 1px solid rgba(15, 23, 42, 0.01);
  border-bottom: 1px solid rgba(15, 23, 42, 0.01);
}
.content-card .solution-danger { border-left-color: #DC2626; background: rgba(220, 38, 38, 0.015); }
.content-card .solution strong { color: var(--primary); display: block; margin-bottom: 8px; font-weight: 700; font-size: 14.5px; }
.content-card .solution-danger strong { color: #DC2626; }

.content-card ol, .content-card ul {
  margin-top: 14px; margin-left: 20px;
  display: flex; flex-direction: column; gap: 12px;
  font-size: 14.5px; color: var(--text-2); line-height: 1.75;
}
.content-card li strong { color: var(--text); }

.content-card :not(pre) > code {
  font-family: var(--mono);
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary); padding: 3px 8px;
  border-radius: 4px; font-size: 13px; font-weight: 600;
}

.tech-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.tech-table th, .tech-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.tech-table th { background: rgba(37, 99, 235, 0.05); font-weight: 700; color: var(--primary); }
.tech-table td { color: var(--text-2); }

.code-block-wrapper { position: relative; margin-top: 16px; }
.content-card pre {
  font-family: var(--mono); background: var(--code-bg); color: #E2E8F0;
  padding: 20px 24px; border-radius: 12px; font-size: 13px;
  overflow-x: auto; line-height: 1.7;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06); position: relative;
}
.content-card pre .prompt { color: #4ADE80; font-weight: 600; user-select: none; }
.content-card pre .comment { color: #64748B; }
.copy-btn {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94A3B8; width: 36px; height: 36px;
  border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: all 0.2s var(--ease-out); z-index: 10;
}
.code-block-wrapper:hover .copy-btn { opacity: 1; }
.copy-btn:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.copy-btn.copied { background: rgba(74, 222, 128, 0.15); border-color: rgba(74, 222, 128, 0.3); color: #4ADE80; }
.copy-btn svg { width: 18px; height: 18px; }

@media (max-width: 1024px) { .container { padding-top: 120px; } }
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; gap: 24px; }
  .sidebar-card { position: relative; top: 0; max-height: none; padding: 20px 14px; border-radius: 20px; }
  .menu-category { margin-bottom: 20px; }
  .menu-list { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .menu-item { font-size: 12.5px; padding: 8px 12px 8px 18px; border-radius: 8px; }
  .menu-item svg { display: none; }
  .content-card { padding: 32px 24px; border-radius: 20px; }
}
@media (max-width: 640px) {
  .container { padding-top: 100px; }
  .menu-list { flex-direction: column; width: 100%; }
  .menu-item { width: 100%; }
  .content-card pre { padding: 16px; font-size: 12px; }
}