/**
 * 梯子工厂 (tizigc.online) - Skeuomorphic & Soft Realistic Design System
 * 风格参考：拟物化质感 (Skeuomorphism)、温润立体阴影、物理高光、真实触感
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap');

:root {
  /* 基础色彩系统 (暖灰基调 + 活力科技蓝) */
  --bg-gradient: radial-gradient(circle at 50% 10%, #fbfaf8 0%, #edeae5 55%, #e2dfd8 100%);
  --bg-body: #ece9e3;
  --bg-surface: #ffffff;
  --bg-surface-soft: #f7f6f3;
  --bg-surface-inset: #e8e5de;
  
  /* 文字层级 */
  --text-main: #19202c;
  --text-muted: #5c6677;
  --text-sub: #8692a3;
  --text-inverse: #ffffff;

  /* 拟物科技主色 (高光蓝与按压深蓝) */
  --brand-blue-light: #448cf8;
  --brand-blue: #2563eb;
  --brand-blue-dark: #1d4ed8;
  --brand-blue-shadow: rgba(37, 99, 235, 0.38);

  /* 状态强调色 */
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #ef4444;
  --accent-purple: #8b5cf6;

  /* 拟物高光与立体阴影 */
  --shadow-skeuo-card: 
    0 20px 40px -15px rgba(22, 28, 45, 0.08),
    0 1px 3px rgba(22, 28, 45, 0.04),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 2px 0 rgba(0, 0, 0, 0.03);

  --shadow-skeuo-card-hover: 
    0 26px 50px -15px rgba(22, 28, 45, 0.13),
    0 2px 6px rgba(22, 28, 45, 0.06),
    inset 0 1px 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 2px 0 rgba(0, 0, 0, 0.03);

  --shadow-skeuo-button: 
    0 10px 22px -4px var(--brand-blue-shadow),
    0 3px 6px -2px rgba(37, 99, 235, 0.3),
    inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px 0 rgba(0, 0, 0, 0.2);

  --shadow-skeuo-button-active: 
    0 4px 8px -2px var(--brand-blue-shadow),
    inset 0 2px 4px 0 rgba(0, 0, 0, 0.35);

  --shadow-skeuo-pill: 
    0 4px 12px rgba(22, 28, 45, 0.06),
    inset 0 1px 1px rgba(255, 255, 255, 0.9);

  --shadow-skeuo-inset: 
    inset 0 2px 5px rgba(0, 0, 0, 0.06),
    inset 0 -1px 1px rgba(255, 255, 255, 0.7);

  /* 边框与倒角 */
  --border-subtle: 1px solid rgba(255, 255, 255, 0.85);
  --border-light: 1px solid rgba(0, 0, 0, 0.06);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  /* 字体系统 */
  --font-sans: 'Plus Jakarta Sans', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --nav-height: 74px;
}

/* 全局重置与平滑滚动 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-body);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.65;
  font-size: 15px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ====== 顶部拟物化全局导航栏 ====== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(247, 245, 241, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 20px -2px rgba(22, 28, 45, 0.05);
}

.header-container {
  max-width: 1560px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* 品牌 Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--text-main);
  flex-shrink: 0;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff, #e9e6e0);
  box-shadow: 
    0 6px 14px rgba(0, 0, 0, 0.08),
    inset 0 1px 1px #fff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: transform 0.25s ease;
}

.brand-logo:hover .brand-icon {
  transform: translateY(-2px) scale(1.04);
}

.brand-title {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 19px;
  font-weight: 800;
  background: linear-gradient(135deg, #0f172a 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* 导航链接集合 (拟物胶囊组) */
.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(235, 232, 226, 0.6);
  padding: 5px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-skeuo-inset);
  border: 1px solid rgba(255, 255, 255, 0.5);
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.nav-item.active {
  color: var(--brand-blue-dark);
  background: #ffffff;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.07),
    inset 0 1px 1px #fff;
  font-weight: 700;
}

/* 导航右侧操作区 (搜索 + 按钮) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* 拟物搜索药丸输入框 */
.search-pill-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: #ffffff;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.05),
    inset 0 1px 1px #fff;
  font-size: 13px;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-pill-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  color: var(--text-main);
}

