/* ==========================================================================
   templatein10 — India Entertainment / Streaming APK Download Template
   Design language: "Cinema Discovery" — a warm, editorial media layout built
   for movie / TV / streaming app discovery and download. Poster-style cards,
   underline navigation, block CTA buttons. One accent (marquee crimson) plus
   a muted gold reserved only for the rating star. Mobile-first, no UI
   framework, system fonts only.
   ========================================================================== */

:root{
  /* ---- Color tokens ---- */
  --bg:         #faf6ef;
  --bg-alt:     #f2ebdd;
  --surface:    #ffffff;
  --surface-2:  #fbf8f2;
  --border:     #e8e0cf;
  --ink:        #241a2e;
  --ink-dim:    #6a5f78;
  --ink-faint:  #978c9f;

  --accent:      #c6234c;   /* marquee crimson — CTA / links / active states */
  --accent-dark: #9c1a3b;
  --accent-soft: rgba(198,35,76,.09);
  --accent-ink:  #ffffff;
  --gold:        #ab7d1f;   /* rating star only */

  /* ---- Type ---- */
  --font-display: Georgia, "Noto Serif", "Times New Roman", serif;
  --font-body:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* ---- Layout ---- */
  --maxw: 1180px;
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 18px;

  --bar-h: 52px;
  --nav-h: 46px;
}

