/* 科技感主色调与全局设置 */
:root {
  --primary: #00ffe7;
  --secondary: #0f0c29;
  --bg: #181a20;
  --card-bg: #23263a;
  --card-glow: 0 0 16px #00ffe7, 0 0 32px #00ffe744;
  --text: #e0e6ed;
  --muted: #7a8fa6;
  --radius: 18px;
  --transition: 0.3s cubic-bezier(.4,2,.6,1);
  --shadow: 0 4px 24px #00ffe722;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
  min-height: 100vh;
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.menu-open,
html.menu-open {
  overflow: hidden !important;
  height: 100% !important;
  position: fixed !important;
  width: 100vw !important;
  top: 0 !important;
  left: 0 !important;
}
a{
  text-decoration: none;
  color: var(--text);
}
/* 导航栏 */
nav {
  background: linear-gradient(90deg, #0f0c29 0%, #302b63 100%);
  box-shadow: var(--shadow);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  height: 60px;
  position: static;
  top: 0;
  z-index: 10;
}
nav .logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
  letter-spacing: 2px;
  margin-right: 2rem;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}
nav ul li a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}
nav ul li a:hover {
  color: var(--primary);
}
nav .menu-toggle {
  display: none;
  margin-left: auto;
  font-size: 2rem;
  color: var(--primary);
  cursor: pointer;
}

/* 卡片布局 */
.main-content {
  flex: 1;
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.2rem;
}
@media (max-width: 1200px) {
  .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.7rem;
  }
}
@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
}
.game-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--card-glow);
  overflow: hidden;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  border: 3px solid transparent;
  background-clip: padding-box;
  z-index: 1;
  color: #fff;
  text-decoration: none;
}
.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 0;
  z-index: 2;
  pointer-events: none;
  border: 3px solid transparent;
  background: linear-gradient(120deg, #00ffe7, #7f00ff, #00ffe7, #00ffe7 80%);
  background-size: 200% 200%;
  opacity: 0;
  transition: opacity 0.3s;
}
.game-card:hover::before {
  opacity: 1;
  animation: neon-border-move 2s linear infinite;
}
@keyframes neon-border-move {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}
.game-card > * {
  position: relative;
  z-index: 3;
}
.game-card:hover {
  transform: translateY(-8px) scale(1.03) rotate(-1deg);
  box-shadow: 0 0 32px #00ffe7cc, 0 0 64px #00ffe744;
}
/* 统一游戏卡片图片宽高 */
.game-card .cover {
  width: 240px;
  height: 135px;
  object-fit: cover;
  border-bottom: 2px solid var(--primary);
  display: block;
  margin: 0 auto;
}
@media (max-width: 600px) {
  .game-card .cover {
    width: 160px;
    height: 90px;
  }
}
.game-card .info {
  padding: 0.7rem 0.7rem 0.7rem 0.7rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.game-card .title {
  font-size: 1rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 0.3rem;
}
.game-card .desc {
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  max-height: calc(1.4em * 3);
}
.game-card .tags {
  /* margin-top: 0.7rem; */
  position: absolute;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.game-card .tag {
  background: linear-gradient(90deg, #00ffe7 0%, #302b63 100%);
  color: #181a20;
  border-radius: 0 12px 12px 0;
  padding: 0.2rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
}

/* 按钮 */
.btn {
  background: linear-gradient(90deg, #00ffe7 0%, #302b63 100%);
  color: #181a20;
  border: none;
  border-radius: 12px;
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 12px #00ffe744;
  transition: background var(--transition), color var(--transition);
}
.btn:hover {
  background: linear-gradient(90deg, #302b63 0%, #00ffe7 100%);
  color: var(--primary);
}

/* 页脚 */
footer {
  background: #181a20;
  color: var(--muted);
  text-align: center;
  padding: 1.5rem 0 1rem 0;
  font-size: 0.98rem;
  letter-spacing: 1px;
  margin-top: 2rem;
}

/* 响应式适配 */
@media (max-width: 900px) {
  .main-content {
    padding: 1.2rem 0.5rem;
  }
  .card-grid {
    gap: 0.7rem;
  }
}
@media (max-width: 600px) {
  nav ul {
    display: none;
    flex-direction: column;
    background: #23263aee;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100vw;
    padding: 1.5rem 0;
    z-index: 100;
  }
  nav ul.active {
    display: flex;
    padding: 20px;
  }
  nav .menu-toggle {
    display: block;
  }
  .main-content {
    padding: 0.5rem 4vw;
  }
  .search-bar {
    width: 100%;
    max-width: 100%;
    margin: 0 0 2rem 0;
    box-sizing: border-box;
  }
  .game-card {
    min-height: 140px;
  }
  .game-card .cover {
    width: 160px;
    height: 90px;
  }
  .game-card .info {
    padding: 0.4rem 0.4rem 0.4rem 0.4rem;
  }
  .game-card .title {
    font-size: 0.95rem;
  }
  .card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .game-card {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 180px;
  }
  .game-card .cover {
    width: 100%;
    height: 90px;
    object-fit: cover;
    display: block;
    margin: 0;
    padding: 0;
    border-bottom: 2px solid var(--primary);
  }
  .game-card .info {
    flex: 1;
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
}

/* 霓虹动画 */
@keyframes neon-glow {
  0%, 100% { box-shadow: 0 0 16px #00ffe7, 0 0 32px #00ffe744; }
  50% { box-shadow: 0 0 32px #00ffe7cc, 0 0 64px #00ffe744; }
}
.game-card:hover {
  animation: neon-glow 1.2s alternate infinite;
} 
.search-bar {
        width: 100%;
        max-width: 420px;
        margin: 0 auto 2rem auto;
        display: flex;
        background: var(--card-bg);
        border-radius: 12px;
        box-shadow: var(--card-glow);
        align-items: center;
        padding: 0.3rem 1rem;
      }
      @media (max-width: 600px) {
        .search-bar {
          max-width: 90vw;
        }
      }
      .search-bar input {
        flex: 1;
        background: transparent;
        border: none;
        color: var(--text);
        font-size: 1.1rem;
        padding: 0.7rem 0.5rem;
        outline: none;
      }
      .search-bar button {
        background: none;
        border: none;
        color: var(--primary);
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0 0.5rem;
      }

.menu-overlay {
  display: none;
  position: fixed;
  z-index: 2;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  transition: opacity 0.25s;
}
body.menu-open .menu-overlay,
html.menu-open .menu-overlay {
  display: block;
  opacity: 1;
}
.policy-content {
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
  font-size: 1.08rem;
  background: var(--card-bg);
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
  word-break: break-word;
}
@media (max-width: 800px) {
  .policy-content {
    margin: 1rem;
    max-width: 96vw;
    padding: 1.2rem 6vw;
    font-size: 1rem;
  }
}
@media (max-width: 500px) {
  .policy-content {
    margin: 1rem;
    max-width: 100vw;
    padding: 1rem 4vw;
    font-size: 0.98rem;
  }
}