/*
Theme Name: Parimatch Download
Theme URI: https://parimatchdownload.com
Author: in-g5
Description: Parimatch APK download site for India. Dark theme with yellow accents, sticky TOC, spec tables, pros/cons, howto lightbox steps. Mobile-first, SEO-optimized, high-conversion.
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: parimatch-download
Tags: dark, betting, apk-download, seo, responsive, mobile-first, india
Requires at least: 6.0
Requires PHP: 8.0
*/

/* ==================== Design Tokens ==================== */
:root {
  --bg: #171716;
  --bg-alt: #1f1f1d;
  --bg-card: #252523;
  --bg-elev: #2a2a28;
  --yellow: #f3fa19;
  --yellow-dim: #d4db15;
  --yellow-hover: #eaf33f;
  --green: #4ade80;
  --red: #f87171;
  --blue: #3b9eff;
  --text: #ffffff;
  --text-2: #b8b8b6;
  --text-3: #76766f;
  --border: #33332f;
  --border-yellow: rgba(243, 250, 25, 0.25);
  --radius: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --max-w: 1140px;
  --shadow-y: 0 2px 12px rgba(243, 250, 25, 0.12);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.3);
  --transition: 0.2s ease;
  --font-size: 18px;
  --line-h: 1.55;
  --h1: 31px;
  --h2: 24px;
  --h3: 20px;
  --bullet: "●";
}

/* ==================== Reset ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: var(--line-h);
  font-size: var(--font-size);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--yellow); }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ==================== Utilities ==================== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 16px; }
.text-yellow { color: var(--yellow); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-center { text-align: center; }
.bg-alt { background: var(--bg-alt); }
.bgi-block { border-radius: var(--radius); overflow: hidden; }
.gradient-yellow {
  background: linear-gradient(135deg, var(--yellow), var(--yellow-dim));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hidden { display: none !important; }

/* ==================== Buttons ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius); font-weight: 700; font-size: 16px;
  border: none; text-align: center; transition: all var(--transition); text-decoration: none;
  line-height: 1.3; white-space: nowrap;
}
.btn-yellow { background: var(--yellow); color: #090807; }
.btn-yellow:hover { background: var(--yellow-hover); color: #090807; }
.btn-green { background: var(--green); color: #090807; }
.btn-green:hover { background: #22c55e; color: #090807; }
.btn-outline { background: transparent; color: var(--yellow); border: 1px solid var(--yellow); }
.btn-outline:hover { background: var(--yellow); color: #090807; }
.btn-lg { padding: 12px 28px; font-size: 18px; }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 14px; }

/* ==================== Header ==================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(23, 23, 22, 0.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: var(--max-w); margin: 0 auto; padding: 8px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-logo { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 18px; color: var(--text); text-decoration: none; }
.site-logo img, .site-logo svg { width: 120px; height: auto; }
.nav-links { display: flex; list-style: none; gap: 20px; align-items: center; }
.nav-links a { color: var(--text-2); font-weight: 600; font-size: 15px; padding: 4px 0; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--yellow); }
.nav-links a.active::after { content: ''; position: absolute; bottom: -4px; left: 0; right: 0; height: 2px; background: var(--yellow); border-radius: 1px; }
.nav-cta { display: flex; gap: 8px; }
.nav-toggle { display: none; background: none; border: none; flex-direction: column; gap: 4px; padding: 4px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 1px; transition: var(--transition); }
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

.top-spacer { height: 56px; }

@media (max-width: 768px) {
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--bg-alt); padding: 12px 16px; gap: 8px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-cta .btn-outline { display: none; }
  .nav-toggle { display: flex; }
}

/* ==================== Breadcrumb ==================== */
.breadcrumb {
  padding: 12px 0; font-size: 14px; color: var(--text-3);
}
.breadcrumb a { color: var(--text-2); }
.breadcrumb span { margin: 0 6px; color: var(--text-3); }
.breadcrumb .current { color: var(--yellow); }

