/* ============================================================
   Promptchan AI Coupon — site stylesheet
   Dark editorial theme with magenta accent
   ============================================================ */

:root {
  --bg: #0d0b14;
  --bg-soft: #151221;
  --bg-card: #1a1628;
  --border: #2b2440;
  --text: #e8e4f2;
  --text-muted: #a79fc0;
  --accent: #e64ca6;
  --accent-soft: #f27ec0;
  --accent-dark: #b02d7c;
  --link: #8ab4ff;
  --warn-bg: #2a2038;
  --radius: 10px;
  --maxw: 860px;
  font-size: 17px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 11, 20, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-logo {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-logo .logo-accent { color: var(--accent); }

#main-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-left: auto;
  align-items: center;
}

#main-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

#main-nav a:hover { color: var(--text); background: var(--bg-card); }

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
}

.nav-cta:hover { background: var(--accent-dark); }

#main-nav a.nav-cta-desktop { margin-left: 0.35rem; }

/* Mobile-only CTA next to the hamburger */
.nav-cta-mobile { display: none; margin-left: auto; }

/* ---------- Hamburger button ---------- */
#menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 40px;
  padding: 8px 9px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

#menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}

#menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#menu-toggle.open span:nth-child(2) { opacity: 0; }
#menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Breadcrumbs ---------- */
#breadcrumbs {
  max-width: var(--maxw);
  margin: 1.1rem auto 0;
  padding: 0 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

#breadcrumbs a { color: var(--text-muted); text-decoration: none; }
#breadcrumbs a:hover { color: var(--accent-soft); }
#breadcrumbs .crumb-sep { margin: 0 0.4rem; opacity: 0.6; }

/* ---------- Article ---------- */
#article-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.5rem 1rem 3rem;
}

.article-meta-line {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.8rem 0 0;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.article-meta-line .meta-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
}

#article-body h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 1rem 0 0.8rem;
  font-weight: 800;
}

#article-body h2 {
  font-size: 1.35rem;
  margin: 2.2rem 0 0.7rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}

#article-body h3 {
  font-size: 1.08rem;
  margin: 1.6rem 0 0.5rem;
  font-weight: 700;
}

#article-body p { margin: 0.75rem 0; }

#article-body a { color: var(--link); text-decoration: none; border-bottom: 1px solid rgba(138, 180, 255, 0.35); }
#article-body a:hover { color: #b7d0ff; border-bottom-color: #b7d0ff; }

#article-body ul, #article-body ol { padding-left: 1.4rem; margin: 0.75rem 0; }
#article-body li { margin: 0.3rem 0; }

/* Direct-answer blockquote */
#article-body blockquote {
  margin: 1.3rem 0;
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, rgba(230, 76, 166, 0.10), rgba(230, 76, 166, 0.03));
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

#article-body blockquote p { margin: 0.3rem 0; }

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 1.2rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

#article-body table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
  min-width: 480px;
}

#article-body th {
  background: var(--bg-card);
  color: var(--accent-soft);
  text-align: left;
  font-weight: 700;
  padding: 0.6rem 0.8rem;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

#article-body td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

#article-body tr:last-child td { border-bottom: none; }
#article-body tbody tr:hover { background: rgba(230, 76, 166, 0.05); }

/* Code */
#article-body code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1rem 0.35rem;
  font-size: 0.85em;
  font-family: 'SFMono-Regular', Consolas, monospace;
}

#article-body pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
}

#article-body pre code { background: none; border: none; padding: 0; }

/* ---------- Tracked affiliate CTA buttons ---------- */
#article-body p.cta-block { text-align: center; margin: 1.6rem 0; }

#article-body a.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  border-bottom: none;
  box-shadow: 0 4px 18px rgba(230, 76, 166, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

#article-body a.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(230, 76, 166, 0.5);
  color: #fff;
}

/* Inline sponsored links keep normal style but accent colour */
#article-body a[data-cta="inline"] { color: var(--accent-soft); border-bottom-color: rgba(242, 126, 192, 0.4); }

/* Disclosure paragraph highlight */
#article-body p.disclosure-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--warn-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
}

/* ---------- Related guides ---------- */
#related-guides {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

#related-guides h2 {
  font-size: 1.2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.related-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

.related-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.related-card .rc-cat { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-soft); font-weight: 700; }
.related-card .rc-title { font-size: 0.9rem; font-weight: 600; margin-top: 0.25rem; line-height: 1.4; }

/* ---------- Guides index page ---------- */
.guides-hero { text-align: center; padding: 2.2rem 1rem 0.5rem; }
.guides-hero h1 { font-size: 2rem; margin: 0 0 0.4rem; }
.guides-hero p { color: var(--text-muted); max-width: 620px; margin: 0 auto; }

.guides-section { max-width: 1080px; margin: 0 auto; padding: 1rem; }
.guides-section h2 { font-size: 1.25rem; color: var(--accent-soft); margin: 1.8rem 0 0.6rem; }

/* ---------- Footer ---------- */
#site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  margin-top: 2rem;
  padding: 2rem 1rem 2.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-inner { max-width: 1080px; margin: 0 auto; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-cols h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin: 0 0 0.6rem;
}

.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin: 0.3rem 0; }
.footer-cols a { color: var(--text-muted); text-decoration: none; }
.footer-cols a:hover { color: var(--accent-soft); }

.footer-legal {
  border-top: 1px solid var(--border);
  padding-top: 1.2rem;
  line-height: 1.7;
}

.badge-18 {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  border-radius: 6px;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  margin-right: 0.5rem;
}

/* ---------- Hero conversion banner ---------- */
.hero-banner {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.2rem;
  align-items: center;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(230, 76, 166, 0.16), transparent 60%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem;
  margin: 1.5rem 0;
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: top;
  border-radius: 10px;
  display: block;
  border: 1px solid var(--border);
}

