/* Reset and base styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* --- 炫酷风格重构 --- */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&display=swap');

:root {
  --primary: #00eaff;
  --primary-hover: #00bfff;
  --neon-pink: #ff00cc;
  --neon-purple: #a259ff;
  --bg: linear-gradient(135deg, #0f2027 0%, #2c5364 100%);
  --card-bg: rgba(20,22,40,0.95);
  --text: #e0e7ef;
  --text-secondary: #7f8fa6;
  --border: #232946;
  --radius: 14px;
  --shadow: 0 0 16px 2px #00eaff99, 0 2px 24px 0 #000b;
  --transition: all 0.22s cubic-bezier(.4,2,.6,1);
}

html, body {
  height: 100%;
  background: var(--bg) !important;
  color: var(--text);
  font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg) !important;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2vw;
}

header {
  background: rgba(20,22,40,0.98);
  border-bottom: 2px solid var(--neon-purple);
  box-shadow: 0 2px 24px 0 #00eaff33;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.7rem 2vw;
  height: 70px;
}

.logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  margin-left: 1.2rem;
  margin-right: 1.2rem;
}

.logo-img {
  padding: 0 5px;
  width: 100%;
  height: 48px;
  border-radius: 12px;
  /* background: linear-gradient(135deg, var(--primary), var(--neon-pink));
  box-shadow: 0 0 12px 2px var(--primary), 0 0 24px 4px var(--neon-pink); */
}

.logo-text {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 2px;
  text-shadow: 0 0 8px var(--primary), 0 0 16px var(--neon-pink);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.5rem 0.5rem;
  border-radius: 8px;
  background: none;
  border: none;
  position: relative;
  transition: var(--transition);
  text-decoration: none;
  text-shadow: 0 0 4px #00eaff44;
}

.nav-link.active, .nav-link:hover {
  color: var(--primary);
  background: linear-gradient(90deg, #00eaff33 0%, #a259ff33 100%);
  box-shadow: 0 0 8px 2px var(--primary);
}

.nav-link.active::after, .nav-link:hover::after {
  content: '';
  display: block;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--primary), var(--neon-pink));
  border-radius: 2px;
  position: absolute;
  left: 0;
  bottom: -4px;
  box-shadow: 0 0 8px 2px var(--primary);
}

.search-container {
  margin-left: 1.5rem;
  flex: 0 0 auto;
}

.search-form {
  display: flex;
  align-items: center;
  background: #181c2b;
  border-radius: 32px;
  border: 2px solid var(--primary);
  box-shadow: 0 0 12px 2px var(--primary);
  overflow: hidden;
  padding: 0;
}

.search-form:focus-within {
  border: 2px solid var(--neon-pink);
  box-shadow: 0 0 24px 4px var(--neon-pink);
  background: #232946;
}

.search-input {
  border: none;
  background: transparent;
  padding: 0.6rem 1rem;
  font-size: 1.08rem;
  outline: none;
  border-radius: 32px 0 0 32px;
  width: 180px;
  transition: width 0.3s, background 0.2s;
  font-weight: 500;
  height: 44px;
  box-sizing: border-box;
  color: var(--text);
}

.search-input:focus {
  width: 240px;
  background: #232946;
  color: #fff;
}

/* 搜索按钮炫酷动效优化 */
.search-button {
  position: relative;
  overflow: hidden;
  z-index: 1;
  background: linear-gradient(135deg, var(--primary), var(--neon-pink));
  color: #fff;
  box-shadow: 0 0 16px 4px var(--primary), 0 0 32px 8px var(--neon-pink);
  border: none;
  font-weight: bold;
  transition: var(--transition), box-shadow 0.3s, transform 0.18s;
  outline: none;
}
.search-button:active {
  transform: scale(0.96);
  box-shadow: 0 0 32px 12px var(--neon-pink), 0 0 48px 16px var(--primary);
}
.search-button:hover, .search-button:focus {
  background: linear-gradient(135deg, var(--neon-pink), var(--primary));
  box-shadow: 0 0 32px 12px var(--neon-pink), 0 0 48px 16px var(--primary);
  filter: brightness(1.15) saturate(1.2);
}
.search-button .ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.5s linear;
  background: rgba(0,234,255,0.35);
  pointer-events: none;
  z-index: 2;
}
@keyframes ripple {
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}
/* 加载旋转动画 */
.search-button.loading svg {
  animation: spin 0.8s linear infinite;
  filter: drop-shadow(0 0 8px var(--primary));
}
@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* 优化移动端导航按钮 */
.mobile-menu-button {
  display: none !important;
}