/* ==================== Hero (Picture-Text Block) ==================== */
.hero-block {
  background: #353535; border-radius: var(--radius); overflow: hidden; margin-bottom: 24px;
}
.hero-inner { display: flex; align-items: stretch; }
.hero-text { flex: 2; padding: 28px; }
.hero-text h1 { font-size: var(--h1); font-weight: 800; line-height: 1.2; margin-bottom: 12px; }
.hero-text p { color: var(--text-2); font-size: 17px; max-width: 560px; }
.hero-cta-row { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* Gift Block (bonus card on hero right) */
.gift-block {
  flex: 1; background: var(--bg-card); padding: 24px; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center;
  border-left: 1px solid var(--border);
}
.gift-block__icon { width: 56px; height: 56px; }
.gift-block__icon svg { fill: var(--yellow); }
.gift-block__text { color: var(--text-2); font-size: 15px; line-height: 1.4; }
.gift-block__button { width: 100%; }

@media (max-width: 768px) {
  .hero-inner { flex-direction: column-reverse; }
  .gift-block { border-left: none; border-top: 1px solid var(--border); padding: 20px; }
  .hero-text { padding: 20px; }
}

/* ==================== Sticky TOC Sidebar ==================== */
.toc-wrap {
  background: var(--bg-card); border-radius: var(--radius); padding: 12px 16px;
  margin-bottom: 20px;
}
.toc-head {
  font-size: 14px; font-weight: 700; color: var(--yellow);
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
  cursor: pointer;
}
.toc-head::before { content: "☰"; font-size: 16px; }
.toc-list { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.toc-list li a {
  font-size: 13px; color: var(--text-2); padding: 2px 0; display: block;
  border-left: 2px solid transparent; padding-left: 8px; transition: var(--transition);
}
.toc-list li a:hover { color: var(--yellow); border-left-color: var(--yellow); }

@media (min-width: 992px) {
  .layout-grid { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
  .toc-wrap { position: sticky; top: 70px; max-height: calc(100vh - 80px); overflow-y: auto; }
  .toc-list { flex-direction: column; gap: 2px; }
}

/* ==================== Content Sections ==================== */
.section { padding: 24px 0; }
.section-alt { padding: 24px 0; background: var(--bg-alt); }
.section-heading { margin-bottom: 20px; }
.section-heading h2 { font-size: var(--h2); font-weight: 800; margin-bottom: 6px; }
.section-heading p { color: var(--text-2); font-size: 16px; }
.section-divider { width: 48px; height: 3px; background: var(--yellow); margin-top: 8px; border-radius: 2px; }

.content-block { margin-bottom: 20px; }
.content-block h2 { font-size: var(--h2); font-weight: 800; margin-bottom: 10px; scroll-margin-top: 70px; }
.content-block h3 { font-size: var(--h3); font-weight: 700; margin-top: 16px; margin-bottom: 8px; scroll-margin-top: 70px; }
.content-block p { color: var(--text-2); margin-bottom: 12px; }
.content-block ul, .content-block ol { margin: 8px 0 12px 20px; }
.content-block li { color: var(--text-2); margin-bottom: 4px; position: relative; padding-left: 16px; }
.content-block ul li::before { content: var(--bullet); color: var(--yellow); position: absolute; left: 0; }
.content-block ol { list-style: decimal; }
.content-block strong { color: var(--text); }
.content-block a { color: var(--blue); text-decoration: underline; }
.content-block a:hover { color: var(--yellow); }

/* ==================== Spec Table ==================== */
.spec-table-wrap { overflow-x: auto; margin: 16px 0; }
.spec-table { width: 100%; border-collapse: collapse; border-radius: var(--radius); overflow: hidden; }
.spec-table td { border: 1px solid var(--border); padding: 8px 12px; font-size: 15px; }
.spec-table tr td:first-child { background: var(--yellow); color: #000; font-weight: 700; width: 35%; }
.spec-table tr td:last-child { background: #feffed; color: #1a1a1a; }
@media (max-width: 600px) {
  .spec-table tr td:first-child { width: 45%; font-size: 13px; }
  .spec-table tr td:last-child { font-size: 13px; }
}

/* ==================== Howto Steps (with screenshots) ==================== */
.howto-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 16px 0; }
.howto-step {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; text-align: center; transition: border-color var(--transition);
}
.howto-step:hover { border-color: var(--border-yellow); }
.howto-step__num {
  width: 36px; height: 36px; border-radius: 50%; background: var(--yellow); color: #000;
  display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 16px;
  margin: 0 auto 8px;
}
.howto-step__img {
  margin: 8px 0; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  border: 1px solid var(--border); transition: var(--transition);
}
.howto-step__img:hover { border-color: var(--yellow); }
.howto-step__img img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.howto-step__text { color: var(--text-2); font-size: 14px; line-height: 1.4; }
.howto-step__text strong { color: var(--text); }

/* Lightbox */
.lightbox {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.9); z-index: 9999; align-items: center; justify-content: center;
  cursor: pointer; padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90%; max-height: 90%; border-radius: var(--radius); object-fit: contain; }
.lightbox__close { position: absolute; top: 16px; right: 16px; color: var(--yellow); font-size: 28px; cursor: pointer; }

/* ==================== Pros / Cons ==================== */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
@media (max-width: 600px) { .pros-cons { grid-template-columns: 1fr; } }
.pros-card, .cons-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
}
.pros-card { border-left: 3px solid var(--green); }
.cons-card { border-left: 3px solid var(--red); }
.pros-card h3, .cons-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.pros-card h3 { color: var(--green); }
.cons-card h3 { color: var(--red); }
.pros-card li, .cons-card li { color: var(--text-2); padding-left: 20px; margin-bottom: 6px; position: relative; font-size: 15px; }
.pros-card li::before { content: "✓"; color: var(--green); position: absolute; left: 0; font-weight: 700; }
.cons-card li::before { content: "✗"; color: var(--red); position: absolute; left: 0; font-weight: 700; }

/* ==================== Feature Grid ==================== */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; transition: border-color var(--transition);
}
.feature-card:hover { border-color: var(--border-yellow); }
.feature-card__icon { width: 32px; height: 32px; margin-bottom: 8px; }
.feature-card__icon svg { fill: var(--yellow); }
.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.feature-card p { color: var(--text-2); font-size: 14px; line-height: 1.4; }

/* ==================== Game Grid ==================== */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.game-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; text-align: center; transition: all var(--transition);
}
.game-card:hover { border-color: var(--yellow); transform: translateY(-2px); }
.game-card__icon { font-size: 36px; margin-bottom: 6px; }
.game-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.game-card p { color: var(--text-2); font-size: 13px; line-height: 1.3; margin-bottom: 8px; }

