/* ============================================================
   okie-common.css  —  全站共用样式（导航栏 + 侧边栏布局）
   所有页面统一引用：<link rel="stylesheet" href="/okie-common.css">
   修改本文件即可全站同步，请勿在各页面内重复定义这些样式。
   生成时间: 2026-06-23
   ============================================================ */

/* ===== 导航栏 NAVBAR ===== */
/* ═══════════════════════════════════════════════════════
   GLOBAL NAV — 统一标准，所有页面共用，禁止在各页面单独覆盖
   ═══════════════════════════════════════════════════════ */
[dir="rtl"] .nav-right { flex-direction: row-reverse; }

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  gap: 0;
}
[data-theme="dark"] .navbar {
  background: var(--bg-card);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
  margin-right: 16px;
  flex-shrink: 0;
}
.nav-logo-icon { font-size: 1rem; }
.nav-logo-dot { color: var(--accent); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow: visible;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sub);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}
.nav-link:hover { background: var(--bg-soft); color: var(--text); }
.nav-link.active { color: var(--accent); background: var(--blue-bg); }

/* 汉堡菜单（移动端） */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  background: transparent;
  border: none;
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-sub);
  border-radius: 2px;
  transition: all 0.2s;
}
.nav-mobile-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px 16px;
  z-index: 999;
  gap: 4px;
}
[data-theme="dark"] .nav-mobile-menu {
  background: var(--bg-card);
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu .nav-link {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
}

@media (max-width: 860px) {
  .nav-hamburger { display: flex; }
  .nav-links { display: none; }
  .navbar { padding: 0 16px; }
}

/* 主题切换按钮 */
.theme-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.theme-btn:hover { border-color: var(--border-hover); background: var(--bg-soft); }

/* 语言切换 */
.lang-wrap { position: relative; flex-shrink: 0; }
.lang-switcher {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.lang-switcher #langLabel {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
  height: 34px;
  box-sizing: border-box;
}
.lang-switcher #langLabel:hover { border-color: var(--border-hover); color: var(--text); }
.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  min-width: 160px;
  z-index: 2000;
  overflow: hidden;
}
.lang-menu.open {
  display: block;
  animation: langMenuIn 0.18s ease forwards;
}
@keyframes langMenuIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.lang-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-sub);
  cursor: pointer;
  transition: background 0.12s;
  border-bottom: 1px solid var(--border);
}
.lang-opt:last-child { border-bottom: none; }
.lang-opt:hover { background: var(--blue-bg); color: var(--accent); }
.lang-opt.active { background: var(--blue-bg); color: var(--accent); font-weight: 600; }

/* Sign In 按钮（由 okie-auth.js 动态注入，统一样式） */
#okieAuthSignInBtn {
  padding: 6px 14px;
  height: 34px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  box-sizing: border-box;
}
#okieAuthSignInBtn:hover { background: var(--blue-bg); }
/* ═══════════════════════════════════════════════════════ */

/* ===== 侧边栏 + 应用布局 SIDEBAR / APP LAYOUT ===== */
/* ============================================================
   OKIE SIDEBAR LAYOUT — Monica AI Style v3
   ============================================================ */

body { overflow-x: hidden; }

