/* ============================================
   market-detail.css - API详情页样式
   ============================================ */

/* ========== 详情页整体 ========== */
.detail-page {
  padding-bottom: 40px;
  min-height: calc(100vh - 64px);
}

/* ========== 顶部信息区 ========== */
.detail-top {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}

/* 左侧：API信息 */
.detail-info {
  flex: 1;
  min-width: 0;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px;
}

.detail-info-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

/* API大图标 */
.detail-api-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #666;
  flex-shrink: 0;
  background: transparent;
}

.detail-api-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 6px;
}

/* 官方标签 */
.official-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 12px;
  color: #fff;
  background: var(--primary);
  border-radius: var(--radius-sm);
  margin-left: 8px;
  vertical-align: middle;
  font-weight: 500;
}

.detail-api-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

/* 标签列表 */
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-tags .detail-tag {
  padding: 3px 12px;
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 20px;
}

/* ========== 右侧服务商信息（已隐藏） ========== */
.detail-provider {
  display: none;
}

/* ========== 价格区（左侧卡片内） ========== */
.detail-price-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.price-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.price-group-label {
  font-size: 13px;
  font-weight: 600;
  color: #1890ff;
  margin: 16px 0 6px 0;
  padding-left: 8px;
  border-left: 3px solid #1890ff;
}

.price-group-label:first-child {
  margin-top: 0;
}

.price-display {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 6px;
}

.price-currency {
  font-size: 18px;
  font-weight: 600;
  color: #ff4d4f;
}

.price-value {
  font-size: 36px;
  font-weight: 700;
  color: #ff4d4f;
  line-height: 1;
}

.price-unit {
  font-size: 14px;
  color: var(--text-secondary);
  margin-left: 4px;
}

.price-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.6;
  margin-top: 4px;
}

/* ========== 套餐选择 - 卡片网格 ========== */
.price-cards-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.price-card {
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  user-select: none;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.price-card:hover {
  transform: translateY(-2px);
  border-color: #4f6ef7;
  box-shadow: 0 4px 12px rgba(79, 110, 247, 0.18);
}

.price-card.selected {
  border-color: #4f6ef7;
  box-shadow: 0 0 0 2px rgba(79, 110, 247, 0.2);
}

.price-card.selected::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 12px;
  color: #fff;
  background: #4f6ef7;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
}

/* 上半部分 - 白底 */
.price-card-top {
  padding: 14px 10px 10px;
  flex: 1;
  background: #fff;
}

.price-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}

.price-card-amount {
  font-size: 30px;
  font-weight: 700;
  color: #ff4d4f;
  line-height: 1.1;
  margin-bottom: 2px;
}

.price-card-currency {
  font-size: 14px;
  font-weight: 600;
  color: #ff4d4f;
}

.price-card-count {
  font-size: 13px;
  color: #888;
  margin-top: 2px;
}

.price-card-time {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
  line-height: 1.3;
  padding: 0 4px;
}

/* 下半部分 - 蓝底 */
.price-card-bottom {
  padding: 8px 10px;
  background: #4f6ef7;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-card.selected .price-card-bottom {
  background: #3d5bd6;
}

/* 联系客服卡片 - 同样上白下蓝 */
.price-card-contact .price-card-top {
  background: #fff;
}

.price-card-contact .price-card-name {
  color: #333;
}

.price-card-contact .price-card-amount {
  color: #4f6ef7;
  font-size: 18px;
}

.price-card-contact .price-card-currency {
  color: #4f6ef7;
}

.price-card-contact .price-card-count {
  color: #888;
}

.price-card-contact .price-card-bottom {
  background: #4f6ef7;
}

.price-card-contact:hover .price-card-bottom {
  background: #3d5bd6;
}

/* ========== 查看更多卡片 ========== */
.price-card-more {
  border: 1px dashed #4f6ef7;
  background: #f8f9ff;
}
.price-card-more:hover {
  background: #eef1ff;
  border-color: #3d5bd6;
}
.price-card-more .price-card-name {
  color: #4f6ef7;
}
.price-card-more .price-card-count {
  color: #999;
  font-size: 12px;
}
.price-card-more .price-card-bottom {
  background: #4f6ef7;
}
.price-card-more:hover .price-card-bottom {
  background: #3d5bd6;
}

