/* ══════════════════════════════════════════
   AI 素養工作坊 · Shared Design System
   Nav + Bottom Bar · 全站統一
   ══════════════════════════════════════════ */

:root {
  --nav-h:  56px;
  --bar-h:  60px;
  --p:   #7c4dbd;
  --p2:  #5c2d91;
  --p3:  #3a1a6b;
  --nav-bg: rgba(42, 14, 90, 0.97);
  --lt:  #c4a0e8;
  --pk:  #d63f74;
  --pk2: #a82d58;
  --gold:#ffd580;
}

/* ── body spacing ── */
body {
  padding-top: var(--nav-h);
  padding-bottom: var(--bar-h);
}

/* ══ BOTTOM BAR ══ */
#sn-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bar-h);
  z-index: 800;
  background: var(--p3);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 -3px 16px rgba(0,0,0,.28);
  box-sizing: border-box;
}
#sn-bar .sn-bar-info {
  display: flex; align-items: center; gap: 10px;
  overflow: hidden;
}
#sn-bar .sn-bar-batch {
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  color: var(--gold); white-space: nowrap;
  background: rgba(255,255,255,.08);
  padding: 3px 10px; border-radius: 20px;
  flex-shrink: 0;
}
#sn-bar .sn-bar-detail {
  font-size: 13px; color: rgba(255,255,255,.85);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#sn-bar .sn-bar-line { display: inline; }
#sn-bar .sn-bar-detail strong {
  color: #fff; font-weight: 700;
}
#sn-bar .sn-bar-btn {
  flex-shrink: 0; margin-left: 12px;
  background: var(--pk); color: #fff;
  font-weight: 700; font-size: 14px;
  padding: 0 22px; height: 38px;
  border-radius: 50px; border: none; cursor: pointer;
  display: inline-flex; align-items: center;
  text-decoration: none; transition: background .15s;
  white-space: nowrap; font-family: sans-serif;
}
#sn-bar .sn-bar-btn:hover { background: var(--pk2); }

/* ══ NAV ══ */
#sn-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 900;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.07);
  transition: box-shadow .2s;
  font-family: "PingFang TC","Noto Sans TC","Helvetica Neue",sans-serif;
}
#sn-nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.4); }

.sn-nav-inner {
  max-width: 840px; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 20px; height: var(--nav-h);
  box-sizing: border-box;
}
.sn-logo {
  font-size: 14px; font-weight: 700; color: #fff;
  display: flex; align-items: center; gap: 6px;
  text-decoration: none; flex-shrink: 0;
  letter-spacing: -.2px;
}
.sn-logo span {
  color: var(--lt);
  font-family: 'Georgia', 'Noto Serif TC', serif;
  letter-spacing: .3px;
}

.sn-links {
  display: flex; align-items: center; gap: 2px;
}
.sn-links a {
  color: rgba(255,255,255,.72); font-size: 13px;
  padding: 5px 9px; border-radius: 6px;
  text-decoration: none; transition: color .15s, background .15s;
  white-space: nowrap;
}
.sn-links a:hover { color: rgba(255,255,255,.95); background: rgba(255,255,255,.08); }
.sn-links a.active { color: var(--gold); font-weight: 600; }
.sn-links a.sn-cta, .sn-links button.sn-cta {
  background: var(--pk); color: #fff !important;
  font-weight: 700; padding: 5px 14px;
  border-radius: 20px; margin-left: 12px;
  border: none; cursor: pointer; font-family: sans-serif; font-size: 14px;
}
.sn-links a.sn-cta:hover, .sn-links button.sn-cta:hover { background: var(--pk2); }

/* ══ HAMBURGER ══ */
.sn-ham {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; width: 36px; height: 36px; padding: 6px;
  background: none; border: none; cursor: pointer; flex-shrink: 0;
}
.sn-ham span {
  display: block; height: 2px; background: rgba(255,255,255,.8);
  border-radius: 2px; transition: transform .2s, opacity .2s;
}
.sn-ham.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sn-ham.open span:nth-child(2) { opacity: 0; }
.sn-ham.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══ DRAWER ══ */
#sn-drawer {
  display: none;
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  z-index: 850;
  background: rgba(36, 10, 80, 0.98);
  backdrop-filter: blur(12px);
  padding: 12px 16px 16px;
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: transform .2s, opacity .2s, visibility .2s;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
#sn-drawer.open { transform: translateY(0); opacity: 1; visibility: visible; }
#sn-drawer a {
  display: block; padding: 12px 16px;
  color: rgba(255,255,255,.8); font-size: 15px;
  text-decoration: none; border-radius: 8px;
}
#sn-drawer a:hover, #sn-drawer a.active { background: rgba(255,255,255,.06); color: #fff; }
#sn-drawer a.active { color: var(--gold); }
#sn-drawer .sn-drawer-cta {
  display: block; width: 100%; box-sizing: border-box;
  padding: 12px 22px; margin-top: 20px;
  color: #fff; font-weight: 700; font-size: 14px;
  text-align: center; font-family: sans-serif;
  background: var(--pk);
  border-radius: 50px;
  border: none;
  cursor: pointer; text-decoration: none;
  transition: background .15s; white-space: nowrap;
}
#sn-drawer .sn-drawer-cta:hover { background: var(--pk2); }

/* ══ RESPONSIVE ══ */
@media (max-width: 660px) {
  .sn-links { display: none; }
  .sn-ham   { display: flex; }
  #sn-drawer { display: block; }

  #sn-bar .sn-bar-batch { display: none; }
  #sn-bar { height: auto; min-height: var(--bar-h); padding: 10px 16px; }
  #sn-bar .sn-bar-detail { font-size: 12px; white-space: normal; line-height: 1.6; display: flex; flex-direction: column; }
  #sn-bar .sn-bar-line { display: block; }
  #sn-bar .sn-bar-btn { font-size: 13px; padding: 0 14px; height: 34px; align-self: center; }
  body { padding-bottom: 80px; }
}