/* App Shell */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── 左侧边栏 ── */
.sidebar {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  background: var(--bg-soft, #f8faff);
  border-right: 1px solid var(--border, #e5e9f5);
  display: flex;
  flex-direction: column;
  padding: 20px 12px 16px;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  transition: transform 0.25s ease;
}

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--navy, #0d1b4b);
  text-decoration: none;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.sidebar-logo:hover { background: var(--bg, #fff); }
.sidebar-logo .logo-star { color: var(--accent, #2563eb); font-size: 22px; }
/* OF 品牌图标（替换原 ✦ 文字符号） */
.sidebar-logo .logo-img { height: 26px; width: auto; display: block; flex-shrink: 0; }
[data-theme="dark"] .sidebar-logo .logo-img { filter: brightness(1.15); }

/* ============================================================
   SITE FOOTER — 全站统一页脚（从各页面抽取至此集中管理）
   ============================================================ */
.site-footer {
  background: #060c1a; color: rgba(255,255,255,0.55);
  padding: 56px 32px 32px; border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand .footer-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; font-weight: 800; font-size: 17px;
  color: #fff; letter-spacing: -0.3px; margin-bottom: 12px;
}
.footer-brand .footer-logo-img { height: 24px; width: auto; display: block; filter: brightness(1.15); }
.footer-tagline { font-size: 13px; line-height: 1.6; color: rgba(255,255,255,0.45); max-width: 220px; }
.footer-col-title { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 16px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 0; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.55); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.3); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: 12px; color: rgba(255,255,255,0.35); text-decoration: none; transition: color 0.15s; }
.footer-bottom-links a:hover { color: rgba(255,255,255,0.7); }
@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 520px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* 分组标签 */
.sidebar-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted, #8892b8);
  padding: 16px 12px 6px;
  flex-shrink: 0;
}

/* 导航链接列表 */
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: visible;
}

/* 单个导航链接 */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-sub, #4a5580);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}
.sidebar-link:hover {
  background: var(--bg, #fff);
  color: var(--text, #0d1b4b);
  transform: translateX(2px);
}
.sidebar-link.active {
  background: var(--blue-bg, #eff6ff);
  color: var(--accent, #2563eb);
  font-weight: 600;
}
.sidebar-link .nav-emoji {
  font-size: 16px;
  min-width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.sidebar-link .nav-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* ── 底部操作区 ── */
.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border, #e5e9f5);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

/* 语言切换按钮 */
.sidebar-lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-sub, #4a5580);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  width: 100%;
  text-align: left;
  transition: all 0.15s;
  position: relative;
  box-sizing: border-box;
}
.sidebar-lang-btn:hover { background: var(--bg, #fff); color: var(--text, #0d1b4b); }

/* 语言下拉菜单（向上弹出） */
.sidebar-lang-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e5e9f5);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(13,27,75,.12);
  overflow: hidden;
  z-index: 300;
}
.sidebar-lang-menu.open { display: block; }
.sidebar-lang-opt {
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-sub, #4a5580);
  transition: background 0.15s;
}
.sidebar-lang-opt:hover { background: var(--blue-bg, #eff6ff); color: var(--accent, #2563eb); }
.sidebar-lang-opt.active { background: var(--blue-bg, #eff6ff); color: var(--accent, #2563eb); font-weight: 600; }

/* 主题切换 + Auth 行 */
.sidebar-bottom-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}

/* 主题切换按钮 */
.sidebar-theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-sub, #4a5580);
  transition: all 0.15s;
  flex-shrink: 0;
}
.sidebar-theme-btn:hover { background: var(--bg, #fff); color: var(--text, #0d1b4b); }

/* nav-right 容器（okie-auth.js 注入 Sign In 按钮到这里） */
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}
/* Sign In 按钮适配侧边栏 */
.nav-right .auth-btn {
  width: 100%;
  justify-content: center;
  border-radius: 10px;
  height: 36px;
  font-size: 13px;
  padding: 0 12px;
}
/* 用户头像区适配侧边栏 */
.nav-right .auth-avatar-wrap {
  width: 100%;
  position: relative;
}
.nav-right .auth-avatar-btn {
  width: 100%;
  border-radius: 10px;
  height: 36px;
  justify-content: flex-start;
  padding: 0 12px;
  gap: 8px;
}
/* 用户下拉菜单向上弹出 */
.nav-right .auth-dropdown {
  bottom: calc(100% + 8px);
  top: auto;
  right: 0;
  left: 0;
  min-width: unset;
}

/* ── 右侧主内容区 ── */
.main-content {
  margin-left: 260px;
  flex: 1;
  min-width: 0;
  background: var(--bg, #fff);
}

/* 隐藏旧的顶部导航 */
#nav-global { display: none !important; }
.navbar { display: none !important; }

/* ── 移动端汉堡按钮 ── */
.sidebar-hamburger {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e5e9f5);
  box-shadow: 0 2px 8px rgba(13,27,75,.08);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
}
.sidebar-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy, #0d1b4b);
  border-radius: 2px;
  transition: all 0.25s;
}

/* 侧边栏遮罩（移动端） */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 190;
}

@media (max-width: 860px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    box-shadow: 4px 0 24px rgba(13,27,75,.12);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-hamburger { display: flex; }
  .sidebar-overlay.open { display: block; }
  .main-content {
    margin-left: 0;
    padding-top: 64px;
  }
}

@media (max-width: 480px) {
  /* main-content padding-top 已移除 */
}

/* ============================================================
   MOBILE RESPONSIVE — 全站移动端适配 (max-width: 768px / 480px)
   追加于此，无需修改各页面。
   ============================================================ */

/* ── 768px 断点：平板 / 大手机 ── */
@media (max-width: 768px) {

  /* Hero 区域 */
  .hero {
    padding: 56px 16px 40px;
  }
  .hero-title {
    font-size: clamp(2rem, 7vw, 2.8rem);
    letter-spacing: -1px;
  }
  .hero-sub {
    font-size: 0.95rem;
  }
  .hero-stats {
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero-cta-row {
    max-width: 100%;
  }

  /* 通用 section 内边距 */
  .tool-section,
  .how-section,
  .features-section,
  .cta-section,
  .setup-section {
    padding-left: 16px;
    padding-right: 16px;
  }
  .how-section { padding-top: 48px; padding-bottom: 48px; }

  /* 通用 grid 折叠 */
  .how-grid,
  .steps-grid,
  .grid-2,
  .method-grid {
    grid-template-columns: 1fr;
  }

  /* Tab 行 */
  .tab-row {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .tab {
    padding: 8px 14px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* 表单卡片 */
  .form-card {
    padding: 16px;
  }
  .model-row {
    flex-direction: column;
  }
  .model-row .field-input {
    width: 100%;
  }
  .btn-load {
    width: 100%;
    padding: 10px;
    text-align: center;
  }

  /* Verdict 卡片（API Checker） */
  .verdict-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 16px;
  }
  .score-ring {
    align-self: center;
  }
  .verdict-info {
    min-width: 0;
    width: 100%;
  }

  /* Result actions */
  .result-actions {
    flex-direction: column;
  }
  .act-btn {
    min-width: 0;
    width: 100%;
  }

  /* Probe list */
  .probe-item {
    padding: 12px 14px;
    flex-wrap: wrap;
  }

  /* Output panel header（Prompt Rewriter / AI Detector） */
  .output-header,
  .result-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  .output-actions {
    flex-wrap: wrap;
    gap: 6px;
  }
  .out-btn {
    font-size: 11px;
    padding: 4px 10px;
  }

  /* 统一容器 */
  .unified-container {
    padding: 20px 12px;
  }
  .unified-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .site-footer {
    padding: 40px 16px 24px;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ── 480px 断点：小手机 ── */
@media (max-width: 480px) {

  /* Hero */
  .hero {
    padding: 40px 14px 28px;
  }
  .hero-title {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
    letter-spacing: -0.5px;
  }
  .hero-stats {
    gap: 14px;
  }
  .stat-n {
    font-size: 1.4rem;
  }

  /* Footer 单列 */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Tab 行 */
  .tab {
    padding: 7px 12px;
    font-size: 12px;
  }

  /* 表单 */
  .form-card {
    padding: 14px 12px;
  }
  .field-input {
    font-size: 13px;
    padding: 10px 12px;
  }
  .run-btn {
    font-size: 14px;
    padding: 12px;
  }

  /* Verdict 评分圆 */
  .score-ring {
    width: 96px;
    height: 96px;
  }
  .score-ring svg {
    width: 96px;
    height: 96px;
  }
  .score-ring-num .n {
    font-size: 26px;
  }

  /* 通用卡片内边距 */
  .how-card,
  .method-card {
    padding: 16px;
  }

  /* 侧边栏宽度在极小屏适配 */
  .sidebar {
    width: 100vw;
    min-width: 0;
    max-width: 100vw;
  }
}