.search-shortcut {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-surface-inset);
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--text-muted);
}

/* 拟物方形图标按钮 (右上方质感小圆钮) */
.icon-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff, #f0eee9);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 
    0 5px 12px rgba(22, 28, 45, 0.06),
    inset 0 1px 1px #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-action-btn:hover {
  color: var(--brand-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.15);
}

.icon-action-btn:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-skeuo-inset);
}

/* 移动端汉堡菜单按钮 */
.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: 0.3s;
}

/* ====== 核心拟物化组件样式 ====== */

/* 1. 拟物实体卡片 (Skeuomorphic Card) */
.skeuo-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 30px;
  border: var(--border-subtle);
  box-shadow: var(--shadow-skeuo-card);
  position: relative;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.skeuo-card:hover {
  box-shadow: var(--shadow-skeuo-card-hover);
}

/* 2. 拟物蓝色高光立体按钮 (与用户提供截图 100% 呼应) */
.skeuo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-inverse);
  background: linear-gradient(180deg, var(--brand-blue-light) 0%, var(--brand-blue-dark) 100%);
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-skeuo-button);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.skeuo-btn:hover {
  background: linear-gradient(180deg, #5397fc 0%, #1a44c2 100%);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -4px var(--brand-blue-shadow), 0 4px 10px -2px rgba(37, 99, 235, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.6);
  color: #fff;
}

.skeuo-btn:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-skeuo-button-active);
}

/* 次级拟物浅色立体按钮 */
.skeuo-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  background: linear-gradient(180deg, #ffffff 0%, #f0ede6 100%);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.95);
  cursor: pointer;
  box-shadow: 
    0 6px 16px rgba(0, 0, 0, 0.06),
    inset 0 1px 1px #fff,
    inset 0 -1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.skeuo-btn-secondary:hover {
  color: var(--brand-blue);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.09), inset 0 1px 1px #fff;
}

.skeuo-btn-secondary:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-skeuo-inset);
}

/* 3. 拟物化凹陷输入容器 */
.skeuo-input-group {
  background: var(--bg-surface-inset);
  box-shadow: var(--shadow-skeuo-inset);
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.skeuo-input-group input {
  border: none;
  background: transparent;
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-main);
  outline: none;
}

/* 4. 拟物徽章 Badge */
.skeuo-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05), inset 0 1px 1px #fff;
}

.badge-gold {
  color: #b45309;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #fde68a;
}

.badge-blue {
  color: #1d4ed8;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #bfdbfe;
}

.badge-emerald {
  color: #047857;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #a7f3d0;
}

.badge-rose {
  color: #b91c1c;
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  border-color: #fecdd3;
}

/* ====== 全局搜索模态框 (Ctrl+K) ====== */
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.search-modal-backdrop.open {
  display: flex;
}

.search-modal-window {
  width: 90%;
  max-width: 640px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25), inset 0 1px 1px #fff;
  border: 1px solid rgba(255, 255, 255, 0.8);
  overflow: hidden;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.search-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #f1f0eb;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-modal-header input {
  flex: 1;
  font-size: 17px;
  border: none;
  outline: none;
  font-family: inherit;
  color: var(--text-main);
}

.search-modal-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 12px 16px;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.search-result-item:hover {
  background: #f4f6fa;
  transform: translateX(4px);
}

.search-result-title {
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-result-category {
  font-size: 11px;
  color: var(--text-sub);
  background: #ebe9e4;
  padding: 2px 8px;
  border-radius: 6px;
}

/* ====== 全局页脚 ====== */
.site-footer {
  margin-top: auto;
  background: #e4e1da;
  border-top: 1px solid rgba(255, 255, 255, 0.8);
  padding: 60px 24px 35px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.03);
}

.footer-container {
  max-width: 1560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 12px;
  max-width: 380px;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-main);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 13.5px;
}

.footer-col a:hover {
  color: var(--brand-blue);
  padding-left: 4px;
}

.footer-bottom {
  max-width: 1560px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-sub);
  flex-wrap: wrap;
  gap: 12px;
}

/* 响应式断点 */
@media (max-width: 1200px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-actions .search-pill-btn {
    display: none;
  }
  .footer-container {
    grid-template-columns: 1fr;
  }
}
