* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: #f5f9ff;
  min-height: 100vh;
  padding: 16px;
}

.container {
  max-width: 420px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(28, 100, 242, 0.08);
  overflow: hidden;
  position: relative;
}

/* 头部样式 */
.header {
  background: #1574F7;
  padding: 28px 20px;
  text-align: center;
  color: #fff;
}

.logo {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}

.title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1px;
}

/* 订单信息 */
.order-info {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-label {
  color: #999;
  font-size: 14px;
}

.order-id {
  color: #333;
  font-size: 14px;
  font-weight: 500;
}

/* 支付方式区域 */
.payment-section {
  padding: 20px;
  background: #fff;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a73e8;
  margin-bottom: 16px;
  padding-left: 12px;
  position: relative;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  background: #1a73e8;
  border-radius: 2px;
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payment-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}

.payment-option:active {
  background: #f5f9ff;
}

.payment-option.selected {
  border-color: #1574F7;
  background: #f0f7ff;
}

.option-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.option-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.points-icon {
  background: #fff7e6;
  color: #fa8c16;
}

.wechat-icon {
  background: #f0fff0;
}

.option-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.option-name {
  font-size: 15px;
  font-weight: 500;
  color: #333;
}

.option-desc {
  font-size: 12px;
  color: #999;
}

.option-right {
  display: flex;
  align-items: center;
}

.radio-circle {
  width: 20px;
  height: 20px;
  border: 2px solid #d9d9d9;
  border-radius: 50%;
  position: relative;
  transition: all 0.2s ease;
}

.radio-circle.checked {
  border-color: #1574F7;
}

.radio-circle.checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: #1574F7;
  border-radius: 50%;
}

/* 支付按钮 */
.pay-button-wrapper {
  padding: 20px;
  padding-top: 10px;
  background: #fff;
}

.pay-button {
  width: 100%;
  height: 48px;
  background: #1574F7;
  border: none;
  border-radius: 24px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pay-button:active {
  background: #1260d9;
}

.pay-button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* 加载状态 */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.loading-overlay.show {
  display: flex;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e8e8e8;
  border-top-color: #1574F7;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  margin-top: 14px;
  color: #666;
  font-size: 14px;
}

/* 错误页面 */
.error-page {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  z-index: 99;
}

.error-page.show {
  display: flex;
}

.error-icon {
  margin-bottom: 20px;
}

.error-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.error-message {
  font-size: 14px;
  color: #999;
  text-align: center;
  margin-bottom: 28px;
}

.retry-button {
  padding: 10px 36px;
  background: #1574F7;
  border: none;
  border-radius: 20px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.retry-button:active {
  background: #1260d9;
}

/* 成功页面 */
.success-page {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  z-index: 99;
}

.success-page.show {
  display: flex;
}

.success-icon {
  margin-bottom: 20px;
  animation: scaleIn 0.4s ease;
}

@keyframes scaleIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.success-message {
  font-size: 14px;
  color: #999;
  text-align: center;
  margin-bottom: 28px;
}

.back-button {
  padding: 10px 36px;
  background: #52c41a;
  border: none;
  border-radius: 20px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.back-button:active {
  background: #45a818;
}

/* Toast 提示 */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 14px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  max-width: 80%;
  text-align: center;
}

.toast.show {
  opacity: 1;
}

/* 隐藏内容 */
.hidden {
  display: none !important;
}