/* ============================================
   NANO BANANA AI PROMPTS - MAIN STYLESHEET
   Design: Cream/Cobalt (light) + Slate/Cobalt (dark)
   Fonts: Sora (headings), Inter (body), JetBrains Mono (tags)
   ============================================ */

/* ---- COLOR VARIABLES ---- */
:root {
    /* Light mode (default) - soft lavender-blue */
    --bg: #F5F7FF;
    --surface: #FFFFFF;
    --border-color: #E2E6F5;
    --accent: #2563EB;
    --accent-text: #FFFFFF;
    --tag-color: #F97316;
    --text-primary: #0F172A;
    --text-muted: #64748B;
    --overlay-bg: rgba(255,255,255,0.97);
    --image-placeholder: #E4E9FA;
    --image-icon: #BFC8EE;
    --gradient-hero: linear-gradient(135deg, #DBEAFE 0%, #EDE9FE 50%, #FCE7F3 100%);
}

[data-theme="dark"] {
    --bg: #0B1320;
    --surface: #16202F;
    --border-color: rgba(255,255,255,0.06);
    --accent: #4D8DFF;
    --accent-text: #0B1320;
    --tag-color: #5FD9D0;
    --text-primary: #E7ECF3;
    --text-muted: #8C9AB0;
    --overlay-bg: rgba(11,19,32,0.94);
    --image-placeholder: #1F2C40;
    --image-icon: #3D4D66;
    --gradient-hero: linear-gradient(135deg, #16202F 0%, #0B1320 60%, #1A1430 100%);
}

/* ---- RESET & BASE ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.2s ease, color 0.2s ease;
}

h1, h2, h3, h4 {
    font-family: 'Sora', sans-serif;
    font-weight: 500;
    line-height: 1.3;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- HEADER / NAV ---- */
/* ---- HEADER OUTER WRAPPER ---- */
.header-outer {
    padding: 20px 20px 0;
    max-width: 860px;
    margin: 0 auto;
}

/* ---- PILL NAVBAR (PromptPlum style) ---- */
.site-header {
    background: transparent;
}

.nav-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #FFFFFF;
    border-radius: 999px;
    padding: 8px 10px 8px 18px;
    box-shadow: 0 4px 24px rgba(37,99,235,0.12), 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid rgba(37,99,235,0.10);
}

[data-theme="dark"] .nav-pill {
    background: #1A2433;
    border-color: rgba(77,141,255,0.2);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0;
}

.logo-img {
    height: 44px;
    width: auto;
    transition: filter 0.2s ease;
    filter: drop-shadow(0 2px 8px rgba(37,99,235,0.2));
}

.logo:hover .logo-img {
    filter: drop-shadow(0 2px 12px rgba(37,99,235,0.5)) drop-shadow(0 0 8px rgba(249,115,22,0.25));
}

.logo-mark-3d {
    flex-shrink: 0;
    filter: drop-shadow(0 3px 8px rgba(37, 99, 235, 0.45));
}

/* Nav right side - icons with left divider */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    border-left: 1px solid var(--border-color);
    padding-left: 10px;
    margin-left: 10px;
}

.nav-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 18px;
    transition: background 0.15s ease;
    text-decoration: none;
}

.nav-icon-btn i {
    font-size: 19px;
    line-height: 1;
    color: var(--text-primary);
}

.nav-icon-btn:hover {
    background: var(--border-color);
}



.logo-text {
    color: var(--text-primary);
}

.logo-accent {
    color: var(--accent);
}

.logo .logo-suffix {
    color: var(--text-muted);
    font-weight: 400;
}

.theme-toggle {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-primary);
    flex-shrink: 0;
    transition: border-color 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--accent);
}

/* ---- CATEGORY PILL BAR ---- */
.category-bar-wrap {
    border-top: 1px solid var(--border-color);
}

.category-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    justify-content: center;
    flex-wrap: wrap;
}

.category-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    padding: 8px 16px;
    border-radius: 999px;
    white-space: nowrap;
    background: var(--surface);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    flex-shrink: 0;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.category-pill:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.category-pill.active {
    background: var(--accent);
    color: var(--accent-text);
    border-color: var(--accent);
}

