/**
 * ui-enhance.css —— 全局视觉增强层（非破坏性）
 *
 * 原则：只增强观感（字体/圆角/阴影/过渡/焦点态），不改动既有页面的布局结构
 * （不动 width/float/position），可安全叠加在任意页面最后引入。
 * 同时提供首页落地页（.home-*）与通用组件（.ui-btn / .ui-card）的样式。
 */

:root {
  --brand: #0aa1ed;
  --brand-600: #0876c4;
  --brand-700: #075ea0;
  --ink: #1f2937;
  --ink-soft: #6b7280;
  --line: #e8edf2;
  --bg: #f5f7fa;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(16, 42, 67, 0.06), 0 1px 2px rgba(16, 42, 67, 0.04);
  --shadow-md: 0 6px 18px rgba(16, 42, 67, 0.1);
  --shadow-lg: 0 16px 40px rgba(8, 118, 196, 0.18);
}

/* ---------- 全局观感增强（低侵入） ---------- */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
::selection {
  background: rgba(10, 161, 237, 0.18);
}
a {
  transition: color 0.18s ease, opacity 0.18s ease;
}
img {
  -webkit-user-drag: none;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(10, 161, 237, 0.35);
  outline-offset: 1px;
}

/* ---------- 通用组件 ---------- */
.ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(8, 118, 196, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.ui-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(8, 118, 196, 0.36);
  filter: brightness(1.03);
}
.ui-btn:active {
  transform: translateY(0);
}

.ui-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.ui-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(10, 161, 237, 0.4);
}

/* ===================================================================== */
/*  首页落地页                                                            */
/* ===================================================================== */
.home {
  font-family:
    system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Roboto, Arial,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* Hero */
.home-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0aa1ed 0%, #0876c4 55%, #075ea0 100%);
  color: #fff;
  padding: 64px 20px 88px;
  text-align: center;
}
.home-hero::after {
  /* 顶部柔光装饰 */
  content: '';
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 320px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.22), transparent);
  pointer-events: none;
}
.home-hero h1 {
  position: relative;
  margin: 0 0 12px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 1px;
}
.home-hero p {
  position: relative;
  margin: 0 auto 28px;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.7;
  opacity: 0.92;
}
.home-hero .home-cta {
  position: relative;
  display: inline-flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.home-hero .ui-btn {
  background: #fff;
  color: var(--brand-700);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.home-hero .ui-btn.ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* 内容容器：上移与 hero 叠合 */
.home-wrap {
  max-width: 1100px;
  width: 92%;
  margin: -52px auto 56px;
  position: relative;
  z-index: 2;
}
.home-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 4px 18px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.home-section-title::before {
  content: '';
  width: 4px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(var(--brand), var(--brand-600));
}

/* 卡片网格（响应式） */
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.home-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 26px 16px;
  text-decoration: none;
  color: inherit;
}
.home-card .ico {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  font-size: 28px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(10, 161, 237, 0.12), rgba(8, 118, 196, 0.08));
  transition: transform 0.18s ease;
}
.home-card:hover .ico {
  transform: scale(1.08) rotate(-3deg);
}
.home-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.home-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* 页脚条 */
.home-foot {
  text-align: center;
  padding: 28px 16px 40px;
  color: var(--ink-soft);
  font-size: 13px;
}

/* ===================================================================== */
/*  登录 / 注册 等鉴权页（.auth-page，覆盖旧 login.css / register.css）    */
/*  用 .auth-page + #id 提高特异性以稳定覆盖，且本表在旧表之后引入。       */
/* ===================================================================== */
.auth-page {
  min-height: 100vh;
  margin: 0;
  font-family:
    system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Roboto, Arial,
    sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #0aa1ed 0%, #0876c4 55%, #075ea0 100%) fixed;
}

/* 顶部欢迎条 */
.auth-page #top {
  background: transparent;
  border: none;
  box-shadow: none;
}
.auth-page #top .top {
  max-width: 1100px;
  width: 92%;
  margin: 0 auto;
  padding: 20px 0;
  color: #fff;
}
.auth-page #top .top span {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

/* 居中卡片容器（覆盖旧 #container/#cover 的浮动与定位） */
.auth-page #container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: 24px 16px;
  background: none;
}
.auth-page #cover {
  float: none !important;
  position: static !important;
  width: 100% !important;
  max-width: 420px;
  margin: 0 !important;
  padding: 38px 34px 30px !important;
  background: rgba(255, 255, 255, 0.98) !important;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(8, 60, 110, 0.35);
  backdrop-filter: blur(4px);
}

