/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --neon-pink: #ff2d95;
  --neon-blue: #00f0ff;
  --neon-green: #39ff14;
  --neon-yellow: #ffe600;
  --neon-purple: #b026ff;
  --neon-orange: #ff6a00;
  /* Module 1: Hot Games - Fire Energy Theme */
  --hot-primary: #ff4500;
  --hot-secondary: #ff6b35;
  --hot-accent: #ffd700;
  --hot-glow: rgba(255, 69, 0, 0.3);
  /* Module 2: New Games - Tech Fresh Theme */
  --new-primary: #00d4ff;
  --new-secondary: #0099cc;
  --new-accent: #7fff00;
  --new-glow: rgba(0, 212, 255, 0.3);
  /* Module 3: Popular Games - Luxury Theme */
  --pop-primary: #9400d3;
  --pop-secondary: #8b5cf6;
  --pop-accent: #ffd700;
  --pop-glow: rgba(148, 0, 211, 0.3);
  --bg: #05050e;
  --bg-card: #0c0c1d;
  --bg-card-hover: #111133;
  --bg-header: rgba(5,5,14,0.92);
  --bg-alt: #08081a;
  --text: #b8b8d4;
  --text-muted: #5e5e80;
  --text-light: #e8e8ff;
  --border: #1a1a40;
  --border-glow: #2a2a66;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-neon: 0 0 15px rgba(0,240,255,0.15), 0 0 40px rgba(0,240,255,0.05);
  --shadow-pink: 0 0 15px rgba(255,45,149,0.15), 0 0 40px rgba(255,45,149,0.05);
  --transition: 0.25s ease;
  --font-main: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
a { color: var(--neon-blue); text-decoration: none; transition: all var(--transition); }
a:hover { color: var(--neon-pink); text-shadow: 0 0 8px rgba(255,45,149,0.5); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
  
/* Scanline overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ===== Header ===== */
.site-header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 30px rgba(0,240,255,0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
}
.logo {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.2rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.logo span {
  color: var(--neon-pink);
  text-shadow: 0 0 10px rgba(255,45,149,0.6), 0 0 30px rgba(255,45,149,0.3);
}
.nav-links { display: flex; gap: 0.3rem; align-items: center; }
.nav-links a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.nav-links a:hover {
  color: var(--neon-blue);
  background: rgba(0,240,255,0.06);
  text-shadow: 0 0 8px rgba(0,240,255,0.5);
}
.nav-links a.active {
  color: var(--neon-blue);
  background: rgba(0,240,255,0.1);
  box-shadow: inset 0 0 10px rgba(0,240,255,0.1);
  text-shadow: 0 0 8px rgba(0,240,255,0.5);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--neon-blue);
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(0,240,255,0.5);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 5rem 0 4rem;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, #05050e 0%, #0a0520 40%, #08051a 70%, #05050e 100%);
}
.hero::before {
  content: '';
  position: absolute;
  top: -60%;
  left: -30%;
  width: 160%;
  height: 220%;
  background: 
    radial-gradient(ellipse at 25% 40%, rgba(255,45,149,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 50%, rgba(0,240,255,0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(176,38,255,0.08) 0%, transparent 50%);
  animation: heroPulse 10s ease-in-out infinite alternate;
}
@keyframes heroPulse {
  0% { transform: scale(1) rotate(0deg); opacity: 0.8; }
  100% { transform: scale(1.15) rotate(2deg); opacity: 1; }
}
.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-particles span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  animation: neonFloat 7s ease-in-out infinite;
}
.hero-particles span:nth-child(odd) { background: var(--neon-pink); box-shadow: 0 0 6px var(--neon-pink); }
.hero-particles span:nth-child(even) { background: var(--neon-blue); box-shadow: 0 0 6px var(--neon-blue); }
.hero-particles span:nth-child(1) { left: 8%; top: 18%; animation-delay: 0s; animation-duration: 6s; }
.hero-particles span:nth-child(2) { left: 22%; top: 55%; animation-delay: 1.2s; animation-duration: 8s; }
.hero-particles span:nth-child(3) { left: 45%; top: 25%; animation-delay: 2.4s; animation-duration: 7s; }
.hero-particles span:nth-child(4) { left: 68%; top: 65%; animation-delay: 0.6s; animation-duration: 5s; }
.hero-particles span:nth-child(5) { left: 82%; top: 20%; animation-delay: 1.8s; animation-duration: 9s; }
.hero-particles span:nth-child(6) { left: 12%; top: 75%; animation-delay: 3s; animation-duration: 6s; }
.hero-particles span:nth-child(7) { left: 38%; top: 10%; animation-delay: 2.8s; animation-duration: 8s; }
.hero-particles span:nth-child(8) { left: 58%; top: 80%; animation-delay: 1.5s; animation-duration: 7s; }
.hero-particles span:nth-child(9) { left: 88%; top: 45%; animation-delay: 0.9s; animation-duration: 6s; }
.hero-particles span:nth-child(10) { left: 32%; top: 42%; animation-delay: 3.5s; animation-duration: 9s; }
@keyframes neonFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
  50% { transform: translateY(-25px) scale(2); opacity: 1; }
}
.hero-content { position: relative; z-index: 2; }
.hero-badge {
  display: inline-block;
  padding: 0.4rem 1.4rem;
  background: rgba(255,45,149,0.1);
  border: 1px solid rgba(255,45,149,0.3);
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--neon-pink);
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(255,45,149,0.5);
}
.hero h1 {
  font-size: 3.4rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}