/* ---- TABS (Latest / Popular) ---- */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 4px;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-left: auto;
margin-right: auto;
}

.tab {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 999px;
    cursor: pointer;
    border: none;
    background: transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.tab.active {
    background: #2563EB;
    color: #FFFFFF;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
}

.tab:hover:not(.active) {
    color: var(--text-primary);
}

/* ---- PROMPT CARD GRID (v2 design) ---- */
.prompt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    padding: 24px 0 48px;
}

.prompt-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.prompt-card:hover {
    border-color: var(--accent);
}

.prompt-card-image-link {
    display: block;
}

.prompt-card-image {
    height: 220px;
    background: var(--image-placeholder);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.prompt-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.prompt-card-image .placeholder-icon {
    font-size: 32px;
    color: var(--image-icon);
}

.prompt-card-body {
    padding: 14px;
}

.prompt-card-title-link {
    display: block;
}

.prompt-card-title {
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.prompt-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 12px;
}

.prompt-card-actions {
    display: flex;
    gap: 8px;
}

.prompt-card-credit {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ---- BUTTONS ---- */
.btn-copy {
    background: var(--accent);
    color: var(--accent-text);
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    width: 100%;
    font-family: 'Inter', sans-serif;
}

.btn-copy:active {
    transform: scale(0.98);
}

.btn-copy.copied {
    background: var(--tag-color);
    color: #fff;
}

.prompt-card-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--tag-color);
    text-transform: lowercase;
}


/* ---- SINGLE PROMPT PAGE ---- */
.prompt-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 32px 0;
}

@media (max-width: 768px) {
    .prompt-detail {
        grid-template-columns: 1fr;
    }
}

.prompt-detail-image {
    border-radius: 12px;
    overflow: hidden;
    background: var(--image-placeholder);
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prompt-detail-image img {
    width: 100%;
    height: auto;
}

.prompt-detail-content h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.prompt-text-box {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    white-space: pre-wrap;
}

.related-section h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

/* ---- FOOTER ---- */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.site-footer a {
    color: var(--accent);
}

/* ---- HERO SECTION ---- */
.hero {
    background: var(--gradient-hero);
    border-radius: 20px;
    padding: 48px 24px;
    text-align: center;
    margin: 20px 0 32px;
}

.hero h1 {
    font-size: 38px;
    line-height: 1.2;
    margin-bottom: 8px;
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--tag-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p.tagline {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.hero-search {
    display: flex;
    max-width: 560px;
    margin: 0 auto 16px;
    background: var(--surface);
    border-radius: 999px;
    padding: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.hero-search input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    padding: 12px 18px;
    font-size: 14px;
    color: var(--text-primary);
}

.hero-search button {
    background: linear-gradient(135deg, var(--accent), var(--tag-color));
    color: var(--accent-text);
    border: none;
    border-radius: 999px;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hero-search button i {
    font-size: 18px;
    line-height: 1;
}

/* Fallback: if the icon webfont fails to load, draw a search icon with pure SVG background */
.hero-search button i.ti-search::before {
    font-family: "tabler-icons" !important;
}

.hero-search button svg.search-fallback-icon {
    width: 19px;
    height: 19px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hero-search button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.hero-search button:active {
    transform: translateY(0) scale(0.96);
}

.hero-popular {
    font-size: 13px;
    color: var(--text-muted);
}

.hero-popular a {
    color: var(--accent);
    font-weight: 500;
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: 28px;
    }
    .hero {
        padding: 32px 16px;
    }
}

/* ---- BROWSE BY CATEGORY GRID ---- */
.section-heading {
    text-align: center;
    margin: 40px 0 24px;
}

.section-heading h2 {
    font-size: 26px;
    margin-bottom: 6px;
}

.section-heading p {
    color: var(--text-muted);
    font-size: 14px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 40px;
}

.category-grid-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.category-grid-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.category-grid-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--accent-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sora', sans-serif;
    font-weight: 500;
    font-size: 15px;
    flex-shrink: 0;
}

.category-grid-name {
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 500;
}

.category-grid-count {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* ---- SEO ARTICLE CONTENT BLOCK ---- */
.seo-article {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    margin: 24px 0 48px;
}

.seo-article h2 {
    font-size: 22px;
    margin-bottom: 14px;
}

.seo-article h3 {
    font-size: 16px;
    margin: 20px 0 8px;
}

.seo-article p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 12px;
}

.seo-article ul {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.9;
    padding-left: 20px;
    margin-bottom: 12px;
}

.seo-article a {
    color: var(--accent);
}

.seo-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 4px;
}

.seo-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 999px;
}

.compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 16px 0 20px;
}

