html,
body,
#app {
  height: 100%;
  margin: 0px;
  padding: 0px;
}

#loader-index-wrapper {
  width: 100%;
  height: 100%;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
  background-color: #f4f5f8;
}

#loader-index {
  width: 36px;
  -webkit-transform-origin: center;
  transform-origin: center;
  -webkit-animation: rotate4 1s linear infinite;
  animation: rotate4 1s linear infinite;
}

#circle-index {
  fill: none;
  /* 低版本兼容 - 使用rgb作为fallback */
  stroke: rgb(66, 133, 244);
  stroke: hsl(217, 91%, 60%);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 90, 200;
  -webkit-animation: dash4 1s ease-in-out infinite;
  animation: dash4 1s ease-in-out infinite;
}

#load-index-title {
  margin-top: 12px;
  font-size: 15px;
}

#reload-button {
  margin-top: 32px;
  padding: 8px 16px;
  background-color: hsl(217, 91%, 60%);
  /* 低版本兼容 - 使用rgb作为fallback */
  background-color: rgb(66, 133, 244);
  color: white;
  border: none;
  /* 低版本兼容 - 添加webkit前缀 */
  -webkit-border-radius: 20px;
  -moz-border-radius: 20px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  /* 低版本兼容 - 添加webkit前缀 */
  -webkit-transition: opacity 0.2s;
  -moz-transition: opacity 0.2s;
  -o-transition: opacity 0.2s;
  transition: opacity 0.2s;
  width: 120px;
  height: 40px;
  white-space: nowrap;
  line-height: 1;
  /* 低版本兼容 - 添加flexbox前缀 */
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  /* 低版本兼容 - 添加align-items前缀 */
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  /* 低版本兼容 - 添加justify-content前缀 */
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  /* 低版本兼容 - 防止文本选择 */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* 低版本兼容 - 触摸优化 */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

#reload-button:active {
  opacity: 0.8;
  /* 低版本兼容 - 添加transform作为视觉反馈 */
  -webkit-transform: scale(0.98);
  -moz-transform: scale(0.98);
  -ms-transform: scale(0.98);
  transform: scale(0.98);
}

@-webkit-keyframes rotate4 {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  100% {
    -webkit-transform: rotate(-360deg);
    transform: rotate(-360deg);
  }
}

@keyframes rotate4 {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  100% {
    -webkit-transform: rotate(-360deg);
    transform: rotate(-360deg);
  }
}

@-webkit-keyframes dash4 {
  0% {
    stroke-dasharray: 90, 150;
  }

  100% {
    stroke-dasharray: 10, 150;
  }
}

@keyframes dash4 {
  0% {
    stroke-dasharray: 90, 150;
  }

  100% {
    stroke-dasharray: 10, 150;
  }
}

/* 隐藏高德地图logo - 低版本兼容 */
.amap-logo {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  /* 低版本兼容 - 确保完全隐藏 */
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

.amap-copyright {
  opacity: 0 !important;
  visibility: hidden !important;
  /* 低版本兼容 - 确保完全隐藏 */
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* 低版本WebView兼容性增强 */
* {
  /* 防止在老版本WebView中出现选择问题 */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  /* 确保box-sizing在老版本中正常工作 */
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

/* 针对vivo、oppo等品牌WebView的特殊处理 */
body {
  /* 防止在某些WebView中出现滚动问题 */
  -webkit-overflow-scrolling: touch;
  /* 确保字体渲染正常 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 防止缩放 */
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* 错误提示样式 - 兼容老版本 */
.error-message {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #ff4444;
  background: -webkit-linear-gradient(135deg, #ff6b6b, #ee5a24);
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: white;
  padding: 12px 16px;
  z-index: 10000;
  font-size: 14px;
  /* 低版本兼容 - 添加阴影前缀 */
  -webkit-box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  -moz-box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* 应用加载失败容器样式 - 兼容老版本 */
.error-container {
  padding: 20px;
  text-align: center;
  color: #666;
  font-family: Arial, sans-serif;
  /* 低版本兼容 - 确保居中显示 */
  width: 100%;
  height: 100%;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
}

.error-title {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

.error-text {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.5;
  color: #666;
}

.error-reload-btn {
  padding: 10px 20px;
  margin-top: 16px;
  background: #1976d2;
  color: white;
  border: none;
  font-size: 14px;
  cursor: pointer;
  /* 低版本兼容 - 添加前缀 */
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  -webkit-transition: background-color 0.2s, transform 0.1s;
  -moz-transition: background-color 0.2s, transform 0.1s;
  -o-transition: background-color 0.2s, transform 0.1s;
  transition: background-color 0.2s, transform 0.1s;
  /* 防止文本选择 */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* 触摸优化 */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.error-reload-btn:hover {
  background: #1565c0;
}

.error-reload-btn:active {
  background: #0d47a1;
  -webkit-transform: scale(0.98);
  -moz-transform: scale(0.98);
  -ms-transform: scale(0.98);
  transform: scale(0.98);
}

/* 设备信息显示区域样式 - 兼容老版本 */
.device-info {
  margin: 20px 0;
  padding: 16px;
  background: #f8f9fa;
  /* 低版本兼容 - 添加前缀 */
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  text-align: left;
  max-width: 400px;
  width: 100%;
}

.info-title {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: bold;
  color: #495057;
  text-align: center;
}

.info-item {
  margin: 6px 0;
  font-size: 13px;
  line-height: 1.4;
  color: #6c757d;
  word-break: break-word;
}

.info-item strong {
  color: #495057;
  font-weight: 600;
}

/* UserAgent详情展开区域 */
.user-agent-details {
  margin-top: 12px;
  border-top: 1px solid #e9ecef;
  padding-top: 12px;
}

.user-agent-details summary {
  cursor: pointer;
  font-size: 13px;
  color: #007bff;
  font-weight: 500;
  padding: 4px 0;
  /* 低版本兼容 - 防止文本选择 */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* 触摸优化 */
  -webkit-tap-highlight-color: transparent;
}

.user-agent-details summary:hover {
  color: #0056b3;
}

.user-agent-text {
  margin: 8px 0 0 0;
  font-size: 11px;
  line-height: 1.3;
  color: #6c757d;
  background: #ffffff;
  padding: 8px;
  /* 低版本兼容 - 添加前缀 */
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  word-break: break-all;
  font-family: 'Courier New', monospace;
}

/* 响应式设计 - 小屏幕适配 */
@media (max-width: 480px) {
  .device-info {
    margin: 16px 0;
    padding: 12px;
  }

  .info-item {
    font-size: 12px;
  }

  .user-agent-text {
    font-size: 10px;
    padding: 6px;
  }
}
}
