/* ============================================================
   萝卜芽 AI 学习平台 · 四大场馆（悬停/点击动画展开）
   参考腾讯乐学「AI实验平台」的四大场馆卡片形态
   配色：科技蓝 #0066FF + 向阳黄 #FADB14（品牌色板 v1.0）
   ============================================================ */

.hall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 4px 0 26px;
}
@media (max-width: 1180px) { .hall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .hall { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 场馆卡 ---------- */
.hallcard {
  position: relative; overflow: hidden;
  border-radius: 20px; padding: 20px 20px 0;
  min-height: 236px; min-width: 0;
  color: #fff;
  display: flex; flex-direction: column;
  box-shadow: 0 10px 26px -14px rgba(0, 40, 110, .40);
  transition: transform .32s cubic-bezier(.22, .9, .28, 1), box-shadow .32s;
  isolation: isolate;
}
.hallcard:hover, .hallcard.open {
  transform: translateY(-8px);
  box-shadow: 0 26px 52px -18px rgba(0, 40, 110, .48);
}
.hallcard.c-blue   { background: linear-gradient(150deg, #0A4BE0 0%, #0066FF 48%, #00C2FF 100%); }
.hallcard.c-yellow { background: linear-gradient(150deg, #FFC42E 0%, #FADB14 46%, #FFA51F 100%); color: #2A1C00; }
.hallcard.c-green  { background: linear-gradient(150deg, #35C24A 0%, #52C41A 48%, #9BE15D 100%); color: #0E2A05; }
.hallcard.c-purple { background: linear-gradient(150deg, #5B2BD6 0%, #722ED1 50%, #A97BFF 100%); }

/* 圆点纹理（参考图里的点阵质感） */
.hallcard::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.34) 1.6px, transparent 1.7px);
  background-size: 15px 15px;
  -webkit-mask-image: radial-gradient(120% 100% at 88% 6%, #000 8%, transparent 68%);
          mask-image: radial-gradient(120% 100% at 88% 6%, #000 8%, transparent 68%);
  opacity: .55;
}
/* 斜向光带 */
.hallcard::after {
  content: ""; position: absolute; right: -40px; top: -60px; width: 190px; height: 190px;
  border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(closest-side, rgba(255,255,255,.30), transparent 72%);
  transition: transform .5s cubic-bezier(.22,.9,.28,1);
}
.hallcard:hover::after { transform: scale(1.35) translate(-8px, 10px); }

/* 大图标水印 */
.hallcard .hw {
  position: absolute; right: 10px; bottom: -14px; z-index: 0; pointer-events: none;
  opacity: .16; transition: transform .45s cubic-bezier(.22,.9,.28,1), opacity .3s;
}
.hallcard:hover .hw { transform: translateY(-8px) rotate(-8deg) scale(1.06); opacity: .24; }
.hallcard .hw svg { width: 108px; height: 108px; }

.hallcard .hi {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(255,255,255,.20); margin-bottom: 12px;
  transition: transform .35s cubic-bezier(.22,.9,.28,1);
}
.hallcard:hover .hi { transform: rotate(-8deg) scale(1.06); }
.hallcard .hi svg { width: 22px; height: 22px; }

.hallcard h3 { font-size: 20px; font-weight: 800; letter-spacing: .2px; }
.hallcard .en { font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; opacity: .72; margin-top: 3px; }
.hallcard p { font-size: 12.5px; line-height: 1.75; margin-top: 10px; opacity: .92; }

/* ---------- 展开的工具条（动画核心）---------- */
.htools {
  display: flex; flex-wrap: wrap; gap: 6px; min-width: 0;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .42s cubic-bezier(.22,.9,.28,1), opacity .28s ease, margin-top .42s;
  margin-top: 0;
}
.hallcard:hover .htools, .hallcard.open .htools { max-height: 132px; opacity: 1; margin-top: 13px; }
.ht {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 8px 13px; border-radius: 999px; min-height: 36px;
  background: rgba(255,255,255,.22); color: inherit; text-decoration: none;
  /* ★ 11.5px 对小学生太小 —— 工具名要认得出来（2026-11-21 全站体检） */
  font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border: 1px solid rgba(255,255,255,.26);
  transition: background .16s, transform .16s;
}
.ht:hover { background: rgba(255,255,255,.36); transform: translateY(-2px); }
.ht svg { width: 15px; height: 15px; }

.hallcard .hgo {
  margin-top: auto; padding: 13px 0 15px;
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
  font-size: 13.5px; font-weight: 700; color: inherit; text-decoration: none; opacity: .9;
}
.hallcard .hgo svg { width: 15px; height: 15px; transition: transform .2s; }
.hallcard:hover .hgo svg { transform: translateX(4px); }

/* ---------- 内容区切换动画 ---------- */
@keyframes hallViewIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.main.view-anim > * { animation: hallViewIn .38s cubic-bezier(.22,.9,.28,1) both; }
.main.view-anim > *:nth-child(2) { animation-delay: .04s; }
.main.view-anim > *:nth-child(3) { animation-delay: .08s; }

/* ---------- 场馆标题条 ---------- */
.hall-head {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px;
}
.hall-head b { font-size: 17px; font-weight: 800; }
.hall-head span { font-size: 12.5px; color: var(--ink3); }
.hall-head .bar { width: 4px; height: 17px; border-radius: 3px; background: var(--blue); }

/* ============================================================
   工坊视图（一级目录页）：大标题 + 馆内工具卡
   ============================================================ */
.wk-head {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 24px; margin-bottom: 22px;
  border-radius: 18px; color: #fff;
  background: linear-gradient(135deg, #0A4BE0, #0066FF 55%, #00C2FF);
  box-shadow: 0 14px 32px -18px rgba(0, 40, 110, .50);
  overflow: hidden; position: relative;
}
.wk-head.c-yellow { background: linear-gradient(135deg, #FFC42E, #FADB14 55%, #FFA51F); color: #2A1C00; }
.wk-head.c-purple { background: linear-gradient(135deg, #5B2BD6, #722ED1 55%, #A97BFF); }
.wk-head .hi {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; flex: none;
  background: rgba(255,255,255,.22);
}
.wk-head .hi svg { width: 27px; height: 27px; }
.wk-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.3px; }
.wk-head .en { font-size: 11px; letter-spacing: 2.2px; text-transform: uppercase; opacity: .74; margin-top: 3px; }
.wk-head p { margin: 9px 0 0; font-size: 13.5px; line-height: 1.7; opacity: .94; }

.wk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .wk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .wk-grid { grid-template-columns: minmax(0, 1fr); } }

.wk-card {
  display: flex; flex-direction: column; gap: 7px; text-decoration: none; color: inherit;
  padding: 18px 18px 16px; border-radius: 16px; min-width: 0;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--sh);
  transition: transform .2s cubic-bezier(.22,.9,.28,1), border-color .2s, box-shadow .2s;
}
.wk-card:hover { transform: translateY(-4px); border-color: rgba(0,102,255,.30); box-shadow: var(--sh2); }
.wk-card .ic {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(0,102,255,.10); color: var(--blue); margin-bottom: 4px;
}
.wk-card .ic svg { width: 22px; height: 22px; }
.wk-card b { font-size: 15px; font-weight: 700; color: var(--ink); }
.wk-card i {
  font-style: normal; font-size: 12px; color: var(--ink3); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
