/* pages/portal.html（一键帮三端入口）专用样式 */

html {
  font-size: 100%;
}

body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100vh;
  background: url("../images/背景图片.png") center/cover no-repeat fixed;
  padding: 0 10%; /* 稍微增加两侧内边距，让内容更聚拢 */
  gap: 40px;
  position: relative;
  overflow: hidden; /* 防止光晕撑破屏幕 */
}

/* 增加背景光晕，填补大片纯色的空旷感 */
.bg-decoration {
  position: absolute;
  top: -20%;
  left: -10%;
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(255,246,236,0.8) 0%, rgba(246,241,233,0) 70%);
  z-index: -1;
  pointer-events: none;
}

.welcome-area {
  flex: 1;
  max-width: 550px; /* 控制左侧文本的最大宽度 */
  text-align: left;
  z-index: 1;
}

.welcome-text h1 {
  font-size: 5.2rem;
  color: #3d2c1f;
  margin-bottom: 0.5rem;
}

.welcome-text h2 {
  font-size: 2.5rem;
  color: #b86a3d;
  margin-bottom: 1.5rem;
}

.slogan {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 2.5rem;
}

/* 左侧插画容器，填补下方空缺 */
.illustration-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 280px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.1) 100%);
  border: 1px solid rgba(173, 224, 255, 0.5);
  box-shadow: 0 8px 32px rgba(173, 224, 255, 0.5);
}

.placeholder-text {
  color: #c9b19c;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

/* === 右侧：主卡片 + 卡片外低调总控入口 === */
.portal-column {
  flex: 0 0 420px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  z-index: 1;
}

.portal {
  width: 100%;
  margin: 0;
  padding: 32px;
  background-color: #fff;
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.portal-admin-link {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(61, 44, 31, 0.42);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.portal-admin-link:hover {
  color: #6b5b8c;
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(107, 91, 140, 0.18);
  box-shadow: 0 2px 12px rgba(107, 91, 140, 0.08);
}

.portal-admin-link:focus-visible {
  outline: 2px solid rgba(107, 91, 140, 0.45);
  outline-offset: 2px;
}

.portal:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
}

.portal h1 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 2.2rem;
  color: #3d2c1f;
}

.portal p.muted {
  margin-bottom: 24px;
  font-size: 1.2rem;
  color: #888;
}

.portal-grid {
  display: grid;
  gap: 14px;
}

.portal-grid .portal-choice {
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #f0f0f0;
  background: #fff;
  font-weight: 700;
  color: #3d2c1f;
  transition: all 0.2s ease-in-out;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  text-align: left;
}

.portal-grid .portal-choice:hover {
  border-color: #ddecfd;
  background-color: #b9d9fe;
  transform: scale(1.02);
}

.portal-grid .portal-choice:active {
  transform: scale(0.98);
}

.portal-grid .portal-choice:focus-visible {
  outline: 3px solid rgba(79, 130, 255, 0.45);
  outline-offset: 2px;
}

/* === 图标统一样式 === */
.portal-grid .portal-choice .icon {
  width: 44px;
  height: 44px;
  margin-right: 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff; /* 内部 SVG 统一为白色 */
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.1); /* 增加一点内阴影提升质感 */
}

/* 控制 SVG 大小 */
.portal-grid .portal-choice .icon svg {
  width: 22px;
  height: 22px;
}

.portal-grid .portal-choice span {
  font-size: 1.2rem;
}

.portal-grid .portal-choice small {
  display: block;
  font-weight: 500;
  color: #777;
  margin-top: 4px;
  font-size: 0.8rem;
  line-height: 1.3;
}

/* 图标渐变背景 */
.icon-user {
  background: linear-gradient(135deg, #a8d5c2 0%, #83b9a1 100%);
}

.icon-worker {
  background: linear-gradient(135deg, #ddecfd 0%, #b9d7ff 100%);
}

.icon-helper {
  background: linear-gradient(135deg, #fbe4d3 0%, #f2c2a0 100%);
}

.portal-footnote {
  text-align: center;
  margin-top: 24px;
  font-size: 0.8rem;
}

button.portal-admin-link {
  background: transparent;
  font: inherit;
  cursor: pointer;
}

button.portal-admin-link::-moz-focus-inner {
  border: 0;
}

/* 响应式调整 */
@media (max-width: 1000px) {
  body {
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    padding: 40px 20px;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .welcome-area,
  .portal-column {
    width: 100%;
    max-width: 600px;
  }

  .portal-column {
    align-items: center;
  }
}

@media (max-width: 560px) {
  body {
    padding: 24px 16px;
  }

  .welcome-text h1 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .welcome-text h2 {
    font-size: clamp(1.1rem, 5vw, 1.65rem);
  }

  .portal h1 {
    font-size: 1.5rem;
  }

  .portal p.muted {
    font-size: 1rem;
  }
}