.hero-highlight {
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 12px rgba(0,240,255,0.4));
}
.hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.5);
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}
.hero-search {
  display: flex;
  max-width: 520px;
  margin: 0 auto 2.5rem;
  background: rgba(10,10,30,0.8);
  border: 1px solid var(--border-glow);
  border-radius: 8px;
  overflow: hidden;
  transition: all var(--transition);
}
.hero-search:focus-within {
  border-color: var(--neon-blue);
  box-shadow: 0 0 20px rgba(0,240,255,0.2), inset 0 0 20px rgba(0,240,255,0.05);
}
.search-icon {
  width: 20px;
  height: 20px;
  margin-left: 1.2rem;
  color: var(--neon-blue);
  flex-shrink: 0;
}
.hero-search input {
  flex: 1;
  padding: 0.95rem 1rem;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 0.95rem;
  outline: none;
}
.hero-search input::placeholder { color: rgba(255,255,255,0.3); }
.hero-search button {
  padding: 0.95rem 2rem;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: white;
  border: none;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 0 6px rgba(255,255,255,0.3);
}
.hero-search button:hover {
  filter: brightness(1.2);
  box-shadow: 0 0 20px rgba(255,45,149,0.4);
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
}
.hero-stat { text-align: center; }
.hero-stat strong {
  display: block;
  font-size: 1.6rem;
  color: var(--neon-blue);
  font-weight: 900;
  text-shadow: 0 0 12px rgba(0,240,255,0.5);
}
.hero-stat span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ===== Section Shared ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.8rem;
}
.section-title-group { display: flex; align-items: center; gap: 1rem; }
.section-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.section-icon svg { width: 22px; height: 22px; }
.fire-icon {
  background: linear-gradient(135deg, rgba(255, 69, 0, 0.2), rgba(255, 107, 53, 0.1));
  color: var(--hot-primary);
  box-shadow: 0 0 15px var(--hot-glow), inset 0 0 10px rgba(255, 69, 0, 0.1);
  border: 1px solid rgba(255, 69, 0, 0.2);
}
.sparkle-icon {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 153, 204, 0.1));
  color: var(--new-primary);
  box-shadow: 0 0 15px var(--new-glow), inset 0 0 10px rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
}
.thumb-icon {
  background: linear-gradient(135deg, rgba(148, 0, 211, 0.2), rgba(139, 92, 246, 0.1));
  color: var(--pop-primary);
  box-shadow: 0 0 15px var(--pop-glow), inset 0 0 10px rgba(148, 0, 211, 0.1);
  border: 1px solid rgba(148, 0, 211, 0.2);
}
.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-light);
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.view-all {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--neon-blue);
  padding: 0.45rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(0,240,255,0.2);
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.view-all:hover {
  background: rgba(0,240,255,0.08);
  border-color: var(--neon-blue);
  box-shadow: 0 0 15px rgba(0,240,255,0.2);
  color: var(--neon-blue);
  text-shadow: 0 0 6px rgba(0,240,255,0.5);
}

