/* ========================================
   白云经脉宝互联网医院 - 在线充值页面样式
   主题色：绿色系（匹配主站风格）
   ======================================== */

/* ========== CSS 变量 ========== */
:root {
  --primary: #2E7D32;
  --primary-dark: #1B5E20;
  --primary-light: #4CAF50;
  --accent: #FF8F00;
  --white: #ffffff;
  --bg-light: #f8faf8;
  --bg-green-light: #e8f5e9;
  --text-dark: #2c3e50;
  --text-gray: #666;
  --text-light: #999;
  --border: #e0e0e0;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --transition: all 0.3s ease;
}

/* ========== 全局重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.6;
  min-height: 100vh;
}
a { text-decoration: none; color: var(--primary); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

/* ========== 顶部导航 ========== */
.pay-header {
  background: var(--white);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}
.pay-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.pay-logo img {
  height: 40px;
  display: block;
}
.pay-nav {
  display: flex;
  gap: 8px;
}
.pay-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 20px;
  color: var(--text-gray);
  font-size: 14px;
  transition: var(--transition);
}
.pay-nav a:hover,
.pay-nav a:last-child {
  background: var(--bg-green-light);
  color: var(--primary);
  font-weight: 500;
}

/* ========== 充值主区域 ========== */
.pay-section {
  padding: 40px 20px 60px;
}
.pay-container {
  max-width: 1100px;
  margin: 0 auto;
}

/* ========== 步骤条 ========== */
.pay-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-light);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.step.active .step-num {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(46,125,50,0.3);
}
.step-label {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 500;
}
.step.active .step-label {
  color: var(--primary);
  font-weight: 600;
}
.step-line {
  width: 80px;
  height: 2px;
  background: var(--border);
  margin: 0 16px;
  transition: var(--transition);
}
.step.active + .step-line {
  background: var(--primary-light);
}

/* ========== 主内容区 ========== */
.pay-main {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

/* ========== 左侧表单 ========== */
.pay-form-wrap {
  flex: 1;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.pay-form-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 28px 30px;
  color: var(--white);
}
.pay-form-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}
.pay-form-header h2 i { margin-right: 8px; }
.pay-form-header p {
  font-size: 14px;
  opacity: 0.85;
}

/* 提示条 */
.pay-alert-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 30px;
  padding: 14px 18px;
  background: #fff8e1;
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: #8d6e00;
  line-height: 1.6;
}
.pay-alert-info i {
  color: var(--accent);
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* 表单 */
.pay-form {
  padding: 0 30px 30px;
}

.form-section {
  margin-bottom: 28px;
}
.form-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bg-light);
  position: relative;
}
.form-section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 48px;
  height: 2px;
  background: var(--primary);
}

.form-row {
  display: flex;
  gap: 16px;
}
.form-row .form-group { flex: 1; }

.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.required {
  color: #e53935;
  font-weight: 700;
}

.input-icon {
  position: relative;
}
.input-icon i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 15px;
  pointer-events: none;
  z-index: 1;
}
.input-icon input {
  width: 100%;
  height: 46px;
  padding: 0 16px 0 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-dark);
  background: var(--bg-light);
  transition: var(--transition);
  outline: none;
}
.input-icon input:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
}
.input-icon input::placeholder {
  color: #bbb;
}

/* ========== 金额选择网格 ========== */
.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.amount-card {
  cursor: pointer;
}
.amount-card input[type="radio"] {
  display: none;
}
.amount-card-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 12px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  transition: var(--transition);
  text-align: center;
  height: 100%;
}
.amount-card input:checked + .amount-card-inner {
  border-color: var(--primary);
  background: var(--bg-green-light);
  box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
}
.amount-card-inner:hover {
  border-color: var(--primary-light);
}
.amount-currency {
  font-size: 14px;
  color: var(--text-gray);
  font-weight: 500;
}
.amount-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
  margin: 4px 0;
}
.amount-card input:checked + .amount-card-inner .amount-value {
  color: var(--primary);
}
.amount-tag {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

/* 自定义金额 */
.amount-custom .amount-custom-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-gray);
  margin-bottom: 8px;
}
.amount-custom .amount-input {
  width: 90%;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 16px;
  text-align: center;
  outline: none;
  transition: var(--transition);
}
.amount-custom .amount-input:focus {
  border-color: var(--primary);
}
.amount-custom .amount-input:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}

/* ========== 支付方式 ========== */
.pay-method-list {
  display: flex;
  gap: 12px;
}
.pay-method-item {
  cursor: pointer;
  flex: 1;
}
.pay-method-item input[type="radio"] {
  display: none;
}
.pay-method-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  transition: var(--transition);
  position: relative;
}
.pay-method-item input:checked + .pay-method-inner {
  border-color: var(--primary);
  background: var(--bg-green-light);
}
.pay-method-inner .alipay-color {
  font-size: 26px;
  color: #1677FF;
}
.pay-method-inner span {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
}
.pay-method-inner .check-icon {
  margin-left: auto;
  font-size: 20px;
  color: var(--border);
  transition: var(--transition);
}
.pay-method-item input:checked + .pay-method-inner .check-icon {
  color: var(--primary);
}
.pay-method-tip {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-light);
}
.pay-method-tip i {
  color: var(--primary);
  margin-right: 4px;
}