/* ==================== Split Layout ==================== */
.content-split { display: flex; gap: 24px; align-items: center; margin: 16px 0; }
.content-split > * { flex: 1; }
.split-image img { border-radius: var(--radius); border: 1px solid var(--border); }
@media (max-width: 768px) { .content-split { flex-direction: column; gap: 16px; } }

/* ==================== FAQ (card style, not accordion) ==================== */
.faq-grid { display: grid; gap: 8px; }
.faq-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px;
}
.faq-card__q { font-size: 16px; font-weight: 700; color: var(--yellow); margin-bottom: 6px; display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.faq-card__q::before { content: "Q"; flex-shrink: 0; width: 24px; height: 24px; background: var(--yellow); color: #000; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; }
.faq-card__a { color: var(--text-2); font-size: 15px; padding-left: 32px; }
.faq-card__a::before { content: "A: "; color: var(--text-3); font-weight: 700; }

/* Old accordion fallback (keep compatible) */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 6px; overflow: hidden; }
.faq-question { width: 100%; background: none; border: none; color: var(--text); font-size: 16px; font-weight: 600; text-align: left; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; }
.faq-question .icon { color: var(--yellow); font-size: 20px; transition: transform var(--transition); }
.faq-item.open .faq-question .icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.open .faq-answer { max-height: 400px; }
.faq-answer p { padding: 0 16px 12px; color: var(--text-2); font-size: 15px; }

/* ==================== Steps List (vertical) ==================== */
.steps-list { display: flex; flex-direction: column; gap: 12px; max-width: 720px; margin: 0 auto; }
.step-item { display: flex; gap: 12px; align-items: flex-start; }
.step-number { flex-shrink: 0; width: 36px; height: 36px; background: var(--yellow); color: #000; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 16px; }
.step-content h3 { font-size: 17px; font-weight: 700; margin-bottom: 2px; }
.step-content p { color: var(--text-2); font-size: 15px; }

/* ==================== Payments Strip ==================== */
.payments-strip { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin-top: 12px; }
.payments-strip img { height: 28px; width: auto; border-radius: 3px; background: #fff; padding: 2px; }

/* ==================== Notice Box ==================== */
.notice-box {
  display: flex; gap: 10px; align-items: flex-start; background: var(--bg-card);
  border: 1px solid var(--border); border-left: 3px solid var(--yellow); border-radius: var(--radius);
  padding: 12px 16px; margin: 16px 0; max-width: 720px;
}
.notice-box .icon { font-size: 18px; flex-shrink: 0; }
.notice-box p { color: var(--text-2); font-size: 15px; margin: 0; }

/* ==================== CTA Banner ==================== */
.cta-banner { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; max-width: 720px; margin: 0 auto; }
.cta-banner h2 { font-size: var(--h2); font-weight: 800; margin-bottom: 6px; }
.cta-banner p { color: var(--text-2); margin: 8px auto 16px; max-width: 500px; font-size: 16px; }

/* ==================== Download Cards ==================== */
.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; max-width: 600px; margin: 0 auto; }
.download-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; transition: border-color var(--transition); }
.download-card:hover { border-color: var(--yellow); }
.platform-icon { font-size: 40px; margin-bottom: 6px; }
.download-card h3 { font-size: 18px; margin-bottom: 4px; }
.download-card .version { color: var(--text-2); font-size: 13px; margin-bottom: 2px; font-family: var(--font-mono); }
.download-card p { color: var(--text-2); font-size: 14px; margin-bottom: 12px; }

/* ==================== Sticky Mobile Bar ==================== */
.sticky-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: rgba(23, 23, 22, 0.98); backdrop-filter: blur(8px);
  border-top: 1px solid var(--border); padding: 8px 12px;
  display: none; gap: 8px; align-items: center; justify-content: center;
}
.sticky-bar .btn { flex: 1; max-width: 180px; }
@media (max-width: 768px) { .sticky-bar { display: flex; } body { padding-bottom: 60px; } }