main {
  flex: 1 0 auto;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2vw 2rem 2vw;
  background: transparent;
}

.page-header {
  margin-bottom: 2.2rem;
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
  text-shadow: 0 0 8px var(--primary), 0 0 16px var(--neon-pink);
  font-family: 'Orbitron', Arial, sans-serif;
}

.page-header h2, .page-header .page-description {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
  margin-top: 2.5rem;
  position: relative;
  align-items: stretch;
  justify-content: center;
}

.game-card {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 24px 4px #00eaff33, 0 2px 24px 0 #000b;
  transition: var(--transition), box-shadow 0.3s;
  z-index: 1;
  margin: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  max-width: 900px;
  height: auto;
  min-height: 0;
  max-height: none;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  border: 2px solid var(--primary);
}

.game-card:hover {
  box-shadow: 0 0 32px 8px var(--neon-pink), 0 2px 32px 0 #000b;
  border-color: var(--neon-pink);
  transform: scale(1.03) rotate(-1deg);
}

.game-image-only {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  min-height: 120px;
  max-height: 220px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 0.7em;
  flex-shrink: 0;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-image-only img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #f3f4f6;
  border-radius: 0;
  transition: var(--transition);
}

.game-title-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, #00eaffcc 0%, #a259ffcc 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.4em 0.7em;
  text-align: left;
  border-radius: 0 0 12px 12px;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 8px #000, 0 0 16px var(--neon-pink);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.category-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 0 24px 4px #00eaff33, 0 2px 24px 0 #000b;
  padding: 1.2rem 1.2rem 1.2rem 1.2rem;
  transition: var(--transition), box-shadow 0.3s;
  text-align: center;
  border: 2px solid var(--primary);
}

.category-card:hover {
  box-shadow: 0 0 32px 8px var(--neon-pink), 0 2px 32px 0 #000b;
  border-color: var(--neon-pink);
  transform: scale(1.03) rotate(-1deg);
}

.category-link {
  text-decoration: none;
  color: var(--primary);
  display: block;
}

.category-link h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary), 0 0 16px var(--neon-pink);
  font-family: 'Orbitron', Arial, sans-serif;
  letter-spacing: 2px;
}

.category-link p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 0 24px 4px #00eaff33, 0 2px 24px 0 #000b;
  padding: 2rem;
  margin-bottom: 2rem;
  max-width: 900px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  border: 2px solid var(--primary);
}

.card:hover {
  box-shadow: 0 0 32px 8px var(--neon-pink), 0 2px 32px 0 #000b;
  border-color: var(--neon-pink);
  transform: scale(1.03) rotate(-1deg);
}

.game-content {
  padding: 1rem 1.2rem 1.2rem 1.2rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: visible;
  min-height: 0;
  max-height: none;
}

.game-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary), 0 0 16px var(--neon-pink);
  font-family: 'Orbitron', Arial, sans-serif;
  letter-spacing: 2px;
}

.game-description {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 0.7rem;
}

.game-category {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  padding: 0.2em 0.7em;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.game-footer {
  display: flex;
  gap: 1.2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.7rem;
}

.game-rating {
  color: #f59e42;
  font-weight: 700;
}

.game-play, button {
  background: linear-gradient(90deg, var(--primary), var(--neon-pink));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.7em 1.2em;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition), box-shadow 0.3s;
  /* margin-top: 0.7rem; */
  box-shadow: 0 0 16px 2px var(--primary), 0 0 24px 4px var(--neon-pink);
  font-family: 'Orbitron', Arial, sans-serif;
  letter-spacing: 1px;
}

.game-play:hover, button:hover {
  background: linear-gradient(90deg, var(--neon-pink), var(--primary));
  box-shadow: 0 0 32px 8px var(--neon-pink), 0 2px 32px 0 #000b;
  transform: scale(1.04);
}

footer {
  background: #181c2b;
  border-top: 2px solid var(--neon-purple);
  padding: 2rem 0 0.7rem 0;
  margin-top: 2rem;
  color: var(--text-secondary);
  box-shadow: 0 -2px 24px 0 #00eaff33;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-section {
  flex: 1 1 200px;
  margin-bottom: 1.2rem;
}

