/* ─── Viralin Tools Hub — shared styles ───
   Pakai palet yang sama dengan index.html (dark + light mode)
   ─────────────────────────────────────────────────────── */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #0ea5e9;
  --accent-text: #0284c7;
  --accent-soft: #e0f2fe;
  --radius: 16px;
  --ok: #10b981;
  --warn: #f59e0b;
  --err: #ef4444;
}

html[data-theme="dark"] {
  --bg: #09161f;
  --surface: #0e1e2b;
  --surface-2: #142838;
  --text: #f1f5f9;
  --muted: #829ab1;
  --line: #1c3449;
  --accent: #0ea5e9;
  --accent-text: #38bdf8;
  --accent-soft: rgba(14, 165, 233, 0.16);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* ─── Header ─── */
.tools-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
  display: flex; align-items: center; gap: 16px;
  backdrop-filter: blur(12px);
}
.tools-header .brand {
  font-weight: 800; font-size: 18px; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
.tools-header .brand span { color: var(--accent); }
.tools-header nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.tools-header nav a {
  color: var(--muted); text-decoration: none; font-size: 14px;
  padding: 8px 14px; border-radius: 10px; font-weight: 600;
  transition: all .15s;
}
.tools-header nav a:hover { color: var(--text); background: var(--surface-2); }
.tools-header nav a.active { color: var(--accent-text); background: var(--accent-soft); }
.menu-btn {
  display: none; position: relative; z-index: 5; margin-left: auto;
  background: none; border: 0;
  color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; padding: 6px 8px;
}
.tools-drawer {
  display: none; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 14px;
}
.tools-drawer.open { display: grid; gap: 4px; }
.tools-drawer a {
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 10px 12px; border-radius: 10px;
}
.tools-drawer a.active { background: var(--accent-soft); color: var(--accent-text); }
.btn-login {
  background: var(--accent); color: #fff !important;
  padding: 9px 18px !important; border-radius: 10px;
  font-weight: 700 !important;
}
.btn-login:hover { filter: brightness(1.1); background: var(--accent) !important; }

/* ─── Layout ─── */
.tools-wrap {
  max-width: 1180px; margin: 0 auto; padding: 28px 20px 80px;
  display: grid; grid-template-columns: 1fr 300px; gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .tools-wrap { grid-template-columns: 1fr; }
  .ad-sidebar { display: none; }
  .tools-header nav a:not(.btn-login):not(#theme-toggle) { display: none; }
  .menu-btn { display: inline-flex; }
}

.tools-main { min-width: 0; }

/* ─── Hero / title ─── */
.tools-title {
  font-size: 30px; font-weight: 800; letter-spacing: -0.03em;
  margin: 0 0 6px;
}
.tools-sub { color: var(--muted); margin: 0 0 24px; font-size: 15px; }

/* ─── Card ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
}

/* ─── Form ─── */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13px; font-weight: 700;
  margin-bottom: 7px; color: var(--text);
}
.field input[type="text"], .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text); font-size: 15px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { resize: vertical; min-height: 90px; }

.combo { position: relative; }
.combo-input {
  width: 100%; padding: 12px 38px 12px 14px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 11px; color: var(--text); font-size: 15px; font-family: inherit;
}
.combo-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.combo-btn {
  position: absolute; right: 4px; top: 4px; bottom: 4px; width: 32px;
  border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px;
}
.combo-list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
  margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.28); max-height: 240px; overflow: auto;
}
@media (max-width: 700px) {
  .combo-list { position: static; margin-top: 6px; box-shadow: none; }
}
.combo-list[hidden] { display: none; }
.combo-list li {
  padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600;
}
.combo-list li[aria-selected="true"], .combo-list li:hover { background: var(--accent-soft); color: var(--accent-text); }
.combo-empty { padding: 9px 10px; color: var(--muted); font-size: 13px; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; } }

