/* 基础布局 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Orbitron', 'Segoe UI', sans-serif;
  background-color: #000;
  color: #00ffff;
  overflow: hidden;
}

.container {
  display: flex;
  height: 100vh;
  width: 100vw;
  box-sizing: border-box;
}

/* 左侧游戏区域（科技感重点） */
.left {
  flex: 1;
  position: relative;
  background-color: #010512;
  background-image:
    radial-gradient(circle at 30% 30%, #00ffff11 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, #00ffff22 2px, transparent 2px),
    repeating-linear-gradient(0deg, #00ffff06 0, #00ffff06 1px, transparent 1px, transparent 40px),
    repeating-linear-gradient(90deg, #00ffff08 0, #00ffff08 1px, transparent 1px, transparent 40px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  animation: gridScroll 30s linear infinite;
  box-shadow: inset 0 0 30px #00ffff33;
  border-right: 2px solid #00ffff55;
}

@keyframes gridScroll {
  0% {
    background-position: 0 0, 0 0, 0 0, 0 0;
  }
  100% {
    background-position: 300px 300px, 200px 200px, 0 40px, 40px 0;
  }
}

/* 画布透明，绘图元素叠加在背景上 */
canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
}

/* 右侧排行榜 */
.right {
  width: 300px;
  background: rgba(0, 20, 40, 0.85);
  backdrop-filter: blur(6px);
  padding: 20px;
  box-shadow: inset 0 0 20px #0ff6;
  border-left: 2px solid #00ffff33;
  overflow-y: auto;
  font-size: 15px;
}

h1, h2 {
  font-weight: 600;
  color: #00ffff;
  text-shadow: 0 0 5px #00f8;
}

/* 开始界面 */
#startScreen {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid #00ffffaa;
  border-radius: 16px;
  box-shadow: 0 0 20px #00ffff88;
  padding: 30px;
  text-align: center;
}

#startScreen input {
  padding: 10px;
  width: 200px;
  margin-bottom: 15px;
  border-radius: 6px;
  border: none;
  background: #111;
  color: #0ff;
  text-align: center;
  font-size: 16px;
  box-shadow: 0 0 8px #00ffff55 inset;
}

#startScreen button {
  padding: 10px 20px;
  font-size: 18px;
  background: #00ffff;
  border: none;
  border-radius: 10px;
  color: #000;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

#startScreen button:hover {
  background: #0fffc9;
}

/* 排行榜项 */
.rank-item {
  padding: 5px;
  margin-bottom: 5px;
  border-bottom: 1px dashed #0ff4;
  color: #fff;
}

.rank-item span {
  color: #00ffff;
  font-weight: bold;
}
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 20, 40, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.5s ease-in-out;
}

.modal-content {
  background: rgba(0, 10, 20, 0.9);
  border: 2px solid #00ffff88;
  border-radius: 16px;
  box-shadow: 0 0 20px #00ffff66;
  padding: 30px 40px;
  text-align: center;
  color: #0ff;
  animation: popIn 0.4s ease-out;
  max-width: 400px;
}

.modal-content h2 {
  margin-bottom: 15px;
  color: #ff3366;
  text-shadow: 0 0 5px #f06;
}

.modal-content p {
  font-size: 18px;
  margin-bottom: 25px;
  color: #ccc;
}

.btn-group button {
  padding: 10px 20px;
  margin: 0 10px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  background: #00ffff;
  color: #000;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
}

.btn-group button:hover {
  background: #0fffc9;
  box-shadow: 0 0 10px #0ff;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
