:root {
  --primary-green: #1a7442;
  --header-green: #1f8a4e;
  --gold-accent: #c48a12;
  --gold-light: #fff8e6;
  --btn-green: #1b8a4f;
  --btn-green-hover: #156d3e;
  --bg-body: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --text-dark: #1e293b;
  --text-muted: #64748b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
  background-color: var(--bg-body);
  color: var(--text-dark);
  padding-bottom: 40px;
}

/* Header */
header {
  background: linear-gradient(90deg, #186b3c 0%, #228f52 100%);
  padding: 10px 16px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #fff;
  padding: 2px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.brand span {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.nav-tabs {
  display: flex;
  gap: 8px;
}

.nav-btn {
  background: transparent;
  border: none;
  color: #e2e8f0;
  padding: 8px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  transition: 0.2s ease;
}

.nav-btn.active, .nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Info Bar Marquee */
.info-bar {
  background: #111827;
  color: #fff;
  display: flex;
  align-items: center;
  overflow: hidden;
  font-size: 0.85rem;
  border-bottom: 2px solid #eab308;
}

.info-tag {
  background: #dc2626;
  color: #fff;
  font-weight: 700;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.marquee-content {
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
  padding: 6px 0;
}

.marquee-text {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 25s linear infinite;
  font-weight: 500;
  color: #fef08a;
}

@keyframes marquee {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-100%, 0); }
}

/* Layout */
.container {
  max-width: 960px;
  margin: 18px auto 0;
  padding: 0 16px;
}

.intro-box {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.65;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.featured-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--gold-accent);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.featured-box img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.featured-title-wrap {
  font-size: 0.88rem;
}

.featured-label {
  font-weight: 800;
  color: #0f172a;
  display: block;
  margin-bottom: 2px;
}

.featured-link-text {
  color: var(--primary-green);
  font-weight: 700;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Horizontal Top 6 Carousel */
.top6-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 28px;
  scrollbar-width: thin;
}

.top6-carousel::-webkit-scrollbar {
  height: 6px;
}

.top6-carousel::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.top-mini-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  min-width: 102px;
  max-width: 102px;
  padding: 10px 8px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: transform 0.2s ease;
}

.top-mini-card:hover {
  transform: translateY(-3px);
  border-color: #facc15;
}

.top-mini-card img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  margin-bottom: 6px;
}

.top-mini-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-mini-bonus {
  font-size: 0.75rem;
  font-weight: 700;
  color: #d97706;
}

/* Game List Cards */
.apps-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.game-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
  transition: 0.2s ease;
}

.game-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.game-rank {
  font-size: 1.15rem;
  font-weight: 800;
  font-style: italic;
  color: #94a3b8;
  width: 22px;
}

.game-img {
  width: 62px;
  height: 62px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  flex-shrink: 0;
}

.game-details {
  min-width: 0;
}

.game-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-bonus {
  color: #dc2626;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.game-min {
  color: var(--primary-green);
  font-size: 0.82rem;
  font-weight: 700;
}

.btn-download-action {
  background: var(--btn-green);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(27, 138, 79, 0.35);
  transition: 0.2s ease;
}

.btn-download-action:hover {
  background: var(--btn-green-hover);
}

/* Telegram CTA */
.tg-banner-wrap {
  text-align: center;
  margin: 30px 0 22px;
}

.btn-telegram {
  background: #eab308;
  color: #000;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 12px 28px;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(234, 179, 8, 0.4);
  transition: transform 0.15s ease;
}

.btn-telegram:active {
  transform: scale(0.97);
}

/* SEO Cards */
.seo-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.seo-card h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
}

.seo-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 14px 0 6px;
}

.seo-card p {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.68;
  margin-bottom: 10px;
}

/* Footer */
footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 28px 16px 20px;
  margin-top: 40px;
  border-top: 4px solid var(--primary-green);
}

.footer-container {
  max-width: 960px;
  margin: 0 auto;
}

.footer-about-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.footer-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 20px;
  color: #cbd5e1;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
}

.footer-nav a {
  color: #cbd5e1;
  text-decoration: none;
  margin-right: 12px;
}

.footer-nav a:hover {
  color: #facc15;
}

.footer-tg-pill {
  background: #0284c7;
  color: #fff;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Floating Scroll Button */
.btn-scroll-top {
  position: fixed;
  right: 18px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  z-index: 999;
}

.btn-scroll-top:hover {
  background: var(--primary-green);
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  color: #64748b;
  margin: 12px 0 16px;
}
.breadcrumb a {
  color: var(--primary-green);
  text-decoration: none;
}

/* Post Detail Styling */
.post-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.4;
}

.post-icon-wrap {
  text-align: center;
  margin-bottom: 20px;
}
.post-main-icon {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

/* Specs Table */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
  font-size: 0.92rem;
}
.spec-table th, .spec-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
}
.spec-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  width: 40%;
}
.spec-table td {
  color: #1e293b;
  font-weight: 600;
}

/* Big Direct Download Button */
.btn-big-download {
  display: block;
  width: 100%;
  background: var(--btn-green);
  color: #fff;
  text-align: center;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(27, 138, 79, 0.35);
  margin: 20px 0 28px;
  transition: 0.2s;
}
.btn-big-download:hover {
  background: var(--btn-green-hover);
}

/* Share Buttons */
.share-bar {
  display: flex;
  gap: 8px;
  margin: 20px 0;
  flex-wrap: wrap;
}
.share-btn {
  padding: 6px 14px;
  border-radius: 4px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}
.btn-share-fb { background: #1877f2; }
.btn-share-tw { background: #1da1f2; }
.btn-share-in { background: #0077b5; }
.btn-share-mail { background: #ea4335; }

/* View All Red Button */
.view-all-wrap {
  text-align: center;
  margin: 24px 0 30px;
}
.btn-view-all {
  background: #dc2626;
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 6px;
  display: inline-block;
}

/* Single Unified Mobile Fix for All Pages */
@media (max-width: 600px) {
  .game-card {
    padding: 10px 12px !important;
    gap: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  .card-left {
    gap: 10px !important;
    flex: 1 !important;
    min-width: 0 !important;
  }
  .game-img {
    width: 48px !important;
    height: 48px !important;
    flex-shrink: 0 !important;
  }
  .game-details {
    min-width: 0 !important;
    flex: 1 !important;
  }
  .game-name {
    font-size: 0.95rem !important;
    white-space: normal !important;
    word-break: keep-all !important;
    line-height: 1.25 !important;
    margin-bottom: 3px !important;
  }
  .game-bonus, .game-min {
    font-size: 0.78rem !important;
    line-height: 1.3 !important;
  }
  .btn-download-action {
    padding: 8px 12px !important;
    font-size: 0.82rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
}