.hero-kicker {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-soft);
  margin-bottom: 0.4rem;
}

.hero-lead { margin: 0.2rem 0 0.7rem; font-size: 1.02rem; font-weight: 600; line-height: 1.5; }

.hero-points {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

#article-body a.hero-cta { margin: 0; }

.hero-disclosure {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  opacity: 0.85;
  margin-top: 0.6rem;
}

/* ---------- Article figures ---------- */
.article-figure {
  margin: 1.6rem 0;
  text-align: center;
}

.article-figure img,
.article-figure video {
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.article-figure img { max-height: 480px; object-fit: contain; background: var(--bg-card); }

.video-figure video { width: 100%; max-width: 560px; max-height: 560px; background: #000; }

.article-figure figcaption {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ---------- Gallery strip ---------- */
.gallery-strip { margin: 2rem 0; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.gallery-grid img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-grid img:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 24px rgba(230, 76, 166, 0.25);
}

.gallery-note { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.6rem; }

/* ---------- Site-wide direct answer box ---------- */
.direct-answer-box {
  margin: 2.4rem 0 1rem;
  padding: 1.4rem 1.5rem 1.6rem;
  background:
    radial-gradient(140% 180% at 100% 0%, rgba(230, 76, 166, 0.14), transparent 55%),
    var(--bg-card);
  border: 1px solid var(--accent-dark);
  border-radius: 14px;
  text-align: left;
}

.direct-answer-box .da-title {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
  border-bottom: none;
  padding-bottom: 0;
  color: var(--accent-soft);
}

.direct-answer-box p { margin: 0 0 1rem; }
.direct-answer-box .da-content p { margin: 0 0 1rem; }

#article-body a.da-cta { margin: 0; }

/* ---------- Sticky bottom CTA bar ---------- */
#sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  transform: translateY(110%);
  transition: transform 0.35s ease;
  background: rgba(19, 15, 30, 0.97);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--accent-dark);
  box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.45);
}

#sticky-cta.visible { transform: translateY(0); }

.sticky-cta-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1rem;
}

.sticky-cta-text { font-size: 0.88rem; color: var(--text-muted); flex: 1; min-width: 0; }
.sticky-cta-text strong { color: var(--text); }

.sticky-cta-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 3px 14px rgba(230, 76, 166, 0.4);
}

.sticky-cta-btn:hover { background: var(--accent-dark); }

.sticky-cta-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  line-height: 1;
}

.sticky-cta-close:hover { color: var(--text); }

/* ---------- Loading state ---------- */
.article-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 4rem 1rem;
  font-size: 0.9rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  /* Header becomes logo + CTA + hamburger on one row */
  .header-inner { flex-wrap: nowrap; align-items: center; gap: 0.6rem; }
  .site-logo { font-size: 1.02rem; }

  .nav-cta-mobile { display: inline-block; font-size: 0.78rem; padding: 0.4rem 0.8rem; }
  #menu-toggle { display: flex; flex-shrink: 0; }

  /* Slide-down full-width menu */
  #main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0.4rem 0 0.7rem;
    background: rgba(13, 11, 20, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
  }

  #main-nav.open { display: flex; }

  #main-nav a {
    font-size: 1rem;
    padding: 0.8rem 1.2rem;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
  }

  #main-nav a:last-child { border-bottom: none; }

  #main-nav a.nav-cta-desktop {
    margin: 0.7rem 1.2rem 0.2rem;
    border-radius: 999px;
    text-align: center;
    border-bottom: none;
  }
}

@media (max-width: 640px) {
  :root { font-size: 16px; }

  #article-body h1 { font-size: 1.45rem; }
  #article-body h2 { font-size: 1.18rem; }
  #article-body h3 { font-size: 1.02rem; }
  #article-main { padding-bottom: 2rem; }

  /* Meta chips wrap tighter */
  .article-meta-line { gap: 0.4rem; }
  .article-meta-line .meta-chip { font-size: 0.7rem; padding: 0.12rem 0.55rem; }

  /* Hero stacks vertically */
  .hero-banner { grid-template-columns: 1fr; padding: 1rem; gap: 0.9rem; }
  .hero-media img { height: 210px; }
  .hero-lead { font-size: 0.95rem; }
  .hero-points { gap: 0.5rem; font-size: 0.75rem; }
  #article-body a.hero-cta { display: block; text-align: center; }

  /* Figures and galleries */
  .article-figure img { max-height: 340px; }
  .video-figure video { max-width: 100%; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .gallery-grid img { height: 160px; }

  /* Tables scroll smoothly */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  #article-body table { font-size: 0.8rem; min-width: 420px; }
  #article-body th, #article-body td { padding: 0.45rem 0.6rem; }

  /* CTA buttons go full width */
  #article-body a.cta-button { display: block; text-align: center; padding: 0.75rem 1rem; }

  /* Quick summary box */
  .direct-answer-box { padding: 1.1rem 1rem 1.2rem; }

  /* Related cards single column on small phones */
  .related-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .related-card { padding: 0.7rem 0.8rem; }
  .related-card .rc-title { font-size: 0.82rem; }

  /* Sticky bar compact */
  .sticky-cta-text { display: none; }
  .sticky-cta-inner { justify-content: center; padding: 0.55rem 0.8rem; }
  .sticky-cta-btn { width: 100%; max-width: 320px; text-align: center; }

  /* Footer single column feel */
  .footer-cols { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}

@media (max-width: 400px) {
  .related-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .gallery-grid img { height: 140px; }
  .site-logo { font-size: 0.95rem; }
  .nav-cta-mobile { font-size: 0.72rem; padding: 0.35rem 0.65rem; }
}