.compare-box {
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
}

.compare-box.problem {
    background: rgba(226, 75, 74, 0.06);
    border-color: rgba(226, 75, 74, 0.25);
}

.compare-box.solution {
    background: rgba(99, 153, 34, 0.06);
    border-color: rgba(99, 153, 34, 0.25);
}

.compare-box h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.compare-box.problem h4 { color: #E24B4A; }
.compare-box.solution h4 { color: #639922; }

.compare-box p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 16px 0 20px;
}

.step-card {
    background: var(--bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}

.step-card .step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    margin: 0 auto 8px;
}

.step-card .step-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
}

.step-card .step-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 16px 0 20px;
}

.explore-card {
    background: var(--bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
}

.explore-card h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.explore-card p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .seo-article {
        padding: 20px;
    }
}

/* ---- PAGINATION ---- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 24px 0 48px;
    flex-wrap: wrap;
}

.page-link {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--surface);
}

.page-link.active {
    background: var(--accent);
    color: var(--accent-text);
    border-color: var(--accent);
}

/* ---- EMPTY STATE ---- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

/* ---- ADMIN PANEL ---- */
.admin-body {
    background: var(--bg);
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 220px;
    background: var(--surface);
    border-right: 1px solid var(--border-color);
    padding: 20px 0;
    flex-shrink: 0;
}

.admin-sidebar .logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--bg);
    color: var(--accent);
}

.admin-main {
    flex: 1;
    padding: 28px;
    max-width: 100%;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.admin-topbar h1 {
    font-size: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-text);
    border-color: var(--accent);
}

.btn-danger {
    background: #E24B4A;
    color: #fff;
    border-color: #E24B4A;
}

/* Admin table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 12px 14px;
    text-align: left;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    color: var(--text-muted);
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
}

.admin-table img.thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.status-badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
}

.status-published {
    background: #C0DD97;
    color: #173404;
}

.status-draft {
    background: #D3D1C7;
    color: #2C2C2A;
}

/* Login page */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 380px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 20px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.alert-success {
    background: #EAF3DE;
    color: #173404;
}

.alert-error {
    background: #FCEBEB;
    color: #501313;
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
}

.stat-card .label {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.stat-card .value {
    font-size: 26px;
    font-weight: 500;
    font-family: 'Sora', sans-serif;
    margin-top: 6px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-outer {
        padding: 10px 12px 0;
    }
    .nav-pill {
        padding: 6px 6px 6px 12px;
    }
    .logo-img {
        height: 28px;
    }
    .admin-sidebar {
        display: none;
    }
    .hero-search {
        flex-wrap: nowrap;
    }
    .hero-search input {
        padding: 10px 14px;
        font-size: 13px;
    }
    .prompt-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .prompt-card-image {
        height: 180px;
    }
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .compare-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 22px;
    }
    .hero p.tagline {
        font-size: 13px;
    }
    .hero-popular {
        font-size: 12px;
        line-height: 1.8;
    }
    /* 1 column on small phones */
    .prompt-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .prompt-card-image {
        height: 260px;
    }
    .prompt-card-body {
        padding: 12px;
    }
    .prompt-card-title {
        font-size: 15px;
    }
    .prompt-card-desc {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    .steps-grid {
        grid-template-columns: 1fr 1fr;
    }
    .category-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.tabs {
    width: fit-content;
margin-left: auto;
margin-right: auto;
}

.tab {
    flex: 1;
    justify-content: center;
    padding: 8px 10px;
    font-size: 12px;
}