/* ==================== License Card ==================== */
.license-card { display: flex; gap: 16px; align-items: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.license-badge { flex-shrink: 0; }
.license-badge img { width: 64px; height: 64px; }
.license-text h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.license-text p { color: var(--text-2); font-size: 14px; margin-bottom: 4px; }

/* ==================== Footer ==================== */
.site-footer { background: #828282; padding: 24px 0 48px; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 16px; }
.footer-logo { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.footer-links a { color: #e0e0e0; font-size: 14px; }
.footer-links a:hover { color: var(--yellow); }
.footer-social { display: flex; gap: 8px; margin-bottom: 12px; }
.footer-social a { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.footer-social a:hover { background: var(--yellow); }
.footer-social svg { width: 16px; height: 16px; fill: #fff; }
.footer-legal { color: #d0d0d0; font-size: 13px; line-height: 1.5; max-width: 600px; margin-bottom: 8px; }
.footer-copy { color: #a0a0a0; font-size: 12px; }

/* Scroll to top */
.scrolltop {
  position: fixed; bottom: 16px; right: 16px; width: 40px; height: 40px;
  background: var(--yellow); color: #000; border: none; border-radius: 50%;
  display: none; align-items: center; justify-content: center; font-size: 20px; cursor: pointer;
  z-index: 80; transition: var(--transition);
}
.scrolltop.visible { display: flex; }
.scrolltop:hover { background: var(--yellow-hover); }
@media (max-width: 768px) { .scrolltop { bottom: 72px; } }

/* ==================== Blog ==================== */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.blog-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color var(--transition); }
.blog-card:hover { border-color: var(--yellow); }
.blog-card__thumb { aspect-ratio: 16/9; background: var(--bg-elev); overflow: hidden; }
.blog-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-card__body { padding: 14px; }
.blog-card__title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.blog-card__title a { color: var(--text); }
.blog-card__title a:hover { color: var(--yellow); }
.blog-card__meta { font-size: 13px; color: var(--text-3); margin-bottom: 6px; }
.blog-card__excerpt { color: var(--text-2); font-size: 14px; line-height: 1.4; }

/* ==================== Article (single.php) ==================== */
.article-body { max-width: 720px; margin: 0 auto; }
.article-body h2 { font-size: var(--h2); font-weight: 800; margin: 20px 0 8px; }
.article-body h3 { font-size: var(--h3); font-weight: 700; margin: 16px 0 6px; }
.article-body p { color: var(--text-2); margin-bottom: 12px; }
.article-body ul, .article-body ol { margin: 8px 0 12px 20px; }
.article-body li { color: var(--text-2); margin-bottom: 4px; }
.article-body ul li::before { content: var(--bullet); color: var(--yellow); margin-right: 6px; }
.article-body ol { list-style: decimal; }
.article-body img { border-radius: var(--radius); margin: 12px 0; }
.article-body strong { color: var(--text); }
.article-body a { color: var(--blue); text-decoration: underline; }
.article-body blockquote { border-left: 3px solid var(--yellow); padding: 8px 16px; margin: 12px 0; background: var(--bg-card); border-radius: 0 var(--radius) var(--radius) 0; color: var(--text-2); font-style: italic; }

/* ==================== 404 ==================== */
.error-404 { text-align: center; padding: 80px 16px; }
.error-404 h1 { font-size: 72px; font-weight: 900; color: var(--yellow); margin-bottom: 8px; }
.error-404 p { color: var(--text-2); margin-bottom: 20px; font-size: 18px; }

/* ==================== Responsive ==================== */
@media (max-width: 600px) {
  :root { --font-size: 16px; --h1: 26px; --h2: 20px; --h3: 18px; }
  .hero-text h1 { font-size: 26px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
}

/* ==================== Print ==================== */
@media print {
  .site-header, .sticky-bar, .scrolltop, .nav-cta, .toc-wrap { display: none !important; }
  body { background: #fff; color: #000; }
}