/* ─── Button ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 11px; border: none;
  font-size: 15px; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: all .15s;
}
.btn-primary { background: var(--accent); color: #fff; width: 100%; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-ghost {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); padding: 8px 14px; font-size: 13px;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-text); }

/* ─── Results ─── */
.results { margin-top: 22px; }
.result-item {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px 16px;
  margin-bottom: 12px;
  display: flex; gap: 12px; align-items: flex-start;
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.result-item .txt { flex: 1; white-space: pre-wrap; word-break: break-word; font-size: 15px; }
.result-item .copy {
  flex-shrink: 0; background: var(--surface); border: 1px solid var(--line);
  color: var(--muted); border-radius: 9px; padding: 7px 11px;
  cursor: pointer; font-size: 12px; font-weight: 700; font-family: inherit;
  transition: all .15s;
}
.result-item .copy:hover { color: var(--accent-text); border-color: var(--accent); }
.result-item .copy.done { color: var(--ok); border-color: var(--ok); }
.result-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: flex-start; }
.share-wa, .share-x, .share-native {
  background: var(--surface); border: 1px solid var(--line);
  color: var(--muted); border-radius: 9px; padding: 7px 9px;
  cursor: pointer; font-size: 13px; line-height: 1; transition: all .15s;
}
.share-wa:hover { border-color: #25d366; color: #25d366; }
.share-x:hover { border-color: var(--text); color: var(--text); }
.share-native:hover { border-color: var(--accent); color: var(--accent-text); }
@media (max-width: 600px) {
  .result-item { flex-direction: column; }
  .result-actions { align-self: flex-end; }
}

/* ─── Quota bar ─── */
.quota {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted); margin-bottom: 18px;
  padding: 10px 14px; background: var(--surface-2);
  border-radius: 11px; border: 1px solid var(--line);
}
.quota .badge {
  padding: 3px 10px; border-radius: 20px; font-weight: 700; font-size: 12px;
  letter-spacing: .3px;
}
.quota .badge.free { background: rgba(34,197,94,.14); color: #16a34a; }
.quota .badge.login { background: rgba(59,130,246,.14); color: #2563eb; }
.quota .badge.premium { background: rgba(168,85,247,.14); color: #9333ea; }
.badge-upgrade {
  color: var(--accent-text); font-weight: 600; font-size: 12px;
  text-decoration: none; border-bottom: 1px dashed var(--accent-text);
}
.badge-upgrade:hover { opacity: .8; }

/* ─── Soft wall (limit reached) ─── */
.softwall {
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px; margin-top: 18px;
}
.softwall h3 { margin: 0 0 10px; font-size: 18px; }
.softwall ul { margin: 0 0 16px; padding-left: 20px; color: var(--muted); }
.softwall ul li { margin-bottom: 4px; }
.softwall .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.softwall .actions a {
  text-decoration: none; padding: 11px 20px; border-radius: 10px;
  font-weight: 700; font-size: 14px;
}
.softwall .actions .primary { background: var(--accent); color: #fff; }
.softwall .actions .secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line); }

/* ─── Ad slots ─── */
.ad-sidebar { position: sticky; top: 90px; }
.ad-box {
  background: var(--surface-2); border: 1px dashed var(--line);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 12px; margin-bottom: 18px; text-align: center;
}
.ad-box.tall { height: 600px; }
.ad-box.rect { height: 250px; }
.ad-banner {
  max-width: 1180px; margin: 0 auto 40px; padding: 0 20px; text-align: center;
}
.ad-banner .ad-box { height: 90px; }
.ad-banner.ad-mobile { display: none; }
.ad-banner.ad-desktop { display: block; }
@media (max-width: 767px) {
  .ad-banner.ad-desktop { display: none; }
  .ad-banner.ad-mobile { display: block; }
}

/* ─── CTA to Viralin ─── */
.cta-viralin {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px; margin-top: 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.cta-viralin .txt { flex: 1; min-width: 200px; }
.cta-viralin strong { display: block; font-size: 16px; margin-bottom: 3px; }
.cta-viralin span { color: var(--muted); font-size: 14px; }
.cta-viralin a {
  background: var(--accent); color: #fff; text-decoration: none;
  padding: 11px 20px; border-radius: 10px; font-weight: 700; font-size: 14px;
  white-space: nowrap;
}

/* ─── Loading ─── */
.spinner {
  width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* ─── Error ─── */
.error-box {
  background: rgba(239,68,68,.1); border: 1px solid var(--err);
  color: var(--err); border-radius: 11px; padding: 14px 16px;
  margin-top: 16px; font-size: 14px;
}

/* ─── Hub grid (landing /tools) ─── */
.hub-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px; margin-top: 24px;
}
.hub-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
  text-decoration: none; color: var(--text);
  transition: all .18s; display: block;
}
.hub-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.hub-card .ico { font-size: 30px; margin-bottom: 12px; }
.hub-card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.hub-card p { margin: 0; color: var(--muted); font-size: 14px; }
.hub-card .soon {
  display: inline-block; margin-top: 10px; font-size: 11px; font-weight: 700;
  color: var(--warn); background: rgba(245,158,11,.14);
  padding: 3px 9px; border-radius: 20px;
}

.offer-box { display: grid; gap: 10px; margin: 18px 0 0; }
.offer {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px;
}
.offer strong { display: block; font-size: 15px; }
.offer span { display: block; color: var(--muted); font-size: 13px; margin: 2px 0 10px; }
.offer .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.offer .actions a, .share-btn {
  text-decoration: none; font-size: 13px; font-weight: 700;
  border-radius: 10px; padding: 8px 12px; cursor: pointer;
}
.offer .primary { background: var(--accent); color: #fff; }
.offer .secondary, .share-btn {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
}

/* ─── Upgraded CTA (cta-boost) ─── */
.cta-boost {
  background: linear-gradient(135deg, var(--surface) 0%, var(--accent-soft) 100%);
  border-color: var(--accent);
}
.cta-btn-order {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
  color: #fff !important; text-decoration: none;
  padding: 13px 24px; border-radius: 12px;
  font-weight: 800; font-size: 15px;
  white-space: nowrap; letter-spacing: -0.01em;
  box-shadow: 0 4px 20px rgba(14,165,233,.35);
  transition: all .2s;
}
.cta-btn-order:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(14,165,233,.45); }

/* ─── SEO Tips Section ─── */
.tips-section {
  margin-top: 40px; padding-top: 32px;
  border-top: 1px solid var(--line);
}
.tips-section h2 {
  font-size: 22px; font-weight: 800; margin: 0 0 20px;
  letter-spacing: -0.02em;
}
.tips-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.tip-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 16px;
  transition: border-color .2s;
}
.tip-card:hover { border-color: var(--accent); }
.tip-card h3 { font-size: 15px; font-weight: 700; margin: 0 0 8px; }
.tip-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

/* ─── SEO sub-pages ─── */
.seo-hero {
  text-align: center; padding: 2rem 0 1rem;
}
.seo-hero h1 { font-size: 1.6rem; font-weight: 800; margin: 0 0 .5rem; color: var(--text); }
.seo-hero p { color: var(--muted); font-size: .95rem; max-width: 520px; margin: 0 auto; }
.seo-content {
  max-width: 640px; margin: 2rem auto; padding: 0 1rem;
  color: var(--text); line-height: 1.7;
}
.seo-content h2 { font-size: 1.15rem; font-weight: 700; margin: 1.8rem 0 .6rem; }
.seo-content ul, .seo-content ol { padding-left: 1.2rem; }
.seo-content li { margin-bottom: .5rem; }
.seo-content p { margin: .6rem 0; color: var(--muted); }

/* ─── Blog ─── */
.blog-filters { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.blog-filter {
  background: var(--surface); border: 1px solid var(--line);
  color: var(--muted); border-radius: 10px; padding: 8px 16px;
  cursor: pointer; font-size: 13px; font-weight: 700; font-family: inherit;
  transition: all .15s;
}
.blog-filter:hover { border-color: var(--accent); color: var(--accent-text); }
.blog-filter.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }

.blog-list { display: grid; gap: 16px; }
.blog-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
  text-decoration: none; color: var(--text);
  display: flex; gap: 16px; align-items: flex-start;
  transition: all .18s; cursor: pointer;
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.blog-card-emoji { font-size: 36px; flex-shrink: 0; padding-top: 2px; }
.blog-card-body { flex: 1; min-width: 0; }
.blog-card-body h3 { margin: 6px 0 8px; font-size: 17px; font-weight: 700; line-height: 1.4; }
.blog-card-body p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.blog-cat {
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: 20px; background: var(--accent-soft); color: var(--accent-text);
}
.blog-date { font-size: 12px; color: var(--muted); }
.blog-platform { font-size: 12px; color: var(--muted); text-transform: capitalize; }
.blog-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.blog-loading { text-align: center; padding: 40px; color: var(--muted); }
.blog-more { text-align: center; margin-top: 20px; }

/* Blog post view */
.blog-post-wrap { max-width: 740px; margin: 0 auto; padding: 20px; }
.blog-back { color: var(--accent-text); text-decoration: none; font-weight: 600; font-size: 14px; display: inline-block; margin-bottom: 20px; }
.blog-back:hover { opacity: .8; }
.blog-post-header { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.blog-post-wrap h1 { font-size: 26px; font-weight: 800; line-height: 1.3; margin: 0 0 24px; letter-spacing: -0.02em; }
.blog-article { line-height: 1.8; font-size: 16px; color: var(--text); }
.blog-article h2 { font-size: 20px; font-weight: 700; margin: 32px 0 12px; }
.blog-article h3 { font-size: 17px; font-weight: 700; margin: 24px 0 10px; }
.blog-article p { margin: 12px 0; }
.blog-article ul, .blog-article ol { padding-left: 20px; margin: 12px 0; }
.blog-article li { margin-bottom: 6px; }
.blog-article strong { color: var(--accent-text); }
.blog-post-footer { margin-top: 40px; }
@media (max-width: 600px) {
  .blog-card { flex-direction: column; gap: 10px; }
  .blog-card-emoji { font-size: 28px; }
  .blog-post-wrap h1 { font-size: 22px; }
}

/* ─── Threads Shopee Affiliate Generator ─── */
.nav-badge-hot {
  display: inline-block;
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  vertical-align: middle;
  margin-left: 4px;
  box-shadow: 0 2px 6px rgba(255, 65, 108, 0.35);
}

.tool-badge.threads-affiliate { background: #ee4d2d20; color: #ee4d2d; }

.pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pill-btn {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pill-btn:hover {
  border-color: var(--accent);
  color: var(--accent-text);
}
.pill-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

.formula-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 640px) {
  .formula-grid { grid-template-columns: repeat(2, 1fr); }
}
.formula-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all .15s ease;
  text-align: left;
}
.formula-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.formula-card.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.25);
}
.formula-card-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.formula-card-desc {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* Alternative hooks */
.threads-hooks-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
}
.threads-hooks-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}
.threads-hook-item {
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  font-size: 13.5px;
  cursor: pointer;
  transition: all .15s ease;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.threads-hook-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.threads-hook-item.applied {
  border-style: solid;
  border-color: var(--ok);
  background: rgba(16, 185, 129, 0.08);
}
.threads-hook-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  white-space: nowrap;
}

