/* ========================================
   2026 行业创新峰会 · 移动端优先样式
   适配微信 / iOS Safari / Android
   ======================================== */

:root {
  --gold: #CC1A25;
  --gold-dark: #A01020;
  --gold-light: #E03040;
  --bg-deep: #0d0d12;
  --bg-card: #15151d;
  --bg-card-alt: #1c1c28;
  --text-white: #f0f0f5;
  --text-light: #b8b8c8;
  --text-muted: #7878a0;
  --border-color: rgba(255,255,255,0.08);
  --border-gold: rgba(204,26,37,0.35);
  --input-bg: rgba(255,255,255,0.06);
  --input-border: rgba(255,255,255,0.12);
  --input-focus: var(--gold);
  --success-green: #52c41a;
  --error-red: #ff4d4f;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--text-white);
  background: linear-gradient(165deg, var(--bg-deep) 0%, #0a0510 60%, #000 100%);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.65;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
}

/* ========== 页面结构 ========== */
.page-wrap {
  min-height: 100vh;
  min-height: 100dvh;
}

/* ========== 邀请函区域 ========== */
.invitation-section {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 32px;
  padding-top: max(env(safe-area-inset-top), 24px);
  padding-bottom: max(env(safe-area-inset-bottom), 32px);
}

.invitation-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(204,26,37,0.1);
  position: relative;
  overflow: hidden;
}

/* 顶部装饰条 */
.invitation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-dark));
}

.card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.brand-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.invite-tag {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  padding: 3px 10px;
  border-radius: 20px;
}

.card-hero {
  text-align: center;
  margin-bottom: 20px;
}

.event-title {
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.3;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.event-subtitle {
  font-size: 11px;
  letter-spacing: 6px;
  color: var(--gold);
  font-weight: 600;
}

.card-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
}

.divider-diamond {
  font-size: 8px;
  color: var(--gold);
}

.card-body {
  margin-bottom: 20px;
}

.greeting-text {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.event-desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.8;
}

.info-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.info-card-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gold);
}

.info-card-icon svg {
  width: 20px;
  height: 20px;
}

.info-card-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.info-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.info-value {
  font-size: 14px;
  color: var(--text-white);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-footer-text {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.footer-note {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 2px;
}

/* ========== 立即报名 CTA ========== */
.cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 420px;
  margin-top: 24px;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #fff;
  border-radius: 50px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  box-shadow: 0 4px 16px rgba(204,26,37,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}

.cta-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(204,26,37,0.3);
}

.cta-btn-arrow {
  font-size: 14px;
  animation: bounceDown 1.5s ease-in-out infinite;
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ========== 报名表单区域 ========== */
.register-section {
  padding: 0 16px 40px;
  padding-left: max(env(safe-area-inset-left), 16px);
  padding-right: max(env(safe-area-inset-right), 16px);
  padding-bottom: max(env(safe-area-inset-bottom), 40px);
}

.register-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.register-header {
  text-align: center;
  margin-bottom: 24px;
}

.register-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 6px;
}

.register-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.form-row {
  margin-bottom: 14px;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 6px;
}

.required {
  color: var(--gold);
  font-style: normal;
}

/* ========== 表单输入框（移动端优化） ========== */
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 13px 14px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--text-white);
  font-size: 16px; /* iOS 不会缩放的关键：16px */
  font-family: var(--font-sans);
  line-height: 1.4;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
  border-radius: var(--radius-sm);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
  font-size: 14px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(204,26,37,0.15);
}

/* iOS 微信安全区域处理 */
input[type="text"],
input[type="tel"] {
  padding-top: 13px;
  padding-bottom: 13px;
}

/* select 下拉箭头 */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237878a0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

textarea {
  resize: vertical;
  min-height: 60px;
}

/* 字段错误提示 */
.field-error {
  font-size: 12px;
  color: var(--error-red);
  margin-top: 4px;
  min-height: 16px;
}

/* ========== 提交按钮 ========== */
.submit-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: 1px;
  cursor: pointer;
  margin-top: 20px;
  box-shadow: 0 4px 16px rgba(204,26,37,0.35);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  -webkit-appearance: none;
  min-height: 50px;
}

.submit-btn:active:not(:disabled) {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(204,26,37,0.25);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-loading {
  display: none;
  align-items: center;
  gap: 8px;
}

.submit-btn.is-loading .btn-text { display: none; }
.submit-btn.is-loading .btn-loading { display: flex; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-error-msg {
  text-align: center;
  font-size: 13px;
  color: var(--error-red);
  margin-top: 12px;
  min-height: 18px;
}

.privacy-note {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 14px;
  line-height: 1.5;
}

/* ========== 报名成功页面 ========== */
.success-section {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  padding-top: max(env(safe-area-inset-top), 24px);
  padding-bottom: max(env(safe-area-inset-bottom), 24px);
}

.success-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.success-icon-wrap {
  margin-bottom: 20px;
  animation: successPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes successPop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.success-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 10px;
}

.success-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 24px;
}

.success-info {
  background: var(--bg-card-alt);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
  text-align: left;
}

.success-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.success-info-row:last-child {
  border-bottom: none;
}

.success-info-label {
  font-size: 13px;
  color: var(--text-muted);
}

.success-info-value {
  font-size: 13px;
  color: var(--text-white);
  font-weight: 500;
}

.success-divider {
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 14px;
}

.success-tip {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  background: linear-gradient(135deg, #07c160, #06ad56);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(7,193,96,0.35);
  transition: transform 0.15s;
  -webkit-appearance: none;
}

.btn-share:active {
  transform: scale(0.97);
}

/* ========== 分享引导浮层 ========== */
.share-guide {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.75);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: max(env(safe-area-inset-top), 20px) 20px 0 0;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.share-guide-content {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.share-guide-arrow {
  font-size: 48px;
  color: #fff;
  margin-bottom: 8px;
  animation: arrowPulse 1s ease-in-out infinite;
}

@keyframes arrowPulse {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(10px); }
}

.share-guide-text {
  color: #fff;
  font-size: 15px;
  line-height: 1.6;
  text-align: right;
  max-width: 200px;
}

/* ========== 动画 ========== */
.fade-in {
  animation: fadeInUp 0.5s ease both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.delay-1 { animation-delay: 0.1s; }

/* ========== 减少动画（用户偏好） ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========== 暗黑模式适配（已有深色主题） ========== */
@media (prefers-color-scheme: light) {
  /* 深色主题不需要变化，保持一致性 */
}

/* ========== 大屏幕适配 ========== */
@media (min-width: 640px) {
  .invitation-section,
  .register-section {
    padding-left: 24px;
    padding-right: 24px;
  }

  .invitation-card,
  .register-card {
    padding: 36px 32px;
  }
}

/* ========== 安全区域适配（iPhone刘海屏） ========== */
@supports (padding-top: env(safe-area-inset-top)) {
  /* 已通过 padding-top: max() 处理 */
}

/* ========== 滚动优化 ========== */
html {
  scroll-behavior: smooth;
}

/* ========== 隐藏滚动条但保持功能 ========== */
::-webkit-scrollbar {
  width: 0;
  display: none;
}
