/* TopIn Teen Patti (topinteenpatti.com) — listing-portal layout:
   narrow centered column (~720px), light grey page background, dark header, pink hero,
   white icon nav, orange-red CTAs, list-row app entries. */

:root {
  --page-bg: #d7d7d7;
  --frame-bg: #ffffff;
  --text: #212121;
  --text-muted: #616161;
  --border: #e0e0e0;
  --header-dark: #1a1a3d;
  --header-dark2: #2d1b4e;
  --hero-pink: #e91e63;
  --hero-pink-dark: #c2185b;
  --cta-orange: #ff5722;
  --cta-orange-hover: #f4511e;
  --nav-active: #00897b;
  --notice-bg: #fff8e1;
  --notice-border: #ffcc80;
  --star: #ffc107;
  --safe-green: #2e7d32;
  --ribbon-1: #7b1fa2;
  --ribbon-2: #ef6c00;
  --ribbon-3: #c62828;
  --frame-max: 720px;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--page-bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #1565c0;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Centered “phone-width” column */
.site-frame {
  max-width: var(--frame-max);
  margin: 0 auto;
  background: var(--frame-bg);
  min-height: 100vh;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.12);
}

.container {
  width: 100%;
  padding: 0 12px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  color: #000;
  padding: 8px 12px;
  z-index: 200;
}

.skip-link:focus {
  left: 8px;
}

/* ----- Header (dark gradient) ----- */
.site-header {
  background: linear-gradient(135deg, var(--header-dark) 0%, var(--header-dark2) 100%);
  color: #fff;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  min-width: 0;
}

.header-logo:hover {
  text-decoration: none;
  opacity: 0.92;
}

.header-logo img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #ff9800;
  object-fit: cover;
  flex-shrink: 0;
  background: #fff;
}

.header-brand {
  font-weight: 800;
  font-size: clamp(0.95rem, 3.5vw, 1.1rem);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
}

.menu-toggle::before {
  content: "";
  width: 18px;
  height: 2px;
  background: #fff;
  box-shadow: 0 6px 0 #fff, 0 -6px 0 #fff;
}

.drawer-nav {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0 12px 12px;
}

.drawer-nav.is-open {
  display: block;
}

.drawer-nav ul {
  list-style: none;
  margin: 0;
  padding: 8px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}

.drawer-nav a {
  color: #e1bee7;
  font-size: 0.9rem;
  display: block;
  padding: 6px 0;
}

.drawer-nav a:hover {
  color: #fff;
}

/* White icon navigation bar */
.nav-icon-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.nav-icon-bar ul {
  list-style: none;
  margin: 0;
  padding: 6px 4px;
  display: flex;
  justify-content: space-between;
  gap: 2px;
}

.nav-icon-bar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #333;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 6px 4px;
  border-radius: 8px;
  text-decoration: none;
  min-width: 52px;
}

.nav-icon-bar a i {
  font-size: 1rem;
  color: #424242;
}

.nav-icon-bar a:hover {
  background: #f5f5f5;
  text-decoration: none;
}

.nav-icon-bar a[aria-current="page"] {
  color: var(--nav-active);
}

.nav-icon-bar a[aria-current="page"] i {
  color: var(--nav-active);
}

.nav-icon-bar a[aria-current="page"]::after {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  background: var(--nav-active);
  border-radius: 2px;
  margin-top: 2px;
}

/* Legacy dual nav from first version — hidden (replaced by drawer + icon bar) */
.nav-primary,
.nav-secondary,
.nav-toggle {
  display: none !important;
}

/* ----- Hero (pink band) ----- */
.hero-pink {
  background: linear-gradient(180deg, var(--hero-pink) 0%, var(--hero-pink-dark) 100%);
  color: #fff;
  padding: 16px 14px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-pink__badge {
  display: inline-block;
  background: #000;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.hero-pink h1 {
  margin: 0 0 8px;
  font-size: clamp(1.05rem, 4vw, 1.35rem);
  line-height: 1.35;
  font-weight: 800;
}

.hero-pink p {
  margin: 0;
  font-size: 0.82rem;
  opacity: 0.95;
}

.hero-banner-img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  background: #fce4ec;
}

/* ----- Page title blocks (inner pages) ----- */
.page-hero {
  padding: 20px 12px 12px;
  text-align: center;
  background: #fafafa;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.section {
  padding: 16px 0 24px;
}

.section-title {
  font-size: 1.05rem;
  margin: 0 0 12px;
  padding: 0 12px;
  color: #333;
}

