/* ==============================
   H5BROS - Poki-Style Design
   ============================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=Outfit:wght@700;800;900&display=swap');

/* === CSS Variables === */
:root {
  --bg-page: #20c2d4;
  --bg-gradient-top: #0fb8cc;
  --bg-gradient-mid: #24cce0;
  --bg-gradient-bottom: #1abcd0;
  --white: #ffffff;
  --white-soft: #f5fbfc;
  --black: #000000;
  --nav-island-bg: #ffffff;
  --nav-island-radius: 22px;
  --sidebar-bg: rgba(255, 255, 255, 0.18);
  --sidebar-active: #ffffff;
  --sidebar-width: 196px;
  --card-radius: 10px;
  --card-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  --card-shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.35);
  --text-dark: #1a1a2e;
  --text-medium: #3a3a5c;
  --text-light: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --accent: #0fb0c4;
  --accent-dark: #0897aa;
  --nav-height: 60px;
  --left-col-width: 196px;
  --card-gap: 10px;
  --font-main: 'Nunito', 'Segoe UI', sans-serif;
  --transition-fast: 0.15s ease;
  --transition-med: 0.22s ease;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

/* === Dark Mode === */
html.dark {
  --bg-page: #0d1117;
  --bg-gradient-top: #0d1117;
  --bg-gradient-mid: #161b22;
  --bg-gradient-bottom: #0d1117;
  --nav-island-bg: #21262d;
  --sidebar-bg: rgba(255, 255, 255, 0.07);
  --sidebar-active: #ffffff;
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  --card-shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.7);
  --text-dark: #e6edf3;
  --text-medium: #8b949e;
  --accent: #20c2d4;
  --accent-dark: #0fb8cc;
}
html.dark body { background: var(--bg-page); color: var(--text-dark); }
html.dark body::before {
  background: radial-gradient(circle at 20% 20%, rgba(15, 184, 204, 0.05) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.3) 0%, transparent 50%);
}
html.dark .bg-pattern { opacity: 0.05; }
html.dark .left-col { background: rgba(255,255,255,0.04); }
html.dark .search-island { background: #21262d; border-color: rgba(255,255,255,0.12); }
html.dark .search-island input { color: #e6edf3; }
html.dark .search-island input::placeholder { color: #555; }
html.dark .category-card { background: #21262d; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
html.dark .category-card-label { color: #e6edf3; }
html.dark .site-footer { background: rgba(0,0,0,0.4); }
html.dark .mobile-topbar { background: #161b22; }
html.dark .mobile-drawer { background: #0d1117; }
html.dark .mobile-hamburger, html.dark .mobile-search-btn { background: #21262d; }
html.dark .mobile-hamburger span { background: #e6edf3; }
html.dark .btn-show-more { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }

/* Dark Mode Toggle */
#theme-toggle { width: 100%; text-align: left; cursor: pointer; font-family: var(--font-main); font-size: 0.875rem; }
.theme-toggle-btn { background: rgba(255,255,255,0.1); border: 1.5px solid rgba(255,255,255,0.25); margin: 2px 0 6px; }
.theme-toggle-btn:hover { background: rgba(255,255,255,0.22) !important; }

body {
  font-family: var(--font-main);
  background: var(--bg-page);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  color: var(--text-dark);
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; background: none; }
input { font-family: inherit; outline: none; border: none; background: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.4); border-radius: 99px; }
.left-col::-webkit-scrollbar { display: block; width: 3px; }
.left-col { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.3) transparent; }

/* Background Pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.bg-pattern {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpolygon points='0,0 20,0 0,20' fill='white'/%3E%3Crect x='40' y='10' width='8' height='8' fill='white' opacity='0.6'/%3E%3Ccircle cx='60' cy='60' r='4' fill='white' opacity='0.5'/%3E%3Cpolygon points='70,30 80,30 80,40 70,40' fill='white' opacity='0.4'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* === PAGE LAYOUT === */
.layout {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: var(--left-col-width) 1fr;
  min-height: 100vh;
}

/* Left Sidebar */
.left-col {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 10px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  flex-shrink: 0;
}
.left-col::-webkit-scrollbar { width: 3px; }
.left-col::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); border-radius: 99px; }

/* Logo Island */
.poki-logo-island {
  background: transparent; border-radius: var(--nav-island-radius);
  padding: 12px 14px; display: flex; align-items: center; justify-content: flex-start; margin-bottom: 4px;
}
.logo-link { display: flex; align-items: center; gap: 8px; font-size: 1.25rem; font-weight: 900; color: var(--text-dark); }
.logo-icon {
  width: 40px; height: 40px; background-color: #0fb8cc;
  background-image: url('../favicon.svg'); background-size: 85%;
  background-repeat: no-repeat; background-position: center;
  border-radius: 10px; flex-shrink: 0; user-select: none; font-size: 0;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: logo-drop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes logo-drop {
  0% { transform: scale(0.5) rotate(-12deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.logo-link:hover .logo-icon { transform: scale(1.15) rotate(-6deg); }
.logo-link:active .logo-icon { transform: scale(0.9); }
.logo-text {
  font-family: 'Outfit', 'Nunito', sans-serif; font-size: 1.2rem; font-weight: 800;
  letter-spacing: -0.02em; white-space: nowrap;
  background: linear-gradient(135deg, #0897aa 0%, #0fb8cc 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.left-col .logo-text, .mobile-drawer .logo-text, .mobile-topbar .logo-text {
  background: none; -webkit-text-fill-color: #ffffff; color: #ffffff;
}

/* Search Island */
.search-island {
  background: #ffffff; border-radius: 16px; padding: 10px 14px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18); border: 1.5px solid rgba(255, 255, 255, 0.9);
  transition: var(--transition-fast); position: relative;
}
.search-island:focus-within, .search-island:hover { box-shadow: 0 5px 16px rgba(0, 0, 0, 0.22); }
.search-island input { flex: 1; font-size: 0.875rem; font-weight: 600; color: #1a1a2e; min-width: 0; background: transparent; }
.search-island input::placeholder { color: #999; font-weight: 500; }
.search-island-icon { color: #999; font-size: 0.95rem; flex-shrink: 0; }

/* Nav Items */
.left-nav-section { margin-top: 4px; }
.left-nav-label {
  font-size: 0.68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.6); padding: 6px 10px 4px;
}
.left-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px;
  font-size: 0.875rem; font-weight: 700; color: rgba(255, 255, 255, 0.9);
  transition: var(--transition-fast); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.left-nav-item:hover, .left-nav-item.active { background: rgba(255, 255, 255, 0.22); color: #fff; }
.left-nav-item .nav-icon { font-size: 1.1rem; flex-shrink: 0; }

/* Main Content */
.main-content { padding: 12px 12px 40px 0; min-width: 0; }

/* === CAROUSELS === */
.carousel-wrap { position: relative; margin: 0; }
.carousel-track {
  display: flex; gap: 10px; overflow-x: auto; scroll-behavior: smooth;
  padding: 6px 0 10px; scrollbar-width: none; -ms-overflow-style: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); border: 2px solid rgba(255, 255, 255, 0.25);
  color: #fff; font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 20; transition: background 0.15s ease, transform 0.15s ease;
  backdrop-filter: blur(4px); line-height: 1; margin-top: -4px;
}
.carousel-btn:hover { background: rgba(0, 0, 0, 0.8); transform: translateY(-50%) scale(1.1); }
.carousel-btn--prev { left: 0; }
.carousel-btn--next { right: 0; }
.carousel-btn.hidden { display: none; }
.cat-strip-wrap { position: relative; margin-bottom: 18px; }

/* === GAME CARDS === */
.game-card {
  flex: 0 0 auto; width: 405px; height: 270px; border-radius: var(--card-radius);
  overflow: hidden; cursor: pointer; transition: transform var(--transition-med), box-shadow var(--transition-med);
  position: relative; background: #b0d8dc; box-shadow: var(--card-shadow); display: block; text-decoration: none;
}
.game-card--portrait { width: 203px; height: 270px; }
.game-card:hover { transform: scale(1.05) translateZ(0); box-shadow: var(--card-shadow-hover); z-index: 10; }
.game-card-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: opacity var(--transition-med); position: absolute; inset: 0; z-index: 1;
}
.game-card-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.3s ease; pointer-events: none; z-index: 2;
}
.game-card:hover .game-card-video { opacity: 1; }
.game-card:hover .game-card-img { opacity: 0; }

/* Badges */
.card-new-badge, .card-hot-badge {
  position: absolute; top: 6px; left: 6px;
  background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 0.62rem; font-weight: 800;
  padding: 3px 8px; border-radius: 6px; text-transform: uppercase;
  letter-spacing: 0.04em; backdrop-filter: blur(4px); z-index: 5;
}

/* Title Bar — visible on touch, hover reveals on desktop */
.game-card-title-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 22px 8px 7px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.80));
  color: #fff; font-size: 0.7rem; font-weight: 700; opacity: 0;
  transition: opacity var(--transition-med); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; z-index: 4; letter-spacing: 0.01em;
}
.game-card:hover .game-card-title-bar { opacity: 1; }
/* Always show titles on touch devices */
@media (hover: none) {
  .game-card-title-bar { opacity: 1; }
}

/* Heart Button */
.card-heart {
  position: absolute; top: 6px; right: 6px; z-index: 10;
  background: rgba(0,0,0,0.45); border: none; border-radius: 50%;
  width: 28px; height: 28px; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 1; transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s;
  backdrop-filter: blur(4px); line-height: 1; padding: 0;
}
.game-card:hover .card-heart, .card-heart--active { opacity: 1; }
.card-heart:hover { background: rgba(0,0,0,0.7); transform: scale(1.15); }
.card-heart--active { background: rgba(220, 50, 80, 0.75); }

/* === SECTION HEADERS === */
.section-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.25); backdrop-filter: blur(6px);
  border-radius: 99px; padding: 7px 16px 7px 10px;
  font-size: 0.875rem; font-weight: 800; color: #fff;
  margin-bottom: 10px; border: 1.5px solid rgba(255, 255, 255, 0.35);
}
.section-pill .section-icon { font-size: 1rem; }

/* === CATEGORY CARDS === */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.category-card {
  background: var(--white); border-radius: 18px; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  transition: transform var(--transition-med), box-shadow var(--transition-med);
  text-decoration: none; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.category-card:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16); }
.category-card-icon { font-size: 1.6rem; flex-shrink: 0; }
.category-card-label { font-size: 0.875rem; font-weight: 800; color: var(--text-dark); line-height: 1.2; word-break: break-word; }

/* === CATEGORY STRIP === */
.cat-strip {
  display: flex; flex-direction: row; gap: 10px; overflow-x: auto; scroll-behavior: smooth;
  padding: 4px 2px 10px; scrollbar-width: none; -ms-overflow-style: none;
}
.cat-strip::-webkit-scrollbar { display: none; }
.cat-strip-card {
  flex: 0 0 auto; min-width: 140px; height: 80px; border-radius: 14px;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 10px 12px; cursor: pointer; text-decoration: none;
  position: relative; overflow: hidden;
  transition: transform var(--transition-med), box-shadow var(--transition-med);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}
.cat-strip-card:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); }
.cat-strip-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.2) 100%);
  pointer-events: none;
}
.cat-strip-card-label {
  font-size: 0.82rem; font-weight: 900; color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); line-height: 1.2; z-index: 1;
  max-width: 70%; letter-spacing: 0.01em;
}
.cat-strip-card-icon { font-size: 1.6rem; z-index: 1; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3)); flex-shrink: 0; }