/* ---- Reset ---- */
*, *::before, *::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img{ max-width: 100%; height: auto; display: block; }
a{ color: inherit; text-decoration: none; }
ul, ol{ margin: 0; padding: 0; list-style: none; }
button{ font: inherit; }
h1,h2,h3,h4{ margin: 0 0 .5em; line-height: 1.2; font-family: var(--font-display); font-weight: 700; }
p{ margin: 0 0 1em; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

:focus-visible{
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.container{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden{
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link{
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  z-index: 999;
  border-radius: 0 0 6px 0;
  font-weight: 700;
}
.skip-link:focus{ left: 0; }

/* ==========================================================================
   HEADER — two-tier: brand row + underline nav row (desktop)
   ========================================================================== */
.site-header{
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-top{
  height: var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
}
.brand img{ width: 34px; height: 34px; flex-shrink: 0; }
.brand-name{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-cta{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  border-bottom: 3px solid var(--accent-dark);
}
.header-cta:hover{ background: var(--accent-dark); }

.menu-toggle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
}
.menu-toggle svg{ width: 20px; height: 20px; }
.menu-toggle .icon-close{ display: none; }
.menu-toggle[aria-expanded="true"] .icon-open{ display: none; }
.menu-toggle[aria-expanded="true"] .icon-close{ display: block; }

.header-nav-row{
  display: none;
  border-top: 1px solid var(--border);
}
.header-nav-row ul{
  display: flex;
  gap: 22px;
  height: var(--nav-h);
}
.header-nav-row a{
  display: flex;
  align-items: center;
  height: 100%;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-dim);
  border-bottom: 2px solid transparent;
}
.header-nav-row a:hover,
.header-nav-row a[aria-current="page"]{
  color: var(--ink);
  border-bottom-color: var(--accent);
}

@media (min-width: 860px){
  .header-nav-row{ display: block; }
  .menu-toggle{ display: none; }
  .mobile-nav{ display: none !important; }
}

/* ---- Mobile nav: side drawer ---- */
.mobile-nav{
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(320px, 84vw);
  background: var(--surface);
  z-index: 39;
  padding: 20px;
  overflow-y: auto;
  box-shadow: -8px 0 30px rgba(36,26,46,.18);
  transform: translateX(100%);
  transition: transform .28s ease;
}
.mobile-nav.is-open{ transform: translateX(0); }
.mobile-nav-scrim{
  position: fixed;
  inset: 0;
  background: rgba(36,26,46,.35);
  z-index: 38;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
.mobile-nav-scrim.is-open{ opacity: 1; pointer-events: auto; }
.mobile-nav-head{
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.mobile-nav ul{ display: flex; flex-direction: column; }
.mobile-nav a{
  display: block;
  padding: 14px 4px;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.mobile-nav .header-cta{
  display: flex;
  justify-content: center;
  margin-top: 20px;
  width: 100%;
}

/* ==========================================================================
   BREADCRUMB (download / special page)
   ========================================================================== */
.breadcrumb{ padding: 14px 0 0; }
.breadcrumb ol{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-faint);
}
.breadcrumb li:not(:last-child)::after{
  content: "/";
  margin-left: 6px;
  color: var(--ink-faint);
}
.breadcrumb a{ color: var(--ink-dim); }
.breadcrumb a:hover{ color: var(--accent); }
.breadcrumb [aria-current]{ color: var(--ink); font-weight: 600; }

/* ==========================================================================
   HERO — poster / marquee card
   ========================================================================== */
.hero{ padding: 36px 0 44px; }
.hero-grid{
  display: grid;
  gap: 30px;
}
.category-ribbon{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: 1px solid rgba(198,35,76,.25);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero h1{
  font-size: clamp(28px, 6vw, 42px);
  letter-spacing: -.01em;
  color: var(--ink);
}
.hero-desc{
  color: var(--ink-dim);
  font-size: 16px;
  max-width: 58ch;
  font-family: var(--font-body);
}
.hero-updated{
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 6px;
  display: block;
}

.cta-row{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
}
.btn-primary{
  background: var(--accent);
  color: var(--accent-ink);
  border-bottom: 4px solid var(--accent-dark);
}
.btn-primary:hover{ background: var(--accent-dark); }
.btn-outline{
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover{ background: var(--ink); color: var(--surface); }
.btn-icon{ width: 18px; height: 18px; flex-shrink: 0; }

/* ---- Poster card ---- */
.poster-card{
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 18px 40px -22px rgba(36,26,46,.35);
  max-width: 420px;
}
.poster-card-top{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.poster-card-top img{
  width: 72px; height: 72px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.poster-card-name{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}
.poster-card-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-dim);
}
.rating-chip{ color: var(--gold); font-weight: 700; }
.poster-card .download-note{
  font-size: 12.5px;
  color: var(--ink-faint);
  margin: 10px 0 0;
}
.poster-card .btn{ width: 100%; }

/* ==========================================================================
   SECTION SCAFFOLDING
   ========================================================================== */
.section{ padding: 40px 0; border-top: 1px solid var(--border); }
.section-head{ margin-bottom: 22px; }
.section-title{ font-size: 24px; color: var(--ink); }
.section-sub{ color: var(--ink-dim); font-family: var(--font-body); margin: 0; }

/* ---- App information: icon list rows ---- */
.spec-list{
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
}
.spec-row{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.spec-row:last-child{ border-bottom: none; }
.spec-row:nth-child(odd){ background: var(--surface-2); }
.spec-icon{
  width: 20px; height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}
.spec-label{
  font-size: 13px;
  color: var(--ink-faint);
  flex: 1 1 auto;
}
.spec-value{
  font-weight: 700;
  color: var(--ink);
  font-size: 14px;
  text-align: right;
}
.spec-value.is-accent{ color: var(--gold); }

@media (min-width: 640px){
  .spec-list{ grid-template-columns: 1fr 1fr; }
  .spec-row{ border-bottom: 1px solid var(--border); }
  .spec-row:nth-child(4n+1),
  .spec-row:nth-child(4n+2){ background: var(--surface-2); }
  .spec-row:nth-child(4n+3),
  .spec-row:nth-child(4n+4){ background: var(--surface); }
}

/* ---- How to install: numbered steps ---- */
.steps{ counter-reset: step; max-width: 68ch; }
.step{
  position: relative;
  padding: 4px 0 18px 42px;
  counter-increment: step;
}
.step::before{
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step p{ margin: 3px 0 0; }

/* ---- Discovery poster cards (latest / popular) ---- */
.poster-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.poster-tile{
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.poster-tile-media{
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--bg-alt);
  overflow: hidden;
}
.poster-tile-media img{
  width: 100%; height: 100%;
  object-fit: cover;
}
.poster-tile-scrim{
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(to top, rgba(36,26,46,.82), rgba(36,26,46,0));
}
.poster-tile-title{
  position: absolute;
  left: 10px; right: 10px; bottom: 10px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.poster-tile-date{
  display: block;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--ink-faint);
}

@media (min-width: 640px){
  .poster-grid{ grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 980px){
  .poster-grid{ grid-template-columns: repeat(4, 1fr); }
}

/* ---- Special pages strip ---- */
.pages-strip{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pages-strip a{
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-dim);
  background: var(--surface);
}
.pages-strip a:hover{ border-color: var(--accent); color: var(--accent-dark); }

/* ---- Article body ---- */
.article-body{ font-family: var(--font-body); }
.article-body h2{ font-size: 22px; margin-top: 1.4em; color: var(--ink); }
.article-body h3{ font-size: 18px; margin-top: 1.2em; color: var(--ink); }
.article-body p{ color: var(--ink); }
.article-body figure{ margin: 20px 0; }
.article-body figure img{
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.article-body figcaption{
  font-size: 13px;
  color: var(--ink-faint);
  margin-top: 6px;
  text-align: center;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer{
  background: var(--ink);
  color: #d8d1e0;
  padding: 44px 0 24px;
  margin-top: 20px;
}
.footer-grid{
  display: grid;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  margin-bottom: 10px;
}
.footer-brand img{ width: 28px; height: 28px; }
.footer-desc{ font-size: 13.5px; color: #b4abc0; font-family: var(--font-body); }
.footer-col-title{
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #fff;
  margin-bottom: 12px;
}
.footer-col ul{ display: flex; flex-direction: column; gap: 9px; }
.footer-col a{ font-size: 14px; color: #cabfd6; }
.footer-col a:hover{ color: #fff; }

.footer-bottom{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  padding-top: 18px;
  font-size: 13px;
  color: #a89dbb;
}
.footer-disclosure{
  font-size: 12px;
  color: #8f83a4;
  margin: 14px 0 0;
  font-family: var(--font-body);
}

@media (min-width: 720px){
  .footer-grid{ grid-template-columns: 1.4fr 1fr 1fr; }
}

/* ==========================================================================
   STICKY MOBILE DOWNLOAD BAR
   ========================================================================== */
.sticky-dl-bar{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 20px rgba(36,26,46,.12);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transform: translateY(100%);
  transition: transform .25s ease;
}
.sticky-dl-bar.is-visible{ transform: translateY(0); }
.sticky-dl-bar div{ min-width: 0; }
.sticky-dl-bar strong{
  display: block;
  font-size: 14px;
  font-family: var(--font-display);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sticky-dl-bar span{ font-size: 12px; color: var(--ink-faint); }
.sticky-dl-bar .btn{ padding: 10px 18px; font-size: 14px; flex-shrink: 0; }

@media (min-width: 860px){
  .sticky-dl-bar{ display: none; }
}

/* ---- Back to top ---- */
.back-to-top{
  position: fixed;
  right: 16px;
  bottom: 74px;
  z-index: 44;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}
.back-to-top.is-visible{ opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top svg{ width: 20px; height: 20px; }

@media (min-width: 860px){
  .back-to-top{ bottom: 24px; }
}

/* ==========================================================================
   LAYOUT: content + aside
   ========================================================================== */
.layout.with-aside {
  display: block;   /* 取消网格布局 */
}

@media (min-width: 860px){
  .hero-grid{ grid-template-columns: 1.1fr .9fr; align-items: center; }
  .layout.with-aside{ grid-template-columns: 1fr;  }
  .aside .poster-grid{ grid-template-columns: repeat(2, 1fr) !important; }
}
