/* Yono All Game Downloads – UI components (front page, app list, game page, buttons) */
:root {
  --psb-cta: #0a8f55;
  --psb-cta-dark: #067a45;
  --psb-ink: #14231d;
  --psb-muted: #5a6b63;
  --psb-line: #dfeae4;
  --psb-nav-h: 58px;
}
.psb-container { max-width: 1100px; margin: 0 auto; padding-left: 16px; padding-right: 16px; box-sizing: border-box; }
.psb-container *, .psb-hero *, .psb-app * { box-sizing: border-box; }
.psb-page-top { padding-top: calc(var(--psb-nav-h) + 24px); padding-bottom: 20px; }
.psb-page-top h1 { font-size: 1.7rem; margin: 0 0 16px; }

/* ---------- buttons (one system for the whole site) ---------- */
.psb-btn, button.psb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box;
  background: var(--psb-cta); color: #fff !important; border: 0; border-radius: 12px; padding: 13px 22px;
  font: 700 16px/1.2 "Poppins", system-ui, sans-serif; text-decoration: none !important; cursor: pointer; text-align: center;
  transition: background .15s, transform .15s, box-shadow .15s; box-shadow: 0 3px 10px rgba(10, 143, 85, .28);
}
.psb-btn:hover { background: var(--psb-cta-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(10, 143, 85, .38); }
.psb-btn-lg { min-width: 280px; padding: 15px 24px; font-size: 17px; }
.psb-btn-pill { border-radius: 999px; padding: 10px 20px; font-size: 14px; white-space: nowrap; }
.psb-badge-new { position: absolute; left: -2px; top: -2px; background: #e11d48; color: #fff; font: 800 10.5px/1 "Poppins", sans-serif; letter-spacing: .05em; padding: 4px 9px; border-radius: 999px; border: 2px solid #fff; z-index: 2; }
.psb-badge-hot { background: #f97316; }
.psb-meta { display: block; font-size: 12.5px; color: var(--psb-muted); }
.psb-empty { text-align: center; padding: 28px 12px; color: var(--psb-muted); }

/* ---------- hero (front page + list pages) ---------- */
.psb-hero { background: linear-gradient(135deg, #062f24 0%, #0b5d44 55%, #12a56f 100%); color: #fff; padding: calc(var(--psb-nav-h) + 36px) 0 40px; }
.psb-hero h1 { font-size: clamp(1.6rem, 4.4vw, 2.5rem); line-height: 1.22; font-weight: 700; margin: 0 0 12px; color: #fff !important; -webkit-text-fill-color: #fff; }
.psb-hero p { max-width: 780px; margin: 0; color: #e3f6ec; line-height: 1.7; font-size: 1rem; }
.psb-hero-sm { padding: calc(var(--psb-nav-h) + 26px) 0 26px; }
.psb-hero-sm h1 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
.psb-search { display: flex; max-width: 560px; margin-top: 20px; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); }
.psb-search input { flex: 1; min-width: 0; border: 0; padding: 14px 16px; font-size: 16px; color: var(--psb-ink); outline: 0; background: #fff; }
.psb-search button { flex: 0 0 auto; background: var(--psb-cta); color: #fff; border: 0; padding: 0 24px; font: 700 15px "Poppins", sans-serif; cursor: pointer; }
.psb-search button:hover { background: var(--psb-cta-dark); }

/* ---------- section headings + quick tiles ---------- */
.psb-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 34px 0 14px; }
.psb-sec-head h2 { font-size: 1.3rem; margin: 0; color: var(--psb-ink); }
.psb-sec-head a { font-weight: 600; font-size: .92rem; color: var(--psb-cta-dark); text-decoration: none; white-space: nowrap; }
.psb-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.psb-tile { display: flex; align-items: center; gap: 12px; padding: 13px 16px; background: #fff; border: 1.5px solid #bfe0d0; border-radius: 12px; font-weight: 600; color: var(--psb-ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.psb-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(6, 47, 36, .12); }
.psb-tile i { font-style: normal; font-size: 20px; flex: 0 0 38px; height: 38px; display: grid; place-items: center; background: #e8f6ef; border-radius: 10px; }

/* ---------- popular apps: icon row ---------- */
.psb-icon-row { display: flex; gap: 18px; overflow-x: auto; padding: 8px 4px 14px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.psb-icon-item { flex: 0 0 96px; text-align: center; text-decoration: none; color: var(--psb-ink); scroll-snap-align: start; }
.psb-icon-img { position: relative; display: block; width: 96px; height: 96px; border-radius: 22px; background: #0b3d2e; box-shadow: 0 6px 16px rgba(6, 47, 36, .18); }
.psb-icon-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; display: block; }
.psb-icon-name { display: block; margin-top: 8px; font-weight: 600; font-size: 13.5px; line-height: 1.25; }
.psb-icon-meta { display: block; font-size: 12px; color: var(--psb-muted); }

/* ---------- app list rows ---------- */
.psb-app-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
.psb-app-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: #fff; border-radius: 14px; border: 1px solid var(--psb-line); box-shadow: 0 4px 14px rgba(6, 47, 36, .06); }
.psb-app-icon { position: relative; flex: 0 0 68px; width: 68px; height: 68px; border-radius: 16px; background: #0b3d2e; }
.psb-app-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; display: block; }
.psb-app-text { flex: 1; min-width: 0; }
.psb-app-name { display: block; font-weight: 700; font-size: 1rem; color: var(--psb-ink); text-decoration: none; line-height: 1.3; }
.psb-app-text p { margin: 2px 0 3px; font-size: .86rem; color: var(--psb-muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.psb-more { text-align: center; margin: 18px 0 0; }
.psb-more a { font-weight: 700; color: var(--psb-cta-dark); text-decoration: none; }

/* ---------- game page ---------- */
.psb-app { max-width: 980px; padding-top: calc(var(--psb-nav-h) + 14px); padding-bottom: 36px; color: var(--psb-ink); }
.psb-crumbs-in { font-size: 13px; color: var(--psb-muted); margin: 0 0 12px; }
.psb-crumbs-in a { color: var(--psb-cta-dark); font-weight: 600; text-decoration: none; }
.psb-hero-card { display: grid; grid-template-columns: 96px 1fr; gap: 14px 20px; align-items: start; background: #fff; border-radius: 16px; padding: 20px; border: 1px solid var(--psb-line); box-shadow: 0 6px 20px rgba(6, 47, 36, .08); }
.psb-hero-icon { position: relative; width: 96px; height: 96px; border-radius: 22px; background: #0b3d2e; }
.psb-hero-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; display: block; }
.psb-hero-info h1 { font-size: 1.55rem; line-height: 1.25; margin: 0 0 6px; color: var(--psb-ink); -webkit-text-fill-color: var(--psb-ink); }
.psb-hero-desc { margin: 0 0 6px; color: #33443c; line-height: 1.6; font-size: .96rem; }
.psb-hero-cta { grid-column: 1 / -1; margin-top: 4px; }
.psb-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0 6px; }
.psb-stat { background: #fff; border: 1px solid var(--psb-line); border-radius: 12px; padding: 10px 14px; min-width: 0; }
.psb-stat strong { display: block; font-size: 1.1rem; color: var(--psb-ink); }
.psb-stat span { display: block; font-size: 12.5px; color: var(--psb-muted); }
.psb-tabbar { position: sticky; top: var(--psb-nav-h); z-index: 40; display: flex; gap: 2px; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--psb-line); margin: 14px 0 0; padding: 0 6px; scrollbar-width: none; }
.psb-tabbar::-webkit-scrollbar { display: none; }
.psb-tabbar a { flex: 0 0 auto; padding: 14px 14px 11px; font-weight: 700; font-size: 14px; color: var(--psb-muted); border-bottom: 3px solid transparent; text-decoration: none; white-space: nowrap; }
.psb-tabbar a.on { color: var(--psb-ink); border-bottom-color: var(--psb-cta); }
.psb-sec { padding: 22px 0 6px; scroll-margin-top: calc(var(--psb-nav-h) + 56px); }
.psb-sec h2 { font-size: 1.3rem; margin: 0 0 14px; color: var(--psb-ink); }
.psb-banner { width: 100%; height: auto; max-height: 460px; object-fit: cover; border-radius: 16px; display: block; margin-bottom: 18px; }
.psb-prose { line-height: 1.75; font-size: 1rem; }
.psb-prose h2, .psb-prose h3 { margin: 22px 0 10px; }
.psb-prose img { max-width: 100%; height: auto; border-radius: 12px; }
.psb-feats { display: grid; gap: 12px; }
.psb-feat { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--psb-line); border-radius: 12px; padding: 14px 16px; }
.psb-feat-n { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--psb-cta); color: #fff; display: grid; place-items: center; font-weight: 700; }
.psb-feat h3 { font-size: 1.02rem; margin: 2px 0 4px; }
.psb-feat p { margin: 0; color: #33443c; line-height: 1.6; }
.psb-steps { padding-left: 22px; line-height: 1.8; margin: 0 0 16px; }
.psb-steps li { margin-bottom: 6px; }
.psb-faq { background: #fff; border: 1px solid var(--psb-line); border-radius: 12px; padding: 0 16px; margin-bottom: 10px; }
.psb-faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; position: relative; padding-right: 26px; }
.psb-faq summary::after { content: "+"; position: absolute; right: 2px; top: 11px; font-size: 22px; color: var(--psb-cta); }
.psb-faq[open] summary::after { content: "–"; }
.psb-faq p { margin: 0 0 14px; line-height: 1.7; color: #33443c; }
.psb-disclaimer { font-size: 12.5px; color: var(--psb-muted); margin: 14px 0 0; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .psb-tiles { grid-template-columns: repeat(2, 1fr); }
  .psb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .psb-app-list { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  :root { --psb-nav-h: 56px; }
  .psb-hero { padding-bottom: 30px; }
  .psb-search button { padding: 0 16px; }
  .psb-sec-head h2 { font-size: 1.15rem; }
  .psb-hero-card { grid-template-columns: 76px 1fr; padding: 16px; gap: 12px 14px; }
  .psb-hero-icon { width: 76px; height: 76px; border-radius: 18px; }
  .psb-hero-icon img { border-radius: 18px; }
  .psb-hero-info h1 { font-size: 1.25rem; }
  .psb-btn-lg { width: 100%; min-width: 0; }
  .psb-app-row { padding: 10px 12px; gap: 10px; }
  .psb-app-icon { flex-basis: 58px; width: 58px; height: 58px; }
  .psb-btn-pill { padding: 9px 14px; font-size: 13px; }
}

/* ---------- fixes from the layout audit ---------- */
.psb-sec-head h2, .psb-sec h2, .psb-page-top h1 { font-weight: 700; }
.psb-icon-item, .psb-icon-item * , .psb-app-name, .psb-card, .psb-card * { text-decoration: none !important; }
.psb-btn > span { display: inline-block; text-align: center; }
.psb-latest { margin: 8px 0 30px; }
.psb-latest .psb-grid { max-width: none; padding: 0; }
.psb-btn-lg > span:last-child { overflow-wrap: anywhere; }

/* back-to-top button: small, bottom-right, never over content */
.fixed-widget { top: auto !important; bottom: 16px !important; right: 12px !important; left: auto !important; transform: none !important; z-index: 90; }
.fixed-widget .widget-container { display: flex; flex-direction: column; gap: 6px; }
.fixed-widget .widget-item { width: 42px !important; height: 42px !important; min-width: 0 !important; }

/* mobile: shorter navbar, compact lists */
@media (max-width: 991px) {
  .navbar-brand img { width: 104px !important; height: 41px !important; margin: 2px 0; }
}
@media (max-width: 520px) {
  .psb-app-row { flex-wrap: wrap; }
  .psb-app-text { flex: 1 1 calc(100% - 78px); }
  .psb-app-row .psb-btn-pill { flex: 1 1 100%; margin-top: 2px; padding: 11px 16px; }
  .psb-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  .psb-card { flex-direction: row; }
  .psb-card-img { flex: 0 0 118px; aspect-ratio: auto; min-height: 118px; }
  .psb-card-img img { height: 100%; }
  .psb-chip { left: 6px; top: 6px; font-size: 10.5px; padding: 2px 8px; }
  .psb-card-body { padding: 10px 12px; gap: 5px; justify-content: center; }
  .psb-card-title { font-size: 14px; -webkit-line-clamp: 3; }
  .psb-card-ex { display: none; }
  .psb-card-meta { margin-top: 2px; }
  .psb-tile { padding: 11px 12px; gap: 10px; font-size: 14px; }
  .psb-tile i { flex-basis: 34px; height: 34px; }
}

/* ---------- one fixed navbar height; body padding comes from here (not from the old script) ---------- */
:root { --psb-nav-h: 60px; }
body { padding-top: var(--psb-nav-h) !important; }
.topnav .container { min-height: var(--psb-nav-h); padding-top: 0; padding-bottom: 0; align-items: center; }
.psb-page-top { padding-top: 24px; }
.psb-hero { padding-top: 44px; }
.psb-hero-sm { padding-top: 32px; }
.psb-app { padding-top: 16px; }
.psb-crumbs { margin-top: 16px !important; }
.fixed-widget .widget-item { width: 38px !important; height: 38px !important; opacity: .92; }

/* ---------- nav: highlight only the current page ---------- */
.topnav .nav-link#navHome:not(.active) { background: transparent !important; color: #eafff5 !important; border-bottom: 0 !important; }
.topnav .nav-link.active { background: rgba(255, 200, 61, .18) !important; color: var(--yd-gold, #ffc83d) !important; }

/* ---------- legacy bootstrap buttons use the site green ---------- */
.btn-primary, .btn-success { background-color: var(--psb-cta) !important; border-color: var(--psb-cta) !important; color: #fff !important; border-radius: 10px; font-weight: 600; }
.btn-primary:hover, .btn-success:hover { background-color: var(--psb-cta-dark) !important; border-color: var(--psb-cta-dark) !important; }
.btn-outline-primary { color: var(--psb-cta) !important; border-color: var(--psb-cta) !important; border-radius: 10px; }

/* About page hero: remove the old brand picture, use brand colours */
.about-crumb { background-image: none !important; background-color: #062f24 !important; min-height: 0 !important; }
.about-crumb .psb-about-h1 { color: #fff; text-align: center; font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 700; padding: 30px 16px 10px; margin: 0; }

/* About page */
.psb-about { max-width: 900px; padding-bottom: 30px; }
.psb-about .psb-sec p { line-height: 1.8; margin: 0 0 12px; }
.psb-about-list { padding-left: 22px; line-height: 1.8; }
.psb-about-list li { margin-bottom: 8px; }
.psb-about a:not(.psb-tile) { color: var(--psb-cta-dark); font-weight: 600; }
.psb-about { max-width: 1100px; }
.psb-about .psb-sec { max-width: 820px; }
.psb-about .psb-tiles { max-width: 820px; }
.psb-feat h3 { font-weight: 700; }