/* 表单标题（用 #cover 提高特异性，覆盖旧表的白色文字与绝对偏移） */
.auth-page #cover .txt p,
.auth-page #form-register .txt p,
.auth-page #cover h2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  height: auto !important;
  line-height: 1.3 !important;
  margin: 0 0 22px !important;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line) !important;
  font-size: 22px !important;
  font-weight: 700;
  color: var(--ink) !important;
}
.auth-page #cover .txt p span a,
.auth-page #form-register .txt p span a {
  position: static !important;
  right: auto !important;
  font-size: 13px !important;
  font-weight: 500;
  color: var(--brand) !important;
}

/* 输入框 */
.auth-page .text,
.auth-page .auth-field {
  margin-bottom: 16px;
}
.auth-page .text input,
.auth-page input[type='text'],
.auth-page input[type='password'],
.auth-page input[type='tel'],
.auth-page input[type='email'] {
  width: 100% !important;
  height: auto !important;
  box-sizing: border-box;
  padding: 13px 15px !important;
  font-size: 14px;
  color: var(--ink);
  background: #f6f8fb !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.auth-page .text input:focus,
.auth-page input:focus {
  background: #fff !important;
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px rgba(10, 161, 237, 0.15) !important;
  outline: none;
}

/* 注册页容器（.parent / .container / .panel，结构与登录页不同） */
.auth-page .parent {
  background: none !important;
}
.auth-page .container {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  float: none !important;
  min-height: calc(100vh - 200px);
  padding: 24px 16px;
  background: none !important;
}
.auth-page .panel {
  float: none !important;
  position: static !important;
  width: 100% !important;
  max-width: 460px;
  margin: 0 !important;
  padding: 34px 32px 26px !important;
  background: rgba(255, 255, 255, 0.98) !important;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(8, 60, 110, 0.35);
}

/* 表单组（label 在上、input 在下、下方提示） */
.auth-page .form-group {
  margin-bottom: 15px;
}
.auth-page .form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.auth-page .form-group label:empty {
  display: none;
}
.auth-page .msg-default {
  display: block;
  width: auto !important;
  height: auto !important;
  margin-top: 6px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  font-size: 12px;
  line-height: 1.4 !important;
  color: var(--ink-soft) !important;
  position: static !important;
}
.auth-page .msg-default.hidden {
  display: none;
}

/* 主按钮（登录/注册） */
.auth-page .button_login,
.auth-page .button_register,
.auth-page #bt-register,
.auth-page #bt-login,
.auth-page .auth-submit {
  display: block;
  width: 100% !important;
  height: auto !important;
  margin: 6px 0 4px !important;
  padding: 13px 0 !important;
  font-size: 16px !important;
  font-weight: 600;
  color: #fff !important;
  background: linear-gradient(135deg, var(--brand), var(--brand-600)) !important;
  border: none !important;
  border-radius: 999px !important;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(8, 118, 196, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.auth-page .button_login:hover,
.auth-page .button_register:hover,
.auth-page .auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(8, 118, 196, 0.4);
  filter: brightness(1.03);
}

/* 折叠原本用 <br> 撑开的间距 */
.auth-page .txt > div > br {
  display: none;
}

/* 底部操作区（忘记密码 / 微博登录） */
.auth-page .chose {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}
.auth-page .chose a span {
  font-size: 13px;
  color: var(--ink-soft);
}
.auth-page .chose a span:hover {
  color: var(--brand);
}
.auth-page .weibo_login {
  cursor: pointer;
  height: 26px;
  opacity: 0.85;
  transition: opacity 0.18s ease;
}
.auth-page .weibo_login:hover {
  opacity: 1;
}

/* 错误提示 */
.auth-page #showResult {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  min-width: 160px;
  text-align: center;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 13px;
  line-height: 38px;
  box-shadow: var(--shadow-md);
}
.auth-page #showResult:empty {
  display: none;
}

/* 页脚淡化（覆盖旧表白底） */
.auth-page .foot_bj,
.auth-page #foot {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  height: auto !important;
}
.auth-page #foot {
  padding: 16px 0 24px;
}
.auth-page .record,
.auth-page .service p {
  color: rgba(255, 255, 255, 0.85) !important;
  text-align: center;
}

/* ---------- 移动端自适应 ---------- */
@media (max-width: 640px) {
  .home-hero {
    padding: 48px 18px 72px;
  }
  .home-hero h1 {
    font-size: 30px;
  }
  .home-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }
  .auth-page #cover {
    padding: 30px 22px 24px !important;
  }
}