/* ===== Notification Styles ===== */
.notification {
  position: fixed;
  top: 100px;
  right: -400px;
  max-width: 350px;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  color: white;
  font-weight: 500;
  z-index: 9999;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.notification.show {
  right: 20px;
}
.notification-success {
  background: linear-gradient(135deg, #10b981, #059669);
  border-left: 4px solid #065f46;
}
.notification-error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-left: 4px solid #991b1b;
}

/* ===== Module 1: Hot Games - Compact Grid Cards ===== */
.section { padding: 0 0 2rem; }
.section-dark { background: var(--bg-alt); }

.hot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
}
.hot-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.hot-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.hot-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--hot-primary), var(--hot-accent), var(--hot-secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.hot-card:hover::before {
  transform: scaleX(1);
}
.hot-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(255, 69, 0, 0.2), 0 0 40px rgba(255, 107, 53, 0.1);
  border-color: rgba(255, 69, 0, 0.2);
}
.hot-cover {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}
.hot-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.hot-card:hover .hot-cover img {
  transform: scale(1.1);
}
.hot-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.7rem;
  background: linear-gradient(135deg, var(--hot-primary), var(--hot-secondary));
  color: white;
  border-radius: 20px;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 3;
  box-shadow: 0 0 12px rgba(255, 69, 0, 0.5);
}
.hot-play-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5,5,14,0.8) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 1rem;
  opacity: 0;
  transition: opacity var(--transition);
}
.hot-card:hover .hot-play-overlay { opacity: 1; }
.hot-play-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--hot-primary), var(--hot-secondary));
  backdrop-filter: blur(8px);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 24px rgba(255, 69, 0, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.15);
  transform: translateY(10px);
  transition: transform 0.3s ease;
  border: 2px solid rgba(255, 215, 0, 0.3);
}
.hot-card:hover .hot-play-circle { transform: translateY(0); }
.hot-info {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
}
.hot-genre {
  font-size: 0.68rem;
  color: var(--hot-accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.35rem;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}
.hot-title {
  font-size: 1.05rem;
  color: var(--text-light);
  font-weight: 800;
  margin-bottom: 0.4rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hot-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.7rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.hot-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.hot-rating {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.hot-play-btn {
  padding: 0.45rem 1.2rem;
  background: linear-gradient(135deg, var(--hot-primary), var(--hot-secondary));
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 4px rgba(255,255,255,0.3);
  box-shadow: 0 0 12px rgba(255, 69, 0, 0.3);
}
.hot-play-btn:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 20px rgba(255, 69, 0, 0.5);
  transform: scale(1.05);
}

/* ===== Module 2: New Games - Floating Cards ===== */
.new-grid {
  display: flex;
  gap: 1.6rem;
  overflow-x: auto;
  padding: 1rem 0 1.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.new-grid::-webkit-scrollbar {
  height: 6px;
}
.new-grid::-webkit-scrollbar-track {
  background: rgba(0, 212, 255, 0.08);
  border-radius: 3px;
}
.new-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--new-primary), var(--new-secondary));
  border-radius: 3px;
}
.new-card {
  flex: 0 0 270px;
  scroll-snap-align: start;
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.new-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 212, 255, 0.03) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.new-card:hover::before { opacity: 1; }
.new-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0, 212, 255, 0.15), 0 0 40px rgba(0, 153, 204, 0.1);
  border-color: var(--new-primary);
}
.new-thumb {
  position: relative;
  width: 100%;
  height: 170px;
  overflow: hidden;
}
.new-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.new-card:hover .new-thumb img {
  transform: scale(1.06);
}
.new-ribbon {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.2rem 0.6rem;
  background: linear-gradient(135deg, var(--new-primary), var(--new-secondary));
  color: var(--bg);
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 3;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}
.new-rating {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  padding: 0.2rem 0.5rem;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  border-radius: 4px;
  font-size: 0.75rem;
  z-index: 3;
}
.new-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.new-card:hover .new-play-overlay { opacity: 1; }
.new-play-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--new-primary), var(--new-secondary));
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.5);
  transform: scale(0.8);
  transition: transform var(--transition);
  border: 2px solid rgba(127, 255, 0, 0.3);
}
.new-card:hover .new-play-circle { transform: scale(1); }
.new-body {
  padding: 1rem 1.1rem 1.1rem;
}
.new-genre {
  font-size: 0.68rem;
  color: var(--new-accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
  text-shadow: 0 0 8px rgba(127, 255, 0, 0.4);
}
.new-title {
  font-size: 1rem;
  color: var(--text-light);
  font-weight: 700;
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.new-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.new-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.6rem;
}
.new-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.65rem;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(176,38,255,0.12);
  color: var(--neon-purple);
  border: 1px solid rgba(176,38,255,0.2);
}
.new-footer {
  display: flex;
  justify-content: flex-end;
}
.new-play-btn {
  display: inline-block;
  padding: 0.4rem 1.3rem;
  background: linear-gradient(135deg, var(--new-primary), var(--new-accent));
  color: var(--bg);
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}
.new-play-btn:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
  transform: scale(1.05);
  color: var(--bg);
}

/* ===== Module 3: Popular - Glow Cards Layout ===== */
.rank-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.rank-item {
  position: relative;
  display: grid;
  grid-template-columns: 70px 110px 1fr 130px;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}
