/* =============================================
   quickplayh5.xyz — theme.css
   Design: Clean Minimal Modern
   White / Teal / Soft Gray
   Mobile-first responsive
   ============================================= */

/* ---- Reset & Base ---- */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  background:#fff;
  color:#0f172a;
  line-height:1.6;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  overflow-x:hidden;
}
img{display:block;max-width:100%;height:auto}
a{color:inherit;text-decoration:none}
button,input{font:inherit;border:none;outline:none;background:none}
ul{list-style:none}

/* ---- Container ---- */
.container{width:100%;max-width:1120px;margin:0 auto;padding:0 20px}

/* ---- Header ---- */
.site-header{
  position:sticky;top:0;z-index:100;
  background:rgba(255,255,255,.92);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(226,232,240,.6);
}
.header-inner{
  display:flex;align-items:center;justify-content:space-between;
  height:60px;gap:16px;
}
.header-inner .logo{
  font-size:22px;font-weight:800;letter-spacing:-.3px;
  color:#0891b2;white-space:nowrap;
}
.header-inner .logo span{color:#0f172a}
.header-search{flex:1;max-width:420px;position:relative}
.header-search input{
  width:100%;height:40px;padding:0 16px 0 40px;
  border-radius:100px;background:#f1f5f9;
  font-size:14px;color:#0f172a;transition:.2s;
}
.header-search input::placeholder{color:#94a3b8}
.header-search input:focus{background:#e2e8f0}
.header-search .search-icon{
  position:absolute;left:14px;top:50%;transform:translateY(-50%);
  width:16px;height:16px;color:#94a3b8;pointer-events:none;
}
.header-actions{display:flex;align-items:center;gap:8px}

/* ---- Hamburger ---- */
.hamburger{
  width:36px;height:36px;display:flex;flex-direction:column;align-items:center;justify-content:center;
  cursor:pointer;border-radius:10px;transition:.2s;position:relative;
}
.hamburger:hover{background:#f1f5f9}
.hamburger span{
  display:block;width:20px;height:2px;border-radius:2px;
  background:#0f172a;transition:all .3s ease;transform-origin:center;
}
.hamburger span+span{margin-top:5px}
.hamburger span+span+span{margin-top:5px}
.hamburger.active span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.hamburger.active span:nth-child(2){opacity:0;transform:scaleX(0)}
.hamburger.active span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

/* ---- Mobile Drawer ---- */
.drawer-overlay{
  position:fixed;inset:0;z-index:200;background:rgba(15,23,42,.4);
  opacity:0;pointer-events:none;transition:opacity .3s;
}
.drawer-overlay.open{opacity:1;pointer-events:auto}
.drawer{
  position:fixed;top:0;right:0;bottom:0;width:300px;max-width:82vw;
  z-index:210;background:#fff;padding:24px 28px;
  transform:translateX(100%);transition:transform .35s cubic-bezier(.22,1,.36,1);
  overflow-y:auto;display:flex;flex-direction:column;
}
.drawer.open{transform:translateX(0)}
.drawer-close{
  align-self:flex-end;width:36px;height:36px;display:flex;align-items:center;justify-content:center;
  cursor:pointer;border-radius:10px;font-size:20px;color:#64748b;margin-bottom:12px;
}
.drawer-close:hover{background:#f1f5f9}
.drawer nav{display:flex;flex-direction:column;gap:4px;margin-bottom:32px}
.drawer nav a{
  display:flex;align-items:center;gap:10px;padding:10px 14px;
  border-radius:12px;font-size:15px;font-weight:500;color:#334155;transition:.15s;
}
.drawer nav a:hover{background:#f1f5f9;color:#0891b2}
.drawer nav a.active{background:#e8f4f8;color:#0891b2;font-weight:600}
.drawer-categories h3{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#94a3b8;margin-bottom:10px;padding:0 14px}
.drawer-categories .cat-chips{display:flex;flex-wrap:wrap;gap:8px;padding:0 4px}
.drawer-categories .cat-chips a{
  display:inline-block;padding:6px 14px;border-radius:100px;
  font-size:13px;font-weight:500;background:#f1f5f9;color:#334155;transition:.2s;
}
.drawer-categories .cat-chips a:hover{background:#0891b2;color:#fff}

/* ---- Bottom Nav (mobile only) ---- */
.bottom-nav{
  display:none;position:fixed;bottom:0;left:0;right:0;z-index:90;
  background:rgba(255,255,255,.92);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  border-top:1px solid rgba(226,232,240,.6);padding:6px 0 env(safe-area-inset-bottom,8px);
}
.bottom-nav ul{display:flex;justify-content:space-around;align-items:stretch}
.bottom-nav ul li{flex:1}
.bottom-nav ul li a{
  display:flex;flex-direction:column;align-items:center;gap:2px;
  padding:6px 0;font-size:11px;color:#94a3b8;transition:.15s;
}
.bottom-nav ul li a svg{width:22px;height:22px}
.bottom-nav ul li a.active{color:#0891b2}
.bottom-nav ul li a.active svg{stroke:#0891b2}
.bottom-nav ul li a span{font-weight:500}
@media(max-width:639px){.bottom-nav{display:block}}
@media(max-width:639px){.site-main{padding-bottom:70px}}

/* ---- Hero ---- */
.hero{
  position:relative;padding:56px 0 40px;text-align:center;
  background:linear-gradient(180deg,#f0f9ff 0%,#fff 100%);
}
.hero h1{font-size:clamp(28px,5vw,48px);font-weight:800;letter-spacing:-.5px;line-height:1.2;margin-bottom:10px}
.hero h1 span{color:#0891b2}
.hero p{font-size:clamp(15px,2vw,18px);color:#475569;max-width:520px;margin:0 auto 28px}
.hero-search{
  max-width:580px;margin:0 auto;position:relative;
}
.hero-search input{
  width:100%;height:56px;padding:0 60px 0 24px;
  border-radius:100px;border:2px solid #e2e8f0;
  font-size:16px;background:#fff;transition:.25s;box-shadow:0 2px 12px rgba(0,0,0,.04);
}
.hero-search input:focus{border-color:#0891b2;box-shadow:0 4px 24px rgba(8,145,178,.12)}
.hero-search .hero-search-btn{
  position:absolute;right:6px;top:50%;transform:translateY(-50%);
  width:44px;height:44px;border-radius:50%;background:#0891b2;
  display:flex;align-items:center;justify-content:center;cursor:pointer;
  color:#fff;transition:.2s;
}
.hero-search .hero-search-btn:hover{background:#0e7490}

/* ---- Category Chips ---- */
.cat-strip{padding:16px 0 0}
.cat-strip-inner{
  display:flex;gap:8px;overflow-x:auto;padding:4px 2px 12px;
  scrollbar-width:none;-ms-overflow-style:none;
}
.cat-strip-inner::-webkit-scrollbar{display:none}
.cat-chip{
  flex-shrink:0;display:inline-flex;align-items:center;gap:6px;
  padding:8px 18px;border-radius:100px;font-size:13px;font-weight:600;
  background:#f1f5f9;color:#475569;cursor:pointer;transition:.2s;
  white-space:nowrap;border:1.5px solid transparent;
}
.cat-chip:hover{background:#e2e8f0}
.cat-chip.active{background:#0891b2;color:#fff;border-color:#0891b2}
.cat-chip .chip-count{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:18px;height:18px;border-radius:9px;padding:0 5px;
  font-size:10px;font-weight:700;background:rgba(0,0,0,.1);color:inherit;
}
.cat-chip.active .chip-count{background:rgba(255,255,255,.25)}

/* ---- Section Titles ---- */
.section-title{
  font-size:20px;font-weight:700;margin-bottom:16px;display:flex;align-items:center;gap:8px;
}
.section-title .title-accent{
  display:inline-block;width:4px;height:22px;border-radius:4px;background:#0891b2;
}

/* ---- Horizontal Game Strips ---- */
.strip-section{margin-bottom:32px}
.strip-wrap{position:relative}
.strip-scroll{
  display:flex;gap:16px;overflow-x:auto;padding:4px 0 12px;
  scroll-behavior:smooth;scrollbar-width:none;-ms-overflow-style:none;
}
.strip-scroll::-webkit-scrollbar{display:none}

.game-card-strip{
  flex-shrink:0;width:180px;background:#fff;border-radius:16px;
  border:1px solid #f1f5f9;overflow:hidden;transition:transform .2s,box-shadow .2s;
  cursor:pointer;
}
.game-card-strip:hover{transform:translateY(-4px);box-shadow:0 12px 32px rgba(0,0,0,.08)}
.game-card-strip .thumb{
  width:100%;aspect-ratio:16/10;object-fit:cover;background:#f1f5f9;
}
.game-card-strip .info{padding:10px 12px 12px}
.game-card-strip .info h3{
  font-size:13px;font-weight:600;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.game-card-strip .info .meta{
  display:flex;align-items:center;justify-content:space-between;margin-top:4px;
}
.game-card-strip .info .rating{font-size:11px;color:#f59e0b;font-weight:600}
.game-card-strip .info .cat-tag{
  font-size:10px;color:#94a3b8;font-weight:600;text-transform:uppercase;
}

/* ---- Feed Section ---- */
.feed-section{padding:8px 0 24px}
.feed-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.feed-header .results-count{font-size:14px;color:#64748b}
.feed-grid{display:flex;flex-direction:column;gap:16px}

.game-card-feed{
  display:flex;gap:16px;padding:14px;background:#fff;border-radius:16px;
  border:1px solid #f1f5f9;cursor:pointer;transition:transform .2s,box-shadow .2s;
}
.game-card-feed:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.06)}
.game-card-feed .thumb{
  width:110px;height:78px;flex-shrink:0;border-radius:12px;object-fit:cover;background:#f1f5f9;
}
.game-card-feed .info{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center}
.game-card-feed .info h3{font-size:15px;font-weight:600;line-height:1.3;margin-bottom:2px}
.game-card-feed .info .desc{
  font-size:13px;color:#64748b;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.game-card-feed .info .meta{
  display:flex;align-items:center;gap:10px;margin-top:6px;font-size:12px;color:#94a3b8;
}
.game-card-feed .info .meta .rating{color:#f59e0b;font-weight:600}
.game-card-feed .info .play-badge{
  margin-left:auto;padding:3px 10px;border-radius:100px;
  background:#0891b2;color:#fff;font-size:11px;font-weight:600;
}

/* ---- Infinite Scroll Sentinel ---- */
.sentinel{width:100%;height:2px;margin-top:8px}

/* ---- Game Detail Page ---- */
.game-detail{padding:24px 0 40px}
.breadcrumb{
  display:flex;align-items:center;gap:6px;font-size:13px;color:#94a3b8;margin-bottom:20px;flex-wrap:wrap;
}
.breadcrumb a{color:#64748b}
.breadcrumb a:hover{color:#0891b2}
.breadcrumb .sep{color:#cbd5e1}

.game-player-wrap{
  background:#0f172a;border-radius:20px;overflow:hidden;margin-bottom:24px;
  position:relative;width:100%;aspect-ratio:16/9;max-height:520px;
}
.game-player-wrap iframe{
  width:100%;height:100%;border:none;
}
.game-player-wrap .play-overlay{
  position:absolute;inset:0;display:flex;flex-direction:column;
  align-items:center;justify-content:center;background:rgba(15,23,42,.7);
  cursor:pointer;transition:.3s;
}
.game-player-wrap .play-overlay .play-btn{
  width:72px;height:72px;border-radius:50%;background:#0891b2;
  display:flex;align-items:center;justify-content:center;transition:.2s;
  margin-bottom:12px;
}
.game-player-wrap .play-overlay:hover .play-btn{transform:scale(1.08);background:#0e7490}
.game-player-wrap .play-overlay span{color:#fff;font-size:15px;font-weight:600}

.game-info-card{
  background:#fff;border-radius:20px;padding:24px;border:1px solid #f1f5f9;margin-bottom:24px;
}
.game-info-card .game-title{font-size:24px;font-weight:700;margin-bottom:6px}
.game-info-card .game-meta{
  display:flex;align-items:center;gap:16px;flex-wrap:wrap;
  font-size:13px;color:#64748b;margin-bottom:16px;
}
.game-info-card .game-meta .rating{color:#f59e0b;font-weight:700}
.game-info-card .game-meta .cat-link{
  padding:3px 12px;border-radius:100px;background:#f1f5f9;font-weight:600;font-size:11px;color:#0891b2;text-transform:uppercase;
}
.game-info-card .game-desc{
  font-size:15px;color:#475569;line-height:1.7;white-space:pre-wrap;overflow-wrap:break-word;
}
.game-info-card .game-actions{display:flex;gap:12px;margin-top:20px}
.game-info-card .game-actions .btn-play{
  padding:12px 32px;border-radius:100px;background:#0891b2;color:#fff;
  font-size:15px;font-weight:600;cursor:pointer;transition:.2s;
}
.game-info-card .game-actions .btn-play:hover{background:#0e7490}
.game-info-card .game-actions .btn-share{
  padding:12px 20px;border-radius:100px;border:1.5px solid #e2e8f0;
  font-size:14px;font-weight:500;color:#475569;cursor:pointer;transition:.2s;
}
.game-info-card .game-actions .btn-share:hover{background:#f1f5f9}

/* ---- Category Page ---- */
.category-header{
  padding:32px 0 8px;text-align:center;
}
.category-header h1{font-size:clamp(24px,4vw,36px);font-weight:800;margin-bottom:6px}
.category-header p{color:#64748b;font-size:15px}
.category-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
  gap:16px;padding:24px 0 40px;
}
.game-card-grid{
  background:#fff;border-radius:16px;border:1px solid #f1f5f9;
  overflow:hidden;cursor:pointer;transition:transform .2s,box-shadow .2s;
}
.game-card-grid:hover{transform:translateY(-4px);box-shadow:0 12px 32px rgba(0,0,0,.08)}
.game-card-grid .thumb{
  width:100%;aspect-ratio:16/10;object-fit:cover;background:#f1f5f9;
}
.game-card-grid .info{padding:10px 12px 12px}
.game-card-grid .info h3{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.game-card-grid .info .meta{
  display:flex;align-items:center;justify-content:space-between;margin-top:4px;
}
.game-card-grid .info .rating{font-size:11px;color:#f59e0b;font-weight:600}
.game-card-grid .info .cat-tag{font-size:10px;color:#94a3b8;font-weight:600;text-transform:uppercase}

/* ---- 404 Page ---- */
.page-404{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:60px 20px}
.page-404 h1{font-size:clamp(80px,15vw,140px);font-weight:900;color:#0891b2;line-height:1;margin-bottom:8px}
.page-404 h2{font-size:clamp(20px,3vw,28px);font-weight:700;margin-bottom:10px}
.page-404 p{color:#64748b;margin-bottom:28px;max-width:360px}
.page-404 .btn-home{
  padding:12px 32px;border-radius:100px;background:#0891b2;color:#fff;
  font-size:15px;font-weight:600;cursor:pointer;transition:.2s;
}
.page-404 .btn-home:hover{background:#0e7490}

/* ---- Static Pages ---- */
.static-page{flex:1;padding:40px 0 60px;max-width:720px;margin:0 auto}
.static-page h1{font-size:28px;font-weight:800;margin-bottom:20px}
.static-page h2{font-size:20px;font-weight:700;margin:28px 0 12px}
.static-page p,.static-page li{color:#475569;font-size:15px;line-height:1.75;margin-bottom:10px}
.static-page ul{padding-left:20px;margin-bottom:16px}
.static-page strong{color:#0f172a}
.static-page a{color:#0891b2;font-weight:500}
.static-page a:hover{text-decoration:underline}

/* ---- Footer ---- */
.site-footer{
  margin-top:auto;background:#0f172a;color:#94a3b8;font-size:13px;
}
.footer-inner{padding:32px 0;display:flex;flex-wrap:wrap;gap:24px;justify-content:space-between}
.footer-brand .logo{font-size:20px;font-weight:800;color:#fff;margin-bottom:6px}
.footer-brand .logo span{color:#0891b2}
.footer-brand p{max-width:280px;line-height:1.6}
.footer-links{display:flex;gap:32px;flex-wrap:wrap}
.footer-links .col{display:flex;flex-direction:column;gap:8px}
.footer-links .col h4{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#64748b;margin-bottom:4px}
.footer-links .col a{color:#94a3b8;transition:.15s}
.footer-links .col a:hover{color:#fff}
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.06);padding:16px 0;
  display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;
}

/* ---- Loading Skeleton ---- */
.skeleton{background:linear-gradient(90deg,#f1f5f9 25%,#e2e8f0 50%,#f1f5f9 75%);background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:8px}
@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* ---- Empty State ---- */
.empty-state{text-align:center;padding:48px 20px}
.empty-state svg{width:56px;height:56px;color:#cbd5e1;margin-bottom:12px}
.empty-state h3{font-size:18px;font-weight:600;color:#334155;margin-bottom:4px}
.empty-state p{font-size:14px;color:#94a3b8}

/* ---- Toast ---- */
.toast{
  position:fixed;bottom:100px;left:50%;transform:translateX(-50%) translateY(20px);
  z-index:999;background:#0f172a;color:#fff;padding:12px 24px;border-radius:12px;
  font-size:14px;font-weight:500;opacity:0;pointer-events:none;
  transition:all .35s cubic-bezier(.22,1,.36,1);
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
@media(min-width:640px){.toast{bottom:40px}}

/* ---- Scroll to Top ---- */
.scroll-top{
  position:fixed;bottom:80px;right:20px;z-index:80;
  width:42px;height:42px;border-radius:50%;background:#fff;
  border:1px solid #e2e8f0;box-shadow:0 4px 12px rgba(0,0,0,.08);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;opacity:0;pointer-events:none;transition:.3s;
  color:#64748b;
}
.scroll-top.visible{opacity:1;pointer-events:auto}
.scroll-top:hover{background:#f1f5f9}
@media(min-width:640px){.scroll-top{bottom:40px;right:32px}}

/* ---- Filter Bar (Category) ---- */
.filter-bar{
  display:flex;gap:8px;overflow-x:auto;padding:12px 0 4px;
  scrollbar-width:none;-ms-overflow-style:none;
}
.filter-bar::-webkit-scrollbar{display:none}
.filter-bar .filter-chip{
  flex-shrink:0;padding:7px 18px;border-radius:100px;font-size:13px;font-weight:600;
  background:#f1f5f9;color:#475569;cursor:pointer;transition:.2s;white-space:nowrap;
}
.filter-bar .filter-chip:hover{background:#e2e8f0}
.filter-bar .filter-chip.active{background:#0891b2;color:#fff}

/* ---- Responsive ---- */
@media(max-width:480px){
  .category-grid{grid-template-columns:repeat(2,1fr)}
  .game-info-card .game-actions{flex-wrap:wrap}
}
@media(min-width:640px){
  .game-card-feed .thumb{width:150px;height:100px}
  .game-card-strip{width:200px}
  .category-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:20px}
}
@media(min-width:768px){
  .game-info-card{padding:32px}
  .game-info-card .game-title{font-size:28px}
}
@media(min-width:1024px){
  .hero{padding:72px 0 48px}
  .game-card-strip{width:220px}
  .category-grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:24px}
}