.footer-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary);
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-link, .footer-link:visited {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
  text-shadow: 0 0 8px var(--primary);
}

.footer-link:hover {
  color: var(--neon-pink);
  text-shadow: 0 0 16px var(--neon-pink);
}

.footer-bottom {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 1.2rem;
}

/* Banner轮播 */
.banner-carousel {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 2rem auto;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 0 32px 8px var(--primary), 0 2px 32px 0 #000b;
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, #232946 0%, #0f2027 100%);
}

.banner-slide {
  display: none;
  width: 100%;
  height: 260px;
  background: #eee;
}

.banner-slide.active {
  display: block;
  animation: fadein 0.7s;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 0 32px 8px var(--primary), 0 2px 32px 0 #000b;
  border: 2px solid var(--primary);
}

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

.banner-controls {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 0.7rem;
}

.banner-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--primary);
  opacity: 0.6;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  box-shadow: 0 0 8px 2px var(--primary);
}

.banner-dot.active {
  background: var(--neon-pink);
  opacity: 1;
  box-shadow: 0 0 16px 4px var(--neon-pink);
}

@media (max-width: 900px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .search-container {
    margin-left: 0.5rem;
  }
  .search-input {
    width: 120px;
    font-size: 1rem;
  }
  .search-input:focus {
    width: 180px;
  }
}

@media (max-width: 600px) {
  nav {
    display: flex;
    align-items: center;
    height: 44px;
    min-height: 44px;
    padding: 0.2rem 1vw;
    gap: 0.2rem;
    position: relative;
  }
  .logo {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
  .logo-img {
    width: 100%;
    height: 24px;
    border-radius: 6px;
  }
  .logo-text {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--primary);
    width: auto;
    overflow: visible;
    letter-spacing: 0.5px;
    font-weight: 700;
    text-shadow: 0 0 2px var(--primary);
    margin-left: 2px;
    vertical-align: middle;
  }
  .search-container {
    flex: 1 1 0%;
    margin: 0 0.2rem;
    display: flex;
    align-items: center;
  }
  .search-form {
    width: 100%;
    min-width: 0;
    border-radius: 16px;
    padding: 0;
    display: flex;
    align-items: center;
    background: #181c2b;
    border: 1.5px solid var(--primary);
    box-shadow: 0 0 6px 1px var(--primary);
    height: 32px;
    max-width: 100vw;
  }
  .search-input {
    width: 100%;
    min-width: 0;
    font-size: 0.92rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px 0 0 12px;
    height: 32px;
    line-height: 32px;
    box-sizing: border-box;
    background: transparent;
    border: none;
  }
  .search-button {
    width: 32px;
    height: 32px;
    border-radius: 0 12px 12px 0;
    font-size: 1rem;
    margin-left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-width: 32px;
    min-height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--neon-pink));
    border: none;
  }
  .search-button svg {
    width: 16px;
    height: 16px;
    display: block;
    margin: auto;
  }
  .mobile-menu-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-left: 0.2rem;
    margin-right: 0;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px 2px var(--primary);
    border: none;
    padding: 0;
    position: relative;
    top: -1.5px;
  }
  .mobile-menu-button svg {
    width: 18px;
    height: 18px;
    display: block;
    margin: auto;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 44px;
    left: 0;
    width: 100vw;
    background: #181c2b;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 8px 32px 0 #6366f122;
    border-radius: 0 0 16px 16px;
    z-index: 1001;
    padding: 0.7rem 0.5rem 0.7rem 1.2rem;
    animation: fadein 0.3s;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-link {
    font-size: 1rem;
    padding: 0.7rem 0.2rem;
    white-space: nowrap;
  }
  .games-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-top: 1.2rem;
  }
  .game-card {
    border-radius: 10px;
    padding: 0.7rem 0.3rem;
    font-size: 0.98rem;
    max-width: 100vw;
    margin: 0 auto 1.2rem auto !important;
    box-sizing: border-box;
  }
  .game-image {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.7rem;
  }
  .game-image img,
  .game-cover {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    display: block;
  }
  .game-content {
    padding: 0.5rem 0.2rem 0.7rem 0.2rem;
    font-size: 0.97rem;
  }
  .game-play, button {
    font-size: 1.05rem;
    padding: 0.6em 0.7em;
    width: 100%;
    min-width: 0;
    /* margin-top: 0.7rem; */
  }
  .card {
    border-radius: 10px;
    padding: 1rem 0.5rem;
    font-size: 0.98rem;
    max-width: 100vw;
    margin: 0 auto 1.2rem auto !important;
    box-sizing: border-box;
  }
  .comment-list {
    padding-left: 0;
    font-size: 0.97rem;
    word-break: break-all;
  }
  .recommended-games {
    gap: 0.7rem;
    margin-top: 0.5rem;
  }
  .game-title, .category-link h3 {
    font-size: 1.05rem;
  }
  .game-description, .category-link p {
    font-size: 0.95rem;
  }
  .banner-carousel {
    max-width: 100vw;
    border-radius: 12px;
    margin-bottom: 1.2rem;
  }
  .banner-slide {
    height: 120px;
  }
  .footer-content {
    flex-direction: column;
    gap: 0.7rem;
    padding: 0 1vw;
  }
  .footer-section {
    margin-bottom: 0.7rem;
  }
  .footer-section h3 {
    font-size: 1rem;
  }
  .footer-link {
    font-size: 0.98rem;
  }
  .footer-bottom {
    font-size: 0.92rem;
  }
}