.rank-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, var(--pop-primary), var(--pop-secondary), var(--pop-accent));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.rank-item:hover::before { opacity: 1; }
.rank-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(148, 0, 211, 0.2), 0 0 50px rgba(139, 92, 246, 0.1);
}
.rank-index {
  width: 55px;
  height: 55px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--pop-primary);
  background: rgba(148, 0, 211, 0.08);
  transition: all 0.4s ease;
}
.rank-item:hover .rank-index {
  transform: scale(1.05);
}
.rank-item:nth-child(1) .rank-index {
  background: linear-gradient(135deg, var(--pop-accent), #ffb700);
  color: var(--bg);
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
}
.rank-item:nth-child(2) .rank-index {
  background: linear-gradient(135deg, #e0e0e0, #bdbdbd);
  color: var(--bg);
  box-shadow: 0 0 20px rgba(189, 189, 189, 0.4);
}
.rank-item:nth-child(3) .rank-index {
  background: linear-gradient(135deg, #cd7f32, #b87333);
  color: white;
  box-shadow: 0 0 20px rgba(205, 127, 50, 0.4);
}
.rank-thumb {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.rank-item:hover .rank-thumb img {
  transform: scale(1.08);
}
.rank-info {
  flex: 1;
  min-width: 0;
}
.rank-genre {
  font-size: 0.62rem;
  color: var(--pop-accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.2rem;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}
.rank-title {
  font-size: 0.95rem;
  color: var(--text-light);
  font-weight: 700;
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.rank-tag {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  font-size: 0.6rem;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(176,38,255,0.12);
  color: var(--neon-purple);
  border: 1px solid rgba(176,38,255,0.2);
}
.rank-stats {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.8rem;
  flex-shrink: 0;
}
.rank-rating {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.85rem;
}
.rank-play-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--pop-primary), var(--pop-secondary));
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 0 12px rgba(148, 0, 211, 0.2);
  text-decoration: none;
}
.rank-play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 22px rgba(148, 0, 211, 0.5);
  color: white;
}

/* ===== Tags ===== */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-height: 1.4rem;
}
.tag {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  font-size: 0.68rem;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.tag-action { background: rgba(255,45,149,0.12); color: var(--neon-pink); border: 1px solid rgba(255,45,149,0.2); }
.tag-shooter { background: rgba(255,106,0,0.12); color: var(--neon-orange); border: 1px solid rgba(255,106,0,0.2); }
.tag-puzzle { background: rgba(0,240,255,0.12); color: var(--neon-blue); border: 1px solid rgba(0,240,255,0.2); }
.tag-brain { background: rgba(0,200,220,0.12); color: #00c8dc; border: 1px solid rgba(0,200,220,0.2); }
.tag-racing { background: rgba(255,230,0,0.12); color: var(--neon-yellow); border: 1px solid rgba(255,230,0,0.2); }
.tag-sports { background: rgba(255,150,0,0.12); color: #ff9600; border: 1px solid rgba(255,150,0,0.2); }
.tag-adventure { background: rgba(57,255,20,0.12); color: var(--neon-green); border: 1px solid rgba(57,255,20,0.2); }
.tag-rpg { background: rgba(45,255,100,0.12); color: #2dff64; border: 1px solid rgba(45,255,100,0.2); }
.tag-strategy { background: rgba(176,38,255,0.12); color: var(--neon-purple); border: 1px solid rgba(176,38,255,0.2); }
.tag-defense { background: rgba(140,40,255,0.12); color: #8c28ff; border: 1px solid rgba(140,40,255,0.2); }
.tag-horror { background: rgba(200,40,40,0.12); color: #c82828; border: 1px solid rgba(200,40,40,0.2); }
.tag-runner { background: rgba(0,240,255,0.12); color: var(--neon-blue); border: 1px solid rgba(0,240,255,0.2); }
.tag-arcade { background: rgba(57,255,20,0.12); color: #30e810; border: 1px solid rgba(57,255,20,0.2); }
.tag-sim { background: rgba(100,160,255,0.12); color: #64a0ff; border: 1px solid rgba(100,160,255,0.2); }
.tag-casual { background: rgba(176,38,255,0.12); color: #c060ff; border: 1px solid rgba(176,38,255,0.2); }
.tag-match3 { background: rgba(255,45,149,0.12); color: #ff60b0; border: 1px solid rgba(255,45,149,0.2); }
.tag-board { background: rgba(57,255,20,0.12); color: #40ff80; border: 1px solid rgba(57,255,20,0.2); }
.tag-fighting { background: rgba(255,70,70,0.12); color: #ff4646; border: 1px solid rgba(255,70,70,0.2); }
.tag-multiplayer { background: rgba(0,240,255,0.12); color: #00e0e0; border: 1px solid rgba(0,240,255,0.2); }
.game-card-body .tag, .game-list-info .tags .tag {
  background: rgba(176,38,255,0.12);
  color: var(--neon-purple);
  border: 1px solid rgba(176,38,255,0.2);
  border-radius: 3px;
}

/* ===== Tags Page ===== */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 3rem;
}
.tag-cloud a {
  padding: 0.45rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tag-cloud a:hover, .tag-cloud a.active {
  background: rgba(0,240,255,0.08);
  border-color: var(--neon-blue);
  color: var(--neon-blue);
  box-shadow: 0 0 12px rgba(0,240,255,0.15);
  text-shadow: 0 0 6px rgba(0,240,255,0.4);
}

/* Tags Cloud (new template) */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.tag-item {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.tag-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,240,255,0.06), rgba(176,38,255,0.04));
  opacity: 0;
  transition: opacity var(--transition);
}
.tag-item:hover::before, .tag-item.active::before { opacity: 1; }
.tag-item:hover, .tag-item.active {
  border-color: var(--neon-blue);
  color: var(--neon-blue);
  box-shadow: 0 0 14px rgba(0,240,255,0.15), inset 0 0 20px rgba(0,240,255,0.03);
  text-shadow: 0 0 6px rgba(0,240,255,0.4);
  transform: translateY(-2px);
}
.tag-item.size-lg {
  padding: 0.55rem 1.4rem;
  font-size: 0.9rem;
}
.section-divider {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-glow), transparent);
  margin-left: 1rem;
}
.section-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}
.section-header h2 .accent {
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(0,240,255,0.3));
}

/* Category Games Grid */
.category-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
}
.category-game-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  position: relative;
}
.category-game-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1.5px;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple), var(--neon-blue));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.category-game-card:hover::after { opacity: 1; }
.category-game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 24px rgba(176,38,255,0.12), 0 0 40px rgba(255,45,149,0.06);
}
.category-game-thumb {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}
.category-game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.category-game-card:hover .category-game-thumb img {
  transform: scale(1.08);
}
.game-card-badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 3;
}
.badge-hot {
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: white;
  box-shadow: 0 0 10px rgba(255,45,149,0.4);
}
.category-game-info {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.category-game-info h3 {
  font-size: 1rem;
  color: var(--text-light);
  font-weight: 700;
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.category-game-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.category-game-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.category-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1.2rem;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 4px rgba(255,255,255,0.2);
  box-shadow: 0 0 12px rgba(255,45,149,0.2);
  width: fit-content;
}
.category-play-btn:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 20px rgba(255,45,149,0.4);
  transform: scale(1.05);
}

/* ===== List Page ===== */
.game-list-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.8rem;
  transition: all var(--transition);
}
.game-list-item:hover {
  transform: translateX(4px);
  border-color: var(--neon-blue);
  box-shadow: 0 0 15px rgba(0,240,255,0.1);
}
.game-list-item img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #1a1a40, #0c0c1d);
}
.game-list-info { flex: 1; min-width: 0; }
.game-list-info h3 {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
  font-weight: 700;
}
.game-list-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.game-list-info .tags .tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.68rem;
  margin-right: 0.2rem;
}
.game-list-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.game-list-right .rating { color: var(--neon-yellow); font-size: 0.82rem; font-weight: 700; text-shadow: 0 0 6px rgba(255,230,0,0.3); }

