/* Creator Toolkit — shared stylesheet. Pure CSS, no frameworks. */

:root {
  --bg: #0e0e13;
  --bg-soft: #14141b;
  --surface: #1a1a24;
  --surface-2: #22222f;
  --text: #f1f1f4;
  --muted: #a9a9b8;
  --faint: #71717f;
  --accent: #ff2e2e;
  --accent-dark: #c81e1e;
  --accent-soft: rgba(255, 46, 46, 0.12);
  --green: #3ddc84;
  --amber: #ffb020;
  --border: #2a2a38;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(14, 14, 19, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.logo { font-size: 1.25rem; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 0.5rem; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.logo-mark::after {
  content: ""; border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent;
  margin-left: 3px;
}
.nav-links { display: flex; align-items: center; gap: 0.25rem; list-style: none; }
.nav-links a { color: var(--muted); padding: 0.55rem 0.85rem; border-radius: 8px; font-weight: 500; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-links a.active { color: var(--text); background: var(--surface-2); }

.dropdown { position: relative; }
.drop-btn { cursor: pointer; background: none; border: none; font: inherit; color: var(--muted); padding: 0.55rem 0.85rem; border-radius: 8px; font-weight: 500; }
.drop-btn:hover { color: var(--text); background: var(--surface-2); }
.drop-btn::after { content: " ▾"; font-size: 0.8em; }
.drop-menu {
  display: none; position: absolute; top: 110%; left: 0; min-width: 250px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.4rem; box-shadow: 0 12px 32px rgba(0,0,0,0.5); list-style: none;
}
.dropdown:hover .drop-menu, .dropdown.open .drop-menu { display: block; }
.drop-menu a { display: block; padding: 0.55rem 0.8rem; border-radius: 8px; white-space: nowrap; }
.drop-menu a small { display: block; color: var(--faint); font-size: 0.78rem; }

.hamburger { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 1.3rem; padding: 0.3rem 0.7rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  text-align: center; padding: 4.5rem 1.25rem 3.5rem;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(255,46,46,0.14), transparent 70%);
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.hero h1 .accent { color: var(--accent); }
.hero p.lead { color: var(--muted); font-size: 1.15rem; max-width: 640px; margin: 1rem auto 1.75rem; }
.hero-cta { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 0.7rem 1.5rem; border-radius: 10px; font-weight: 700;
  border: 1px solid transparent; cursor: pointer; font-size: 1rem; transition: transform .08s ease, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-small { padding: 0.45rem 0.9rem; font-size: 0.9rem; }

/* ---------- Sections / cards ---------- */
.section { padding: 2.5rem 0; }
.section h2 { font-size: 1.7rem; margin-bottom: 0.4rem; letter-spacing: -0.01em; }
.section .sub { color: var(--muted); margin-bottom: 1.5rem; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.tool-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem; transition: transform .12s ease, border-color .15s;
}
.tool-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.tool-card:hover a.card-link { text-decoration: none; }
.tool-icon { font-size: 2rem; margin-bottom: 0.6rem; }
.tool-card h3 { font-size: 1.08rem; margin-bottom: 0.35rem; color: var(--text); }
.tool-card p { color: var(--muted); font-size: 0.93rem; }
.card-link { color: inherit; display: block; }
.card-link:hover { text-decoration: none; }

/* ---------- Blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; display: flex; flex-direction: column; }
.post-card:hover { border-color: var(--accent); }
.post-card h3 { font-size: 1.15rem; line-height: 1.4; margin-bottom: 0.5rem; }
.post-card h3 a { color: var(--text); }
.post-card p { color: var(--muted); font-size: 0.94rem; flex: 1; }
.post-meta { color: var(--faint); font-size: 0.82rem; margin-bottom: 0.6rem; }
.read-more { font-weight: 700; font-size: 0.92rem; margin-top: 0.8rem; display: inline-block; }

.article { max-width: 760px; }
.article h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.25; letter-spacing: -0.015em; margin-bottom: 0.6rem; }
.article h2 { font-size: 1.4rem; margin: 2rem 0 0.7rem; }
.article h3 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }
.article p { margin-bottom: 1.1rem; color: #d9d9e0; }
.article ul, .article ol { margin: 0 0 1.1rem 1.4rem; color: #d9d9e0; }
.article li { margin-bottom: 0.45rem; }
.article blockquote { border-left: 3px solid var(--accent); padding: 0.4rem 1rem; margin: 1.2rem 0; color: var(--muted); background: var(--bg-soft); border-radius: 0 8px 8px 0; }
.article table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: 0.95rem; }
.article th, .article td { border: 1px solid var(--border); padding: 0.6rem 0.8rem; text-align: left; }
.article th { background: var(--surface-2); }

.layout-split { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; align-items: start; }
.sidebar .widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1.2rem; }
.sidebar .widget h3 { font-size: 1rem; margin-bottom: 0.7rem; }
.sidebar .widget ul { list-style: none; }
.sidebar .widget li { margin-bottom: 0.45rem; font-size: 0.93rem; }

/* ---------- Forms / tools ---------- */
.tool-page h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 0.4rem; }
.tool-page .sub { color: var(--muted); margin-bottom: 1.6rem; max-width: 700px; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.field .hint { color: var(--faint); font-size: 0.85rem; font-weight: 400; }
input[type="text"], input[type="url"], input[type="email"], textarea, select {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 0.7rem 0.9rem; font-size: 1rem; font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 140px; resize: vertical; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.range-val { font-weight: 700; color: var(--accent); }

.output-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem; margin-top: 1.2rem; white-space: pre-wrap; word-wrap: break-word;
}
.output-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.7rem; flex-wrap: wrap; }
.output-head h3 { font-size: 1.05rem; }

.result-list { list-style: none; margin-top: 1rem; }
.result-list li {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.8rem 1rem; margin-bottom: 0.6rem; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
}
.result-list .t { flex: 1; }
.badge { font-size: 0.75rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 20px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: rgba(61,220,132,0.15); color: var(--green); }
.badge.warn { background: rgba(255,176,32,0.15); color: var(--amber); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.8rem; margin-top: 1.2rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.9rem; text-align: center; }
.stat .num { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.stat .lbl { font-size: 0.82rem; color: var(--muted); }

.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.thumb-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.thumb-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #000; }
.thumb-card .body { padding: 0.8rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }

.error { background: rgba(255,46,46,0.1); border: 1px solid var(--accent); color: #ffb3b3; border-radius: 10px; padding: 0.8rem 1rem; margin-top: 1rem; }
.notice { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 0.8rem 1rem; margin-top: 1rem; color: var(--muted); font-size: 0.92rem; }

.checkbox-row { display: flex; align-items: center; gap: 0.6rem; margin: 0.8rem 0; }
.checkbox-row input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }

/* ---------- About blurb / misc ---------- */
.about-blurb { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.8rem; }
.about-blurb h2 { margin-bottom: 0.6rem; }
.about-blurb p { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 3rem; padding: 2.5rem 0 1.5rem; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 1.8rem; }
.footer-grid h4 { font-size: 0.95rem; margin-bottom: 0.7rem; color: var(--text); }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 0.4rem; }
.footer-grid a { color: var(--muted); font-size: 0.93rem; }
.footer-grid p { color: var(--muted); font-size: 0.93rem; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.2rem; color: var(--faint); font-size: 0.85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- Blog extras: categories, filter, video embed ---------- */
.cat-badge {
  display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.7rem;
  border-radius: 20px; background: var(--accent-soft); color: var(--accent);
  margin-bottom: 0.6rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.cat-badge.guides { background: rgba(61, 220, 132, 0.12); color: var(--green); }

.filter-row { display: flex; gap: 0.6rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.video-embed {
  position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
  border-radius: var(--radius); margin: 1.6rem 0; background: #000;
  border: 1px solid var(--border);
}
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .layout-split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .hamburger { display: block; }
  .nav-links {
    display: none; position: absolute; top: 62px; left: 0; right: 0;
    background: var(--bg-soft); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; padding: 0.6rem 1rem 1rem;
  }
  .site-header.nav-open .nav-links { display: flex; }
  .nav-links a, .drop-btn { display: block; width: 100%; text-align: left; }
  .drop-menu { position: static; box-shadow: none; border: none; background: transparent; padding: 0 0 0 1rem; }
  .dropdown .drop-menu { display: none; }
  .dropdown.open .drop-menu { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 3rem 1.25rem 2.5rem; }
}
