/* ==========================================================================
   云枢科技 CloudHub - 全局公共样式 (Common Stylesheet)
   设计风格：中规中矩、科技大气、精致、极简响应式
   ========================================================================== */

/* 1. CSS 变量定义 (Design Tokens) */
:root {
  /* 品牌核心色彩 */
  --primary-color: #2563eb;         /* 经典科技蓝 */
  --primary-hover: #1d4ed8;         /* 深蓝悬停 */
  --primary-light: #eff6ff;         /* 浅蓝背景 */
  --accent-cyan: #06b6d4;           /* 极光青 */
  --accent-purple: #6366f1;         /* 靛青紫 */
  
  /* 基础色彩 */
  --text-main: #0f172a;             /* 深 Slate 字体主色 */
  --text-muted: #64748b;            /* 次要字体颜色 */
  --text-light: #94a3b8;            /* 浅灰色提示 */
  --bg-canvas: #0b0f19;             /* 主画布背景 (深邃夜空) */
  --card-bg: rgba(255, 255, 255, 0.96); /* 白底卡片 */
  --card-border: #e2e8f0;           /* 边框分割线 */
  
  /* 状态色彩 */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  
  /* 阴影与圆角 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.25);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* 字体与过渡 */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. 重置与基础设置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* 全屏气势背景 (Atmospheric Canvas) */
.page-wrapper {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 15% 15%, #1e293b 0%, #0f172a 50%, #080c14 100%);
  padding: 24px 16px;
}

/* 动态背景光弧与几何网格 */
.page-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 1;
}

.ambient-glow-1 {
  position: absolute;
  top: -100px;
  left: 10%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22) 0%, rgba(37, 99, 235, 0) 70%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 1;
}

.ambient-glow-2 {
  position: absolute;
  bottom: -120px;
  right: 12%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.18) 0%, rgba(6, 182, 212, 0) 70%);
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 1;
}

/* 顶部通用导航栏 (Top Navigation Bar) */
.top-navbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
}

/* 网站品牌 Logo & 名称 */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.5px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-title-sub {
  font-size: 12px;
  font-weight: 400;
  color: #94a3b8;
  display: block;
  margin-top: -2px;
}

/* 返回首页按钮 */
.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  color: #f8fafc;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: var(--transition-fast);
}

.btn-back-home:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-back-home svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: transform 0.2s ease;
}

.btn-back-home:hover svg {
  transform: translateX(-3px);
}

/* 3. 核心双栏容器组件 (Split Card Container) */
.auth-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1080px;
  min-height: 620px;
  margin-top: 60px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

/* 左侧品牌与科技宣传屏 (Left Banner) */
.auth-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  color: #ffffff;
}

.auth-banner::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(37, 99, 235, 0.25) 0%, transparent 60%);
  pointer-events: none;
}

.banner-content {
  position: relative;
  z-index: 2;
}

.banner-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 20px;
  color: #60a5fa;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}

.banner-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.banner-desc {
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 36px;
}

/* 左侧特色优势列表 (Feature Cards) */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateX(4px);
}

.feature-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon-box svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.feature-info h4 {
  font-size: 15px;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 2px;
}

.feature-info p {
  font-size: 13px;
  color: #64748b;
}

.banner-footer {
  position: relative;
  z-index: 2;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #64748b;
  font-size: 13px;
}

/* 右侧表单主区域 (Right Form Section) */
.auth-form-wrapper {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
}

.form-header {
  margin-bottom: 28px;
}

.form-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

.form-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.form-subtitle a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
  transition: var(--transition-fast);
}

.form-subtitle a:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

/* 表单输入框与输入组 */
.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: var(--transition-fast);
}

.input-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.form-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-main);
  background: #f8fafc;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition-fast);
}

.form-input::placeholder {
  color: #cbd5e1;
}

.form-input:hover {
  border-color: #cbd5e1;
  background: #ffffff;
}

