/* ============================================================
   认证相关样式 —— 遮罩层、表单、激活弹窗、用户区域
   ============================================================ */

/* ---------- 遮罩层 ---------- */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(20, 32, 27, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-overlay.hidden {
  display: none;
}

.auth-container {
  position: relative;
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  padding: 40px 36px 36px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  animation: authSlideIn 0.3s ease;
}

@keyframes authSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-container h2 {
  font-size: 24px;
  font-weight: 800;
  color: #27332d;
  text-align: center;
  margin-bottom: 6px;
}

/* ---------- 关闭按钮 ---------- */
.auth-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  color: #7c8c83;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: 0.2s;
}

.auth-close:hover {
  color: #27332d;
}

.auth-container .auth-sub {
  text-align: center;
  color: #7c8c83;
  font-size: 14px;
  margin-bottom: 28px;
}

/* ---------- 切换标签 ---------- */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  background: #eef8f2;
  border-radius: 12px;
  padding: 4px;
}

.auth-tabs button {
  flex: 1;
  padding: 10px 0;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: #7c8c83;
  transition: 0.2s;
}

.auth-tabs button.active {
  background: #5cb88a;
  color: #fff;
}

/* ---------- 表单 ---------- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form.hidden {
  display: none;
}

.auth-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-form .field label {
  font-size: 13px;
  font-weight: 600;
  color: #27332d;
}

.auth-form .field input {
  padding: 12px 14px;
  border: 1px solid #e2efe8;
  border-radius: 10px;
  font-size: 15px;
  color: #27332d;
  background: #f6fbf8;
  transition: 0.2s;
  outline: none;
  font-family: inherit;
}

.auth-form .field input:focus {
  border-color: #5cb88a;
  box-shadow: 0 0 0 3px rgba(92, 184, 138, 0.15);
}

.auth-form .field input::placeholder {
  color: #b0c0b7;
}

.auth-form .field .hint {
  font-size: 12px;
  color: #7c8c83;
}

.auth-form .btn-submit {
  margin-top: 4px;
  padding: 13px 0;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: #5cb88a;
  transition: 0.2s;
}

.auth-form .btn-submit:hover {
  background: #3f9d72;
}

.auth-form .btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-form .error-msg {
  font-size: 13px;
  color: #e74c3c;
  text-align: center;
  min-height: 20px;
}

/* ---------- 激活弹窗 ---------- */
.modal-activation {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(20, 32, 27, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-activation.hidden {
  display: none;
}

.modal-activation .modal-content {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  padding: 32px 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  animation: authSlideIn 0.3s ease;
}

.modal-activation .modal-content h3 {
  font-size: 20px;
  font-weight: 800;
  color: #27332d;
  margin-bottom: 6px;
}

.modal-activation .modal-content .act-desc {
  font-size: 14px;
  color: #7c8c83;
  margin-bottom: 20px;
}

.modal-activation .modal-content input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e2efe8;
  border-radius: 10px;
  font-size: 15px;
  color: #27332d;
  background: #f6fbf8;
  outline: none;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.modal-activation .modal-content input:focus {
  border-color: #5cb88a;
  box-shadow: 0 0 0 3px rgba(92, 184, 138, 0.15);
}

.modal-activation .act-buttons {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.modal-activation .act-buttons button {
  flex: 1;
  padding: 11px 0;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.modal-activation .btn-activate {
  background: #5cb88a;
  color: #fff;
}

.modal-activation .btn-activate:hover {
  background: #3f9d72;
}

.modal-activation .btn-cancel {
  background: #eef8f2;
  color: #7c8c83;
}

.modal-activation .btn-cancel:hover {
  background: #e2efe8;
}

.modal-activation .act-msg {
  margin-top: 14px;
  font-size: 13px;
  text-align: center;
  min-height: 20px;
}

.modal-activation .act-msg.success {
  color: #3f9d72;
}

.modal-activation .act-msg.error {
  color: #e74c3c;
}

/* ---------- 用户区域 ---------- */
#user-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

#btn-activation-entry {
  font-size: 13px;
  font-weight: 600;
  color: #5cb88a;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 999px;
  background: #e8f6ef;
  transition: 0.2s;
}

#btn-activation-entry:hover {
  background: #5cb88a;
  color: #fff;
}

#user-name {
  font-size: 14px;
  font-weight: 600;
  color: #27332d;
}

#btn-logout {
  font-size: 13px;
  font-weight: 600;
  color: #7c8c83;
  background: none;
  border: 1px solid #e2efe8;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s;
}

#btn-logout:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}

/* ---------- 加载提示 ---------- */
.loading-hint {
  text-align: center;
  padding: 60px 20px;
  color: #7c8c83;
  font-size: 15px;
}

/* ---------- 锁定状态按钮 ---------- */
.mbtn-locked,
.sk-btn-locked {
  background: #c0cdc6 !important;
  cursor: not-allowed !important;
  opacity: 0.7;
}

/* ---------- 视频锁定层 ---------- */
.video-lock {
  position: absolute;
  inset: 0;
  background: rgba(20, 32, 27, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 5;
  gap: 14px;
}

.video-lock .lock-icon {
  font-size: 48px;
}

.video-lock .lock-text {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.video-lock .lock-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 10px;
  background: #5cb88a;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.video-lock .lock-btn:hover {
  background: #3f9d72;
}

/* ---------- 案例锁定层 ---------- */
.case-lock {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(20, 32, 27, 0.8), rgba(40, 60, 50, 0.7));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 5;
  gap: 10px;
  color: #fff;
  cursor: pointer;
}

.case-lock .lock-icon {
  font-size: 36px;
}

.case-lock .lock-text {
  font-size: 14px;
  font-weight: 600;
}

/* ---------- 后台管理入口（管理员登录后显示） ---------- */
#admin-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: #5cb88a;
  background: transparent;
  border: 1.5px solid #c8e6d8;
  padding: 7px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  line-height: 1;
  text-decoration: none;
}

#admin-link:hover {
  color: #fff;
  background: #5cb88a;
  border-color: #5cb88a;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(92, 184, 138, 0.3);
}

/* ---------- 登录按钮 ---------- */
#btn-login {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: #5cb88a;
  background: transparent;
  border: 1.5px solid #c8e6d8;
  padding: 7px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  line-height: 1;
}

#btn-login:hover {
  color: #fff;
  background: #5cb88a;
  border-color: #5cb88a;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(92, 184, 138, 0.3);
}

#btn-login:active {
  transform: translateY(0);
  box-shadow: none;
}