/* Threads Timeline */
.threads-timeline-wrap {
  margin: 20px 0;
}
.threads-timeline-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.threads-post-item {
  display: flex;
  position: relative;
  margin-bottom: 0;
}
.threads-post-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 14px;
  flex-shrink: 0;
}
.threads-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #111, #333);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 2;
}
html[data-theme="dark"] .threads-avatar {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid #334155;
}
.threads-line {
  width: 2px;
  flex-grow: 1;
  background: var(--line);
  margin: 6px 0;
  min-height: 40px;
}
.threads-post-item:last-child .threads-line {
  display: none;
}
.threads-post-card {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}
.threads-post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.threads-badge-role {
  background: var(--surface-2);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}
.threads-badge-media {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}
html[data-theme="dark"] .threads-badge-media {
  color: #fbbf24;
}
.threads-content-area {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  resize: vertical;
  padding: 6px 0;
  margin-bottom: 8px;
  min-height: 80px;
}
.threads-content-area:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-2);
  padding: 8px;
}
.threads-post-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 6px;
}
.threads-char-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.threads-char-count.warn {
  color: var(--warn);
}
.threads-char-count.over {
  color: var(--err);
  font-weight: 700;
}
.threads-btn-copy {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
}
.threads-btn-copy:hover {
  background: var(--accent-soft);
  color: var(--accent-text);
  border-color: var(--accent);
}
.threads-btn-copy.copied {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: #10b981;
}

/* Engagement tip */
.threads-tip-box {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 13.5px;
  color: var(--text);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.threads-tip-icon {
  font-size: 22px;
  flex-shrink: 0;
}

/* Soft-Upsell SMM Banner */
.threads-smm-upsell {
  background: linear-gradient(135deg, rgba(238, 77, 45, 0.08), rgba(255, 65, 108, 0.08));
  border: 1px solid rgba(238, 77, 45, 0.25);
  border-radius: var(--radius);
  padding: 20px;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
@media (min-width: 680px) {
  .threads-smm-upsell {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.threads-smm-upsell-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}
.threads-smm-upsell-btn {
  background: linear-gradient(135deg, #ee4d2d, #ff416c);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(238, 77, 45, 0.35);
  transition: all .18s ease;
}
.threads-smm-upsell-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(238, 77, 45, 0.45);
}