/* Games Grid (new list template) */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
}
.games-grid .game-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
}
.games-grid .game-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1.5px;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple), var(--neon-blue));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.games-grid .game-card:hover::after { opacity: 1; }
.games-grid .game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 24px rgba(176,38,255,0.12), 0 0 40px rgba(255,45,149,0.06);
}
.games-grid .game-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}
.game-card-image {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}
.game-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.games-grid .game-card:hover .game-card-image img {
  transform: scale(1.08);
}
.game-card-rating {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  padding: 0.2rem 0.5rem;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  border-radius: 4px;
  font-size: 0.75rem;
  z-index: 3;
}
.game-card-info {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.game-card-info .game-card-title {
  font-size: 1rem;
  color: var(--text-light);
  font-weight: 700;
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.game-card-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.game-card-plays {
  font-size: 0.75rem;
  color: var(--neon-purple);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.game-card-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1.2rem;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 4px rgba(255,255,255,0.2);
  box-shadow: 0 0 12px rgba(255,45,149,0.2);
  text-decoration: none;
  width: fit-content;
}
.game-card-play-btn:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 20px rgba(255,45,149,0.4);
  transform: scale(1.05);
  color: white;
}

/* ===== Game Detail Page ===== */
.game-detail-section {
  padding: 1.5rem 0 3rem;
}

/* Breadcrumb */
.breadcrumb-nav {
  margin-bottom: 1.5rem;
}
.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 6px;
}
.breadcrumb-item {
  display: flex;
  align-items: center;
}
.breadcrumb-item a {
  text-decoration: none;
  color: var(--neon-blue);
  font-weight: 500;
  padding: 3px 6px;
  border-radius: 4px;
  transition: all var(--transition);
  font-size: 0.85rem;
}
.breadcrumb-item a:hover {
  background: rgba(0, 240, 255, 0.08);
  text-shadow: none;
  color: var(--neon-blue);
}
.breadcrumb-item span[aria-current="page"] {
  color: var(--text-muted);
  font-weight: 600;
  padding: 3px 6px;
  font-size: 0.85rem;
}
.breadcrumb-separator {
  color: var(--text-muted);
  user-select: none;
  font-size: 0.75rem;
}

