/* 极点 · 顶部导航 + 可交互布局试玩 精致设计 */

/* ========== 顶部导航菜单精致化 ========== */
.nav, .sf-nav {
  height: 68px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(20px) saturate(1.6) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03), 0 1px 2px rgba(0,0,0,0.02) !important;
  transition: all 0.3s ease !important;
}

.nav:hover, .sf-nav:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.06) !important;
}

.brand, .sf-brand {
  font-weight: 700 !important;
  letter-spacing: -0.3px !important;
  gap: 10px !important;
}

.brand img, .sf-brand img {
  border-radius: 12px !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2) !important;
  transition: transform 0.2s ease !important;
}

.brand:hover img, .sf-brand:hover img {
  transform: scale(1.05) !important;
}

.navlinks, .sf-nav > nav {
  gap: 4px !important;
}

.navlinks button, .sf-nav > nav button {
  position: relative !important;
  padding: 8px 16px !important;
  border-radius: 10px !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  color: #475569 !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  background: transparent !important;
}

.navlinks button:hover, .sf-nav > nav button:hover {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  transform: translateY(-1px) !important;
}

.navlinks button.active, .sf-nav > nav .active {
  background: linear-gradient(135deg, #eff6ff, #dbeafe) !important;
  color: #2563eb !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1) !important;
}

.navlinks button.active::after, .sf-nav > nav .active::after {
  content: "" !important;
  position: absolute !important;
  bottom: 4px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 20px !important;
  height: 3px !important;
  background: #2563eb !important;
  border-radius: 2px !important;
  display: block !important;
}

/* 导航工具区 */
.navtools, .sf-nav > div {
  gap: 10px !important;
}

.nav .search, .sf-nav .search {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  padding: 8px 14px !important;
  transition: all 0.2s ease !important;
}

.nav .search:focus-within, .sf-nav .search:focus-within {
  background: #fff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12) !important;
  width: 200px !important;
}

/* ========== 可交互布局试玩台精致化 ========== */
/* 试玩台整体容器 */
.sf-site, body.sf-site {
  background: #f8fafc !important;
}

/* 试玩编辑器工具栏 */
.sf-editor-tools, .sp-tpl {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 16px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
  margin-bottom: 16px !important;
}

.sp-tpl button {
  border-radius: 20px !important;
  padding: 7px 14px !important;
  font-size: 12.5px !important;
  font-weight: 550 !important;
  border: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
  color: #475569 !important;
  transition: all 0.2s ease !important;
}

.sp-tpl button:hover {
  background: #3b82f6 !important;
  color: #fff !important;
  border-color: #3b82f6 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25) !important;
}

/* 组件列表 / 画布区域 */
.sf-blocks, .sf-canvas, .sf-preview-wrap {
  border-radius: 16px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04) !important;
}

/* 选中状态 */
.sf-block.selected, .sf-selected {
  outline: 2px solid #3b82f6 !important;
  outline-offset: 2px !important;
  border-radius: 12px !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
}

/* 试玩组件卡片 */
.sp-stats div, .sp-feats div {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  transition: all 0.2s ease !important;
}

.sp-stats div:hover, .sp-feats div:hover {
  background: #fff !important;
  border-color: #3b82f6 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1) !important;
}

.sp-stats b {
  color: #2563eb !important;
  font-size: 22px !important;
  font-weight: 700 !important;
}

/* 自定义颜色选择器 */
.sp-custom {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  border: 2px solid #fff !important;
  box-shadow: 0 0 0 2px #e2e8f0, 0 2px 8px rgba(0,0,0,0.1) !important;
  transition: transform 0.2s ease !important;
}

.sp-custom:hover {
  transform: scale(1.1) !important;
}

/* 设备预览切换按钮 */
.sf-device-btns button, .sp-device button {
  border-radius: 8px !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  border: 1px solid #e2e8f0 !important;
  background: #fff !important;
  transition: all 0.15s ease !important;
}

.sf-device-btns button.active, .sp-device button.active {
  background: #3b82f6 !important;
  color: #fff !important;
  border-color: #3b82f6 !important;
}

/* 检查器 / 属性面板 */
.sf-inspector {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 16px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04) !important;
}

.sf-inspector input, .sf-inspector textarea, .sf-inspector select {
  border-radius: 8px !important;
  border: 1px solid #e2e8f0 !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

.sf-inspector input:focus, .sf-inspector textarea:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
  outline: none !important;
}

/* 操作按钮组 */
.sp-insp-actions {
  gap: 8px !important;
  margin-top: 12px !important;
}

.sp-insp-actions .btn {
  border-radius: 8px !important;
  font-size: 12.5px !important;
  padding: 7px 14px !important;
}

/* 提示文字 */
.sp-hint {
  background: #f8fafc !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  color: #64748b !important;
  font-size: 12px !important;
  border: 1px dashed #e2e8f0 !important;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .nav, .sf-nav {
    height: 56px !important;
    padding: 0 12px !important;
  }
  .navlinks button, .sf-nav > nav button {
    padding: 6px 10px !important;
    font-size: 13px !important;
  }
  .sf-editor-tools, .sp-tpl {
    padding: 12px !important;
    border-radius: 12px !important;
  }
}

/* 深色模式 */
.dark .nav, .dark .sf-nav {
  background: rgba(15, 23, 42, 0.92) !important;
  border-bottom-color: #1e293b !important;
}
.dark .navlinks button.active, .dark .sf-nav > nav .active {
  background: #1e3a5f !important;
  color: #60a5fa !important;
}
.dark .sf-editor-tools, .dark .sf-inspector, .dark .sf-canvas {
  background: #1e293b !important;
  border-color: #334155 !important;
}
