* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: system-ui, sans-serif;
  background: #0a0e17;
  color: #d0d8e0;
  line-height: 1.5;
}

header {
  background: #0E1374;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}
.logo { color: white; font-size: 1.9rem; font-weight: 800; letter-spacing: -1px; }
.nav-links { display: flex; gap: 20px; font-size: 0.98rem; font-weight: 500; color: white; }
.nav-links a { color: white; text-decoration: none; }
.nav-links a:hover { text-decoration: underline; }
.search-box { position: relative; width: 240px; flex: 1; max-width: 320px; }
.search-box input {
  width: 100%; padding: 10px 40px 10px 16px;
  border: none; border-radius: 30px;
  background: white; color: #333;
}
.search-box .icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #666; }
a {
  text-decoration: unset;
  color: white;
}
.hero {
  background: #00b4d8;
  padding: 40px 20px 60px;
  text-align: center;
  color: white;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); margin-bottom: 8px; font-weight: 800; }
.hero p { font-size: 1.1rem; max-width: 700px; margin: 0 auto 24px; opacity: 0.95; }
.hero-search { max-width: 520px; margin: 0 auto 40px; }
.hero-search input {
  width: 100%; padding: 14px 20px; font-size: 1.05rem;
  border: none; border-radius: 50px; background: white;
}
.hero-featured {
  display: flex;
  justify-content: center;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.featured-card {
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  overflow: hidden;
  width: 320px;
  border: 1px solid rgba(255,255,255,0.2);
}
.featured-card img { width: 100%; height: 160px; object-fit: cover; }
.featured-info { padding: 14px; color: white; text-align: left; }
.featured-info h3 { font-size: 1.05rem; margin-bottom: 4px; }

.section-title {
  text-align: center;
  font-size: 1.85rem;
  font-weight: 700;
  color: #00d4ff;
  margin: 50px 0 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Recommended Games - Slider với jQuery + infinite loop */
.recommended {
  padding: 0 20px 50px;
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
}
.slider-wrapper { position: relative; }
.slider-container {
  display: flex;
  gap: 18px;
  transition: transform 0.45s ease;
}
.game-item {
  flex: 0 0 calc((100% - 3*18px)/4);
  min-width: 220px;
  background: #13294b;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  border: 1px solid #2a4a6e;
}
.game-item:hover { border-color: #00d4ff; box-shadow: 0 10px 20px rgba(0,212,255,0.2); }
.game-item img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}
.stars {
  position: relative;
  display: inline-block;
  font-size: 1.05rem;
  /*color: #444;*/
  margin: 8px 0;
}
.stars::before {
  content: "★★★★★";
  color: #ffd700;
  position: absolute;
  top: 0; left: 0;
  overflow: hidden;
  white-space: nowrap;
}
.stars[data-rating="4.5"]::before { width: 90%; }
.stars[data-rating="4"]::before { width: 80%; }
.stars[data-rating="3.5"]::before { width: 70%; }
.stars[data-rating="3"]::before { width: 60%; }
.stars[data-rating="2.5"]::before { width: 50%; }
.stars[data-rating="2"]::before { width: 40%; }
.stars[data-rating="1.5"]::before { width: 30%; }
.stars[data-rating="1"]::before { width: 20%; }
.stars[data-rating="0.5"]::before { width: 10%; }
.stars[data-rating="0"]::before { width: 0%; }
.read-link { color: #00d4ff; font-weight: 600; text-decoration: none; display: block; margin-top: 6px; }
.read-link:hover { text-decoration: underline; }

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,212,255,0.4);
  color: white;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
}
.slider-arrow:hover { background: #00d4ff; }
.prev { left: -10px; }
.next { right: -10px; }

/* Latest post on Blog - 4 bài 1 dòng, căn giữa */
.blog-section { padding: 0 20px 50px; }
.blog-wrapper { max-width: 1400px; margin: 0 auto; }
.blog-grid {
  display: flex;
  justify-content: center;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 10px;
}
.post-card {
  flex: 0 0 280px;
  background: #13294b;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #2a4a6e;
  scroll-snap-align: center;
}
.post-card img { width: 100%; height: 170px; object-fit: cover; }
.post-content { padding: 16px; }
.post-content h3 { font-size: 1.15rem; margin-bottom: 8px; color: #a0d4ff; }
.post-content p { font-size: 0.92rem; color: #b0c4d8; margin-bottom: 12px; }
.read-more { color: #00d4ff; font-weight: 600; text-decoration: none; }

.reviews-section { padding: 0 20px 50px; }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.post-card .post-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.review-header h3 { margin: 0; font-size: 1.15rem; color: #a0d4ff; flex: 1; }
.review-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.btn-center {
  display: block;
  width: fit-content;
  margin: 40px auto;
  padding: 12px 32px;
  background: #00d4ff;
  color: #0a1f3a;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-center:hover { background: #00b4d8; }

footer {
  background: #0d1b2a;
  padding: 50px 20px 30px;
  border-top: 1px solid #2a4a6e;
  color: #a0c0ff;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 30px;
  text-align: left;
}
.footer-grid h4 { color: #00d4ff; margin-bottom: 14px; font-size: 1.05rem; }
.footer-grid ul { list-style: none; }
.footer-grid a { color: #b0c4d8; text-decoration: none; line-height: 1.8; display: block; }
.footer-grid a:hover { color: #00d4ff; }
.copyright { text-align: center; padding-top: 20px; border-top: 1px solid #2a4a6e; color: #80a0c0; font-size: 0.85rem; }

ul li, ol li {
  list-style: initial;
  margin-left: 5%;
}
.breadcrumb {
  background: #0d1b2a;
  padding: 10px 16px;
  font-size: 0.9rem;
  color: #a0c0ff;
}
.breadcrumb a { color: #00d4ff; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  gap: 24px;
}

main { flex: 5; min-width: 0; }
aside { flex: 1; min-width: 300px; }

/* Back to top */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #00d4ff;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 999;
}
#backToTop.show { opacity: 1; visibility: visible; }

@media (max-width: 1200px) {
  .main-container { gap: 20px; padding: 20px 16px; }
  .left-column { flex: 0 0 320px; }
  .game-thumb { flex: 0 0 80px; }
  .game-thumb img { height: 80px; }
  .post-poster img { max-width: 280px; }
}
@media (max-width: 1024px) {
  .game-item { flex: 0 0 calc((100% - 2*18px)/3); }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 992px) {
  /*.main-container { flex-direction: column-reverse; }*/
  .post-header { flex-direction: column; align-items: center; text-align: center; }
  .post-poster { max-width: 400px; }
  .main-container {
    flex-direction: column;
    gap: 24px;
  }
  aside { order: 3; position: static; } /* Sidebar xuống dưới cùng */
  .popular-section { order: 4; } /* Popular Now xuống cuối cùng */
  .main-content { order: 2; } /* Article ở giữa */
  .post-header { flex-direction: column; align-items: center; text-align: center; padding: 20px; }
  .left-column { width: 100%; max-width: 400px; margin: 0 auto; }
  .poster-info-row { flex-direction: column; gap: 20px; align-items: center; }
  .rating-button-row { flex-direction: column; align-items: center; gap: 12px; }
  .get-links-btn { width: 100%; max-width: 300px; text-align: center; }
  .popular-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (max-width: 768px) {
  /*.navbar { flex-direction: column; }*/
  .nav-links { display: none; }
  .slider-arrow { width: 40px; height: 40px; }
  .reviews-grid { grid-template-columns: 1fr; }
  .blog-grid .post-card { flex: 0 0 85%; }

  .navbar { flex-direction: column; gap: 10px; padding: 10px 12px; }
  .breadcrumb { font-size: 0.85rem; padding: 8px 12px; }
  .games-slider { padding: 8px; }
  .carousel-arrow { width: 24px; height: 24px; font-size: 0.8rem; }
  .carousel-arrow.prev { left: 4px; }
  .carousel-arrow.next { right: 4px; }
  .game-thumb { flex: 0 0 70px; }
  .game-thumb img { height: 70px; }
  .post-title { font-size: 1.8rem; }
  .post-rating { font-size: 1.6rem; }
  .get-links-btn { padding: 10px 24px; font-size: 0.95rem; }
  .popular-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
  .sidebar-item img { width: 60px; height: 60px; }
  #backToTop { bottom: 16px; right: 16px; width: 40px; height: 40px; font-size: 1.2rem; }
}

@media (max-width: 480px) {
  .post-header { padding: 16px; }
  .left-column { gap: 12px; }
  .games-wrapper { gap: 8px; }
  .game-thumb { flex: 0 0 60px; }
  .game-thumb img { height: 60px; }
  .game-thumb span { font-size: 0.7rem; }
}