/* ============================================================
   H5GAMEZONE.TOP — BRUTALIST HEAVY INDUSTRIAL THEME
   Pure CSS | border-radius: 0 | Thick borders | High contrast
   ============================================================ */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Bebas Neue', 'Arial Black', sans-serif;
  background: #000;
  color: #fff;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: #fff; text-decoration: none; }
a:hover { color: #ff4500; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(2.8rem, 10vw, 6rem); line-height: 0.95; }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.05; }
h3 { font-size: clamp(1.4rem, 3vw, 2rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

.section-title {
  font-size: clamp(1.2rem, 3vw, 2rem);
  padding: 12px 0;
  border-bottom: 4px solid #ff4500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.1em;
}

.section-title .accent-bar {
  display: inline-block;
  width: 8px;
  height: 28px;
  background: #ffd700;
}

/* --- LAYOUT CONTAINER --- */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}

/* --- HEADER / NAV --- */
.site-header {
  background: #000;
  border-bottom: 4px solid #ff4500;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-logo {
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #fff;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-logo .logo-accent { color: #ff4500; }
.site-logo .logo-star { color: #ffd700; }

/* --- SEARCH --- */
.search-wrap {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.search-wrap input {
  width: 100%;
  padding: 12px 16px;
  background: #111;
  border: 3px solid #333;
  color: #fff;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  border-radius: 0;
  transition: border-color 0.15s;
}

.search-wrap input:focus { border-color: #ff4500; }
.search-wrap input::placeholder { color: #666; font-family: 'Inter', sans-serif; }

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #111;
  border: 3px solid #ff4500;
  border-top: 0;
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 999;
}

.search-results.active { display: block; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #222;
  cursor: pointer;
  transition: background 0.12s;
}

.search-result-item:hover { background: #222; }
.search-result-item img { width: 40px; height: 40px; object-fit: cover; }
.search-result-item .sri-name { font-weight: 700; font-size: 0.95rem; text-transform: uppercase; }
.search-result-item .sri-cat { font-size: 0.75rem; color: #ff4500; text-transform: uppercase; }

/* --- DESKTOP NAV --- */
.nav-desktop { display: flex; gap: 4px; align-items: center; }

.nav-desktop a {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 3px solid transparent;
  letter-spacing: 0.08em;
  transition: 0.1s;
}

.nav-desktop a:hover { border-color: #ff4500; color: #fff; }

/* --- HAMBURGER --- */
.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: 3px solid #fff;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}

/* --- MOBILE DRAWER --- */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: -100%;
  width: 85%;
  max-width: 360px;
  height: 100vh;
  background: #000;
  border-right: 4px solid #ff4500;
  z-index: 2000;
  padding: 24px;
  overflow-y: auto;
  transition: left 0.3s ease;
}

.mobile-drawer.open { left: 0; }

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 1999;
  display: none;
}

.drawer-overlay.active { display: block; }

.drawer-close {
  display: block;
  margin-left: auto;
  background: none;
  border: 3px solid #ff4500;
  color: #ff4500;
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  cursor: pointer;
  margin-bottom: 24px;
  border-radius: 0;
}

.drawer-nav a {
  display: block;
  padding: 14px 16px;
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  border-bottom: 2px solid #222;
  letter-spacing: 0.08em;
  transition: 0.1s;
}

.drawer-nav a:hover { background: #111; color: #ff4500; border-color: #ff4500; }

.drawer-categories { margin-top: 24px; }
.drawer-categories h4 {
  font-size: 0.85rem;
  color: #ffd700;
  padding: 8px 16px;
  border-bottom: 2px solid #ffd700;
  margin-bottom: 8px;
}

.drawer-categories a {
  display: block;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  border-bottom: 1px solid #1a1a1a;
  color: #ccc;
  transition: 0.1s;
}

.drawer-categories a:hover { color: #ff4500; background: #111; }

/* --- BOTTOM NAV (mobile) --- */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #000;
  border-top: 4px solid #ff4500;
  z-index: 1000;
  padding: 8px 0;
  justify-content: space-around;
  align-items: center;
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #888;
  padding: 4px 8px;
  letter-spacing: 0.05em;
}

.bottom-nav a.active { color: #ff4500; }
.bottom-nav a .bn-icon { font-size: 1.3rem; line-height: 1; }

/* --- HERO SECTION --- */
.hero {
  padding: 24px 0 0;
  border-bottom: 4px solid #ff4500;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 4px;
  background: repeating-linear-gradient(90deg, #ffd700 0px, #ffd700 20px, transparent 20px, transparent 40px);
}

.hero-title {
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.hero-title .ht-line2 { display: block; color: #ff4500; }

.hero-sub {
  font-size: clamp(0.8rem, 2vw, 1rem);
  color: #aaa;
  max-width: 500px;
  margin-bottom: 16px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  border: 4px solid #fff;
  background: #000;
  color: #fff;
  cursor: pointer;
  transition: 0.1s;
  border-radius: 0;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.06em;
}

.btn:hover { background: #fff; color: #000; }

.btn-primary {
  background: #ff4500;
  border-color: #ff4500;
  color: #000;
}

.btn-primary:hover { background: #fff; border-color: #fff; color: #000; }

.btn-yellow {
  background: #ffd700;
  border-color: #ffd700;
  color: #000;
}

.btn-yellow:hover { background: #fff; border-color: #fff; color: #000; }

.btn-small {
  padding: 8px 18px;
  font-size: 0.78rem;
  border-width: 3px;
}

/* --- CATEGORY PILLS --- */
.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0;
}

.cat-pill {
  display: inline-block;
  padding: 10px 20px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  border: 3px solid #333;
  background: #000;
  color: #fff;
  cursor: pointer;
  transition: 0.1s;
  letter-spacing: 0.06em;
  border-radius: 0;
}

.cat-pill:hover { border-color: #ff4500; color: #ff4500; }
.cat-pill.active { background: #ff4500; border-color: #ff4500; color: #000; }

/* --- HERO GAMES STRIP --- */
.hero-games-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 0 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.hero-games-strip::-webkit-scrollbar { height: 4px; }
.hero-games-strip::-webkit-scrollbar-thumb { background: #ff4500; border-radius: 0; }

.hero-strip-card {
  flex: 0 0 140px;
  background: #0a0a0a;
  border: 3px solid #222;
  padding: 8px;
  scroll-snap-align: start;
  transition: 0.1s;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  display: block;
}
.hero-strip-card:hover { border-color: #ff4500; }
.hero-strip-card .hsc-img {
  width: 100%;
  height: 124px;
  display: block;
  object-fit: cover;
  background: #111;
  margin-bottom: 6px;
}
.hero-strip-card .hsc-name {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-strip-card .hsc-rating {
  font-size: 0.6rem;
  color: #ffd700;
  font-weight: 800;
  margin-top: 2px;
}

.mobile-search-wrap { display: none; }

/* --- GAME GRID --- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 20px 0;
}

.game-card {
  background: #0a0a0a;
  border: 4px solid #222;
  padding: 12px;
  transition: 0.1s;
  display: flex;
  flex-direction: column;
  border-radius: 0;
}

.game-card:hover { border-color: #ff4500; }

.game-card .gc-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
  background: #111;
  margin-bottom: 10px;
}

.game-card .gc-info { flex: 1; display: flex; flex-direction: column; gap: 6px; }

.game-card .gc-name {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card .gc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
}

.game-card .gc-cat {
  font-weight: 700;
  color: #ff4500;
  text-transform: uppercase;
  font-size: 0.65rem;
  display: inline-block;
  padding: 2px 8px;
  border: 2px solid #ff4500;
}

.game-card .gc-rating {
  color: #ffd700;
  font-weight: 800;
}

/* --- STRIP (horizontal scrolling) --- */
.game-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 12px 0 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.game-strip::-webkit-scrollbar { height: 4px; }
.game-strip::-webkit-scrollbar-track { background: #111; }
.game-strip::-webkit-scrollbar-thumb { background: #ff4500; }

.strip-card {
  flex: 0 0 180px;
  background: #0a0a0a;
  border: 4px solid #222;
  padding: 10px;
  scroll-snap-align: start;
  transition: 0.1s;
  border-radius: 0;
}

.strip-card:hover { border-color: #ff4500; }

.strip-card .sc-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  background: #111;
  margin-bottom: 8px;
}

.strip-card .sc-name {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.strip-card .sc-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  margin-top: 4px;
}

.strip-card .sc-cat { color: #ff4500; font-weight: 700; text-transform: uppercase; }
.strip-card .sc-rating { color: #ffd700; font-weight: 800; }

/* --- LOAD MORE --- */
.load-more-wrap {
  text-align: center;
  padding: 16px 0 32px;
}

/* --- SECTION SPACING --- */
.site-section { padding: 20px 0; }

/* --- FOOTER --- */
.site-footer {
  border-top: 4px solid #ff4500;
  padding: 40px 0 80px;
  margin-top: 40px;
}

.site-footer .container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
}

.footer-brand .fb-name {
  font-size: 1.6rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.footer-brand .fb-name span { color: #ff4500; }

.footer-brand p { font-size: 0.85rem; color: #888; max-width: 300px; }

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #ffd700;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid #333;
}

.footer-col a {
  display: block;
  padding: 4px 0;
  font-size: 0.85rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-col a:hover { color: #ff4500; }

.footer-bottom {
  border-top: 2px solid #222;
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
  font-size: 0.75rem;
  color: #666;
  text-transform: uppercase;
  grid-column: 1 / -1;
}

/* --- GAME DETAIL PAGE --- */
.game-detail-header { padding: 24px 0; }

.game-detail-title {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  margin-bottom: 4px;
}

.game-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 20px;
  color: #aaa;
}

.game-detail-meta .gdm-cat {
  color: #ff4500;
  font-weight: 800;
  border: 2px solid #ff4500;
  padding: 2px 10px;
}

.game-detail-meta .gdm-rating { color: #ffd700; font-weight: 800; }

.game-play-wrap {
  background: #0a0a0a;
  border: 4px solid #333;
  width: 100%;
  aspect-ratio: 16/9;
  max-height: 600px;
  position: relative;
  margin-bottom: 24px;
}

.game-play-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.game-detail-desc {
  font-size: 0.95rem;
  color: #ccc;
  line-height: 1.7;
  max-width: 800px;
  margin-bottom: 24px;
  font-family: 'Inter', sans-serif;
}

.game-detail-desc strong { color: #fff; }

.game-info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px 0;
  border-top: 2px solid #222;
  border-bottom: 2px solid #222;
  margin-bottom: 30px;
}

.game-info-bar .gib-item {
  text-transform: uppercase;
  font-size: 0.78rem;
}

.game-info-bar .gib-item .gib-label { color: #666; font-weight: 400; }
.game-info-bar .gib-item .gib-value { font-weight: 800; color: #fff; }

/* --- CATEGORY PAGE --- */
.category-header {
  padding: 24px 0;
  border-bottom: 4px solid #ff4500;
}

.category-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.category-header .ch-count {
  color: #ff4500;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 4px;
  text-transform: uppercase;
}

/* --- 404 PAGE --- */
.page-404 {
  text-align: center;
  padding: 80px 20px;
}

.page-404 h1 { font-size: clamp(5rem, 20vw, 12rem); color: #ff4500; line-height: 0.9; }
.page-404 h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); margin-bottom: 16px; }
.page-404 p { color: #aaa; margin-bottom: 28px; font-size: 1.05rem; text-transform: uppercase; }

/* --- PRIVACY / TERMS --- */
.page-legal {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 16px 80px;
}

.page-legal h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 4px solid #ff4500;
}

.page-legal h2 {
  font-size: 1.2rem;
  margin-top: 28px;
  margin-bottom: 10px;
  color: #ffd700;
}

.page-legal p, .page-legal li {
  font-size: 0.92rem;
  color: #bbb;
  line-height: 1.7;
  font-family: 'Inter', sans-serif;
  margin-bottom: 10px;
}

.page-legal ul { padding-left: 20px; list-style: disc; }
.page-legal li { margin-bottom: 6px; }
.page-legal strong { color: #fff; }

/* --- BREADCRUMB --- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #666;
  padding: 12px 0;
}

.breadcrumb a { color: #888; font-weight: 600; }
.breadcrumb a:hover { color: #ff4500; }
.breadcrumb .sep { color: #444; }

/* --- RESPONSIVE --- */

/* Tablet: ≤1024px */
@media (max-width: 1024px) {
  .game-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .site-footer .container { grid-template-columns: 1fr 1fr; }
}

/* Mobile: ≤768px */
@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .hamburger { display: flex; }

  .site-header .search-wrap { display: none; }
  .mobile-search-wrap {
    display: block;
    padding: 8px 16px;
    background: #000;
    border-bottom: 3px solid #ff4500;
  }
  .mobile-search-wrap input {
    width: 100%;
    padding: 10px 14px;
    background: #111;
    border: 3px solid #333;
    color: #fff;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    border-radius: 0;
  }
  .mobile-search-wrap input:focus { border-color: #ff4500; }

  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  .hero { padding: 16px 0 0; }
  .hero-title { font-size: clamp(1.8rem, 10vw, 2.8rem); }
  .hero-strip-card { flex: 0 0 120px; }

  .strip-card { flex: 0 0 140px; }

  .bottom-nav { display: flex; }
  .site-footer { padding-bottom: 70px; }
  .site-footer .container { grid-template-columns: 1fr; }
  .footer-col { border-top: 2px solid #222; padding-top: 16px; }

  .game-play-wrap { aspect-ratio: 16/10; }
}

/* Small mobile: ≤480px */
@media (max-width: 480px) {
  .hero-strip-card { flex: 0 0 105px; }
  .hero-strip-card .hsc-name { font-size: 0.6rem; }
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .game-card { padding: 8px; border-width: 3px; }
  .game-card .gc-name { font-size: 0.72rem; }
  .cat-pill { padding: 8px 14px; font-size: 0.7rem; }
  .strip-card { flex: 0 0 120px; }
  .btn { padding: 12px 20px; font-size: 0.85rem; }
  .hero-title { font-size: clamp(1.8rem, 10vw, 2.8rem); }
  .bottom-nav a { padding: 4px 4px; font-size: 0.55rem; }
  .bottom-nav a .bn-icon { font-size: 1.1rem; }
}

/* Very small mobile: ≤400px (e.g. 375px iPhone SE) */
@media (max-width: 400px) {
  .game-grid { grid-template-columns: 1fr; gap: 8px; }
  .game-card { padding: 10px; border-width: 3px; flex-direction: row; align-items: center; }
  .game-card .gc-img { width: 80px; height: 80px; aspect-ratio: 1/1; margin-bottom: 0; flex-shrink: 0; }
  .game-card .gc-info { padding-left: 10px; }
  .game-card .gc-name { font-size: 0.78rem; -webkit-line-clamp: 1; }
  .game-card .gc-meta { font-size: 0.65rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-sub { font-size: clamp(0.85rem, 3vw, 1rem); }
  .cat-pill { padding: 6px 12px; font-size: 0.65rem; }
  .strip-card { flex: 0 0 100px; padding: 6px; border-width: 3px; }
  .strip-card .sc-name { font-size: 0.65rem; }
  .site-footer { padding: 24px 0 70px; }
  .footer-col { padding-top: 12px; }
  .footer-col h4 { font-size: 0.75rem; }
  .footer-col a { font-size: 0.75rem; }
  .bottom-nav a { font-size: 0.5rem; padding: 4px 2px; gap: 1px; }
  .bottom-nav a .bn-icon { font-size: 1rem; }
  .section-title { font-size: clamp(1rem, 4vw, 1.2rem); padding: 8px 0; gap: 8px; }
}

/* Large desktop: ≥1200px */
@media (min-width: 1200px) {
  .game-grid { grid-template-columns: repeat(5, 1fr); }
}

/* Extra large: ≥1600px */
@media (min-width: 1600px) {
  .game-grid { grid-template-columns: repeat(6, 1fr); }
}

/* --- UTILITY --- */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }
