/* PromptsBox — public theme */
:root {
    --bg: #f4f7fc;
    --bg-muted: #e8eef8;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #5b6578;
    --brand: #2563eb;
    --brand-2: #7c3aed;
    --brand-dark: #1e3a8a;
    --border: #dbe3f0;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
    --font: "Poppins", "Plus Jakarta Sans", system-ui, sans-serif;
    --header-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }

.container { width: min(1180px, 92vw); margin: 0 auto; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 24px rgba(37, 99, 235, 0.06);
}
.header-bar {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: var(--header-h);
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand-logo { height: 52px; width: auto; max-width: 180px; object-fit: contain; }

.site-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
}
.site-nav > li > a,
.nav-drop-trigger {
    display: block;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}
.site-nav > li > a:hover,
.nav-drop-trigger:hover,
.has-dropdown.open .nav-drop-trigger {
    background: var(--bg-muted);
    color: var(--brand);
    text-decoration: none;
}

.has-dropdown { position: relative; }
.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 320px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.75rem;
}
.has-dropdown.open .nav-dropdown { display: block; }
.nav-dropdown-all {
    display: block;
    font-weight: 700;
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.35rem;
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, rgba(37,99,235,.08), rgba(124,58,237,.08));
}
.nav-dropdown-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.15rem;
}
.nav-dropdown-grid a {
    display: block;
    padding: 0.4rem 0.65rem;
    font-size: 0.88rem;
    color: var(--muted);
    border-radius: 8px;
}
.nav-dropdown-grid a:hover {
    background: var(--bg);
    color: var(--brand);
    text-decoration: none;
}

.header-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    padding: 0.2rem 0.35rem 0.2rem 1rem;
    max-width: 220px;
}
.header-search input {
    border: none;
    background: transparent;
    font: inherit;
    width: 100%;
    outline: none;
    font-size: 0.9rem;
}
.header-search button {
    border: none;
    background: var(--brand);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
}
.header-search--large {
    max-width: 100%;
    padding: 0.35rem;
    margin-top: 1rem;
}
.header-search--large input { padding: 0.65rem 1rem; }
.header-search--large .btn { border-radius: 999px; margin-right: 0.2rem; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    padding: 8px;
    margin-left: auto;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

/* Hero */
.hero-banner {
    background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 45%, #ffffff 100%);
    border-bottom: 1px solid var(--border);
    padding: clamp(2rem, 5vw, 3.5rem) 0;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2rem;
    align-items: center;
}
.hero-copy h1 {
    font-size: clamp(1.85rem, 4.2vw, 2.75rem);
    line-height: 1.15;
    margin: 0.35rem 0 1rem;
    letter-spacing: -0.02em;
}
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--brand);
    margin: 0;
}
.hero-lead, .page-lead {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 52ch;
    margin: 0 0 1.5rem;
}
.hero-visual { text-align: center; }
.hero-logo {
    width: min(100%, 400px);
    margin: 0 auto;
    filter: drop-shadow(0 20px 40px rgba(37, 99, 235, 0.15));
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.7rem 1.35rem;
    font-weight: 700;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary {
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); text-decoration: none; filter: brightness(1.05); }
.btn-ghost, .btn-secondary {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text) !important;
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand) !important; text-decoration: none; }

/* Sections */
.section-block { padding: clamp(2rem, 4vw, 3rem) 0; }
.section-muted { background: var(--bg-muted); }
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.section-head h2 {
    margin: 0;
    font-size: clamp(1.25rem, 2.5vw, 1.65rem);
    letter-spacing: -0.02em;
}
.section-link {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Tools strip */
.tool-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}
.tool-chip {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.15rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: inherit;
    transition: border-color 0.15s, transform 0.15s;
}
.tool-chip:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
    text-decoration: none;
}
.tool-chip strong { font-size: 1rem; color: var(--text); }
.tool-chip span { font-size: 0.88rem; color: var(--muted); }

/* Categories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.category-grid--full { padding-bottom: 2rem; }
.category-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.35rem;
    color: inherit;
    box-shadow: var(--shadow);
    transition: border-color 0.15s, transform 0.15s;
    display: block;
}
.category-tile:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
    text-decoration: none;
}
.category-tile h3 { margin: 0.35rem 0; font-size: 1.05rem; color: var(--text); }
.category-tile p { margin: 0; font-size: 0.9rem; color: var(--muted); }
.category-tile-icon {
    color: var(--brand-2);
    font-size: 0.75rem;
}
.category-count {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand);
}
.tools-grid-page .tool-tile .section-link {
    margin-top: 0.75rem;
    display: inline-block;
}

/* Posts */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.35rem;
}
.post-grid--compact { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.15s;
}
.post-card:hover { transform: translateY(-3px); }
.post-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #dbeafe, #ede9fe);
    display: block;
}
.post-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-card-placeholder { width: 100%; height: 100%; }
.post-card-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    background: rgba(255,255,255,.92);
    color: var(--brand-dark);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
}
.post-card-body { padding: 1.1rem 1.2rem 1.25rem; flex: 1; display: flex; flex-direction: column; }
.post-card-title { margin: 0 0 0.5rem; font-size: 1.05rem; line-height: 1.35; }
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--brand); text-decoration: none; }
.post-card-excerpt { margin: 0; font-size: 0.9rem; color: var(--muted); flex: 1; }
.post-card-meta {
    margin: 0.85rem 0 0;
    font-size: 0.8rem;
    color: var(--muted);
}

/* Page hero */
.page-hero { padding: 2rem 0 0.5rem; }
.page-hero h1 { margin: 0.5rem 0 0; font-size: clamp(1.6rem, 3vw, 2.2rem); }

.breadcrumbs {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
}
.breadcrumbs a { color: var(--muted); font-weight: 600; }
.breadcrumbs a:hover { color: var(--brand); }

/* Article */
.article-layout { padding: 1.5rem 0 3rem; max-width: 820px; }
.article-shell {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: var(--shadow);
}
.article-header h1 {
    font-size: clamp(1.5rem, 3.5vw, 2.1rem);
    line-height: 1.2;
    margin: 0.25rem 0 0.75rem;
}
.article-figure {
    margin: 1.25rem 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.article-toc {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 1rem 1.15rem;
    margin: 1rem 0;
    font-size: 0.9rem;
}
.article-toc ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.article-prose { font-size: 1.05rem; }
.article-prose h2 { margin-top: 1.75rem; font-size: 1.35rem; }
.article-prose h3 { margin-top: 1.25rem; }
.related-block { margin-top: 2.5rem; }
.related-block h2 { font-size: 1.25rem; }

/* Tools page */
.tool-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
}
.tool-panel label { display: block; margin-bottom: 1rem; font-weight: 600; }
.tool-panel input, .tool-panel select, .tool-panel textarea {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
}
.tool-output {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: var(--radius-sm);
    white-space: pre-wrap;
    font-size: 0.95rem;
}
.article-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

/* Footer */
.site-footer {
    margin-top: 2rem;
    background: linear-gradient(180deg, #0f172a, #020617);
    color: #cbd5e1;
    padding: 3rem 0 1.25rem;
}
.footer-top {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 2rem;
}
.footer-logo-card {
    display: inline-block;
    background: #ffffff;
    padding: 0.65rem 1rem;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    margin-bottom: 0.85rem;
}
.footer-logo-card img {
    height: 56px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}
.footer-site-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #f8fafc !important;
    margin: 0 0 0.35rem;
}
.footer-brand p { color: #94a3b8; font-size: 0.92rem; max-width: 28ch; margin: 0.25rem 0; }
.footer-tagline { font-weight: 600; color: #c4b5fd; margin-top: 0.5rem; }
.footer-col h4 {
    margin: 0 0 0.75rem;
    color: #fff;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.footer-col a {
    display: block;
    color: #94a3b8;
    font-size: 0.92rem;
    padding: 0.2rem 0;
}
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #334155;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.88rem;
    color: #94a3b8;
}
.footer-bottom a { color: #94a3b8; }

.pagination {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}
.pagination a {
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
}
.pagination a.active,
.pagination a:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    text-decoration: none;
}

.empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
    color: var(--muted);
}

.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #0f172a;
    color: #fff;
    padding: 1rem;
    display: none;
    z-index: 200;
}
.cookie-banner.show { display: block; }
.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.meta { color: var(--muted); font-size: 0.85rem; }

