/* 星空动画 */
@keyframes move-stars {
  from { background-position: 0 0, 0 0; }
  to { background-position: 200px 200px, -200px 300px; }
}

/* 浮动粒子动画 */
@keyframes float-particles {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
  25% { transform: translateY(-20px) rotate(90deg); opacity: 1; }
  50% { transform: translateY(-10px) rotate(180deg); opacity: 0.8; }
  75% { transform: translateY(-30px) rotate(270deg); opacity: 0.9; }
}

/* 渐变动画 */
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 光效动画 */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 191, 255, 0.3); }
  50% { box-shadow: 0 0 40px rgba(0, 191, 255, 0.6), 0 0 60px rgba(255, 0, 150, 0.3); }
}

html {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  background: 
    linear-gradient(-45deg, #0f0f23, #1a1a3a, #2d1b69, #3f2a7a, #0f0f23),
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.2) 0%, transparent 50%),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><defs><filter id="glow"><feGaussianBlur stdDeviation="3" result="coloredBlur"/><feMerge><feMergeNode in="coloredBlur"/><feMergeNode in="SourceGraphic"/></feMerge></filter></defs><g fill="rgba(255,255,255,0.8)" filter="url(%23glow)"><circle cx="30" cy="30" r="2"/><circle cx="170" cy="80" r="1"/><circle cx="80" cy="170" r="1.5"/><circle cx="150" cy="20" r="1"/><circle cx="20" cy="120" r="1.2"/><circle cx="120" cy="60" r="0.8"/></g></svg>'),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="150" height="150" viewBox="0 0 150 150"><g fill="rgba(0,191,255,0.4)"><circle cx="75" cy="25" r="1.5"/><circle cx="25" cy="100" r="1"/><circle cx="125" cy="75" r="1.2"/><circle cx="100" cy="125" r="0.8"/></g></svg>');
  background-size: 400% 400%, 100% 100%, 100% 100%, 200px 200px, 150px 150px;
  animation: 
    gradient-shift 8s ease infinite,
    move-stars 40s linear infinite;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  min-height: calc(var(--vh, 1vh) * 100);
  position: relative;
  overflow-x: hidden;
}

/* 添加浮动粒子背景效果 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(0, 191, 255, 0.4), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255, 0, 150, 0.3), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.2), transparent);
  background-size: 200px 100px, 250px 120px, 180px 90px, 220px 110px;
  animation: float-particles 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

header {
  padding: 3rem 1rem;
  position: relative;
  z-index: 2;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00bfff, #ff0096, transparent);
  animation: glow-pulse 3s ease-in-out infinite;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, #00bfff, #ff0096, #00ff88, #ff6b00);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 4s ease infinite;
  text-shadow: 0 0 30px rgba(0, 191, 255, 0.5);
  letter-spacing: 2px;
}

header p {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 300;
}

main {
  flex: 1;
  position: relative;
  z-index: 2;
}

.game-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  justify-items: center;
  gap: 3rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.game-card {
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%),
    linear-gradient(45deg, rgba(0, 191, 255, 0.1) 0%, rgba(255, 0, 150, 0.1) 100%);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2rem;
  width: 100%;
  max-width: 320px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.game-card:hover::before {
  left: 100%;
}

.game-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(0, 191, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-color: rgba(0, 191, 255, 0.5);
}

.game-card h2 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #fff;
}

.game-icon {
    font-size: 2.5rem;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    transition: transform 0.3s ease;
}

.game-card:hover .game-icon {
    transform: scale(1.2) rotate(5deg);
}

.game-card p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.play-btn {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #ff6b00, #ff9800, #ffc107);
  border-radius: 50px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 
    0 4px 15px rgba(255, 107, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.play-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.play-btn:hover::before {
  left: 100%;
}

.play-btn:hover {
  background: linear-gradient(135deg, #e65100, #f57c00, #ff8f00);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 
    0 8px 25px rgba(255, 107, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.play-btn:active {
  transform: translateY(0) scale(1.02);
}

footer {
  padding: 2rem;
  background: 
    linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  position: relative;
  z-index: 2;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .game-list {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1rem;
  }
  
  .game-card {
    padding: 1.5rem;
  }
  
  h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: 2rem 1rem;
  }
  
  .game-card {
    padding: 1.2rem;
  }
  
  .play-btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.8rem;
  }
}