/* Game Player */
.game-player-wrap {
  margin-bottom: 2rem;
}
.game-player {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}
.game-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 2;
}
.game-player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(5,5,14,0.5);
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.game-player-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.game-play-btn {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  background: none;
  border: none;
  cursor: pointer;
}
.play-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 0 30px rgba(255,45,149,0.5), 0 0 60px rgba(176,38,255,0.2);
  transition: all 0.3s ease;
  border: 3px solid rgba(255,255,255,0.15);
}
.game-play-btn:hover .play-icon {
  transform: scale(1.1);
  box-shadow: 0 0 40px rgba(255,45,149,0.6), 0 0 80px rgba(176,38,255,0.3);
}
.play-text {
  color: white;
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

/* Game Detail Info */
.game-detail-info {
  margin-bottom: 2rem;
}
.game-detail-main {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.game-detail-title {
  font-size: 1.8rem;
  color: var(--text-light);
  font-weight: 900;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.game-detail-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.game-detail-rating {
  color: var(--neon-yellow);
  font-size: 0.9rem;
  font-weight: 700;
}
.meta-sep {
  color: var(--border-glow);
  font-size: 0.8rem;
}
.game-detail-category {
  font-size: 0.85rem;
  color: var(--neon-blue);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.game-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.game-detail-tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: rgba(176,38,255,0.1);
  border: 1px solid rgba(176,38,255,0.2);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--neon-purple);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: all var(--transition);
}
.game-detail-tag:hover {
  background: rgba(176,38,255,0.18);
  border-color: var(--neon-purple);
  box-shadow: 0 0 10px rgba(176,38,255,0.15);
  color: var(--neon-purple);
  text-shadow: none;
}
.game-detail-desc {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}
.game-detail-desc h3 {
  font-size: 1.2rem;
  color: var(--text-light);
  font-weight: 800;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.game-detail-desc p {
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1.2rem;
  font-size: 0.92rem;
}
.game-detail-desc li {
  color: var(--text);
  line-height: 1.8;
}

/* Game Detail Block (Related Games) */
.game-detail-block {
  margin-top: 2.5rem;
}
.game-detail-block-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.related-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}
.related-game-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  position: relative;
}
.related-game-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1.5px;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple), var(--neon-blue));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.related-game-card:hover::after { opacity: 1; }
.related-game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 24px rgba(176,38,255,0.12), 0 0 40px rgba(255,45,149,0.06);
}
.related-game-thumb {
  position: relative;
  width: 100%;
  height: 140px;
  overflow: hidden;
}
.related-game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.related-game-card:hover .related-game-thumb img {
  transform: scale(1.08);
}
.related-game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.related-game-card:hover .related-game-overlay { opacity: 1; }
.related-game-overlay span {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,45,149,0.9);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 0 18px rgba(255,45,149,0.5);
}
.related-game-info {
  padding: 0.8rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.related-game-title {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.related-game-category {
  font-size: 0.72rem;
  color: var(--neon-purple);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.related-game-rating {
  font-size: 0.78rem;
  color: var(--neon-yellow);
  font-weight: 700;
}

/* Fullscreen Game */
.game-fullscreen-frame {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  border: none;
  background: #000;
  display: none;
}
.game-close-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  display: none;
  justify-content: flex-end;
  padding: 12px 20px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
}
.game-close-btn {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-main);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.game-close-btn:hover {
  background: rgba(255,45,149,0.3);
  border-color: var(--neon-pink);
  box-shadow: 0 0 15px rgba(255,45,149,0.3);
}

/* ===== Pagination ===== */
.pagination-bar {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}
.pagination-container {
  display: flex;
  justify-content: center;
  width: 100%;
}
.pagination-container nav.pagination {
  display: inline-flex;
}
.pagination-list {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.pagination-item {
  display: flex;
  align-items: center;
}
.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  user-select: none;
}
.pagination-link:hover {
  background: rgba(255, 45, 149, 0.12);
  border-color: var(--neon-pink);
  color: var(--neon-pink);
  box-shadow: 0 0 12px rgba(255, 45, 149, 0.15);
  transform: translateY(-1px);
}
.pagination-link.current {
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 18px rgba(255, 45, 149, 0.35);
  cursor: default;
  pointer-events: none;
}
.pagination-link.prev,
.pagination-link.next {
  font-size: 1.1rem;
  padding: 0 14px;
  font-weight: 800;
}
.pagination-link.prev:hover,
.pagination-link.next:hover {
  background: rgba(255, 45, 149, 0.12);
  border-color: var(--neon-pink);
  color: var(--neon-pink);
  box-shadow: 0 0 12px rgba(255, 45, 149, 0.15);
  transform: translateY(-1px);
}
.pagination-link.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-muted);
}
/* Legacy simple pagination fallback */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin: 2rem 0;
}
.pagination a, .pagination span {
  background: var(--bg-card);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.85rem;
  transition: all var(--transition);
  font-weight: 600;
}
.pagination a:hover, .pagination span.active {
  background: var(--neon-pink);
  border-color: var(--neon-pink);
  color: white;
  box-shadow: 0 0 12px rgba(255,45,149,0.3);
}