/* === GRID SECTION === */
.grid-section { margin-bottom: 24px; }

/* === MORE GAMES GRID === */
.more-games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.more-games-grid .game-card, .more-games-grid .mgrid-card {
  flex: none; width: 100%; height: 0; padding-bottom: 66.66%; position: relative;
}
.more-games-grid .game-card .game-card-img, .more-games-grid .game-card .game-card-video,
.more-games-grid .mgrid-card .game-card-img, .more-games-grid .mgrid-card .game-card-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}

/* === SHOW MORE === */
.show-more-row { display: flex; justify-content: center; padding: 16px 0; }
.btn-show-more {
  background: rgba(255, 255, 255, 0.25); border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 99px; padding: 10px 32px; font-size: 0.875rem; font-weight: 800;
  color: #fff; cursor: pointer; transition: var(--transition-med); backdrop-filter: blur(6px);
}
.btn-show-more:hover { background: rgba(255, 255, 255, 0.38); transform: translateY(-2px); }

/* === FOOTER === */
.site-footer {
  background: rgba(0, 0, 0, 0.15); border-radius: 20px; padding: 24px;
  margin: 16px 0 0; backdrop-filter: blur(8px);
  display: flex; flex-direction: column; gap: 4px;
}
.site-footer--full {
  border-radius: 0; margin: 0; position: relative; z-index: 1;
  padding: 24px 24px 24px calc(var(--left-col-width) + 24px);
}
@media (max-width: 860px) { .site-footer--full { padding: 24px; } }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 8px; }
.footer-links a { font-size: 0.8rem; font-weight: 600; color: rgba(255, 255, 255, 0.7); transition: var(--transition-fast); }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 0.75rem; color: rgba(255, 255, 255, 0.5); }
.footer-desc { font-size: 0.78rem; color: rgba(255, 255, 255, 0.9); line-height: 1.6; margin: 10px 0 8px; width: 100%; flex-basis: 100%; }