/* ----- Legal / notice boxes ----- */
.notice {
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  border-radius: var(--radius);
  padding: 14px 12px;
  margin: 12px;
}

.notice h2 {
  margin: 0 0 8px;
  color: #e65100;
  font-size: 1rem;
}

.notice p {
  margin: 0;
  color: #5d4037;
  font-size: 0.88rem;
}

.divider {
  text-align: center;
  letter-spacing: 0.35em;
  color: #9e9e9e;
  margin: 20px 0;
  font-size: 0.85rem;
}

/* ----- Featured triple strip (ranks 2-1-3) ----- */
.featured-strip {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 16px 10px 12px;
  background: #fafafa;
  border-bottom: 1px solid var(--border);
}

.feature-card {
  flex: 1;
  max-width: 33.33%;
  text-align: center;
  position: relative;
  padding-top: 18px;
}

.feature-card__ribbon {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  min-width: 28px;
  height: 32px;
  padding: 4px 8px 0;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  border-radius: 6px 6px 0 0;
  line-height: 1;
}

.feature-card[data-rank="1"] .feature-card__ribbon {
  background: var(--ribbon-1);
}

.feature-card[data-rank="2"] .feature-card__ribbon {
  background: var(--ribbon-2);
}

.feature-card[data-rank="3"] .feature-card__ribbon {
  background: var(--ribbon-3);
}

.feature-card__media {
  display: block;
  margin: 0 auto 6px;
}

.feature-card__media img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  margin: 0 auto;
  border: 1px solid var(--border);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.feature-card--main .feature-card__media img {
  width: 88px;
  height: 88px;
}

.feature-card h3 {
  margin: 0 0 4px;
  font-size: 0.82rem;
  line-height: 1.25;
}

.feature-card h3 a {
  color: var(--text);
}

.feature-stars {
  color: var(--star);
  font-size: 0.72rem;
  letter-spacing: 1px;
  margin: 0 0 4px;
}

.feature-safe {
  margin: 0 0 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.feature-safe i {
  color: var(--safe-green);
  margin-right: 2px;
}

.btn-feature-down {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--cta-orange);
  color: #fff !important;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none !important;
  box-shadow: 0 2px 0 #bf360c;
  width: 100%;
  max-width: 140px;
}

.btn-feature-down:hover {
  filter: brightness(1.05);
  text-decoration: none !important;
}

/* ----- List tabs (cosmetic) ----- */
.list-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin: 0 12px;
}

