/* ==========================================================================
   罗罗英语 · 全站玻璃顶栏（主页 index.html 同款）
   2026-09-15 建立：把主页顶栏复用到后台页面（首个使用页：progress.html 学情页）
   为什么单独成文件：progress.html 明确不引 Tailwind（preflight 会冲掉
   style.css 驱动的手写样式），所以把主页那套 Tailwind 工具类逐条翻译成
   纯 CSS，类名统一 sn- 前缀，避免与 style.css / topbar.js 的 .topbar-inner
   系列打架（那套仍被其他 11 个后台页面使用，不得改动）。
   ========================================================================== */

/* ---- 外层：贴顶固定 ---- */
.sn-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: all .3s ease;
}
.sn-wrap {
  max-width: 1280px;          /* 对应主页 max-w-7xl */
  margin: 0 auto;
  padding: 16px 24px 0;       /* 对应 pt-4 px-6 */
}

/* ---- 玻璃卡片本体（主页 .glass-nav 的等价物） ---- */
.sn-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;         /* 对应 px-6 py-3.5 */
  border-radius: 16px;        /* 对应 rounded-2xl */
  background: rgba(255, 255, 255, .76);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

/* ---- 左：Logo +（宽屏）品牌语 ---- */
.sn-logo {
  display: flex; align-items: center; gap: 12px;
  flex: 0 0 auto; text-decoration: none;
}
.sn-logo img {
  height: 44px;               /* 对应 h-11 */
  width: auto; display: block;
  transition: transform .3s ease;
}
.sn-logo:hover img { transform: scale(1.03); }
.sn-brand {
  display: none;              /* 对应 hidden xl:inline-block */
  font-size: 10px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: #0284c7;
  border-left: 1px solid #e2e8f0;
  padding-left: 12px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  white-space: nowrap;
}

/* ---- 中：菜单 ---- */
.sn-links {
  display: none;              /* 对应 hidden md:flex */
  align-items: center;
  gap: 16px;                  /* 对应 space-x-4 */
  margin: 0; padding: 0; list-style: none;
  font-size: 14px; font-weight: 500;
  letter-spacing: .025em; color: #475569;
  min-width: 0;
}
.sn-links li { position: relative; }
.sn-link {
  position: relative;
  display: inline-block;
  padding: 4px 0;             /* 对应 py-1 */
  color: #475569; text-decoration: none;
  font-weight: 600; white-space: nowrap;
  transition: color .3s ease, transform .3s ease;
}
.sn-link::after {
  content: '';
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  height: 2px; width: 0; background: #38bdf8;
  transition: width .3s ease;
}
.sn-link:hover { color: #0284c7; transform: translateY(-2px); }
.sn-link:hover::after { width: 100%; }
.sn-link.sn-active { color: #0284c7; }
.sn-link.sn-active::after { width: 100%; }

/* 菜单项里的英文小字 */
.sn-en {
  display: none;              /* 对应 hidden xl:inline */
  margin-left: 4px;
  font-size: 11px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.sn-sky     { color: #0ea5e9; }
.sn-amber   { color: #f59e0b; }
.sn-emerald { color: #10b981; }

/* ---- 右：CTA 胶囊按钮 ---- */
.sn-act { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.sn-btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px 6px 6px;  /* 对应 pl-1.5 pr-4 py-1.5 */
  border-radius: 999px;
  background: linear-gradient(90deg, #0ea5e9, #0284c7);
  color: #fff !important; text-decoration: none; font-weight: 700;
  box-shadow: 0 10px 15px -3px rgba(14, 165, 233, .4);
  transition: all .3s ease;
}
.sn-btn:hover {
  background: linear-gradient(90deg, #0284c7, #0369a1);
  transform: scale(1.04);
  box-shadow: 0 20px 25px -5px rgba(14, 165, 233, .5);
}
.sn-btn:active { transform: scale(.95); }
.sn-btn .reg-ico {
  width: 28px; height: 28px; border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  display: grid; place-items: center;
  font-size: 14px; line-height: 1;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, .35), 0 1px 3px rgba(2, 6, 23, .12);
}
.sn-btntxt { display: flex; align-items: baseline; gap: 6px; }
.sn-btn .reg-cn {
  font-size: 13px; line-height: 1; letter-spacing: .03em; white-space: nowrap;
}
.sn-btn .reg-en {
  font-size: 10px; line-height: 1; font-weight: 600;
  letter-spacing: .1em; opacity: .88; white-space: nowrap;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.sn-btn .reg-shine {
  position: absolute; top: 0; bottom: 0; left: 0; width: 35%;
  transform: translateX(-170%) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  transition: transform .75s ease-out; pointer-events: none;
}
.sn-btn:hover .reg-shine { transform: translateX(330%) skewX(-18deg); }
@media (prefers-reduced-motion: reduce) {
  .sn-btn .reg-shine { display: none; }
  .sn-logo img, .sn-link { transition: none; }
}

/* ---- 断点：与主页 Tailwind 断点一一对应（md 768 / lg 1024 / xl 1280） ---- */
@media (min-width: 768px)  { .sn-links { display: flex; } }
@media (min-width: 1024px) { .sn-links { gap: 36px; } }   /* 对应 lg:space-x-9 */
@media (min-width: 1280px) { .sn-brand { display: inline-block; } .sn-en { display: inline; } }

/* 窄屏收紧：防菜单/按钮互相挤压 */
.sn-nav > .sn-logo, .sn-nav > .sn-links, .sn-nav > .sn-act { flex-shrink: 0; }
@media (max-width: 520px) {
  .sn-wrap { padding: 16px 12px 0; }
  .sn-nav { padding: 14px 12px; }
  .sn-logo img { height: 30px; }
  .sn-btn { gap: 6px; padding-left: 5px; padding-right: 10px; }
  .sn-btn .reg-ico { width: 22px; height: 22px; font-size: 12px; }
  .sn-btn .reg-cn { font-size: 12px; }
  .sn-btn .reg-en { display: none; }
}

/* ---- fixed 顶栏高度占位（高度 = 16 + 14 + 44 + 14 + 2 边框 ≈ 90px） ---- */
body.app-page .page {
  padding-top: 90px;          /* 学情页 .page 原本没有上内边距 */
}
@media (max-width: 520px) {
  body.app-page .page { padding-top: 74px; }
}
