@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

body {
  font-family: 'Orbitron', sans-serif;
  background: linear-gradient(to right, #000428, #004e92);
  margin: 0;
  padding: 0;
  color: #fff;
}
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #00ffff;
  color: #000;
  padding: 8px;
  z-index: 1001;
  transition: top 0.3s;
}
.skip-link:focus { top: 0; }

header {
  background: rgba(0,0,0,0.8);
  padding: 20px;
  text-align: center;
  font-size: 28px;
  font-weight: bold;
  border-bottom: 2px solid #00ffff;
}

.main-nav {
  background: rgba(0,0,0,0.7);
  padding: 10px 20px;
}
.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: #00ffff;
  text-decoration: none;
  font-weight: 600;
}
.main-nav a:hover { color: #ff00ff; }

.lang-switch, .auth-buttons {
  text-align: right;
  padding: 10px 20px;
}
.lang-switch button, .auth-buttons button {
  background: #00ffff;
  color: #000;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  margin-left: 10px;
  font-weight: 600;
}

/* 轮播广告 */
.carousel {
  overflow: hidden;
  white-space: nowrap;
  padding: 10px 0;
  background: rgba(0,0,0,0.4);
  border-radius: 10px;
  margin: 0 20px 20px;
}
.carousel img {
  width: 300px;
  height: 150px;
  margin: 0 10px;
  border-radius: 10px;
  display: inline-block;
  object-fit: cover;
  animation: scroll 30s linear infinite;
  loading: lazy;
}
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* 游戏分类 */
.categories {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 0 20px 20px;
}
.category-btn {
  background: #00ffff;
  color: #000;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}
.category-btn.active, .category-btn:hover {
  background: #ff00ff;
  color: #fff;
}

/* 游戏列表 */
main.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  padding: 0 20px 30px;
}
.game-card {
  background: rgba(255,255,255,0.05);
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,255,255,0.3);
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}
.game-card:hover { transform: scale(1.05); }
.game-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  loading: lazy;
}
.game-card p {
  margin-top: 8px;
  font-weight: bold;
  font-size: 16px;
}
.stars {
  margin-top: 6px;
  color: #ffd700;
  font-size: 18px;
  user-select: none;
}

/* 热门榜单 */
.popular-section {
  margin: 0 20px 40px;
  background: rgba(0,0,0,0.3);
  border-radius: 15px;
  padding: 15px;
  box-shadow: 0 0 15px #00ffff;
}
.popular-section h2 {
  text-align: center;
  margin-bottom: 15px;
  border-bottom: 2px solid #00ffff;
  padding-bottom: 5px;
  font-weight: 700;
}
.popular-list {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 5px;
}
.popular-item {
  min-width: 140px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 0 8px #00ffff;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.popular-item:hover { transform: scale(1.1); }
.popular-item img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
  loading: lazy;
}

/* 弹窗及覆盖层 */
.ad-popup, .login-modal {
  display: none;
  position: fixed;
  top: 20%;
  left: 10%;
  width: 80%;
  background: #111;
  color: #fff;
  border: 2px solid #00ffff;
  border-radius: 10px;
  box-shadow: 0 5px 25px rgba(0,255,255,0.5);
  z-index: 1000;
  padding: 20px;
  text-align: center;
}
.ad-popup button, .login-modal button {
  margin-top: 15px;
  padding: 10px 20px;
  background: #00ffff;
  color: #000;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
}
.overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.7);
  z-index: 999;
}
iframe.game-frame {
  display: none;
  position: fixed;
  top: 10%; left: 5%;
  width: 90%; height: 80%;
  border: 3px solid #00ffff;
  border-radius: 10px;
  z-index: 1000;
  background: #000;
}
.footer {
  text-align: center;
  padding: 20px;
  background: rgba(0,0,0,0.5);
  font-size: 14px;
  border-top: 1px solid #00ffff;
}