/* Sidebar + article layout */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: clamp(1.25rem, 3vw, 2.5rem);
    align-items: start;
}
.layout-with-sidebar--article { padding: 1.5rem 0 0; max-width: min(1180px, 92vw); margin: 0 auto; }
.layout-main { min-width: 0; }
.post-grid--main { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.sidebar-panel {
    position: sticky;
    top: calc(var(--header-h) + 12px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.15rem;
    box-shadow: var(--shadow);
}
.sidebar-title {
    margin: 0 0 0.85rem;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.sidebar-list { list-style: none; margin: 0; padding: 0; }
.sidebar-item + .sidebar-item { margin-top: 0.85rem; padding-top: 0.85rem; border-top: 1px solid var(--border); }
.sidebar-item-link {
    display: flex;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
}
.sidebar-item-link:hover .sidebar-item-title { color: var(--brand); }
.sidebar-thumb {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}
.sidebar-thumb--empty {
    display: block;
    background: linear-gradient(135deg, #dbeafe, #ede9fe);
}
.sidebar-item-text { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.sidebar-item-cat { font-size: 0.72rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: 0.04em; }
.sidebar-item-title { font-size: 0.92rem; font-weight: 700; line-height: 1.3; color: var(--text); }
.sidebar-item-meta { font-size: 0.78rem; color: var(--muted); }
.sidebar-all { display: inline-block; margin-top: 1rem; font-size: 0.88rem; font-weight: 700; }

/* More like (friend-style band) */
.more-like-band {
    margin-top: 2.5rem;
    padding: 2.5rem 0 3rem;
    background: linear-gradient(180deg, #0f172a, #1e293b);
    color: #e2e8f0;
}
.more-like-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.more-like-head h2 { margin: 0; font-size: 1.35rem; color: #fff; }
.more-like-head a { color: #93c5fd; font-weight: 600; font-size: 0.92rem; }
.more-like-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}
.more-like-card {
    background: #111827;
    border: 1px solid #334155;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.more-like-media { display: block; aspect-ratio: 4/3; overflow: hidden; }
.more-like-media img { width: 100%; height: 100%; object-fit: cover; }
.more-like-media-fallback { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #1e3a8a, #4c1d95); }
.more-like-body { padding: 0.9rem 1rem 1rem; flex: 1; display: flex; flex-direction: column; gap: 0.35rem; }
.more-like-cat { font-size: 0.78rem; font-weight: 700; color: #93c5fd; text-transform: capitalize; }
.more-like-body h3 { margin: 0; font-size: 0.95rem; line-height: 1.35; }
.more-like-body h3 a { color: #f8fafc; text-decoration: none; }
.more-like-body h3 a:hover { color: #93c5fd; }
.more-like-body p { margin: 0; font-size: 0.82rem; color: #94a3b8; line-height: 1.45; flex: 1; }
.more-like-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 0.65rem;
    font-size: 0.75rem;
    color: #94a3b8;
}
.author-chip { display: inline-flex; align-items: center; gap: 0.35rem; }
.author-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    display: grid;
    place-items: center;
}

@media (max-width: 1024px) {
    .more-like-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .sidebar-panel { position: static; order: -1; }
}

@media (max-width: 560px) {
    .more-like-grid { grid-template-columns: 1fr; }
}

/* Responsive */
@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-lead { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-visual { order: -1; }
    .hero-logo { max-height: 220px; width: auto; }
    .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .header-search { display: none; }
    .site-nav {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        box-shadow: var(--shadow);
    }
    .site-nav.open { display: flex; }
    .site-header .header-bar { position: relative; flex-wrap: wrap; }
    .has-dropdown .nav-dropdown {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0.25rem 0 0.5rem 0.5rem;
    }
    .nav-dropdown-grid { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; }
    .article-layout { width: min(1180px, 92vw); margin: 0 auto; }
}

/* Admin (unchanged base) */
.admin-body { background: #0b1220; min-height: 100vh; color: #e5e7eb; }
.admin-wrap { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: #111827; padding: 1rem; border-right: 1px solid #1f2937; }
.admin-sidebar a { display: block; color: #cbd5e1; padding: 0.45rem 0.5rem; border-radius: 6px; text-decoration: none; margin-bottom: 0.25rem; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: #1f2937; color: #fff; }
.admin-main { padding: 1.25rem; }
.admin-card { background: #111827; border: 1px solid #1f2937; border-radius: 10px; padding: 1rem; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { border-bottom: 1px solid #1f2937; padding: 0.55rem; text-align: left; font-size: 0.92rem; }
.admin-form label { display: block; margin-bottom: 0.75rem; font-weight: 600; }
.admin-form input, .admin-form select, .admin-form textarea {
    width: 100%; margin-top: 0.25rem; padding: 0.55rem; border-radius: 8px; border: 1px solid #334155; background: #0f172a; color: #fff;
}
.admin-form textarea { min-height: 200px; }
.seo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
@media (max-width: 800px) {
    .admin-wrap { grid-template-columns: 1fr; }
    .seo-grid { grid-template-columns: 1fr; }
}

.install-page { display: grid; place-items: center; min-height: 100vh; }
.install-card { background: var(--surface); padding: 2rem; border-radius: var(--radius); border: 1px solid var(--border); width: min(480px, 92%); }
.install-card label { display: block; margin-bottom: 0.8rem; }
.install-card input { width: 100%; padding: 0.55rem; margin-top: 0.25rem; }
.error { color: #b91c1c; }
.success { color: #047857; }

.admin-toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    background: #047857;
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
    z-index: 60;
}
.admin-toast.show { opacity: 1; }