/* ========== 查看更多套餐弹窗 ========== */
.pkg-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}
.pkg-modal-overlay.show {
  display: flex;
}
.pkg-modal {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 1100px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}
.pkg-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #e8ecf1;
}
.pkg-modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0;
}
.pkg-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}
.pkg-modal-title {
  font-size: 14px;
  font-weight: 600;
  color: #1890ff;
  margin-bottom: 12px;
  padding-left: 8px;
  border-left: 3px solid #1890ff;
}
.pkg-modal-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

/* ========== 操作按钮 ========== */
.detail-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.detail-actions .btn-try {
  padding: 10px 28px;
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.detail-actions .btn-try:hover {
  background: #f0f4ff;
}

.detail-actions .btn-buy {
  padding: 10px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.detail-actions .btn-buy:hover {
  background: var(--primary-hover);
}

/* ========== 旧价格区（保留兼容） ========== */
.price-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
}

.price-section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.spec-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.spec-selector .spec-item {
  padding: 6px 18px;
  font-size: 13px;
  color: var(--text-secondary);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.spec-selector .spec-item:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.spec-selector .spec-item.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.price-table th {
  background: #fafafa;
  padding: 10px 16px;
  text-align: left;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.price-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-primary);
}

.price-table .price-amount {
  color: var(--orange);
  font-weight: 600;
  font-size: 15px;
}

.price-table .price-unit {
  color: var(--text-tertiary);
  font-size: 12px;
}

.resource-note {
  padding: 12px 16px;
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: var(--radius-md);
  font-size: 13px;
  color: #8c6d1f;
  line-height: 1.6;
}

.resource-note a {
  color: var(--primary);
  text-decoration: underline;
}

/* ========== Tab区域 ========== */
.detail-tabs {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  overflow: hidden;
}

.detail-tabs .tabs {
  padding: 0 24px;
  background: #fafafa;
}

.detail-tabs .tab-item {
  padding: 14px 24px;
  font-size: 15px;
}

/* Tab内容区 */
.detail-tabs .tab-content {
  padding: 24px;
}

/* 产品说明 */
.product-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.product-desc h3 {
  font-size: 16px;
  color: var(--text-primary);
  margin: 20px 0 10px;
  font-weight: 600;
}

.product-desc p {
  margin-bottom: 12px;
}

.product-desc ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.product-desc ul li {
  list-style: disc;
  margin-bottom: 4px;
}

/* ========== 接入点分组（折叠展开） ========== */
.endpoint-group {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* 分组标题 */
.endpoint-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fafafa;
  cursor: pointer;
  transition: background 0.2s;
  user-select: none;
}

.endpoint-group-header:hover {
  background: #f0f0f0;
}

.endpoint-group-header .group-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.endpoint-group-header .group-count {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* 展开收起箭头 */
.endpoint-group-header .group-arrow {
  font-size: 12px;
  color: var(--text-tertiary);
  transition: transform 0.3s;
}

.endpoint-group.collapsed .group-arrow {
  transform: rotate(-90deg);
}

/* 分组内容 */
.endpoint-group-body {
  transition: max-height 0.3s ease;
  overflow: hidden;
}

.endpoint-group.collapsed .endpoint-group-body {
  max-height: 0 !important;
}

/* 接入点项 */
.endpoint-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.endpoint-item:hover {
  background: var(--primary-light);
}

.endpoint-item .ep-method {
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.ep-method.get { background: #e8f5e9; color: #2e7d32; }
.ep-method.post { background: #e3f2fd; color: #1565c0; }
.ep-method.put { background: #fff3e0; color: #e65100; }
.ep-method.delete { background: #fce4ec; color: #c62828; }

.endpoint-item .ep-path {
  color: var(--text-primary);
  font-family: "Consolas", "Monaco", monospace;
}

.endpoint-item .ep-name {
  color: var(--text-secondary);
  margin-left: auto;
}

/* ========== 参数表格 ========== */
.param-section {
  margin-bottom: 20px;
}

.param-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ========== 代码块增强 ========== */
.detail-page .code-block {
  margin: 16px 0;
}

.code-block .code-lang {
  position: absolute;
  top: 8px;
  left: 16px;
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.code-block pre {
  padding-top: 28px;
}

/* Prism.js 语法高亮适配：去除默认背景/内边距，复用 code-block 深色背景 */
.code-block code[class*="language-"],
.code-block pre[class*="language-"] {
  background: transparent;
  padding: 0;
  margin: 0;
  text-shadow: none;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
}

/* ========== MCP服务区 ========== */
.mcp-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
}

.mcp-section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mcp-section-title .mcp-badge {
  padding: 2px 8px;
  font-size: 11px;
  color: #fff;
  background: var(--success);
  border-radius: var(--radius-sm);
}

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

/* MCP配置项 */
.mcp-config {
  padding: 16px;
  background: #f8f9fa;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.mcp-config-row {
  display: flex;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
}

.mcp-config-row .mcp-label {
  color: var(--text-tertiary);
  min-width: 100px;
}

.mcp-config-row .mcp-value {
  color: var(--text-primary);
  font-family: "Consolas", "Monaco", monospace;
}

/* OpenAPI文档区 */
.openapi-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
}

.openapi-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

/* ========== 帮助手册 ========== */
.help-section {
  margin-bottom: 16px;
}

.help-section h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.help-section p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 10px;
}

.help-section ol,
.help-section ul {
  padding-left: 20px;
  margin-bottom: 10px;
}

.help-section li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 4px;
}

/* ========== 响应式 ========== */

@media (max-width: 768px) {
  .detail-top { flex-direction: column; gap: 16px; }
  .detail-info { padding: 20px; }
  .detail-api-name { font-size: 20px; }
  .detail-tabs .tabs { overflow-x: auto; padding: 0 12px; }
  .detail-tabs .tab-item { padding: 12px 16px; font-size: 14px; white-space: nowrap; }
  .detail-tabs .tab-content { padding: 16px; }
  .detail-price-section { margin-top: 16px; padding-top: 16px; }
  .price-value { font-size: 28px; }
  .plan-list { flex-wrap: wrap; }
  .plan-item { padding: 8px 12px; }
  .detail-actions { margin-top: 16px; }
  .detail-actions .btn-try, .detail-actions .btn-buy { padding: 8px 20px; font-size: 14px; }
  .ep-doc-header { flex-wrap: wrap; padding: 12px 16px; }
  .ep-doc-section { padding: 16px; }
  .ep-info-grid { grid-template-columns: 1fr; }
  .ep-info-item:nth-child(odd) { border-right: none; }
  .price-table { font-size: 12px; display: block; overflow-x: auto; }
  .mcp-config-row { flex-direction: column; gap: 4px; }
}

/* ========== 接口文档 - 阿里云风格 ========== */

/* 单个接口文档容器 */
.ep-doc {
  margin-bottom: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* 接口标题行 */
.ep-doc-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  background: #f8f9fb;
  border-bottom: 1px solid var(--border);
}

.ep-doc-method {
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
  color: #fff;
  flex-shrink: 0;
}

.ep-doc-method.get { background: #52c41a; }
.ep-doc-method.post { background: #4f6ef7; }
.ep-doc-method.put { background: #ff7d00; }
.ep-doc-method.delete { background: #ff4d4f; }

.ep-doc-path {
  font-size: 14px;
  font-family: "Consolas", "Monaco", monospace;
  color: var(--text-primary);
  word-break: break-all;
}

.ep-doc-name {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* 文档区块 */
.ep-doc-section {
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.ep-doc-section:last-child {
  border-bottom: none;
}

.ep-doc-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

/* 接口信息网格 */
.ep-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ep-info-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}

.ep-info-item:nth-child(odd) {
  border-right: 1px solid #f0f0f0;
}

.ep-info-item:nth-last-child(-n+2) {
  border-bottom: none;
}

.ep-info-label {
  min-width: 80px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.ep-info-value {
  color: var(--text-primary);
  word-break: break-all;
}

.ep-info-value a {
  color: var(--primary);
}

.ep-info-value a:hover {
  text-decoration: underline;
}

.code-font {
  font-family: "Consolas", "Monaco", monospace;
  font-size: 13px;
}

/* 方法标签 */
.ep-method-tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 3px;
}

.ep-method-tag.get { background: #f6ffed; color: #52c41a; }
.ep-method-tag.post { background: #eef1fe; color: #4f6ef7; }
.ep-method-tag.put { background: #fff7e6; color: #ff7d00; }
.ep-method-tag.delete { background: #fff1f0; color: #ff4d4f; }

/* 接口描述 */
.ep-doc-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* 空参数提示 */
.ep-doc-empty {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-tertiary);
  background: #fafafa;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  text-align: center;
}

/* 代码示例Tab */
.code-example-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 0;
}

.code-tab {
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  background: #fafafa;
}

.code-tab:hover {
  color: var(--primary);
}

.code-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: #fff;
  font-weight: 500;
}

.code-tab-content {
  display: none;
}

.code-tab-content.active {
  display: block;
}

/* 参数表格在文档中的间距调整 */
.ep-doc-section .param-section {
  margin-bottom: 0;
}

.ep-doc-section .data-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* 代码块在文档中的调整 */
.ep-doc-section .code-block {
  border-radius: var(--radius-md);
  margin: 8px 0 0;
}

/* ========== 购买确认弹窗 ========== */
.buy-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.buy-modal-overlay.show {
  display: flex;
}

.buy-modal {
  width: 460px;
  max-width: 90vw;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.buy-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.buy-modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.buy-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #999;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.buy-modal-close:hover {
  background: #f5f6f8;
  color: #333;
}

.buy-modal-body {
  padding: 24px;
}

.buy-modal-body .buy-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 14px;
}

.buy-modal-body .buy-info-row:last-child {
  border-bottom: none;
}

.buy-info-label {
  color: #999;
}

.buy-info-value {
  color: #333;
  font-weight: 500;
}

.buy-info-value.price {
  color: #4f6ef7;
  font-size: 20px;
  font-weight: 700;
}

.buy-info-value.price.free {
  color: #52c41a;
}

.buy-balance-warn {
  margin-top: 16px;
  padding: 12px 16px;
  background: #fff7e6;
  border: 1px solid #ffe58f;
  border-radius: 10px;
  font-size: 13px;
  color: #d48806;
  line-height: 1.6;
}

.buy-balance-warn a {
  color: #4f6ef7;
  font-weight: 500;
  text-decoration: none;
}

.buy-balance-warn a:hover {
  text-decoration: underline;
}

.buy-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #f0f0f0;
}

.btn-modal-cancel {
  padding: 10px 24px;
  background: #fff;
  color: #666;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-modal-cancel:hover {
  border-color: #999;
  color: #333;
}

.btn-modal-confirm {
  padding: 10px 32px;
  background: #4f6ef7;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-modal-confirm:hover {
  background: #3d5bd9;
}

.btn-modal-confirm:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn-modal-confirm.success {
  background: #52c41a;
}

/* ========== 购买成功引导弹窗 ========== */
.success-guide-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.success-guide-modal {
  background: #fff;
  border-radius: 16px;
  padding: 40px 48px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: scaleIn 0.3s ease;
}

.success-guide-icon {
  margin-bottom: 20px;
}

.success-guide-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.success-guide-desc {
  font-size: 14px;
  color: #666;
  margin-bottom: 32px;
  line-height: 1.6;
}

.success-guide-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.guide-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.guide-btn-debug {
  background: linear-gradient(135deg, #4f6ef7, #7c3aed);
  color: #fff;
}

.guide-btn-debug:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 110, 247, 0.35);
}

.guide-btn-packages {
  background: #f5f7fa;
  color: #333;
  border: 1px solid #e5e7eb;
}

.guide-btn-packages:hover {
  background: #eef1f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ========== 接口文档 - 左侧列表+右侧内容布局 ========== */
.doc-layout {
  display: flex;
  gap: 0;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  min-height: 400px;
}

.doc-nav-list {
  width: 220px;
  min-width: 220px;
  background: #fafafa;
  border-right: 1px solid #e8e8e8;
  overflow-y: auto;
  max-height: 800px;
}

.doc-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  border-left: 3px solid transparent;
  transition: all 0.2s;
  font-size: 13px;
  color: #555;
}

.doc-nav-item:hover {
  background: #f0f5ff;
  color: #333;
}

.doc-nav-item.active {
  background: #e8f0fe;
  color: #1a73e8;
  border-left-color: #1a73e8;
  font-weight: 500;
}

.doc-nav-method {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.doc-nav-method.get {
  background: #e8f5e9;
  color: #2e7d32;
}

.doc-nav-method.post {
  background: #fff3e0;
  color: #e65100;
}

.doc-nav-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

.doc-content-area {
  flex: 1;
  overflow-y: auto;
  max-height: 800px;
  padding: 0;
}

.doc-content-item {
  display: none;
}

.doc-content-item.active {
  display: block;
}