/* ========== 提交按钮 ========== */
.btn-pay-submit {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  font-size: 17px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 2px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-pay-submit:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: 0 6px 20px rgba(46,125,50,0.35);
  transform: translateY(-1px);
}
.btn-pay-submit:active {
  transform: translateY(0);
}
.form-agreement {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-light);
}
.form-agreement a {
  color: var(--primary);
  text-decoration: underline;
}

/* ========== 右侧边栏 ========== */
.pay-sidebar {
  width: 380px;
  flex-shrink: 0;
}

/* 二维码卡片 */
.qrcode-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.qrcode-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}
.qrcode-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 24px;
}
.qrcode-card h3 i { margin-right: 8px; color: var(--primary); }

.qrcode-img-wrap {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 0 auto 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
}
.qrcode-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* 二维码遮罩（未填写信息时） */
.qrcode-mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--white);
  font-size: 13px;
  text-align: center;
  line-height: 1.6;
  padding: 20px;
}
.qrcode-mask i {
  font-size: 28px;
  opacity: 0.8;
}

.qrcode-tip {
  font-size: 13px;
  color: var(--text-gray);
  margin-bottom: 20px;
}

/* 扫码步骤 */
.qrcode-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.qr-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-gray);
  padding: 8px 0;
}
.qr-step span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-green-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* 安全提示 */
.security-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.security-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--bg-light);
}
.security-item:last-child {
  border-bottom: none;
}
.security-item i {
  font-size: 22px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.security-item strong {
  display: block;
  font-size: 14px;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.security-item p {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
}

/* ========== 底部 ========== */
.pay-footer {
  background: #1a1f2e;
  color: #b0bec5;
  padding: 50px 20px 0;
}
.pay-footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 50px;
  padding-bottom: 30px;
}
.pay-footer-info {
  flex: 2;
}
.pay-footer-logo {
  height: 36px;
  margin-bottom: 16px;
}
.pay-footer-info p {
  font-size: 14px;
  line-height: 1.8;
}
.pay-footer-links,
.pay-footer-contact {
  flex: 1;
}
.pay-footer-links h4,
.pay-footer-contact h4 {
  color: var(--white);
  font-size: 16px;
  margin-bottom: 18px;
  font-weight: 600;
}
.pay-footer-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b0bec5;
  font-size: 14px;
  padding: 4px 0;
  transition: var(--transition);
}
.pay-footer-links a:hover {
  color: var(--white);
  padding-left: 4px;
}
.pay-footer-links a i { font-size: 12px; }
.pay-footer-contact p {
  font-size: 13px;
  color: #b0bec5;
  padding: 3px 0;
}
.pay-footer-contact p i {
  color: var(--primary-light);
  margin-right: 6px;
}
.pay-footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  font-size: 13px;
  color: #78909c;
}

/* ========== 响应式 ========== */
@media (max-width: 991px) {
  .pay-main {
    flex-direction: column;
  }
  .pay-sidebar {
    width: 100%;
    display: flex;
    flex-direction: row-reverse;
    gap: 20px;
    align-items: flex-start;
  }
  .qrcode-card {
    flex: 1;
    margin-bottom: 0;
  }
  .security-card {
    flex: 1;
  }
}

@media (max-width: 767px) {
  .pay-header-inner {
    height: 56px;
    padding: 0 15px;
  }
  .pay-logo img { height: 32px; }
  .pay-nav a {
    padding: 6px 12px;
    font-size: 13px;
    gap: 4px;
  }

  .pay-section {
    padding: 24px 15px 40px;
  }
  .pay-steps { margin-bottom: 28px; }
  .step-line { width: 40px; margin: 0 10px; }

  .pay-form-header { padding: 22px 20px; }
  .pay-form-header h2 { font-size: 19px; }
  .pay-alert-info { margin: 16px 20px; }
  .pay-form { padding: 0 20px 24px; }

  .amount-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .pay-sidebar {
    flex-direction: column;
  }
  .qrcode-card { margin-bottom: 20px; }

  .pay-footer-content {
    flex-direction: column;
    gap: 30px;
  }

  .pay-method-inner {
    padding: 12px 16px;
  }
}

@media (max-width: 480px) {
  .pay-nav a span { display: none; }
  .pay-nav a { padding: 6px 10px; font-size: 16px; }

  .amount-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .amount-value { font-size: 24px; }

  .qrcode-img-wrap {
    width: 180px;
    height: 180px;
  }
}
