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

body {
  overflow: hidden;
  background-color: #000;
  font-family: "Arial", sans-serif;
  color: #fff;
}

#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

canvas {
  display: block;
}

#info-panel {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 300px;
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 15px;
  color: #fff;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
  max-height: 80vh;
  overflow-y: auto;
  backdrop-filter: blur(5px);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
  z-index: 1000;
}

@media (max-width: 768px) {
  #info-panel {
    width: calc(100% - 40px);
    right: 20px;
    left: 20px;
    font-size: 12px;
  }
}

#info-panel.visible {
  opacity: 1;
}

#info-panel h2 {
  margin-bottom: 10px;
  font-size: 24px;
  text-align: center;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

#info-panel .info-row {
  display: flex;
  margin-bottom: 8px;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.2);
  padding-bottom: 8px;
}

#info-panel .info-label {
  flex: 1;
  font-weight: bold;
  color: #8af;
}

#info-panel .info-value {
  flex: 2;
}

#info-panel .fun-fact {
  margin-top: 15px;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  font-style: italic;
}

#title {
  position: fixed;
  top: 20px;
  left: 20px;
  font-size: 24px;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  z-index: 1000;
}

.instructions {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

#controls {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
}

#controls button {
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  color: #fff;
  padding: 8px 12px;
  margin-right: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#controls button:hover {
  background-color: rgba(50, 50, 50, 0.7);
}

#controls button.active {
  background-color: rgba(100, 150, 255, 0.5);
}

@media (max-width: 768px) {
  #controls button {
    margin-right: 4px;
  }
}


#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #1a1a2e;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  transition: opacity 1s ease;
  -webkit-transition: opacity 1s ease;
  -moz-transition: opacity 1s ease;
  -ms-transition: opacity 1s ease;
  -o-transition: opacity 1s ease;
}

#loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

#loading-text {
  font-size: 24px;
  color: #fff;
  margin-bottom: 20px;
}

#loading-bar-container {
  width: 300px;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}

#loading-bar {
  height: 100%;
  width: 0%;
  background-color: #8af;
  border-radius: 5px;
  transition: width 0.3s ease;
}


/* 水波纹容器 */
.water-loader {
  position: relative;
  width: 150px;
  height: 150px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 10px #0ef;
}

/* 水波层 */
.wave {
  position: absolute;
  bottom: 0;
  width: 200%;
  height: 200%;
  background: #0ef;
  border-radius: 45%;
  animation: waveMove 8s linear infinite;
}

/* 第一层水波动画 */
.wave:nth-child(1) {
  opacity: 0.7;
  animation-delay: 0s;
  transform: translateX(-25%);
}

/* 第二层水波动画 */
.wave:nth-child(2) {
  opacity: 0.5;
  animation-delay: -4s;
  transform: translateX(-25%) rotate(180deg);
}

/* 进度文本 */
.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 24px;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(0, 238, 255, 0.8);
  z-index: 10;
}

/* 进度条容器 */
.progress-bar {
  position: absolute;
  bottom: 30px;
  width: 200px;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

/* 进度条填充 */
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00eeff, #00c3ff);
  border-radius: 3px;
  transition: width 0.3s;
}

/* 水波动画关键帧 */
@keyframes waveMove {
  0% {
    transform: translateX(-25%) rotate(0deg);
    -webkit-transform: translateX(-25%) rotate(0deg);
    -moz-transform: translateX(-25%) rotate(0deg);
    -ms-transform: translateX(-25%) rotate(0deg);
    -o-transform: translateX(-25%) rotate(0deg);
}
  100% {
    transform: translateX(-25%) rotate(360deg);
    -webkit-transform: translateX(-25%) rotate(360deg);
    -moz-transform: translateX(-25%) rotate(360deg);
    -ms-transform: translateX(-25%) rotate(360deg);
    -o-transform: translateX(-25%) rotate(360deg);
}
}

/* 完成动画 */
@keyframes finish {
  0% {
    transform: scale(1);
    opacity: 1;
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    -ms-transform: scale(1);
    -o-transform: scale(1);
}
  100% {
    transform: scale(1.5);
    opacity: 0;
    -webkit-transform: scale(1.5);
    -moz-transform: scale(1.5);
    -ms-transform: scale(1.5);
    -o-transform: scale(1.5);
}
}
.finish-animation {
  animation: finish 0.8s ease-out forwards;
  -webkit-animation: finish 0.8s ease-out forwards;
}
