/* ============================================================
   包蕉原型 · 共享组件样式
   （课程卡 / 设备指南卡 / 底部栏 / 抽屉 / 弹窗 / 表单等）
   ============================================================ */

/* ---------- 课程卡片（对应 components/course-card） ---------- */
.course-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.course-card:active { transform: scale(.985); box-shadow: 0 1px 6px rgba(0, 0, 0, .05); }
.course-card__cover {
  position: relative;
  height: 190px;
  background: #eef1f7;
  overflow: hidden;
}
.course-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.course-card__badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 5px;
}
.course-card__badge {
  height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  display: inline-flex;
  align-items: center;
  background: rgba(16, 185, 129, .92);
  backdrop-filter: blur(4px);
}
.course-card__badge--price { background: rgba(239, 68, 68, .92); }
.course-card__badge--new { background: linear-gradient(135deg, #667eea, #8b5fcf); }
.course-card__info { padding: 10px 11px 11px; }
.course-card__title {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 39px;
}
.course-card__subtitle {
  margin-top: 3px;
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.course-card__meta {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #9ca3af;
}
.course-card__meta .uni-icons { font-size: 12px; }
.course-card__row { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; }
.course-card--h {
  display: flex;
  padding: 8px;
  gap: 10px;
}
.course-card--h .course-card__cover {
  width: 110px;
  height: 82px;
  border-radius: 8px;
  flex-shrink: 0;
}
.course-card--h .course-card__badges { top: 5px; left: 5px; }
.course-card--h .course-card__info { flex: 1; min-width: 0; padding: 2px 0; display: flex; flex-direction: column; }
.course-card--h .course-card__title { font-size: 14px; min-height: 0; }
.course-card--h .course-card__subtitle { font-size: 11px; }
.course-card--h .course-card__meta { margin-top: auto; }

/* ---------- 设备指南卡片（components/camera-guide-card） ---------- */
.guide-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .05);
  margin-bottom: 10px;
  cursor: pointer;
}
.guide-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(102, 126, 234, .08);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.guide-card__body { flex: 1; min-width: 0; }
.guide-card__title { font-size: 14px; font-weight: 700; color: #1a1a1a; margin-bottom: 2px; }
.guide-card__sub { font-size: 11px; color: #8c8c8c; }
.guide-card__arrow { font-size: 14px; color: #d9d9d9; margin-left: 4px; }

/* ---------- 讲师卡片 ---------- */
.teacher-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.teacher-card__body { flex: 1; min-width: 0; }
.teacher-card__name { font-size: 15px; font-weight: 700; color: #1a1a2e; }
.teacher-card__title { font-size: 11px; color: #8c8c8c; margin-top: 2px; }
.teacher-card__tags { font-size: 10px; color: #667eea; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 底部固定操作栏 ---------- */
.bottom-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(100%, var(--frame-w));
  min-height: 60px;
  padding: 8px 20px calc(8px + var(--safe-bottom));
  background: #fff;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, .05);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
}
.bottom-bar__price { display: flex; align-items: baseline; gap: 2px; }
.bottom-bar__price .price__symbol { font-size: 10px; }
.bottom-bar__price .price-num { font-size: 22px; font-weight: 800; color: var(--danger); }
.bottom-bar__tip { font-size: 9px; color: #bfbfbf; }
.bottom-bar__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.bottom-bar__share {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 18px;
}
.bottom-bar__btn { height: 44px; min-width: 120px; border-radius: 22px; font-size: 15px; font-weight: 600; }

/* ---------- 通用底部抽屉 ---------- */
.proto-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(100%);
  width: min(100%, var(--frame-w));
  max-height: 92vh;
  background: #fff;
  border-radius: 16px 16px 0 0;
  z-index: 3200;
  transition: transform .3s cubic-bezier(.32, .72, 0, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.proto-sheet.is-open { transform: translateX(-50%) translateY(0); }
.proto-sheet__bar {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: #d9d9d9;
  margin: 8px auto 0;
  flex-shrink: 0;
  cursor: grab;
}
.proto-sheet__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 48px 12px 20px;
  flex-shrink: 0;
}
.proto-sheet__title { font-size: 16px; font-weight: 700; color: #1a1a2e; }
.proto-sheet__close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f5f5f5;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}
.proto-sheet__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }

/* ---------- 居中弹窗 ---------- */
.proto-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.94);
  width: min(84%, 320px);
  background: #fff;
  border-radius: 16px;
  z-index: 3200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease, transform .24s cubic-bezier(.32, .72, 0, 1);
  overflow: hidden;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
}
.proto-modal.is-open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.proto-modal__head {
  position: relative;
  padding: 22px 20px 12px;
  text-align: center;
  flex-shrink: 0;
}
.proto-modal__title { font-size: 17px; font-weight: 700; color: #1a1a2e; }
.proto-modal__sub { font-size: 12px; color: #8c8c8c; margin-top: 3px; }
.proto-modal__close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f5f5f7;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
}
.proto-modal__body { padding: 0 16px 18px; overflow-y: auto; }

/* ---------- 表单 ---------- */
.form-item { margin-bottom: 14px; }
.form-label { font-size: 12px; color: #666; margin-bottom: 6px; display: flex; align-items: center; gap: 3px; }
.form-label .required { color: var(--danger); }
.form-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  background: #f7f7f7;
  border-radius: 10px;
  font-size: 14px;
  color: #333;
  border: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
.form-input::placeholder { color: #b8bec9; }
.form-input:focus { border-color: rgba(102, 126, 234, .55); background: #fff; }
textarea.form-input { height: auto; padding: 10px 12px; resize: none; line-height: 1.5; }
.form-tip { font-size: 11px; color: #b0b6c3; margin-top: 5px; }
.form-error { font-size: 11px; color: var(--danger); margin-top: 5px; }
.form-row { display: flex; align-items: center; gap: 8px; }

/* ---------- Tab 切换 ---------- */
.pill-tabs {
  display: flex;
  background: rgba(255, 255, 255, .55);
  border-radius: 12px;
  padding: 3px;
  gap: 2px;
}
.pill-tabs__item {
  flex: 1;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
  transition: all .22s ease;
  white-space: nowrap;
}
.pill-tabs__item.is-active { background: #fff; color: var(--accent); font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }

/* 下划线 tab */
.tabs { display: flex; gap: 18px; }
.tabs__item { position: relative; padding: 8px 2px 10px; font-size: 14px; color: #7a8296; cursor: pointer; white-space: nowrap; }
.tabs__item.is-active { color: #1a1a2e; font-weight: 700; }
.tabs__item.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 2px;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: var(--primary-gradient);
}

/* ---------- VIP 卡片 ---------- */
.vip-banner {
  background: var(--gold-gradient);
  border-radius: var(--radius-lg);
  padding: 15px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(245, 166, 35, .3);
}
.vip-banner::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -40px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
}
.vip-banner__title { font-size: 17px; font-weight: 800; letter-spacing: .3px; }
.vip-banner__desc { font-size: 11px; opacity: .92; margin-top: 3px; }
.vip-banner__btn {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 16px;
  border-radius: 15px;
  background: #fff;
  color: #b7790f;
  font-size: 12px;
  font-weight: 700;
}

/* ---------- 价格方案卡 ---------- */
.plan-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.plan-card.is-active { border-color: rgba(245, 166, 35, .4); background: rgba(245, 166, 35, .03); }
.plan-card__body { flex: 1; }
.plan-card__name { font-size: 15px; font-weight: 800; color: #1a1a2e; }
.plan-card__desc { font-size: 11px; color: #8c8c8c; margin-top: 2px; }
.plan-card__price { text-align: right; }
.plan-card__price .price-num { font-size: 19px; font-weight: 900; color: #c07a2b; }
.plan-card__badge {
  position: absolute;
  top: -1px;
  right: -1px;
  background: var(--gold-gradient);
  color: #fff;
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 0 12px 0 10px;
}

/* ---------- 空状态图 ---------- */
.empty-mini { padding: 30px 0; text-align: center; color: #b0b6c3; font-size: 12px; }
.empty-mini .uni-icons { font-size: 32px; display: block; margin-bottom: 8px; opacity: .5; }

/* ---------- 登录弹窗（components/login-popup） ---------- */
.login-modal { width: min(88%, 330px); }
.login-modal .proto-modal__head { padding-top: 20px; }
.login-tabs {
  display: flex;
  background: #f5f7ff;
  border-radius: 10px;
  padding: 3px;
  margin: 4px 0 16px;
}
.login-tabs__item {
  flex: 1;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #7a8296;
  cursor: pointer;
}
.login-tabs__item.is-active { background: #667eea; color: #fff; font-weight: 600; }
.login-qr {
  width: 180px;
  height: 180px;
  margin: 8px auto;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #eef0f4;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.login-qr__grid {
  width: 140px;
  height: 140px;
  background-image: linear-gradient(90deg, #1c2434 50%, transparent 50%), linear-gradient(#1c2434 50%, transparent 50%);
  background-size: 12px 12px, 12px 12px;
  opacity: .9;
  border-radius: 4px;
  position: relative;
}
.login-qr__logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--primary-gradient);
  border: 3px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
}
.login-qr__refresh {
  margin-top: 10px;
  font-size: 11px;
  color: #667eea;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.login-modal__note { font-size: 11px; color: #b0b6c3; margin-top: 10px; }

/* ---------- 解锁弹窗（components/unlock-popup） ---------- */
.unlock-options { display: flex; flex-direction: column; gap: 8px; }
.unlock-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 16px;
  background: #f8f9fa;
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
}
.unlock-option::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #667eea;
}
.unlock-option--gold::before { background: #fa8c16; }
.unlock-option--green { background: linear-gradient(135deg, #f0faf0, #e8f5e9); border: 1px solid #b7eb8f; }
.unlock-option--green::before { background: #52c41a; }
.unlock-option__body { flex: 1; min-width: 0; }
.unlock-option__title { font-size: 14px; font-weight: 700; color: #1a1a2e; }
.unlock-option--green .unlock-option__title { color: #1b5e20; }
.unlock-option__desc { font-size: 10px; color: #8c8c8c; margin-top: 2px; line-height: 1.35; }
.unlock-option--green .unlock-option__desc { color: #388e3c; }
.unlock-option__side { text-align: right; flex-shrink: 0; }
.unlock-option__price { font-size: 16px; font-weight: 800; color: #e8453c; }
.unlock-option__time { display: inline-block; font-size: 9px; font-weight: 600; color: #667eea; background: rgba(102, 126, 234, .1); border-radius: 7px; padding: 1px 6px; margin-top: 2px; }
.unlock-option--gold .unlock-option__time { color: #fa8c16; background: rgba(250, 140, 22, .12); }
.unlock-option--green .unlock-option__time { color: #52c41a; background: rgba(82, 196, 26, .12); }
.unlock-close {
  margin: 14px auto 4px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
}

/* ---------- 分享面板 ---------- */
.share-panel { padding: 0 20px 8px; }
.share-panel__title { text-align: center; font-size: 15px; font-weight: 700; color: #1a1a2e; margin-bottom: 18px; }
.share-grid { display: flex; gap: 28px; justify-content: center; }
.share-item { display: flex; flex-direction: column; align-items: center; gap: 7px; cursor: pointer; }
.share-item__icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
}
.share-item__icon--wechat { background: #07c160; }
.share-item__icon--moments { background: #faad14; }
.share-item__label { font-size: 12px; color: #595959; }
.share-cancel { margin-top: 18px; height: 44px; border-radius: 22px; background: #f5f5f5; color: #8c8c8c; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; }

/* ---------- 手机号绑定 ---------- */
.bind-panel { padding: 8px 20px 20px; text-align: center; }
.bind-panel__title { font-size: 17px; font-weight: 700; color: #1a1a2e; }
.bind-panel__desc { font-size: 13px; color: #888; line-height: 1.6; margin: 8px 0 18px; }
.bind-panel__later { margin-top: 12px; font-size: 13px; color: #aaa; cursor: pointer; }

/* ---------- 对话框（确认） ---------- */
.proto-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.94);
  width: min(80%, 300px);
  background: #fff;
  border-radius: 14px;
  z-index: 3300;
  opacity: 0;
  pointer-events: none;
  transition: all .22s ease;
  overflow: hidden;
}
.proto-dialog.is-open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.proto-dialog__body { padding: 24px 20px 18px; text-align: center; }
.proto-dialog__title { font-size: 16px; font-weight: 700; color: #1a1a2e; margin-bottom: 8px; }
.proto-dialog__content { font-size: 13px; color: #666; line-height: 1.55; }
.proto-dialog__foot { display: flex; border-top: 1px solid var(--line); }
.proto-dialog__btn { flex: 1; height: 48px; display: flex; align-items: center; justify-content: center; font-size: 15px; cursor: pointer; }
.proto-dialog__btn + .proto-dialog__btn { border-left: 1px solid var(--line); }
.proto-dialog__btn--cancel { color: #8c8c8c; }
.proto-dialog__btn--ok { color: #667eea; font-weight: 600; }

/* ---------- 调试面板（原型控制） ---------- */
.proto-debug-btn {
  position: fixed;
  right: calc(50% - var(--frame-w) / 2 + 12px);
  bottom: calc(var(--safe-bottom) + 16px);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(26, 26, 46, .72);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  z-index: 4000;
  cursor: pointer;
  backdrop-filter: blur(6px);
  opacity: .55;
  transition: opacity .2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}
.proto-debug-btn:hover { opacity: .95; }
.proto-debug-btn.is-tabbar { bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 14px); }
.proto-debug-btn.is-bottom { bottom: calc(var(--safe-bottom) + 84px); }
@media (max-width: 519px) {
  .proto-debug-btn { right: 12px; bottom: calc(var(--safe-bottom) + 16px); }
  .proto-debug-btn.is-tabbar { bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 14px); }
  .proto-debug-btn.is-bottom { bottom: calc(var(--safe-bottom) + 84px); }
}
.proto-debug-panel {
  position: fixed;
  right: calc(50% - var(--frame-w) / 2 + 12px);
  bottom: calc(var(--safe-bottom) + 64px);
  width: 210px;
  background: rgba(26, 26, 46, .94);
  color: #fff;
  border-radius: 12px;
  padding: 12px;
  z-index: 4001;
  font-size: 12px;
  display: none;
  backdrop-filter: blur(8px);
}
.proto-debug-panel.is-open { display: block; }
.proto-debug-panel.is-tabbar { bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 62px); }
.proto-debug-panel.is-bottom { bottom: calc(var(--safe-bottom) + 132px); }
.proto-debug-panel__title { font-size: 12px; font-weight: 700; margin-bottom: 8px; opacity: .8; }
.proto-debug-row { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; gap: 8px; }
.proto-debug-row span { color: rgba(255, 255, 255, .72); }
.proto-debug-switch {
  width: 34px;
  height: 20px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .2);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s;
}
.proto-debug-switch::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
}
.proto-debug-switch.is-on { background: #667eea; }
.proto-debug-switch.is-on::after { transform: translateX(14px); }
.proto-debug-panel a { color: #b9c1ff; display: block; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 6px; }
@media (max-width: 519px) {
  .proto-debug-panel { right: 12px; }
}

/* ---------- 登录弹窗补充 ---------- */
.login-head { display: flex; align-items: center; justify-content: center; position: relative; padding: 6px 0 14px; }
.login-title { font-size: 17px; font-weight: 700; color: #1a1a2e; }
.login-close { position: absolute; right: 0; top: 2px; width: 26px; height: 26px; border-radius: 50%; background: #f5f5f7; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.unlock-modal { width: min(86%, 320px); }
.unlock-modal .proto-modal__body { padding: 0 16px 16px; }

/* ---------- 分享预览条 ---------- */
.share-preview { display: flex; gap: 10px; align-items: center; padding: 0 20px 4px; }
.share-preview img { flex-shrink: 0; }
.share-preview__title { font-size: 13px; font-weight: 600; color: #1a1a2e; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.share-preview__desc { font-size: 11px; color: #9ca3af; margin-top: 3px; }
.share-tip { text-align: center; font-size: 11px; color: #b0b6c3; margin-top: 12px; }

/* ---------- 绑定面板 ---------- */
.bind-sheet .proto-sheet__header { display: none; }
.bind-sheet .proto-sheet__body { padding-top: 10px; }
