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

/* 隐藏滚动条但保留滚动功能 */
::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

* {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 和 Edge */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-y: scroll;
  overflow-x: hidden;
}

.App {
  min-height: 100vh;
  background: linear-gradient(135deg, #a8e6cf 0%, #dcedc1 50%, #ffd3b6 100%);
  position: relative;
  overflow-x: hidden;
}

/* 背景图片高斯模糊遮罩层 */
.background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 0;
  pointer-events: none;
}

/* 背景动画效果 */
.App::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
  pointer-events: none;
  animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50% { opacity: 0.8; transform: translateY(-20px); }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
  position: relative;
  z-index: 1;
}

/* 加载状态 */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  color: white;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-container p {
  margin-top: 20px;
  font-size: 18px;
}

/* PWA 启动画面 */
.pwa-launch {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pwa-launch-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #a8e6cf 0%, #dcedc1 40%, #ffd3b6 100%);
  animation: pwaLaunchBgPulse 3s ease-in-out infinite;
}

.pwa-launch-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4) 0%, transparent 45%),
    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.3) 0%, transparent 45%);
  animation: pwaLaunchShine 4s ease-in-out infinite;
}

@keyframes pwaLaunchBgPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.92; }
}

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

.pwa-launch-content {
  position: relative;
  z-index: 1;
  text-align: center;
  animation: pwaLaunchFadeIn 0.6s ease-out;
}

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

.pwa-launch-logo-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
}

.pwa-launch-logo {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 88px;
  border-radius: 22px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  animation: pwaLaunchLogoFloat 2.5s ease-in-out infinite;
}

@keyframes pwaLaunchLogoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.pwa-launch-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 2px solid rgba(82, 183, 136, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.pwa-launch-ring-1 {
  width: 100px;
  height: 100px;
  animation: pwaLaunchRing 2s ease-out infinite;
}

.pwa-launch-ring-2 {
  width: 120px;
  height: 120px;
  animation: pwaLaunchRing 2s ease-out 0.3s infinite;
}

.pwa-launch-ring-3 {
  width: 140px;
  height: 140px;
  animation: pwaLaunchRing 2s ease-out 0.6s infinite;
}

@keyframes pwaLaunchRing {
  0% {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0;
  }
}

.pwa-launch-title {
  font-size: 28px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.75);
  margin: 0 0 8px;
  letter-spacing: 2px;
}

.pwa-launch-subtitle {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.5);
  margin: 0 0 20px;
}

.pwa-launch-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pwa-launch-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #52b788;
  animation: pwaLaunchDot 1.2s ease-in-out infinite both;
}

.pwa-launch-dot:nth-child(1) { animation-delay: 0s; }
.pwa-launch-dot:nth-child(2) { animation-delay: 0.2s; }
.pwa-launch-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes pwaLaunchDot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* 错误状态 */
.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  color: white;
  text-align: center;
  padding: 20px;
}

.error-container h2 {
  font-size: 32px;
  margin-bottom: 16px;
}

.error-container p {
  font-size: 18px;
  margin-bottom: 12px;
}

.error-hint {
  background: rgba(255, 255, 255, 0.1);
  padding: 12px 24px;
  border-radius: 8px;
  margin-top: 20px;
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 20px 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  position: relative;
  z-index: 1;
}

.footer-visitor {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}

.footer-visitor span {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 20px 15px;
  }
  
  .error-container h2 {
    font-size: 24px;
  }
  
  .error-container p {
    font-size: 16px;
  }
}