.list-tabs button {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.list-tabs button.is-active {
  color: var(--cta-orange);
  border-bottom-color: var(--cta-orange);
}

.app-list-panel[hidden] {
  display: none !important;
}

.tab-empty {
  margin: 0;
  padding: 14px 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ----- App list rows (main listing) ----- */
.app-list {
  border-top: 1px solid var(--border);
}

.app-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.app-row__img {
  flex-shrink: 0;
}

.app-row__img img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.app-row__body {
  flex: 1;
  min-width: 0;
}

.app-row__body h2 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  line-height: 1.25;
}

.app-row__body h2 a {
  color: var(--text);
}

.app-row__bonus,
.app-row__min {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.app-row__bonus strong,
.app-row__min strong {
  color: #c62828;
  font-weight: 700;
}

.btn-row-download {
  flex-shrink: 0;
  background: var(--cta-orange);
  color: #fff !important;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none !important;
  box-shadow: 0 2px 0 #bf360c;
  white-space: nowrap;
}

.btn-row-download:hover {
  filter: brightness(1.05);
  text-decoration: none !important;
}

@media (max-width: 380px) {
  .app-row {
    flex-wrap: wrap;
  }
  .btn-row-download {
    width: 100%;
    text-align: center;
    margin-left: 74px;
  }
}

/* ----- Card grid (category pages, etc.) ----- */
.app-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 0 12px;
}

@media (min-width: 520px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.app-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
}

.app-card__media {
  display: block;
  background: #f5f5f5;
  text-align: center;
  padding: 12px;
}

.app-card__media img {
  margin: 0 auto;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.app-card__body {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.app-card__title {
  margin: 0;
  font-size: 1rem;
}

.app-card__title a {
  color: var(--text);
}

.app-card__stats {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.app-card__bonus {
  margin: 0;
  color: #c62828;
  font-weight: 700;
  font-size: 0.88rem;
}

.app-card__safe {
  margin: 0;
  font-size: 0.78rem;
  color: var(--safe-green);
}

.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 800;
  text-align: center;
  border: none;
  cursor: pointer;
}

.btn-download {
  margin-top: auto;
  background: var(--cta-orange);
  color: #fff !important;
  align-self: flex-start;
  text-decoration: none !important;
  box-shadow: 0 2px 0 #bf360c;
}

.btn-download:hover {
  filter: brightness(1.05);
  text-decoration: none !important;
}

/* Category cards */
.cat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 0 12px;
}

.cat-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cat-card img {
  border-radius: 8px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
}

.cat-card h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.cat-card p {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.btn-ghost {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text) !important;
  text-decoration: none !important;
}

/* App detail */
.app-detail-hero {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 12px;
  background: #fafafa;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 480px) {
  .app-detail-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .app-detail-hero img {
    margin: 0 auto;
  }
}

.app-detail-hero img {
  border-radius: 18px;
  border: 1px solid var(--border);
}

.stars {
  color: var(--star);
  letter-spacing: 2px;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 8px 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.prose {
  padding: 0 12px 24px;
  max-width: 100%;
}

.prose h2 {
  margin-top: 20px;
  font-size: 1.1rem;
}

.prose code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}

.faq details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
}

.seo-block {
  margin-top: 20px;
  padding: 16px 12px 32px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
  background: #fafafa;
}

/* Footer */
.site-footer {
  margin-top: 0;
  padding: 20px 12px 28px;
  border-top: 1px solid var(--border);
  background: #eeeeee;
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 800;
  text-decoration: none !important;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
}

.footer-nav a {
  color: #424242;
  font-size: 0.82rem;
}

.copyright {
  text-align: center;
  color: #757575;
  font-size: 0.8rem;
  margin-top: 12px;
}

/* Floating chat buttons (viewport-fixed, outside narrow frame) */
.float-chats {
  position: fixed;
  right: 12px;
  bottom: 72px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.float-chats a {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 0.65rem;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.float-chats .wa {
  background: #25d366;
}

.float-chats .tg {
  background: #039be5;
}

.app-card__bonus {
  font-weight: 700;
}

.detail-safe {
  margin-top: 12px;
  color: var(--safe-green);
  font-size: 0.88rem;
  font-weight: 600;
}

/* --- Inner app page --- */
.app-page-top {
  text-align: center;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fce4ec 0%, #fff 72%);
}

.app-page-banner {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 0;
}

.app-page-heading {
  margin: 10px 12px 4px;
  font-size: 1.15rem;
  line-height: 1.25;
  color: var(--header-dark);
}

.app-page-sub {
  margin: 0 12px 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.channel-row-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 14px 12px 6px;
}

.channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.channel-pill i {
  font-size: 1.1rem;
}

.channel-pill--wa {
  background: #128c7e;
}

.channel-pill--tg {
  background: #039be5;
}

.app-spotlight {
  margin: 12px 12px 20px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  background: #fff;
}

.app-spotlight__inner {
  padding: 16px 14px 18px;
  text-align: center;
  background: linear-gradient(180deg, #fff3e0 0%, #fff 55%);
}

.app-spotlight__icon {
  margin: 0 auto 10px;
  border-radius: 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.app-spotlight__title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--header-dark);
}

.app-spotlight__tag {
  margin: 0 0 6px;
  font-weight: 700;
  color: #e65100;
  font-size: 0.88rem;
}

.app-spotlight__meta {
  margin: 0 0 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.app-spotlight__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--cta-orange);
  color: #fff !important;
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none !important;
  box-shadow: 0 3px 0 #bf360c;
}

.app-spotlight__btn:hover {
  background: var(--cta-orange-hover);
}

.app-spotlight__safe {
  margin: 14px 0 0;
  font-size: 0.82rem;
  color: var(--safe-green);
  font-weight: 600;
}

.section-title {
  margin: 18px 12px 8px;
  font-size: 0.95rem;
  text-align: center;
  color: var(--header-dark);
}

.seo-hr {
  border: none;
  border-top: 1px dashed #bdbdbd;
  margin: 24px 12px;
}

.article-seo {
  padding-bottom: 8px;
  color: var(--text);
  font-size: 0.88rem;
}

.article-seo h2 {
  font-size: 1rem;
  margin: 18px 0 8px;
  color: var(--header-dark);
}

.article-seo h3 {
  font-size: 0.92rem;
  margin: 14px 0 6px;
}

.article-seo p,
.article-seo li {
  color: var(--text-muted);
  line-height: 1.55;
}

.article-seo .seo-ol {
  margin: 8px 0 8px 1.1rem;
  padding: 0;
}

.article-seo code {
  font-size: 0.85em;
  background: #f5f5f5;
  padding: 1px 6px;
  border-radius: 4px;
}
