/* 基础重置和移动端适配 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'PingFang SC', 'Alibaba PuHuiTi', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #FF8C42 0%, #E67E22 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  width: 100vw;
}

/* 主容器 */
.container {
  width: 100vw;
  max-width: none;
  margin: 0;
  position: relative;
  min-height: 100vh;
  padding: 20px 25px;
}

/* 页面内容 */
.page-content {
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
}

/* 头部区域 */
.header {
  margin-bottom: 30px;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.logo-icon {
  width: 61px;
  height: 61px;
  border-radius: 50%;
  margin-right: 18px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.logo-text {
  font-size: 30px;
  font-weight: 400;
  color: white;
  font-family: 'PingFang SC', sans-serif;
}

.notification {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-icon {
  font-size: 16px;
  opacity: 0.8;
}

.notification-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 主标题区域 */
.main-title-section {
  text-align: center;
  margin-bottom: 30px;
}

.main-title {
  font-size: 42px;
  font-weight: 700;
  color: white;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.success-rate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.rate-line {
  width: 41px;
  height: 20px;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDEiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCA0MSAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMCIgeT0iOCIgd2lkdGg9IjEwIiBoZWlnaHQ9IjEwIiByeD0iMiIgZmlsbD0id2hpdGUiIG9wYWNpdHk9IjAuNTEiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDUgMTMpIi8+CjxyZWN0IHg9IjgiIHk9IjAiIHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCIgcng9IjIiIGZpbGw9IndoaXRlIiBvcGFjaXR5PSIwLjUxIiB0cmFuc2Zvcm09InJvdGF0ZSg0NSAxMyA1KSIvPgo8cmVjdCB4PSIxNiIgeT0iOCIgd2lkdGg9IjEwIiBoZWlnaHQ9IjEwIiByeD0iMiIgZmlsbD0id2hpdGUiIG9wYWNpdHk9IjAuNTEiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDIxIDEzKSIvPgo8cmVjdCB4PSIyNCIgeT0iMiIgd2lkdGg9IjEwIiBoZWlnaHQ9IjEwIiByeD0iMiIgZmlsbD0id2hpdGUiIG9wYWNpdHk9IjAuNTEiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDI5IDcpIi8+CjxyZWN0IHg9IjMyIiB5PSI4IiB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHJ4PSIyIiBmaWxsPSJ3aGl0ZSIgb3BhY2l0eT0iMC41MSIgdHJhbnNmb3JtPSJyb3RhdGUoNDUgMzcgMTMpIi8+Cjwvc3ZnPgo=');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.51;
}

.rate-text {
  font-size: 20px;
  color: white;
  font-weight: 400;
}

.rate-number {
  font-size: 20px;
  color: white;
  font-weight: 700;
}

/* 特色功能卡片 */
.features-grid {
  display: flex;
  flex-direction: row;
  gap: 8px;
  margin-bottom: 30px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 15px 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  justify-content: space-between;
}

.feature-card {
  flex: 0 1 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  text-align: left;
  justify-content: flex-start;
  min-width: 0;
}

.feature-icon {
  width: 20px;
  height: 20px;
  background: #FF8C42;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  font-weight: bold;
  flex-shrink: 0;
}

.feature-text {
  flex: 0 1 auto;
}

.feature-title {
  font-size: 11px;
  color: #333;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

/* 申请表单卡片 */
.application-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 25px;
  padding: 30px 25px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  margin-bottom: 30px;
}

.amount-section {
  text-align: center;
  margin-bottom: 30px;
}

.amount-label {
  font-size: 18px;
  color: #666;
  margin-bottom: 10px;
}

.amount-value {
  font-size: 48px;
  font-weight: 900;
  color: #FF8C42;
  font-family: 'Arial', sans-serif;
  letter-spacing: -1px;
}

/* 表单样式 */
.loan-form {
  width: 100%;
}

.input-wrapper {
  margin-bottom: 20px;
}

.phone-input {
  width: 100%;
  height: 56px;
  border: 1px solid #ddd;
  border-radius: 28px;
  padding: 0 20px;
  font-size: 16px;
  background: #f8f9fa;
  transition: all 0.3s ease;
}

.phone-input:focus {
  outline: none;
  border-color: #FF8C42;
  box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
}

.phone-input::placeholder {
  color: #999;
}

.submit-button {
  width: 100%;
  height: 56px;
  background: linear-gradient(90deg, #FF8C42 0%, #E67E22 100%);
  border: none;
  border-radius: 28px;
  color: white;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 15px;
  box-shadow: 0 8px 25px rgba(255, 140, 66, 0.4);
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(255, 140, 66, 0.5);
}

.submit-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.submit-button.loading {
  opacity: 0.8;
  pointer-events: none;
}

/* 协议区域 */
.agreement {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.checkbox {
  width: 18px;
  height: 18px;
  accent-color: #2AAE67;
  cursor: pointer;
}

.agreement-text {
  font-size: 14px;
  color: #666;
  cursor: pointer;
  user-select: none;
}

.agreement-link {
  color: #007bff;
  text-decoration: none;
  cursor: pointer;
}

/* 下载页面样式 */
#download-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 50px;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* 背景装饰元素 */
.download-bg-decoration {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.decoration-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 6s ease-in-out infinite;
}

.decoration-circle-1 {
  width: 120px;
  height: 120px;
  top: 15%;
  left: 10%;
  animation-delay: 0s;
}

.decoration-circle-2 {
  width: 80px;
  height: 80px;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.decoration-circle-3 {
  width: 60px;
  height: 60px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

.decoration-sparkle {
  position: absolute;
  font-size: 24px;
  animation: sparkle 3s ease-in-out infinite;
}

.decoration-sparkle-1 {
  top: 25%;
  right: 20%;
  animation-delay: 1s;
}

.decoration-sparkle-2 {
  bottom: 30%;
  right: 10%;
  animation-delay: 3s;
}

.decoration-sparkle-3 {
  top: 70%;
  left: 15%;
  animation-delay: 5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

.congrats-title {
  font-size: 50px;
  font-weight: 700;
  color: white;
  font-family: 'PingFang SC', sans-serif;
  margin-bottom: 30px;
  white-space: nowrap;
  position: relative;
  z-index: 2;
}

.download-amount {
  font-size: 100px;
  font-weight: 900;
  color: white;
  font-family: 'Arial', sans-serif;
  letter-spacing: -2px;
  margin-bottom: 40px;
  position: relative;
  z-index: 2;
}

.download-hint {
  font-size: 35px;
  font-weight: 400;
  color: white;
  font-family: 'PingFang SC', sans-serif;
  margin-bottom: 60px;
  position: relative;
  z-index: 2;
}

.download-version-text {
  font-size: 30px;
  font-weight: 700;
  color: white;
  font-family: 'PingFang SC', sans-serif;
  margin-bottom: 40px;
  position: relative;
  z-index: 2;
}

.download-buttons {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.download-button {
  font-size: 35px;
  font-weight: 500;
  color: white;
  background: linear-gradient(90deg, #FF8C42 0%, #E67E22 100%);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 40px;
  padding: 20px 50px;
  font-family: 'PingFang SC', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(255, 140, 66, 0.4);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.download-button::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, 
    rgba(255, 255, 255, 0.4) 0%, 
    rgba(255, 255, 255, 0.1) 50%, 
    rgba(255, 255, 255, 0.4) 100%);
  border-radius: 40px;
  z-index: -1;
}

.download-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(255, 140, 66, 0.6);
  border-color: rgba(255, 255, 255, 0.5);
}

.download-button:active {
  transform: translateY(-1px);
}

/* iOS安装教程页面 */
.ios-install-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 0;
  min-height: 100vh;
  position: relative;
}

.ios-install-content {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 40px;
  max-width: 500px;
  width: 100%;
  margin-top: 50px;
  margin-bottom: 100px;
}

.ios-install-guide-text {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 30px;
}

.ios-install-image-container {
  margin-bottom: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ios-install-guide-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ios-install-floating-btn {
  background: linear-gradient(90deg, #FF8C42 0%, #E67E22 100%);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(255, 140, 66, 0.3);
}

.ios-install-floating-btn:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 140, 66, 0.4);
}

/* 微信提示页面 */
.weixin-tip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.weixin-tip-content {
  background: white;
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  max-width: 400px;
  margin: 20px;
}

.weixin-tip-text {
  font-size: 18px;
  color: #333;
  margin-bottom: 20px;
  line-height: 1.5;
}

.weixin-tip-content button {
  background: #FF8C42;
  color: white;
  border: none;
  border-radius: 15px;
  padding: 12px 30px;
  font-size: 16px;
  cursor: pointer;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 15px 20px;
  }
  
  .main-title {
    font-size: 36px;
  }
  
  .features-grid {
    flex-direction: row;
    gap: 10px;
  }
  
  .feature-card {
    flex-direction: row;
    text-align: left;
    justify-content: flex-start;
  }
  
  .amount-value {
    font-size: 40px;
  }
  
  .congrats-title {
    font-size: 42px;
  }
  
  .download-amount {
    font-size: 85px;
  }
  
  .download-hint {
    font-size: 28px;
  }
  
  .download-version-text {
    font-size: 24px;
  }
  
  .download-button {
    font-size: 28px;
    padding: 18px 40px;
  }
  
  .decoration-sparkle {
    font-size: 20px;
  }
  
  .ios-install-content {
    padding: 35px;
    margin: 30px 15px 100px 15px;
  }
  
  .ios-install-guide-text {
    font-size: 22px;
  }
  
  .ios-install-floating-btn {
    font-size: 17px;
    padding: 14px 28px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px 15px;
  }
  
  .main-title {
    font-size: 32px;
  }
  
  .rate-text, .rate-number {
    font-size: 18px;
  }
  
  .amount-value {
    font-size: 48px;
  }
  
  .congrats-title {
    font-size: 36px;
  }
  
  .download-amount {
    font-size: 72px;
  }
  
  .download-hint {
    font-size: 24px;
  }
  
  .download-version-text {
    font-size: 20px;
  }
  
  .download-button {
    font-size: 24px;
    padding: 15px 30px;
  }
  
  .decoration-sparkle {
    font-size: 18px;
  }
  
  .decoration-circle-1 {
    width: 80px;
    height: 80px;
  }
  
  .decoration-circle-2 {
    width: 60px;
    height: 60px;
  }
  
  .decoration-circle-3 {
    width: 40px;
    height: 40px;
  }
  
  .ios-install-content {
    padding: 30px 20px;
    margin: 20px 10px 100px 10px;
  }
  
  .ios-install-guide-text {
    font-size: 20px;
  }
  
  .ios-install-floating-btn {
    font-size: 16px;
    padding: 12px 25px;
    bottom: 20px;
  }
}

@media (max-width: 320px) {
  .main-title {
    font-size: 28px;
  }
  
  .feature-title {
    font-size: 12px;
  }
  
  .phone-input, .submit-button {
    height: 48px;
  }
}

/* 调试错误提示样式 */
.debug-error-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 99999;
  color: white;
  font-family: Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

.debug-error-content {
  text-align: center;
  padding: 20px;
  max-width: 90%;
  word-wrap: break-word;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.debug-error-title {
  font-size: 24px;
  font-weight: bold;
  color: #ff6b6b;
  margin-bottom: 20px;
}

.debug-error-message {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 20px;
  color: #fff;
}

.debug-error-details {
  font-size: 12px;
  color: #ccc;
  background: rgba(255,255,255,0.1);
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 20px;
  text-align: left;
  max-height: 200px;
  overflow-y: auto;
}

.debug-error-close {
  background: #ff6b6b;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}

.debug-error-close:hover {
  background: #ff5252;
}

@media (max-width: 768px) {
  .debug-error-title {
    font-size: 20px;
  }
  
  .debug-error-message {
    font-size: 14px;
  }
}

/* 备案号样式 */
.footer-beian {
  width: 100%;
  text-align: center;
  padding: 20px 0;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.beian-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'PingFang SC', sans-serif;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .beian-text {
    font-size: 11px;
  }
}