/* === MOBILE TOP BAR === */
.mobile-topbar {
  display: none; position: sticky; top: 0; z-index: 100;
  background: #0fb8cc; padding: 10px 16px; align-items: center; gap: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.mobile-topbar .logo-link { font-size: 1.1rem; }
.mobile-search-btn {
  width: 36px; height: 36px; background: #f0f0f5; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin-left: auto; font-size: 1rem; cursor: pointer;
}
.mobile-hamburger {
  width: 36px; height: 36px; background: #f0f0f5; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
}
.mobile-hamburger span { display: block; width: 16px; height: 2px; background: var(--text-dark); border-radius: 2px; }

/* Mobile Drawer */
.mobile-drawer {
  display: none; position: fixed; top: 0; left: 0; width: 240px; height: 100vh;
  background: var(--bg-page); z-index: 200; padding: 20px 12px;
  flex-direction: column; gap: 4px; overflow-y: auto;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2); transform: translateX(-100%); transition: transform var(--transition-med);
}
.mobile-drawer.open { display: flex; transform: translateX(0); }
.drawer-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 199; }
.drawer-overlay.show { display: block; }

/* Mobile Search Overlay */
.mobile-search-overlay {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: rgba(0, 0, 0, 0.5); padding: 70px 16px 20px; backdrop-filter: blur(4px);
}
.mobile-search-overlay.open { display: block; }
.mobile-search-overlay-inner { background: #fff; border-radius: 16px; padding: 12px 16px; display: flex; align-items: center; gap: 10px; }
.mobile-search-overlay input { flex: 1; font-size: 1rem; font-weight: 600; color: #1a1a2e; font-family: var(--font-main); outline: none; border: none; }
.mobile-search-overlay-close { font-size: 1.3rem; cursor: pointer; color: #999; }

/* === SEARCH HERO === */
.search-hero-form {
  display: flex; align-items: center; gap: 10px;
  background: #ffffff; border: 2px solid rgba(255, 255, 255, 0.9); border-radius: 99px;
  padding: 10px 10px 10px 20px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  max-width: 560px; transition: box-shadow 0.2s ease;
}
.search-hero-form:focus-within { box-shadow: 0 6px 28px rgba(0, 0, 0, 0.18); }
.search-hero-input { flex: 1; background: transparent; border: none; color: #1a1a2e; font-size: 1rem; font-weight: 600; font-family: var(--font-main); min-width: 0; }
.search-hero-input::placeholder { color: #aaa; }
.search-hero-btn {
  padding: 9px 22px; background: var(--accent); border-radius: 99px; color: #fff;
  font-size: 0.875rem; font-weight: 800; flex-shrink: 0;
  transition: opacity 0.15s ease, transform 0.15s ease; font-family: var(--font-main); border: none; cursor: pointer;
}
.search-hero-btn:hover { opacity: 0.9; transform: scale(1.03); }

/* === SEARCH AUTOCOMPLETE === */
.search-autocomplete {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #ffffff; border-radius: 14px; box-shadow: 0 8px 28px rgba(0,0,0,0.2);
  z-index: 500; overflow: hidden; display: none; flex-direction: column;
}
.search-autocomplete.open { display: flex; }
html.dark .search-autocomplete { background: #21262d; }
.ac-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; text-decoration: none;
  color: #1a1a2e; font-size: 0.82rem; font-weight: 700;
  transition: background 0.12s; border-bottom: 1px solid rgba(0,0,0,0.06);
}
html.dark .ac-item { color: #e6edf3; border-color: rgba(255,255,255,0.06); }
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item--active { background: rgba(15,184,204,0.12); }
.ac-thumb { width: 36px; height: 24px; object-fit: cover; border-radius: 5px; flex-shrink: 0; background: #ddd; }

/* === SKELETON === */
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 25%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0.2) 75%);
  background-size: 800px 100%; animation: shimmer 1.4s infinite; border-radius: var(--card-radius);
}

/* === BACK TO TOP === */
#back-to-top {
  position: fixed; bottom: 90px; right: 20px; z-index: 999;
  width: 44px; height: 44px; border-radius: 50%; background: #0fb8cc;
  color: #fff; border: none; font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(15, 184, 204, 0.45);
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease;
}
#back-to-top.visible { opacity: 1; pointer-events: auto; }
#back-to-top:hover { transform: scale(1.1) translateY(-2px); }

/* === SCROLL PROGRESS === */
#scroll-progress {
  position: fixed; top: 0; left: 0; width: 0%; height: 3px;
  background: linear-gradient(90deg, #0fb8cc, #20e8ff);
  z-index: 99999; transition: width 0.1s linear; border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(15, 184, 204, 0.6);
}

/* === PAGE TRANSITIONS === */
.page-fade-in { animation: pageFadeIn 0.3s ease both; }
.page-fade-out { animation: pageFadeOut 0.22s ease both; }
@keyframes pageFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pageFadeOut { from { opacity: 1; } to { opacity: 0; } }

/* === TOAST === */
#h5bros-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 99998; background: #0d1117; color: #fff;
  font-size: 0.875rem; font-weight: 700; padding: 10px 22px; border-radius: 99px;
  border: 1.5px solid #0fb8cc; box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.34,1.56,0.64,1);
  white-space: nowrap; font-family: var(--font-main);
}
#h5bros-toast.toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* === SURPRISE ME === */
.surprise-btn {
  background: linear-gradient(135deg, #0fb8cc22, #6c5ce722);
  border: 1.5px solid rgba(255,255,255,0.3); border-radius: 14px;
  font-weight: 800; color: #fff !important; transition: background 0.2s, transform 0.15s; margin: 4px 0;
}
.surprise-btn:hover { background: linear-gradient(135deg, #0fb8cc44, #6c5ce744) !important; transform: scale(1.03); }

/* === PWA BANNER === */
#pwa-banner {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  z-index: 9999; background: #0a0f1e; border: 1.5px solid #0fb8cc; border-radius: 20px;
  padding: 12px 16px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 8px 32px rgba(15,184,204,0.25); font-family: var(--font-main);
  max-width: 380px; width: calc(100% - 32px); animation: slideUp 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes slideUp { from { transform: translateX(-50%) translateY(40px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
.pwa-icon { font-size: 1.6rem; flex-shrink: 0; }
.pwa-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pwa-text strong { font-size: 0.875rem; color: #fff; font-weight: 800; }
.pwa-text span { font-size: 0.75rem; color: rgba(255,255,255,0.6); }
#pwa-install-btn {
  background: #0fb8cc; color: #fff; border: none; border-radius: 99px;
  padding: 8px 18px; font-size: 0.8rem; font-weight: 800; cursor: pointer;
  white-space: nowrap; font-family: var(--font-main); transition: background 0.15s, transform 0.15s;
}
#pwa-install-btn:hover { background: #0897aa; transform: scale(1.04); }
#pwa-dismiss-btn { background: transparent; border: none; color: rgba(255,255,255,0.4); font-size: 1rem; cursor: pointer; padding: 4px; flex-shrink: 0; }
#pwa-dismiss-btn:hover { color: rgba(255,255,255,0.8); }

/* === UTILITIES === */
.hidden { display: none !important; }

/* === RESPONSIVE === */
@media (max-width: 1100px) { .game-card { width: 330px; height: 220px; } }
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .left-col { display: none; }
  .mobile-topbar { display: flex; }
  .main-content { padding: 12px 12px 40px; }
  .game-card { width: 240px; height: 160px; }
  .game-card--portrait { width: 129px; height: 173px; }
  .carousel-btn { width: 28px; height: 28px; font-size: 0.85rem; }
  .cat-strip { gap: 8px; }
  .cat-strip-card { min-width: 130px; height: 72px; }
  .more-games-grid { grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); gap: 10px; }
  .category-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .footer-links { gap: 5px 14px; }
}
@media (max-width: 480px) {
  .game-card { width: 195px; height: 130px; }
  .game-card--portrait { width: 105px; height: 140px; }
  .cat-strip-card { min-width: 110px; height: 62px; }
  .more-games-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .category-card { padding: 10px 12px; gap: 10px; }
  .category-card-icon { font-size: 1.3rem; }
  .section-pill { font-size: 0.78rem; }
  .btn-show-more { padding: 10px 20px; font-size: 0.8rem; }
  .poki-logo-island { padding: 10px 12px; }
}
