/* 产品快捷入口页 /product-entry/ —— 样式沿用交互稿V1.0（产品矩阵与产品试用入口页），
   命名空间 pe-，不影响其他页面。 */

:root {
  --pe-brand: #1a56db;
  --pe-brand-dark: #0f3a91;
  --pe-brand-light: #e8f0fe;
  --pe-brand-gradient: linear-gradient(135deg, #0f3a91, #1a56db, #2d6ef5);
  --pe-text-1: #1a1a2e;
  --pe-text-2: #555770;
  --pe-text-3: #8e90a6;
  --pe-border: #e8ecf1;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--pe-text-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(135deg, #0a1628 0%, #1a3a5c 40%, #0f3a91 100%);
}

.ic { display: inline-block; width: 1em; height: 1em; fill: currentColor; vertical-align: -0.125em; flex: none; }
.ic-14 { font-size: 14px; }
.ic-15 { font-size: 15px; }
.ic-17 { font-size: 17px; }
.ic-18 { font-size: 18px; }
.ic-20 { font-size: 20px; }
.ic-28 { font-size: 28px; }
.ic-32 { font-size: 32px; }

/* ===== 全屏舞台 ===== */
.pe-stage {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 76px 16px 40px;
}

.pe-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0a1628 0%, #1a3a5c 40%, #0f3a91 100%);
}
.pe-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* 半透明遮罩压暗截图，保证卡片可读 */
.pe-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.42) 0%, rgba(10, 22, 40, 0.52) 60%, rgba(10, 22, 40, 0.62) 100%);
}

/* ===== 左上返回 / 右上关闭 ===== */
.pe-back {
  position: absolute;
  top: 24px;
  left: 32px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 0 20px 0 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s, border-color 0.2s;
}
.pe-back:hover { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.36); }

.pe-close {
  position: absolute;
  top: 24px;
  right: 32px;
  z-index: 30;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.2s;
}
.pe-close:hover { background: rgba(255, 255, 255, 0.2); }

/* ===== 中央卡片 ===== */
.pe-card {
  position: relative;
  z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  width: 500px;
  max-width: 90vw;
  max-height: 88vh;
  overflow-y: auto;
  padding: 44px 40px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
  animation: pePortalIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transition: width 0.28s ease, padding 0.28s ease;
}
.pe-card.wide {
  width: 960px;
  max-width: 94vw;
  padding: 34px 40px 30px;
  max-height: 92vh;
}

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

.pe-pane[hidden] { display: none !important; }

/* ===== 选择态 ===== */
.portal-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.portal-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.portal-name { font-size: 22px; font-weight: 700; line-height: 1.35; letter-spacing: -0.2px; }
.portal-desc { font-size: 14px; color: var(--pe-text-3); margin-bottom: 28px; line-height: 1.6; }

.portal-options { display: flex; flex-direction: column; gap: 10px; }
.portal-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1.5px solid var(--pe-border);
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s, background 0.25s;
  background: #fff;
  width: 100%;
  text-align: left;
  font-family: inherit;
  position: relative;
}
.portal-opt:hover { border-color: var(--pe-brand); box-shadow: 0 2px 12px rgba(26, 86, 219, 0.08); }
.portal-opt-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.portal-opt-body { flex: 1; min-width: 0; }
.portal-opt-title { font-size: 15px; font-weight: 600; }
.portal-opt-sub { font-size: 12px; color: var(--pe-text-3); margin-top: 2px; }
.portal-opt-arrow { color: var(--pe-text-3); transition: transform 0.2s; }
.portal-opt:hover .portal-opt-arrow { transform: translateX(3px); }

/* 图标配色 */
.ic-blue { background: linear-gradient(135deg, #1a56db, #2d6ef5); }
.ic-green { background: linear-gradient(135deg, #00b894, #55efc4); }
.ic-cyan { background: linear-gradient(135deg, #00cec9, #81ecec); }
.ic-purple { background: linear-gradient(135deg, #6c5ce7, #a29bfe); }
.ic-orange { background: linear-gradient(135deg, #ff6a00, #ffa040); }
.ic-pink { background: linear-gradient(135deg, #e84393, #fd79a8); }
.ic-navy { background: linear-gradient(135deg, #0a1628, #1a3a5c); }
.ic-teal { background: linear-gradient(135deg, #0984e3, #74b9ff); }

/* 已有账号：次选项 */
.portal-opt.opt-secondary { text-decoration: none; color: inherit; }
.portal-opt.opt-secondary .portal-opt-title { font-size: 14.5px; color: var(--pe-text-2); }
.portal-opt.opt-secondary .portal-opt-icon { opacity: 0.7; }
.portal-opt.opt-secondary:hover { background: #f7f9fd; }

/* 申请试用：主推项 */
.portal-opt.opt-primary {
  overflow: hidden;
  background: var(--pe-brand-gradient);
  border-color: transparent;
  color: #fff;
  padding: 20px;
  box-shadow: 0 10px 28px rgba(26, 86, 219, 0.30);
}
.portal-opt.opt-primary:hover {
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(26, 86, 219, 0.40);
}
.portal-opt.opt-primary .portal-opt-title { color: #fff; font-size: 16.5px; }
.portal-opt.opt-primary .portal-opt-sub { color: rgba(255, 255, 255, 0.85); }
.portal-opt.opt-primary .portal-opt-icon { background: rgba(255, 255, 255, 0.22) !important; }
.portal-opt.opt-primary .portal-opt-arrow { color: #fff; }
.portal-opt.opt-primary::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -70%;
  width: 55%;
  height: 220%;
  transform: rotate(22deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  animation: peSheen 3.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes peSheen {
  0% { left: -70%; }
  55% { left: 130%; }
  100% { left: 130%; }
}

/* ===== 表单态 ===== */
.form-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--pe-border);
}
.form-head .ft-tx { flex: 1; min-width: 0; }
.form-head h3 { font-size: 22px; font-weight: 700; margin-bottom: 5px; letter-spacing: -0.3px; }
.form-head p { font-size: 13.5px; color: var(--pe-text-3); }
.form-head .to-options {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--pe-text-3);
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border: none;
  font-family: inherit;
  padding: 4px 2px;
  transition: color 0.2s;
}
.form-head .to-options:hover { color: var(--pe-brand); }

.form-hotline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 14px 0 16px;
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--pe-brand-light);
  font-size: 13px;
  color: var(--pe-brand);
  font-weight: 600;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
}
.form-grid .span2 { grid-column: 1 / -1; }

.f-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--pe-text-2);
  margin-bottom: 5px;
}
.f-row label .req { color: #e74c3c; margin-left: 2px; }
.f-row input, .f-row textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--pe-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
  color: var(--pe-text-1);
}
.f-row input:focus, .f-row textarea:focus { border-color: var(--pe-brand); }
.f-row textarea { resize: vertical; min-height: 60px; }
.f-row.f-err input, .f-row.f-err textarea { border-color: #e74c3c; }

/* 验证码行 */
.code-line { display: flex; align-items: center; gap: 12px; }
.code-line input { flex: 1; }
.fc-code { flex: none; cursor: pointer; line-height: 0; border-radius: 6px; overflow: hidden; }
.fc-code img { display: block; cursor: pointer; }

/* 单选组（.radio-group 前缀提高优先级，覆盖 .f-row label 的块级/加粗样式） */
.radio-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.radio-group .radio-item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--pe-border);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  background: #fff;
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 0;
  color: var(--pe-text-2);
  user-select: none;
}
.radio-group .radio-item:hover { border-color: var(--pe-brand); }
.radio-group .radio-item input[type="radio"] { display: none; }
.radio-group .radio-item.selected {
  border-color: var(--pe-brand);
  background: var(--pe-brand-light);
  color: var(--pe-brand);
  font-weight: 600;
}

.form-actions { margin-top: 16px; }
.btn-submit {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: var(--pe-brand-gradient);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: box-shadow 0.2s, transform 0.2s, opacity 0.2s;
}
.btn-submit:hover { box-shadow: 0 4px 20px rgba(26, 86, 219, 0.35); transform: translateY(-2px); }
.btn-submit[disabled] { opacity: 0.65; cursor: not-allowed; transform: none; }
.form-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--pe-text-3);
}
.btn-back {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--pe-text-3);
  font-size: 14px;
  cursor: pointer;
  margin-top: 6px;
  font-family: inherit;
  transition: color 0.2s;
}
.btn-back:hover { color: var(--pe-text-1); }

/* ===== 成功态 / 错误态 ===== */
.form-ok { text-align: center; padding: 20px 0; }
.ok-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00b894, #55efc4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: #fff;
}
.ok-circle--warn { background: linear-gradient(135deg, #ff9f0a, #ffc247); }
.form-ok h3 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.form-ok p { font-size: 14px; color: var(--pe-text-3); }

.pe-err { text-align: center; padding: 20px 0; }
.pe-err h3 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.pe-err p { font-size: 14px; color: var(--pe-text-3); margin-bottom: 18px; }
.pe-err-btns { display: flex; justify-content: center; }
.pe-btn-home {
  display: inline-block;
  padding: 11px 32px;
  border-radius: 10px;
  background: var(--pe-brand-gradient);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: box-shadow 0.2s;
}
.pe-btn-home:hover { box-shadow: 0 4px 20px rgba(26, 86, 219, 0.35); }

/* ===== Toast ===== */
.pe-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 14px 28px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  border-radius: 10px;
  font-size: 15px;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  max-width: 80vw;
  text-align: center;
}
.pe-toast.show { opacity: 1; }

/* ===== 响应式 ===== */
@media (max-width: 760px) {
  .pe-stage { padding: 64px 12px 28px; }
  .pe-card { width: 92vw; padding: 32px 24px 26px; max-height: 88vh; }
  .pe-card.wide { width: 94vw; padding: 26px 22px 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .portal-name { font-size: 19px; }
  .form-head h3 { font-size: 19px; }
  .pe-back { top: 14px; left: 14px; height: 40px; padding: 0 15px 0 12px; font-size: 13px; }
  .pe-close { top: 14px; right: 14px; width: 40px; height: 40px; }
}

/* ===== 减少动画 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .portal-opt.opt-primary::after { display: none; }
}
