/* ApkGuru.org - Main Stylesheet (kaygame.com style) */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f5f6fa;
  color: #2d3142;
  font-size: 14px;
  line-height: 1.5;
}
a { color: #3478f6; text-decoration: none; }
a:hover { color: #2058d8; }
img { max-width: 100%; height: auto; vertical-align: middle; }
ul { list-style: none; }

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
}
@media (min-width: 768px) {
  .container { padding: 0 16px; }
}

/* HEADER */
header {
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}
header .container {
  display: flex;
  align-items: center;
  height: 56px;
  gap: 12px;
}
.cate {
  font-size: 22px;
  cursor: pointer;
  display: block;
  padding: 6px;
  color: #3478f6;
}
@media (min-width: 768px) {
  .cate { display: none; }
}
.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 22px;
  color: #3478f6 !important;
  letter-spacing: -0.5px;
}
.logo-text {
  background: linear-gradient(135deg, #3478f6, #6a4cf0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.home {
  display: none;
  align-items: center;
  gap: 6px;
  margin-left: 16px;
  color: #555 !important;
  font-weight: 600;
}
@media (min-width: 768px) {
  .home { display: inline-flex; }
}
.searchBtn {
  display: none;
  flex: 1;
  margin-left: auto;
  position: relative;
  max-width: 400px;
}
@media (min-width: 768px) {
  .searchBtn { display: flex; }
}
.searchBtn input {
  flex: 1;
  border: 1px solid #d0d4dc;
  border-radius: 999px;
  padding: 8px 16px 8px 40px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.searchBtn input:focus { border-color: #3478f6; }
.searchBtn .searchB {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #6c757d;
}
.sea {
  display: block;
  margin-left: auto;
  font-size: 20px;
  cursor: pointer;
  padding: 6px;
}
@media (min-width: 768px) {
  .sea { display: none; }
}

/* MAIN LAYOUT */
.container.main {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  margin-bottom: 32px;
  align-items: flex-start;
}
.left {
  display: none;
  width: 220px;
  flex-shrink: 0;
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  position: sticky;
  top: 72px;
}
@media (min-width: 992px) {
  .left { display: block; }
}
.left h2 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #2d3142;
  padding-bottom: 8px;
  border-bottom: 2px solid #e8eaf0;
}
.left h2:not(:first-child) { margin-top: 20px; }
.listNav { display: flex; flex-direction: column; gap: 4px; }
.listNav li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #555;
  font-weight: 500;
  transition: background 0.15s;
}
.listNav li a:hover { background: #f0f2f8; color: #3478f6; }
.listNav .cat-emoji { font-size: 18px; }
.listNav img { width: 24px; height: 24px; }
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tags li a {
  display: inline-block;
  background: #eef0f6;
  color: #555;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.tags li a:hover { background: #3478f6; color: white; }

/* RIGHT MAIN AREA */
.right {
  flex: 1;
  min-width: 0;
}

/* Crumbs */
.crumbs {
  background: white;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #6c757d;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.crumbs a { color: #3478f6; }
.crumbs p {
  display: inline;
  color: #2d3142;
  font-weight: 600;
}

/* SWIPER (Top Games) */
.swiperCont, .gameBox {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e8eaf0;
}
.title h2 {
  font-size: 16px;
  font-weight: 700;
  color: #2d3142;
  display: flex;
  align-items: center;
  gap: 8px;
}
.title a {
  font-size: 13px;
  color: #3478f6;
  font-weight: 600;
}

/* Top Games Swiper */
.swiperBox { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.swiperBox::-webkit-scrollbar { display: none; }
.sBox {
  display: flex;
  gap: 12px;
  padding-bottom: 8px;
}
.sBox li {
  flex-shrink: 0;
  width: 280px;
}
.sBox a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e8eaf0;
  background: white;
  transition: transform 0.2s, box-shadow 0.2s;
}
.sBox a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(52,120,246,0.18);
}
.sBox .thumb1 {
  height: 140px;
  background: linear-gradient(135deg, #6a4cf0, #3478f6);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sBox .thumb1 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sBox .con {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}
.sBox .thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid white;
  margin-top: -28px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  background: #f0f2f8;
}
.sBox .thumb img { width: 100%; height: 100%; object-fit: cover; }
.sBox dl { flex: 1; min-width: 0; }
.sBox dt {
  font-size: 14px;
  font-weight: 700;
  color: #2d3142;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sBox dd {
  font-size: 12px;
  color: #6c757d;
}
.sBox dd:first-of-type { margin-bottom: 2px; }
.sBox dd span { color: #ff8c00; font-weight: 700; }
.sBox p {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: #3478f6;
  color: white;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

/* BEST LIST (game grid) */
.bestList {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 480px) { .bestList { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .bestList { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .bestList { grid-template-columns: repeat(5, 1fr); } }

.bestList li a {
  display: block;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  transition: background 0.15s;
}
.bestList li a:hover { background: #f0f2f8; }
.bestList .thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #6a4cf0, #3478f6);
}
.bestList .thumb img { width: 100%; height: 100%; object-fit: cover; }
.bestList dt {
  font-size: 13px;
  font-weight: 600;
  color: #2d3142;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.bestList dd {
  font-size: 12px;
  color: #ff8c00;
  font-weight: 700;
}

/* AD BANNER */
.ad {
  background: white;
  border-radius: 10px;
  padding: 12px;
  margin: 16px 0;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.ad p {
  font-size: 10px;
  color: #999;
  margin-top: 4px;
  letter-spacing: 0.2em;
}
.ad ins { display: block; min-height: 90px; }

/* GAME DETAIL PAGE */
.dex {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex;
  gap: 20px;
  flex-direction: column;
}
@media (min-width: 768px) {
  .dex { flex-direction: row; }
}
.thumbox {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .thumbox { flex-direction: column; align-items: flex-start; }
}
.thumbox .thumb {
  width: 100px;
  height: 100px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, #6a4cf0, #3478f6);
}
@media (min-width: 768px) {
  .thumbox .thumb { width: 160px; height: 160px; }
}
.thumbox .thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumbox h4 {
  display: none;
  font-size: 18px;
  font-weight: 700;
  color: #2d3142;
}
@media (max-width: 767px) {
  .thumbox h4 { display: flex; align-items: center; gap: 6px; }
}
.thumbox .icon-verified { color: #4caf50; font-size: 18px; }

.dex .con { flex: 1; min-width: 0; }
.dex .con > h4 {
  font-size: 22px;
  font-weight: 800;
  color: #2d3142;
  margin-bottom: 12px;
  display: none;
  align-items: center;
  gap: 8px;
}
@media (min-width: 768px) {
  .dex .con > h4 { display: flex; }
}
.dex .con > h4 .icon-verified { color: #4caf50; font-size: 20px; }

.dex .con ul:not(.getGame) {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
@media (min-width: 480px) {
  .dex .con ul:not(.getGame) { grid-template-columns: repeat(4, 1fr); }
}
.dex .con ul:not(.getGame) li {
  background: #f5f6fa;
  padding: 8px 12px;
  border-radius: 8px;
}
.dex .con ul:not(.getGame) li p:first-child {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.dex .con ul:not(.getGame) li p:last-child {
  font-size: 14px;
  font-weight: 700;
  color: #2d3142;
}
.dex .con .rate p:last-child { font-size: 13px; color: #ff8c00; }

/* GET GAME BUTTONS (Download) */
.getGame {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
@media (min-width: 480px) {
  .getGame { grid-template-columns: 1fr 1fr; }
}
.getGame .link {
  display: block;
  background: linear-gradient(135deg, #3478f6, #6a4cf0);
  color: white !important;
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.getGame .link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(52,120,246,0.4);
}
.getGame .link p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.getGame .link span:not(.icon-android):not(.icon-apple) {
  display: block;
  font-size: 11px;
  opacity: 0.85;
}

/* SECURITY BADGE */
.security {
  background: #e8f5e9;
  border-left: 4px solid #4caf50;
  padding: 12px;
  border-radius: 8px;
  margin-top: 12px;
}
.security p {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #2e7d32;
  margin-bottom: 4px;
}
.security span {
  font-size: 12px;
  color: #555;
  line-height: 1.5;
}

/* MODULE (Description, Tags, How To Play) */
.module {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.module h2 {
  font-size: 16px;
  font-weight: 700;
  color: #2d3142;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e8eaf0;
}
.module p {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}
.tagList {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tagList li a {
  display: inline-block;
  background: #eef0f6;
  color: #555;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.tagList li a:hover { background: #3478f6; color: white; }

/* APK BOX MODAL */
#apkBox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#apkBox.active { display: flex; }
#apkBox .dBox {
  background: white;
  border-radius: 16px;
  padding: 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: scaleIn 0.2s ease;
}
@keyframes scaleIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
#apkBox h2 {
  font-size: 18px;
  font-weight: 700;
  color: #2d3142;
  margin-bottom: 10px;
}
#apkBox h2 #names { color: #3478f6; }
#apkBox p {
  color: #6c757d;
  font-size: 14px;
  margin-bottom: 16px;
}
#apkBox .Btn { display: flex; gap: 10px; justify-content: center; }
#apkBox .Btn a {
  flex: 1;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: opacity 0.15s;
}
#apkBox .Btn a:first-child {
  background: #f0f2f8;
  color: #555 !important;
}
#apkBox .Btn a:last-child {
  background: linear-gradient(135deg, #3478f6, #6a4cf0);
  color: white !important;
}
#apkBox .Btn a:hover { opacity: 0.85; }

/* MOBILE CATEGORY DRAWER */
.categoryBox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: flex-start;
}
.categoryBox.active { display: flex; }
.categoryBox .box {
  background: white;
  width: 280px;
  height: 100%;
  padding: 20px 16px;
  overflow-y: auto;
  animation: slideIn 0.25s ease;
}
@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}
.categoryBox h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #2d3142;
}
.categoryBox .listNav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.categoryBox .close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 24px;
  color: white;
  cursor: pointer;
  background: rgba(0,0,0,0.4);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* BOTTOM FOOTER */
.bot {
  background: white;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-top: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.bot nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 12px;
}
.bot nav a {
  font-size: 13px;
  color: #555;
  font-weight: 500;
}
.bot nav a:hover { color: #3478f6; }
.bot p { font-size: 12px; color: #999; }

/* LEGAL PAGES */
.legal {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.legal h1 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
  color: #2d3142;
}
.legal h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 20px 0 8px;
  color: #2d3142;
}
.legal h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 14px 0 6px;
  color: #2d3142;
}
.legal p, .legal li {
  font-size: 14px;
  line-height: 1.7;
  color: #555;
  margin-bottom: 8px;
}
.legal ul, .legal ol { padding-left: 24px; margin-bottom: 12px; }

/* CONTACT FORM */
.contact-form {
  background: #f5f6fa;
  padding: 16px;
  border-radius: 10px;
  margin: 16px 0;
}
.contact-form label { font-weight: 600; color: #2d3142; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d0d4dc;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  margin-top: 4px;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #3478f6;
}
.contact-form button {
  background: linear-gradient(135deg, #3478f6, #6a4cf0);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s;
}
.contact-form button:hover { transform: translateY(-1px); }

/* SEO SECTION */
.seo-section {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.seo-section h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #2d3142;
}
.seo-section p {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 8px;
}

/* SEARCH PAGE */
.placeholder {
  text-align: center;
  padding: 40px;
  color: #6c757d;
  font-size: 14px;
  grid-column: 1 / -1;
}
