/* FreeTools Hub family theme - SocialMediaKit */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --blue: #1d4ed8; --purple: #7c3aed; --ink: #1e293b; --muted: #64748b;
  --line: #e2e8f0; --bg: #f8fafc; --card: #ffffff; --ok: #16a34a;
  --warn: #d97706; --bad: #dc2626;
}
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.6; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
code { background: #eef2ff; padding: 1px 6px; border-radius: 6px; font-size: .85em; }

/* header */
#siteHeader { background: linear-gradient(135deg, var(--blue), var(--purple)); color: #fff; padding: 26px 0 0; }
.header-inner { display: flex; align-items: center; }
.brand { display: flex; gap: 14px; align-items: center; }
.hub-link { color: #fff; text-decoration: none; font-size: .85rem; opacity: .85; display: block; margin-bottom: 2px; }
.hub-link:hover { opacity: 1; text-decoration: underline; }
.brand-name { font-size: 1.7rem; line-height: 1.1; }
.brand-tag { opacity: .9; font-size: .9rem; }
.free-banner { text-align: center; font-size: .82rem; padding: 10px 16px 14px; opacity: .95; }

/* layout */
#main { padding: 30px 0 10px; }
.intro h2 { font-size: 1.5rem; margin-bottom: 6px; }
.intro { margin-bottom: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 20px; }
.card h3 { margin-bottom: 12px; font-size: 1.05rem; }
.card h2 { font-size: 1.3rem; margin-bottom: 12px; }
.tag { font-size: .72rem; background: #eef2ff; color: var(--blue); border-radius: 20px; padding: 2px 10px; font-weight: 600; vertical-align: middle; }

label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 12px; }
input[type="text"], input[type="password"], select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font-size: .95rem;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-weight: 400;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
textarea { resize: vertical; }
input[type="color"] { width: 52px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; margin-top: 6px; display: block; }
input[type="file"] { margin-top: 6px; font-weight: 400; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }

.btn { display: inline-block; padding: 11px 20px; border-radius: 10px; border: 1px solid transparent; font-size: .95rem; font-weight: 700; cursor: pointer; transition: .15s; }
.btn.primary { background: linear-gradient(135deg, var(--blue), var(--purple)); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 4px; }

/* tabs */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tab { padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: .9rem; cursor: pointer; color: var(--ink); }
.tab.active { background: linear-gradient(135deg, var(--blue), var(--purple)); color: #fff; border-color: transparent; }
.tabpanel { display: none; }
.tabpanel.active { display: block; }

/* builder */
.builder-grid { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .builder-grid { grid-template-columns: 1fr; } }
.canvas-holder { background: #0f172a; border-radius: 12px; padding: 16px; display: flex; justify-content: center; }
.canvas-holder canvas { max-width: 100%; max-height: 480px; width: auto; height: auto; border-radius: 8px; }
.thumb-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.thumb-row canvas { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 2px solid var(--line); cursor: pointer; }
.thumb-row canvas.sel { border-color: var(--purple); }

/* bulk */
.bulk-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 16px; }
.bulk-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; background: #fff; }
.bulk-item img { width: 100%; border-radius: 8px; display: block; }
.bulk-item p { font-size: .78rem; margin: 8px 0; color: var(--muted); }
.bulk-item button { font-size: .8rem; padding: 7px 12px; }

/* captions */
.caption-preview { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px; white-space: pre-wrap; font-size: .92rem; min-height: 120px; }
.counter-bar { height: 8px; background: #eef2ff; border-radius: 6px; overflow: hidden; margin: 10px 0 6px; }
.counter-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--purple)); transition: width .2s; }
.counter-fill.over { background: var(--bad); }
.counter-text { font-weight: 700; }
.counter-text.over { color: var(--bad); }
.hashtag-results { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hashtag-results span { background: #eef2ff; color: var(--blue); border-radius: 20px; padding: 4px 12px; font-size: .85rem; font-weight: 600; }

/* publish */
.warn-card { border-left: 5px solid var(--warn); background: #fffbeb; }
.honest-list { padding-left: 20px; display: grid; gap: 8px; font-size: .92rem; }
.api-log { background: #0f172a; color: #c7d2fe; border-radius: 10px; padding: 14px; font-family: ui-monospace, monospace; font-size: .8rem; max-height: 260px; overflow: auto; white-space: pre-wrap; }
.api-log .ok { color: #4ade80; } .api-log .err { color: #f87171; }

/* guide */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.steps { padding-left: 22px; display: grid; gap: 8px; font-size: .92rem; }

/* faq */
.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; background: #fff; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin-top: 8px; color: var(--muted); font-size: .93rem; }

/* toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 10px; opacity: 0; pointer-events: none; transition: .25s; z-index: 99; font-size: .9rem; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
