/* 全局样式 */
* {
  box-sizing: border-box;
}

body {
  font-family: "Microsoft YaHei", sans-serif;
  background: rgba(255, 255, 255, 0.6);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* 背景动画 */
.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.floating-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  animation: float 20s infinite linear;
}

.floating-particle:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
  animation-duration: 25s;
}

.floating-particle:nth-child(2) {
  left: 30%;
  animation-delay: 5s;
  animation-duration: 30s;
}

.floating-particle:nth-child(3) {
  left: 50%;
  animation-delay: 10s;
  animation-duration: 20s;
}

.floating-particle:nth-child(4) {
  left: 70%;
  animation-delay: 15s;
  animation-duration: 35s;
}

.floating-particle:nth-child(5) {
  left: 90%;
  animation-delay: 20s;
  animation-duration: 15s;
}

@keyframes float {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}

/* 屏幕切换 */
.screen {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.screen.active {
  display: block;
  opacity: 1;
}

/* 欢迎界面 */
.welcome-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 0;
  padding: 3rem;
  /* box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); */
  text-align: center;
  animation: slideInUp 0.8s ease-out;
}

.main-icon {
  margin-bottom: 1rem;
  max-height: 200px;
  max-width: 100%;
}

.main-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.sub-title {
  font-size: 1.5rem;
  color: #666;
  margin-bottom: 0;
}

.intro-text {
  text-align: left;
  margin: 2rem 0;
  line-height: 1.8;
  color: #555;
}

.intro-text .highlight {
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: bold;
  text-align: center;
  font-size: 1.2rem;
}

.start-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.start-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

/* 测试界面 */
.test-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 0px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  animation: slideInUp 0.6s ease-out;
}

.progress-container {
  position: relative;
}

.progress {
  height: 8px;
  border-radius: 10px;
  background: rgba(102, 126, 234, 0.2);
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(135deg, #667eea, #764ba2);
  transition: width 0.3s ease;
  border-radius: 10px;
}

.progress-text {
  text-align: center;
  margin-top: 0.5rem;
  color: #666;
  font-weight: 500;
}

.question-card {
  margin: 2rem 0;
  min-height: 300px;
}

.question-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.options-container {
  display: grid;
  gap: 0.65rem;
}

.option-btn {
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid transparent;
  border-radius: 15px;
  padding: 0.5rem 1.5rem;
  text-align: left;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 1rem;
  color: #555;
}

.option-btn:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: #667eea;
  transform: translateX(5px);
}

.option-btn.selected {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: #667eea;
  transform: translateX(5px);
}

.test-controls {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

.test-controls .btn {
  border-radius: 25px;
  padding: 0.5rem 1.5rem;
  font-weight: 500;
}

/* 结果界面 */
.result-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 0px;
  padding: 3rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  animation: slideInUp 0.8s ease-out;
}

.result-icon {
  font-size: 4rem;
  animation: bounceIn 1s ease-out;
}

.result-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.result-subtitle {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.result-description {
  background: rgba(102, 126, 234, 0.1);
  border-radius: 15px;
  padding: 1rem;
  margin: 1rem 0;
  line-height: 1.8;
  color: #555;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.stat-item {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 15px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-label {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: bold;
  color: #333;
}

/* 灵根类型颜色 */
.hidden-root {
  color: #8b008b;
}
.heaven-root {
  color: #ffd700;
}
.mutant-root {
  color: #ff4500;
}
.true-root {
  color: #00ced1;
}
.false-root {
  color: #32cd32;
}
.no-root {
  color: #808080;
}

/* 动画效果 */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .welcome-card,
  .test-card,
  .result-card {
    padding: 1rem;
  }

  .main-title {
    font-size: 2rem;
  }

  .result-title {
    font-size: 2rem;
  }

  .test-controls {
    flex-direction: column;
    gap: 0.5rem;
  }

  .result-stats {
    grid-template-columns: 1fr;
  }
}