/* ===== Content Page ===== */
.page-banner {
  background: linear-gradient(135deg, #0a0520, #050520);
  padding: 3rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.page-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 25%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,45,149,0.1), transparent 70%);
  border-radius: 50%;
}
.page-banner::after {
  content: '';
  position: absolute;
  top: -30%;
  right: 20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(0,240,255,0.08), transparent 70%);
  border-radius: 50%;
}
.page-banner h1 {
  font-size: 2rem;
  color: var(--text-light);
  font-weight: 900;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.page-banner p {
  color: rgba(255,255,255,0.45);
  font-size: 1rem;
  margin-top: 0.4rem;
  position: relative;
}
.content-section { padding: 3rem 0; }
.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem;
  margin-bottom: 1.5rem;
  transition: border-color var(--transition);
}
.content-card:hover { border-color: var(--border-glow); }
.content-card h2 {
  font-size: 1.3rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.content-card h3 {
  font-size: 1.1rem;
  color: var(--neon-blue);
  margin: 1.2rem 0 0.5rem;
  text-shadow: 0 0 6px rgba(0,240,255,0.2);
}
.content-card p {
  margin-bottom: 1rem;
  color: var(--text);
  line-height: 1.8;
}
.content-card ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.content-card ul li {
  list-style: none;
  margin-bottom: 0.4rem;
  color: var(--text);
  line-height: 1.7;
  padding-left: 1rem;
  position: relative;
}
.content-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 6px;
  height: 6px;
  background: var(--neon-blue);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--neon-blue);
}

