/* =============================================
   课堂签到H5 - 学员端样式（简洁文字版）
   ============================================= */

/* 顶部标题 */
.page-title {
  text-align: center;
  padding: 18px 0 6px;
}

.page-title h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
}

.page-title p {
  color: var(--text-sub);
  font-size: 13px;
  margin-top: 4px;
}

/* 信息卡 */
.info-card {
  margin-top: 16px;
}

/* 昵称行 */
.name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.name-row .name {
  font-size: 20px;
  font-weight: 600;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name-row .name.empty {
  color: var(--text-light);
  font-weight: 400;
}

/* 编辑昵称文字按钮 */
.edit-btn {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 6px;
}

.edit-btn:active {
  opacity: 0.6;
}

/* 统计行 */
.stats-row {
  display: flex;
  justify-content: center;
  padding-top: 14px;
}

.stats-item {
  text-align: center;
}

.stats-item .num {
  font-size: 34px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.1;
}

.stats-item .label {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 4px;
}

/* 签到按钮区 */
.checkin-area {
  margin-top: 34px;
  text-align: center;
}

.checkin-btn {
  width: 78%;
  max-width: 320px;
  height: 64px;
  border: none;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 4px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(7, 193, 96, 0.28);
  transition: transform 0.1s ease, background 0.2s;
}

.checkin-btn:active {
  transform: scale(0.98);
  background: var(--primary-dark);
}

.checkin-btn .btn-sub {
  display: block;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 1px;
  margin-top: 2px;
  opacity: 0.9;
}

/* 已签到状态 */
.checkin-btn.done {
  background: #b0b3b8;
  box-shadow: none;
}

.checkin-btn.done:active {
  background: #9a9da2;
  transform: none;
}

/* 签到码过期状态 */
.checkin-btn.expired {
  background: #b0b3b8;
  box-shadow: none;
}

.checkin-btn.expired:active {
  background: #9a9da2;
  transform: none;
}

/* 状态提示 */
.checkin-status {
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-sub);
}

.checkin-status .time {
  color: var(--text-light);
  font-size: 13px;
}

/* 底部提示 */
.footer-tip {
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 40px;
}

/* ---------- 昵称编辑弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
}

.modal-mask.show {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px 18px 16px;
  width: 100%;
  max-width: 300px;
}

.modal-box h3 {
  font-size: 16px;
  text-align: center;
  margin-bottom: 4px;
}

.modal-box .tip {
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 14px;
}

.modal-box input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
  outline: none;
}

.modal-box input:focus {
  border-color: var(--primary);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.modal-actions button {
  flex: 1;
  height: 42px;
  border-radius: 8px;
  border: none;
  font-size: 15px;
  cursor: pointer;
}

.modal-actions .btn-cancel {
  background: #f2f3f5;
  color: var(--text-sub);
}

.modal-actions .btn-ok {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
