/* Author: TDULinks - 杭州顶点财经网络传媒有限公司九分公司 H5 留言页 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1e40af;
  --primary-light: #3b82f6;
  --primary-dark: #0f172a;
  --accent: #60a5fa;
  --gold: #c0a060;
  --bg: #eef2f7;
  --card: #ffffff;
  --text: #0f172a;
  --text-secondary: #64748b;
  --border: #dbeafe;
  --error: #dc2626;
  --radius: 6px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 头部 - 金融专业风 */
.header {
  position: relative;
  padding: 44px 20px 52px;
  overflow: hidden;
  background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 45%, #1e40af 100%);
}

.header-grid {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255,255,255,0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.5) 1px, transparent 1px);
  background-size: 24px 24px;
}

.header-chart {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  opacity: 0.15;
}

.header-chart svg {
  width: 100%;
  height: 100%;
}

.header-content {
  position: relative;
  text-align: center;
  color: #fff;
}

.company-logo {
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  background: rgba(255,255,255,0.08);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--accent);
}

.company-logo svg {
  width: 40px;
  height: 40px;
}

.company-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 8px;
  line-height: 1.45;
  padding: 0 8px;
}

.company-slogan {
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 3px;
  font-weight: 400;
}

.company-tagline {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-top: 8px;
  letter-spacing: 1px;
}

.risk-hint {
  margin-top: 14px;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.5px;
}

/* 主内容 */
.main {
  flex: 1;
  padding: 0 16px 24px;
  margin-top: -24px;
  position: relative;
  z-index: 1;
}

.form-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 20px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  border: 1px solid var(--border);
}

.form-title {
  font-size: 19px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.form-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.form-item {
  margin-bottom: 16px;
}

.form-item label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
}

.required {
  color: var(--error);
}

.form-item input,
.form-item textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text);
  background: #f8fafc;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

.form-item input:focus,
.form-item textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background: #fff;
}

.form-item textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.char-count {
  text-align: right;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.field-error {
  font-size: 12px;
  color: var(--error);
  margin-top: 4px;
  min-height: 16px;
}

/* 协议勾选 */
.agreement-section {
  margin: 20px 0;
  padding: 14px;
  background: #f0f5ff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 12px;
  position: relative;
}

.checkbox-item:last-of-type {
  margin-bottom: 0;
}

.checkbox-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 2px solid #94a3b8;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  background: #fff;
}

.checkbox-item input:checked + .checkbox-custom {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-item input:checked + .checkbox-custom::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

.checkbox-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.checkbox-text a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

/* 提交按钮 */
.submit-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 8px;
}

.submit-btn:active {
  transform: scale(0.98);
  opacity: 0.92;
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 20px 0 8px;
  font-size: 11px;
  color: var(--text-secondary);
}

.footer-risk {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 4px;
  line-height: 1.5;
  padding: 0 12px;
}

/* 弹窗 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.modal-panel {
  position: relative;
  background: var(--card);
  width: 100%;
  max-height: 85vh;
  border-radius: 12px 12px 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--primary-dark);
  color: #fff;
  border-radius: 12px 12px 0 0;
}

.modal-header h3 {
  font-size: 16px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 26px;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.modal-body h4 {
  font-size: 14px;
  color: var(--primary-dark);
  margin: 16px 0 8px;
  padding-left: 8px;
  border-left: 3px solid var(--primary);
}

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

.modal-body p,
.modal-body li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 8px;
}

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

.modal-body strong {
  color: var(--text);
}

.privacy-update {
  font-size: 12px !important;
  color: var(--text-secondary) !important;
  background: #f0f5ff;
  padding: 8px 12px;
  border-radius: var(--radius);
  text-align: center;
}

.modal-footer {
  padding: 12px 20px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-btn {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.success-panel {
  position: relative;
  background: var(--card);
  border-radius: 12px;
  padding: 32px 24px;
  margin: auto 32px;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
}

.success-icon svg { width: 100%; height: 100%; }

.success-panel h3 {
  font-size: 18px;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.success-panel p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

@media (min-width: 480px) {
  .main {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
  .modal { align-items: center; }
  .modal-panel {
    max-width: 480px;
    border-radius: 12px;
    max-height: 80vh;
  }
  .modal-header { border-radius: 12px 12px 0 0; }
}