.form-input:focus {
  border-color: var(--primary-color);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.input-container:focus-within .input-icon {
  color: var(--primary-color);
}

/* 密码显示/隐藏按钮 */
.toggle-password {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: var(--transition-fast);
}

.toggle-password:hover {
  color: var(--text-main);
}

.toggle-password svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* 校验提示 */
.input-error-msg {
  display: none;
  font-size: 12px;
  color: var(--color-error);
  margin-top: 6px;
  align-items: center;
  gap: 4px;
}

.form-group.has-error .form-input {
  border-color: var(--color-error) !important;
  background-color: #fef2f2;
}

.form-group.has-error .input-error-msg {
  display: flex;
}

/* 验证码按钮组 */
.verify-code-group {
  display: flex;
  gap: 12px;
}

.btn-send-code {
  height: 48px;
  padding: 0 18px;
  white-space: nowrap;
  background: #f1f5f9;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.btn-send-code:hover:not(:disabled) {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: var(--primary-color);
}

.btn-send-code:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
  border-color: #e2e8f0;
}

.form-input.no-icon {
  padding-left: 16px;
}

.policy-message {
  margin-bottom: 18px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(37, 99, 235, 0.16);
  background: rgba(37, 99, 235, 0.07);
  color: #1d4ed8;
  font-size: 13px;
  line-height: 1.7;
}

.policy-message.is-error {
  border-color: rgba(239, 68, 68, 0.18);
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
}

.captcha-question {
  min-width: 128px;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: #f8fafc;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.auth-note {
  color: var(--text-muted);
  font-size: 13px;
}

/* 主提交按钮 */
.btn-submit {
  width: 100%;
  height: 50px;
  margin-top: 8px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.btn-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-submit .spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 第三方快捷登录 */
.divider {
  display: flex;
  align-items: center;
  margin: 28px 0 20px 0;
  color: var(--text-light);
  font-size: 13px;
}

.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.divider span {
  padding: 0 14px;
}

.social-login {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  cursor: pointer;
  transition: var(--transition-fast);
}

.social-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.social-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* 4. 模态弹窗组件 (Modal Component for Terms & Privacy) */
.modal-overlay {
  display: none; /* jQuery fadeIn/fadeOut 控制 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  z-index: 100;
  padding: 20px;
  justify-content: center;
  align-items: center;
}

.modal-card {
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-main);
  background: #e2e8f0;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 14px;
  color: #334155;
  line-height: 1.7;
}

.modal-body h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin: 16px 0 8px 0;
}

.modal-body h3:first-child {
  margin-top: 0;
}

.modal-body p {
  margin-bottom: 12px;
}

.modal-body ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.modal-body li {
  margin-bottom: 6px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn-secondary {
  padding: 10px 20px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.btn-agree-modal {
  padding: 10px 24px;
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-agree-modal:hover {
  background: var(--primary-hover);
}

/* 5. 消息 Toast 通知 */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  min-width: 280px;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 4px solid var(--primary-color);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.toast-success { border-left-color: var(--color-success); }
.toast.toast-error { border-left-color: var(--color-error); }
.toast.toast-warning { border-left-color: var(--color-warning); }

/* 6. 响应式布局断点适配 (Responsive Breakpoints) */
@media (max-width: 1024px) {
  .auth-container {
    max-width: 900px;
    grid-template-columns: 1fr 1fr;
  }
  .banner-title {
    font-size: 26px;
  }
  .auth-banner, .auth-form-wrapper {
    padding: 36px 30px;
  }
}

@media (max-width: 820px) {
  .top-navbar {
    padding: 16px 20px;
  }
  .auth-container {
    grid-template-columns: 1fr;
    margin-top: 50px;
    max-width: 500px;
    min-height: auto;
  }
  .auth-banner {
    display: none; /* 移动端隐藏大屏左侧宣发 Banner，突出极速表单 */
  }
  .auth-form-wrapper {
    padding: 36px 28px;
  }
}

@media (max-width: 480px) {
  .page-wrapper {
    padding: 12px;
  }
  .top-navbar {
    padding: 12px 14px;
  }
  .brand-logo span {
    font-size: 17px;
  }
  .brand-title-sub {
    display: none;
  }
  .btn-back-home {
    padding: 6px 12px;
    font-size: 13px;
  }
  .auth-container {
    margin-top: 54px;
    border-radius: var(--radius-lg);
  }
  .auth-form-wrapper {
    padding: 28px 20px;
  }
  .form-title {
    font-size: 22px;
  }
  .social-login {
    gap: 12px;
  }
}