body.detail-page .game-cover {
  display: flex;
  margin: auto;
  width: 100%;
  max-width: 400px;
}

@media (max-width: 600px) {
  body.detail-page .game-card {
    border-radius: 10px;
    padding: 0.7rem 0.3rem;
    font-size: 0.98rem;
    max-width: 100vw;
    margin: 0 auto 1.2rem auto !important;
    box-sizing: border-box;
  }
  body.detail-page .game-image {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.7rem;
  }
  body.detail-page .game-image img,
  body.detail-page .game-cover {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    display: block;
  }
  body.detail-page .game-content {
    padding: 0.5rem 0.2rem 0.7rem 0.2rem;
    font-size: 0.97rem;
  }
  /* body.detail-page .game-play, body.detail-page button {
    font-size: 1.05rem;
    padding: 0.6em 0.7em;
    width: 100%;
    min-width: 0;
    margin-top: 0;
  } */
  body.detail-page .card {
    border-radius: 10px;
    padding: 1rem 0.5rem;
    font-size: 0.98rem;
    max-width: 100vw;
    margin: 0 auto 1.2rem auto !important;
    box-sizing: border-box;
  }
  body.detail-page .comment-list {
    padding-left: 0;
    font-size: 0.97rem;
    word-break: break-all;
  }
  body.detail-page .recommended-games {
    gap: 0.7rem;
    margin-top: 0.5rem;
  }
}

::-webkit-scrollbar {
  width: 10px;
  background: #181c2b;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary), var(--neon-pink));
  border-radius: 8px;
}

.hero {
  background: linear-gradient(135deg, #181c2b 60%, #232946 100%);
  border-radius: 22px;
  box-shadow: 0 4px 32px 0 #00eaff33;
  padding: 2.2rem 1.5rem 2.2rem 1.5rem;
  margin-bottom: 2.5rem;
  text-align: center;
}
.hero h1 {
  font-size: 2.2rem;
  margin-top: 1.2rem;
  margin-bottom: 0.7rem;
  color: var(--primary);
  text-shadow: 0 0 12px var(--primary), 0 0 24px var(--neon-pink);
}
.hero h2 {
  font-size: 1.25rem;
  color: #e0e7ef;
  margin-bottom: 0.5rem;
}
.hero h3 {
  font-size: 1.08rem;
  color: var(--neon-pink);
  margin-bottom: 0.5rem;
}
.games {
  margin-top: 2.5rem;
}
@media (max-width: 600px) {
  .hero {
    padding: 1.2rem 0.5rem 1.2rem 0.5rem;
    border-radius: 14px;
    margin-bottom: 1.2rem;
  }
  .hero h1 {
    font-size: 1.25rem;
    margin-top: 0.7rem;
    margin-bottom: 0.4rem;
  }
  .hero h2 {
    font-size: 1rem;
  }
  .hero h3 {
    font-size: 0.95rem;
  }
  .games {
    margin-top: 1.2rem;
  }
} 

.hero {
  margin: auto;
  width: 80VW;
  max-width: 1000px;
}