/*
Theme Name: VexMOD
Theme URI: https://example.com
Author: You
Description: Dark game-catalog theme with a "Games" post type, categories, search, ratings and store links.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: vexmod
*/
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
body{font-family:'Nunito',sans-serif;background:#0f0d1a;color:#fff;min-height:100vh}
a{text-decoration:none;color:inherit}
button{cursor:pointer;border:none;background:none;font-family:inherit}
input{font-family:inherit;outline:none}
img{max-width:100%;display:block}

/* Header */
.header{position:sticky;top:0;z-index:40;background:rgba(20,16,40,0.97);border-bottom:1px solid rgba(255,255,255,0.07);backdrop-filter:blur(12px)}
.header-inner{max-width:1400px;margin:0 auto;padding:0 12px;display:flex;align-items:center;justify-content:space-between;height:56px}
.logo{display:flex;align-items:center;gap:10px;flex-shrink:0}
.logo-icon{width:36px;height:36px;border-radius:10px;background:linear-gradient(135deg,#ef4444,#dc2626);display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0}
.logo-icon img{width:26px;height:26px;object-fit:contain}
.logo-text{font-weight:900;font-size:17px;line-height:1}
.logo-text span:first-child{color:#fff}
.logo-text span:last-child{color:#06b6d4}
.logo-sub{font-size:10px;font-weight:700;color:rgba(255,255,255,0.4);letter-spacing:.1em;display:none}
.desktop-nav{display:none;align-items:center;gap:6px;padding:6px;border-radius:9999px;background:rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.08)}
.nav-pill{border-radius:9999px;padding:6px 16px;font-weight:700;font-size:13px;color:rgba(255,255,255,0.7);transition:all .2s;display:flex;align-items:center;gap:5px;white-space:nowrap;background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.1)}
.nav-pill:hover{background:rgba(255,255,255,0.12);color:#fff}
.nav-pill.active{background:linear-gradient(135deg,#ef4444,#dc2626);border-color:transparent;color:#fff;box-shadow:0 0 14px rgba(239,68,68,0.4)}
.lang-btn{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:9999px;background:rgba(255,255,255,0.07);border:1px solid rgba(255,255,255,0.12);min-height:40px;font-size:13px;font-weight:700;color:#fff}
.lang-flag{width:22px;height:22px;border-radius:50%;overflow:hidden;flex-shrink:0;border:1px solid rgba(255,255,255,0.2)}
.lang-flag img{width:100%;height:100%;object-fit:cover}

/* Main */
.main{max-width:1400px;margin:0 auto;padding:16px 12px 32px}

/* Search */
.search-wrap{position:relative;max-width:640px;margin:0 auto 20px}
.search-icon{position:absolute;left:16px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:rgba(255,255,255,0.35);pointer-events:none}
.search-bar{width:100%;background:rgba(255,255,255,0.06);border:1.5px solid rgba(255,255,255,0.1);border-radius:9999px;padding:13px 20px 13px 46px;color:#fff;font-size:14px;min-height:48px;transition:border-color .2s,background .2s}
.search-bar::placeholder{color:rgba(255,255,255,0.4)}
.search-bar:focus{border-color:rgba(239,68,68,0.5);background:rgba(255,255,255,0.09)}

/* Section title */
.section-title{font-size:18px;font-weight:900;color:#fff;margin-bottom:16px}

/* Category chips */
.cat-chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:20px}
.cat-chip{display:flex;align-items:center;gap:6px;padding:0 14px;height:44px;border-radius:9999px;font-size:13px;font-weight:700;color:rgba(255,255,255,0.65);background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.1);transition:all .2s;white-space:nowrap}
.cat-chip:hover{background:rgba(255,255,255,0.1);color:#fff}
.cat-chip.active{background:linear-gradient(135deg,#ef4444,#dc2626);color:#fff;border-color:transparent;box-shadow:0 4px 14px rgba(239,68,68,0.4)}
.cat-chip svg{width:14px;height:14px;flex-shrink:0}
.cat-count{font-size:11px;opacity:.6;margin-left:2px}

/* Games grid */
.games-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-bottom:32px}
.game-card{background:linear-gradient(160deg,#1e1a3c 0%,#16132d 100%);border:1px solid rgba(255,255,255,0.07);border-radius:16px;overflow:hidden;transition:transform .25s,box-shadow .25s;display:flex;flex-direction:column;cursor:pointer}
.game-card:hover{transform:translateY(-4px);box-shadow:0 12px 40px rgba(0,0,0,0.5)}
.game-card-img{position:relative;aspect-ratio:1;overflow:hidden;background:#1a1530}
.game-card-img img{width:100%;height:100%;object-fit:cover}
.card-badges{position:absolute;top:8px;left:8px;display:flex;flex-direction:column;gap:4px}
.badge-mod{background:linear-gradient(135deg,#f97316,#ef4444);color:#fff;font-size:10px;font-weight:800;padding:2px 8px;border-radius:9999px;display:inline-flex;align-items:center;gap:3px;text-transform:uppercase;letter-spacing:.05em}
.badge-new{background:linear-gradient(135deg,#10b981,#059669);color:#fff;font-size:10px;font-weight:800;padding:2px 8px;border-radius:9999px;display:inline-flex;align-items:center;gap:3px;text-transform:uppercase;letter-spacing:.05em}
.badge-rating{position:absolute;top:8px;right:8px;background:rgba(15,13,26,0.8);border:1px solid rgba(255,255,255,0.15);color:#fff;font-size:11px;font-weight:800;padding:2px 8px;border-radius:9999px;display:inline-flex;align-items:center;gap:3px}
.game-card-info{padding:10px;display:flex;flex-direction:column;flex:1}
.game-card-version{font-size:10px;font-weight:600;color:rgba(255,255,255,0.45);margin-bottom:2px}
.game-card-name{font-weight:800;font-size:12px;color:#fff;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;flex:1;line-height:1.3;margin-bottom:8px}
.game-card-free{font-size:11px;font-weight:700;color:#06b6d4;margin-bottom:10px}
.get-btn{background:linear-gradient(135deg,#06b6d4,#3b82f6);color:#fff;font-weight:800;font-size:13px;border-radius:9999px;padding:10px 0;min-height:44px;width:100%;display:flex;align-items:center;justify-content:center;gap:6px;box-shadow:0 4px 20px rgba(6,182,212,0.35);transition:all .2s;touch-action:manipulation}
.get-btn:hover{box-shadow:0 6px 28px rgba(6,182,212,0.55);transform:translateY(-1px)}
.get-btn svg{width:14px;height:14px}

/* Empty state */
.empty-state{grid-column:1/-1;text-align:center;padding:60px 20px}
.empty-state svg{width:48px;height:48px;margin:0 auto 12px;opacity:.2}
.empty-state p{font-size:15px;font-weight:700;color:rgba(255,255,255,0.4)}

/* GAME DETAIL */
.detail-view{display:block;min-height:100vh;background:linear-gradient(160deg,#0f0d1a 0%,#130f24 50%,#0a0814 100%);animation:fadeIn .3s ease}
.detail-back{max-width:1000px;margin:0 auto;padding:16px 12px 8px}
.back-btn{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:700;color:rgba(255,255,255,0.6);min-height:44px;transition:opacity .2s;touch-action:manipulation}
.back-btn:hover{opacity:.7}
.back-btn svg{width:16px;height:16px}
.detail-inner{max-width:1000px;margin:0 auto;padding:0 12px 80px}
.detail-cols{display:flex;flex-direction:column;gap:20px;margin-top:8px}
.detail-left{display:flex;flex-direction:column;gap:16px}
.detail-img-wrap{border-radius:20px;overflow:hidden;border:1px solid rgba(255,255,255,0.08);width:160px;margin:0 auto;box-shadow:0 8px 40px rgba(0,0,0,0.5)}
.detail-img-wrap img{width:100%;aspect-ratio:1;object-fit:cover}
.dl-btn{background:linear-gradient(135deg,#10b981,#059669);color:#fff;font-weight:900;font-size:13px;padding:14px 16px;border-radius:14px;display:flex;align-items:center;justify-content:center;gap:8px;width:100%;box-shadow:0 6px 24px rgba(16,185,129,0.4);transition:all .2s;text-transform:uppercase;letter-spacing:.05em;touch-action:manipulation;min-height:48px}
.dl-btn:hover{transform:scale(1.03)}
.dl-btn svg{width:16px;height:16px}
.stats-row{border-radius:14px;padding:12px;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.07)}
.stat-cell{text-align:center}
.stat-cell:nth-child(2){border-left:1px solid rgba(255,255,255,0.08);border-right:1px solid rgba(255,255,255,0.08)}
.stat-label{font-size:10px;font-weight:600;color:rgba(255,255,255,0.4);margin-bottom:4px}
.stat-value{font-weight:900;font-size:12px;color:#fff}
.stat-value.star{color:#facc15}
.detail-right{flex:1;min-width:0}
.detail-title{font-size:20px;font-weight:900;color:#fff;margin-bottom:12px;line-height:1.25;word-break:break-word}
.detail-badges{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.dbadge{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:700;padding:6px 12px;border-radius:9999px}
.dbadge-blue{background:linear-gradient(135deg,#06b6d4,#3b82f6);color:#fff}
.dbadge-gray{background:rgba(255,255,255,0.08);border:1px solid rgba(255,255,255,0.15);color:rgba(255,255,255,0.7)}
.dbadge-green{background:rgba(16,185,129,0.12);border:1px solid rgba(16,185,129,0.3);color:#10b981}
.dbadge svg{width:12px;height:12px}
.detail-desc{border-radius:14px;padding:16px;margin-bottom:16px;background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.07);border-left:3px solid #06b6d4}
.detail-desc p{font-size:13px;font-weight:600;color:rgba(255,255,255,0.8);line-height:1.6}
.features-box{border-radius:14px;padding:16px;background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.07)}
.features-title{display:flex;align-items:center;gap:8px;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.1em;color:#06b6d4;margin-bottom:12px}
.features-title svg{width:14px;height:14px}
.features-grid{display:grid;grid-template-columns:1fr;gap:8px}
.feature-item{display:flex;align-items:flex-start;gap:10px;padding:10px;border-radius:10px;background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.06)}
.feature-item svg{width:16px;height:16px;flex-shrink:0;margin-top:1px;color:#06b6d4}
.feature-item span{font-size:12px;font-weight:600;color:rgba(255,255,255,0.75)}
.dl-btn-bottom{background:linear-gradient(135deg,#7c3aed,#6d28d9);color:#fff;font-weight:900;font-size:14px;padding:16px;border-radius:14px;display:flex;align-items:center;justify-content:center;gap:8px;width:100%;margin-top:16px;box-shadow:0 6px 28px rgba(124,58,237,0.45);transition:all .2s;text-transform:uppercase;letter-spacing:.05em;touch-action:manipulation}
.dl-btn-bottom:hover{transform:scale(1.02)}
.dl-btn-bottom svg{width:18px;height:18px}

/* Footer */
.footer{background:rgba(20,16,40,0.9);border-top:1px solid rgba(255,255,255,0.07);padding:24px 16px;text-align:center}
.footer-logo{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:8px}
.footer-icon{width:28px;height:28px;border-radius:8px;background:linear-gradient(135deg,#ef4444,#dc2626);display:flex;align-items:center;justify-content:center;overflow:hidden}
.footer-icon img{width:20px;height:20px;object-fit:contain}
.footer-name{font-weight:900;font-size:15px}
.footer-sub{font-size:13px;color:rgba(255,255,255,0.4);margin-bottom:4px}
.footer-copy{font-size:11px;color:rgba(255,255,255,0.25)}

/* Mobile bottom nav */
.mobile-nav{position:fixed;bottom:0;left:0;right:0;z-index:40;display:flex;align-items:center;justify-content:space-around;padding:8px 8px max(8px,env(safe-area-inset-bottom,0px));background:rgba(15,13,26,0.97);border-top:1px solid rgba(255,255,255,0.1);backdrop-filter:blur(16px)}
.mnav-btn{display:flex;flex-direction:column;align-items:center;gap:3px;padding:6px 12px;border-radius:12px;min-width:52px;min-height:48px;transition:color .2s;color:rgba(255,255,255,0.45);touch-action:manipulation}
.mnav-btn.active{color:#ef4444}
.mnav-btn svg{width:20px;height:20px}
.mnav-btn span{font-size:10px;font-weight:700;line-height:1}

/* Animations */
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes slideUp{from{transform:translateY(24px);opacity:0}to{transform:translateY(0);opacity:1}}
@keyframes shimmer{0%{transform:translateX(-100%)}100%{transform:translateX(200%)}}

/* Responsive */
@media(min-width:480px){
  .games-grid{grid-template-columns:repeat(3,1fr)}
  .features-grid{grid-template-columns:repeat(2,1fr)}
}
@media(min-width:768px){
  .header-inner{padding:0 24px;height:64px}
  .logo-sub{display:block}
  .logo-text{font-size:19px}
  .logo-icon{width:40px;height:40px}
  .logo-icon img{width:28px;height:28px}
  .desktop-nav{display:flex}
  .mobile-nav{display:none}
  .games-grid{grid-template-columns:repeat(4,1fr);gap:16px}
  .main{padding:28px 24px 48px}
  .detail-cols{flex-direction:row;gap:32px}
  .detail-left{width:220px;flex-shrink:0}
  .detail-img-wrap{width:100%}
  .detail-title{font-size:26px}
  .features-grid{grid-template-columns:repeat(2,1fr)}
  .detail-inner{padding:0 24px 48px}
  .footer{display:block}
}
@media(min-width:1024px){
  .games-grid{grid-template-columns:repeat(5,1fr)}
}
@media(min-width:1280px){
  .games-grid{grid-template-columns:repeat(6,1fr)}
}
/* Hide footer on mobile (bottom nav replaces it) */
@media(max-width:767px){
  .footer{display:none}
  .main{padding-bottom:80px}
}

/* WordPress additions */
.screen-reader-text{position:absolute;left:-9999px}
.nav-pill{text-decoration:none}
.cat-chip{text-decoration:none}
.game-card{text-decoration:none;color:inherit}
.pagination{display:flex;justify-content:center;gap:6px;flex-wrap:wrap;margin:8px 0 32px}
.pagination .page-numbers{padding:8px 14px;border-radius:9999px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);font-weight:700;font-size:13px}
.pagination .current{background:linear-gradient(135deg,#ef4444,#dc2626);border-color:transparent}
.dl-btn.disabled{opacity:.5;pointer-events:none}
.detail-extra{margin-top:16px;border-radius:14px;padding:16px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.07);font-size:14px;line-height:1.7;color:rgba(255,255,255,.8)}
.detail-extra h2,.detail-extra h3{margin:14px 0 8px;color:#fff}
.detail-extra a{color:#06b6d4}
.comments-box{max-width:1000px;margin:24px auto 0;padding:0 12px 80px}
.comments-box h3{margin-bottom:12px}
.comments-box .comment-body,.comments-box textarea,.comments-box input[type=text],.comments-box input[type=email]{width:100%;padding:12px;border-radius:12px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.1);color:#fff;margin-bottom:8px}
.comments-box .submit{background:linear-gradient(135deg,#06b6d4,#3b82f6);color:#fff;font-weight:800;border-radius:9999px;padding:10px 22px;cursor:pointer;border:none}
.comments-box ol{list-style:none;margin-bottom:16px}
.comments-box li{padding:12px;margin-bottom:8px;border-radius:14px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.06);font-size:13px}
.page-content{max-width:800px;margin:0 auto;padding:24px 16px 80px;line-height:1.7}
.page-content h1{margin-bottom:16px}

.dl-wrap{display:flex;flex-direction:column;gap:10px;margin-top:16px}
.detail-left .dl-wrap{margin-top:0}
.dl-wrap .dl-btn,.dl-wrap .dl-btn-bottom{margin-top:0;text-decoration:none}
.dl-btn.dl-ios,.dl-btn-bottom.dl-ios{background:linear-gradient(135deg,#374151,#111827);box-shadow:0 6px 24px rgba(0,0,0,.4)}
.dl-btn.dl-android,.dl-btn-bottom.dl-android{background:linear-gradient(135deg,#10b981,#059669)}
@media(min-width:768px){.detail-right .dl-wrap{flex-direction:row}.detail-right .dl-wrap>*{flex:1}}

/* Spacing fix: stacked download buttons never touch */
.dl-wrap{display:flex;flex-direction:column;gap:12px}
.dl-wrap>*{margin:0 0 0 0}
.dl-wrap>*+*{margin-top:12px}
