/* ==========================================================================
   ViralSplice Blog Styling (Matching Landing Page & Brand Theme)
   ========================================================================== */

:root {
  --bg: #0F1115;
  --panel: #161922;
  --panel2: #1c2030;
  --line: #262b3b;
  --accent: #7C5CFF;
  --accent2: #B39DFF;
  --text: #EDEFF5;
  --muted: #8b92a8;
  --good: #3ddc97;
  --warn: #ffb84d;
  --bad: #ff6b81;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .logo, .brand-font {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.5px;
}

a {
  color: var(--accent2);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #fff;
}

/* Background floating glow orbs */
.bg-glow {
  position: fixed;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.25;
  z-index: 0;
  pointer-events: none;
  animation: float 14s ease-in-out infinite;
}
.g1 { background: var(--accent); top: -180px; left: -160px; }
.g2 { background: #ff4fd8; bottom: -240px; right: -160px; opacity: 0.14; animation-delay: -7s; }
@keyframes float {
  50% { transform: translate(60px, 40px); }
}

/* Header & Navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 36px;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 17, 21, 0.85);
  backdrop-filter: blur(14px);
}

.logo {
  font-size: 22px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.logo:hover {
  opacity: 0.95;
}
.logo b {
  color: var(--accent2);
  font-weight: 800;
}
.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #b04fff);
  font-size: 14px;
  color: #fff;
  box-shadow: 0 0 20px rgba(124, 92, 255, 0.5);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: #fff;
}
.nav-link.active {
  color: var(--accent2);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  padding: 9px 18px;
  border-radius: 10px;
  font: 600 13.5px 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  color: #fff;
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #9a5cff);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 18px rgba(124, 92, 255, 0.4);
}
.btn.primary:hover {
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.6);
}
.btn.ghost {
  background: transparent;
  color: var(--muted);
}
.btn.ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.grad {
  background: linear-gradient(90deg, var(--accent), #ff4fd8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Main Container */
.blog-container {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* Blog Index Hero */
.blog-hero {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 56px;
}
.blog-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.3);
  color: var(--accent2);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 20px;
}
.blog-hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}
.blog-hero p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

/* Article Cards Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
  margin-bottom: 64px;
}

.article-card {
  background: linear-gradient(180deg, var(--panel), #13161e);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
}
.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 20px 48px rgba(124, 92, 255, 0.2);
}

.card-thumb-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 ratio */
  background: #141722;
  overflow: hidden;
}
.card-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.article-card:hover .card-thumb {
  transform: scale(1.04);
}

.card-body {
  padding: 26px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 12px;
}
.card-tag {
  background: rgba(124, 92, 255, 0.15);
  color: var(--accent2);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
}
.card-title a {
  color: #fff;
}
.card-title a:hover {
  color: var(--accent2);
}

.card-excerpt {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 22px;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 16px;
  font-size: 13.5px;
  font-weight: 600;
}
.card-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent2);
}
.card-footer a:hover {
  color: #fff;
  transform: translateX(3px);
}

/* ==========================================================================
   Article Detail Page Styles
   ========================================================================== */

.article-wrapper {
  max-width: 820px;
  margin: 0 auto;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}
.breadcrumbs a {
  color: var(--muted);
}
.breadcrumbs a:hover {
  color: var(--accent2);
}
.breadcrumbs-sep {
  opacity: 0.5;
}

.article-header {
  margin-bottom: 36px;
}
.article-header h1 {
  font-size: clamp(30px, 4.5vw, 46px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 18px;
  color: #fff;
}

.article-author-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13.5px;
  color: var(--muted);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff4fd8);
  display: grid;
  place-items: center;
  font-size: 16px;
  color: #fff;
  font-weight: 700;
}

.article-hero-media {
  margin: 28px 0 40px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #12141c;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}
.article-hero-media img {
  width: 100%;
  height: auto;
  display: block;
}
.media-caption {
  padding: 10px 16px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  background: rgba(18, 20, 28, 0.95);
  border-top: 1px solid var(--line);
}

/* Article Content Body */
.article-body {
  font-size: 16.5px;
  line-height: 1.8;
  color: #d1d5e2;
}

.article-body h2 {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin: 48px 0 18px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.article-body h3 {
  font-size: 20px;
  font-weight: 600;
  color: #e2e5f2;
  margin: 32px 0 14px;
}

.article-body p {
  margin-bottom: 22px;
}

.article-body strong {
  color: #fff;
}

.article-body ul, .article-body ol {
  margin: 0 0 24px 24px;
}

.article-body li {
  margin-bottom: 10px;
}

.article-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  background: rgba(124, 92, 255, 0.08);
  border-radius: 0 12px 12px 0;
  margin: 28px 0;
  font-style: italic;
  color: #e2e5f2;
}

/* Callout Box */
.callout {
  background: linear-gradient(180deg, var(--panel), #141620);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 32px 0;
}
.callout.tip {
  border-left-color: var(--good);
}
.callout-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.callout p {
  margin-bottom: 0;
  font-size: 15px;
  color: #b8bdd0;
}

/* In-article section images */
.article-img-wrap {
  margin: 36px 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #141722;
}
.article-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

/* Comparison side-by-side */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 32px 0;
}
@media(max-width: 680px) {
  .comparison-grid {
    grid-template-columns: 1fr;
  }
}
.comparison-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.comparison-box h4 {
  font-size: 16px;
  margin-bottom: 10px;
}
.comparison-box.bad {
  border-color: rgba(255, 107, 129, 0.4);
}
.comparison-box.good {
  border-color: rgba(61, 220, 151, 0.4);
}

/* ==========================================================================
   Closing CTA Section (ViralSplice + Pro Plans)
   ========================================================================== */

.closing-cta {
  background: linear-gradient(180deg, #181b26, #12141c);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 44px 36px;
  margin: 56px 0 32px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}
.closing-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), #ff4fd8, transparent);
}

.closing-cta h3 {
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 800;
  margin-bottom: 14px;
  color: #fff;
}
.closing-cta p {
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 28px;
  font-size: 15.5px;
}

.pro-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  max-width: 760px;
  margin: 0 auto 32px;
  text-align: left;
}

.pro-plan-card {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
}
.pro-plan-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.pro-plan-card.featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.12), var(--panel2));
}

.plan-name {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.plan-price {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin: 6px 0;
}
.plan-sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
  flex-grow: 1;
}

/* Footer (Matching slice.coderao.com) */
footer.site-footer {
  text-align: center;
  padding: 40px 20px 48px;
  color: #77778f;
  font-size: 13.5px;
  border-top: 1px solid var(--line);
  background: #0b0c10;
  margin-top: 60px;
}
footer.site-footer a {
  color: var(--accent2);
}
footer.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 14px;
  font-size: 13px;
}

/* Template helper box */
.template-instructions-box {
  background: rgba(124, 92, 255, 0.05);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 24px;
  margin-top: 50px;
  font-size: 13.5px;
  color: var(--muted);
}
.template-instructions-box code {
  background: rgba(0, 0, 0, 0.4);
  color: var(--accent2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

@media (max-width: 768px) {
  .topbar {
    padding: 14px 20px;
  }
  .blog-container {
    padding: 32px 16px 60px;
  }
  .articles-grid {
    grid-template-columns: 1fr;
  }
  .closing-cta {
    padding: 32px 20px;
  }
}