/* ===== Contact Form ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.contact-form label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.92rem;
  margin-bottom: 1.2rem;
  outline: none;
  transition: all var(--transition);
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  border-color: var(--neon-blue);
  box-shadow: 0 0 12px rgba(0,240,255,0.15);
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.btn-submit {
  padding: 0.75rem 2.2rem;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 4px rgba(255,255,255,0.2);
}
.btn-submit:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255,45,149,0.3);
}
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.contact-info-item .icon {
  width: 42px;
  height: 42px;
  background: rgba(0,240,255,0.08);
  border: 1px solid rgba(0,240,255,0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.contact-info-item h4 {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.15rem;
}
.contact-info-item p { font-size: 0.82rem; color: var(--text-muted); }

/* ===== Footer ===== */
.site-footer {
  background: #030310;
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-blue), var(--neon-pink), transparent);
  opacity: 0.5;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.footer-col h4 span {
  color: var(--neon-pink);
  text-shadow: 0 0 8px rgba(255,45,149,0.4);
}
.footer-col p {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.7;
}
.footer-col ul li { margin-bottom: 0.45rem; }
.footer-col ul li a {
  color: var(--text-muted);
  font-size: 0.82rem;
  transition: all var(--transition);
}
.footer-col ul li a:hover {
  color: var(--neon-blue);
  padding-left: 4px;
  text-shadow: 0 0 6px rgba(0,240,255,0.3);
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.footer-social { display: flex; gap: 0.6rem; }
.footer-social a {
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}
.footer-social a:hover {
  background: var(--neon-pink);
  border-color: var(--neon-pink);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 0 12px rgba(255,45,149,0.3);
}

/* ===== Game Card (tags page) ===== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}
.game-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-neon);
  border-color: var(--neon-blue);
}
.game-card-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: linear-gradient(135deg, #1a1a40, #0c0c1d);
}
.game-card-body { padding: 0.9rem 1.1rem 1.1rem; }
.game-card-body h3 {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 0.45rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
}
.game-card-body .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.7rem;
}
.game-card-body .rating {
  color: var(--neon-yellow);
  font-size: 0.82rem;
  font-weight: 700;
  text-shadow: 0 0 6px rgba(255,230,0,0.3);
}
.btn-play {
  display: inline-block;
  padding: 0.35rem 1.1rem;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 0 4px rgba(255,255,255,0.2);
}
.btn-play:hover {
  filter: brightness(1.15);
  color: white;
  box-shadow: 0 0 15px rgba(255,45,149,0.3);
  transform: scale(1.05);
}

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  box-shadow: 0 0 15px rgba(255,45,149,0.3);
  z-index: 999;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(255,45,149,0.5);
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.4rem; }
  .hot-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .rank-item {
    grid-template-columns: 55px 90px 1fr 110px;
    padding: 1rem;
    gap: 1.2rem;
  }
  .rank-index {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
  .rank-thumb {
    width: 70px;
    height: 70px;
  }
  .category-games-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
  .game-detail-title { font-size: 1.5rem; }
  .game-detail-main { padding: 1.5rem; }
  .related-games-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .play-icon { width: 60px; height: 60px; font-size: 1.5rem; }
}
@media (max-width: 768px) {
  .container { padding: 0.5rem 1rem; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
    gap: 0.3rem;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 0.92rem; }
  .hero-stats { gap: 1.5rem; }
  .hero-stat strong { font-size: 1.2rem; }
  .hero-search { flex-direction: column; border-radius: 8px; }
  .hero-search button { border-radius: 0 0 7px 7px; }
  .hot-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .hot-cover { height: 160px; }
  .new-grid { gap: 1rem; }
  .new-card { flex: 0 0 220px; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .game-list-item { flex-direction: column; align-items: flex-start; }
  .game-list-item img { width: 100%; height: 160px; }
  .footer-grid { grid-template-columns: 1fr; }
  .content-card { padding: 1.5rem; }
  .page-banner h1 { font-size: 1.5rem; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .rank-grid { gap: 0.5rem; }
  .rank-item {
    grid-template-columns: 45px 70px 1fr 90px;
    padding: 0.8rem 1rem;
    gap: 0.8rem;
  }
  .rank-index {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
  .rank-thumb {
    width: 50px;
    height: 50px;
  }
  .rank-genre {
    font-size: 0.55rem;
  }
  .rank-title {
    font-size: 0.8rem;
  }
  .rank-tags {
    display: none;
  }
  .rank-stats {
    gap: 0.4rem;
  }
  .rank-play-btn {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }
  .category-games-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .category-game-thumb { height: 150px; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .game-card-image { height: 150px; }
  .tags-cloud { gap: 0.4rem; }
  .tag-item { padding: 0.4rem 0.9rem; font-size: 0.78rem; }
  .section-header h2 { font-size: 1.1rem; }
  /* Detail page responsive */
  .game-detail-title { font-size: 1.3rem; }
  .game-detail-main { padding: 1.2rem; }
  .game-detail-desc h3 { font-size: 1rem; }
  .game-detail-meta { gap: 0.5rem; }
  .breadcrumb-list { gap: 4px; }
  .breadcrumb-item a,
  .breadcrumb-item span[aria-current="page"] { font-size: 0.78rem; padding: 2px 4px; }
  .breadcrumb-separator { font-size: 0.65rem; }
  .play-icon { width: 50px; height: 50px; font-size: 1.2rem; }
  .play-text { font-size: 0.8rem; letter-spacing: 2px; }
  .related-games-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .related-game-thumb { height: 110px; }
  .related-game-title { font-size: 0.82rem; }
  /* Pagination responsive */
  .pagination-link { min-width: 32px; height: 32px; font-size: 0.8rem; padding: 0 8px; border-radius: 6px; }
  .pagination-link.prev, .pagination-link.next { padding: 0 10px; font-size: 1rem; }
  .pagination-list { gap: 4px; }
}
