/* 游戏页面通用科技风格样式 */

/* 科技风背景动画 */
@keyframes tech-grid {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 50px 50px, -50px -50px; }
}

@keyframes data-flow {
  0% { transform: translateX(-100%); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 191, 255, 0.3); }
  50% { box-shadow: 0 0 40px rgba(0, 191, 255, 0.8), 0 0 60px rgba(255, 0, 150, 0.4); }
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: #fff;
}

body {
  background: 
    linear-gradient(135deg, #0a0a1a 0%, #1a1a3a 25%, #2d1b69 50%, #1a1a3a 75%, #0a0a1a 100%),
    radial-gradient(circle at 30% 20%, rgba(0, 191, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(255, 0, 150, 0.08) 0%, transparent 50%),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><defs><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="rgba(0,191,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
  background-size: 100% 100%, 100% 100%, 100% 100%, 60px 60px;
  animation: tech-grid 20s linear infinite;
  display: flex;
  flex-direction: column;
  min-height: calc(var(--vh, 1vh) * 100);
  position: relative;
}

/* 科技感数据流效果 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: 
    linear-gradient(90deg, transparent 48%, rgba(0, 191, 255, 0.03) 49%, rgba(0, 191, 255, 0.05) 50%, rgba(0, 191, 255, 0.03) 51%, transparent 52%),
    linear-gradient(90deg, transparent 78%, rgba(255, 0, 150, 0.02) 79%, rgba(255, 0, 150, 0.04) 80%, rgba(255, 0, 150, 0.02) 81%, transparent 82%);
  animation: data-flow 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

header {
  text-align: center;
  padding: 1.5rem;
  position: relative;
  z-index: 2;
}

header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, #00bfff, #ff0096, #00ff88);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: tech-grid 3s ease infinite;
  text-shadow: 0 0 20px rgba(0, 191, 255, 0.5);
  letter-spacing: 1px;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
  padding: 1rem;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(135deg, #0f0f23 0%, #1a1a3a 50%, #0f0f23 100%),
    radial-gradient(circle at 25% 25%, rgba(0, 191, 255, 0.1) 0%, transparent 50%);
  border: 2px solid rgba(0, 191, 255, 0.3);
  border-radius: 16px;
  box-shadow: 
    0 0 30px rgba(0, 0, 0, 0.7),
    inset 0 0 50px rgba(0, 191, 255, 0.05);
  animation: pulse-glow 4s ease-in-out infinite;
  box-sizing: border-box;
}

/* 游戏控制按钮通用样式 */
.game-controls {
  display: flex;
  gap: 1rem;
  z-index: 3;
  justify-content: center;
  margin-top: 1rem;
}

.control-btn {
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, rgba(0, 191, 255, 0.2), rgba(0, 191, 255, 0.1));
  border: 1px solid rgba(0, 191, 255, 0.4);
  border-radius: 25px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  font-family: inherit;
}

.control-btn:hover {
  background: linear-gradient(135deg, rgba(0, 191, 255, 0.3), rgba(0, 191, 255, 0.2));
  border-color: rgba(0, 191, 255, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 191, 255, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
  header {
    padding: 1rem;
  }
  
  main {
    padding: 0.5rem;
  }
  
  .game-controls {
    bottom: 1rem;
    gap: 0.5rem;
  }
  
  .control-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}