/* OnlineGeneratorTools — GeneratePrompt-style Home */
:root {
    --oga-bg: #f7f7f5;
    --oga-surface: #ffffff;
    --oga-border: #e8e6e3;
    --oga-text: #1a1a1a;
    --oga-muted: #6b6b6b;
    --oga-black: #111;
    --oga-sidebar: #f5f4f2;
    --oga-radius: 16px;
    --oga-font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

body .oga-app,
.entry-content .oga-app,
.site-content .oga-app,
.wp-block-post-content .oga-app a,
.oga-app a:hover,
.oga-app a:focus,
.oga-app button,
.oga-nav-item,
.oga-link-btn {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none;
}
.oga-app {

    max-width: 100vw !important;
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
}

.oga-app a,
.oga-app a:hover,
.oga-app a:focus,
.oga-app button,
.oga-nav-item,
.oga-link-btn {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none;
}
.oga-app {

    font-family: var(--oga-font);
    color: var(--oga-text);
    background: var(--oga-bg);
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

/* Sidebar */
.oga-sidebar {
    width: 200px;
    background: var(--oga-sidebar);
    border-right: 1px solid var(--oga-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding: 8px 6px;
    z-index: 20;
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden !important;
}
.oga-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 8px 8px;
    flex-shrink: 0;
}
.oga-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    overflow: hidden !important;
    min-height: 0;
}
.oga-nav-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    border-radius: 5px;
    color: var(--oga-text);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.15;
    white-space: nowrap;
}
.oga-nav-item:hover { background: rgba(0,0,0,0.05); }
.oga-nav-item.active { background: #e4e2df; }
.oga-sidebar-footer {
    padding: 6px 8px;
    font-size: 0.65rem;
    text-align: center;
    flex-shrink: 0;
}
.oga-sidebar-footer a { color: var(--oga-muted); text-decoration: none; }

/* Main */
.oga-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: var(--oga-bg);
    height: 100vh;
    max-height: 100vh;
}
.oga-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    position: sticky;
    top: 0;
    background: rgba(247,247,245,0.9);
    backdrop-filter: blur(10px);
    z-index: 10;
}
.oga-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.oga-brand-text { font-weight: 700; font-size: 0.95rem; }

/* Hero */
.oga-hero {
    text-align: center;
    padding: 48px 20px 24px;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}
.oga-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 12px;
    color: var(--oga-text);
}
.oga-hero-sub {
    color: var(--oga-muted);
    font-size: 1.05rem;
    margin: 0 0 28px;
    line-height: 1.5;
}

.oga-hero-box {
    background: var(--oga-surface);
    border: 1px solid var(--oga-border);
    border-radius: 20px;
    padding: 16px 18px 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    text-align: left;
    position: relative;
    overflow: hidden;
}
.oga-hero-box::before {
    content: '';
    position: absolute;
    left: 0; bottom: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f472b6, #60a5fa, #34d399, #fbbf24);
}
.oga-hero-input {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-size: 1rem;
    font-family: inherit;
    color: var(--oga-text);
    min-height: 72px;
    background: transparent;
    line-height: 1.5;
}
.oga-hero-input::placeholder { color: #a3a3a3; }
.oga-hero-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}
.oga-hero-label {
    font-size: 0.8rem;
    color: var(--oga-muted);
    font-weight: 500;
}
.oga-generate-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--oga-black);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
}
.oga-generate-btn:hover { opacity: 0.9; transform: scale(1.02); }
.oga-generate-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.oga-quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
}
.oga-chip {
    background: var(--oga-surface);
    border: 1px solid var(--oga-border);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--oga-text);
    transition: all 0.15s;
}
.oga-chip:hover { background: var(--oga-black); color: #fff; border-color: var(--oga-black); }

/* Results */
.oga-results {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 20px 40px;
    width: 100%;
}
.oga-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 16px;
}
.oga-messages { display: flex; flex-direction: column; gap: 16px; }
.oga-results-actions { margin-top: 20px; text-align: center; }
.oga-btn-secondary {
    background: #fff;
    border: 1px solid var(--oga-border);
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
}
.oga-btn-secondary:hover { background: #f0f0f0; }

/* Prompt result cards */
.oga-card {
    background: var(--oga-surface);
    border: 1px solid var(--oga-border);
    border-radius: var(--oga-radius);
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.oga-card-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--oga-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 12px;
}
.oga-prompt-item {
    display: flex;
    gap: 14px;
    background: #fafaf9;
    border: 1px solid var(--oga-border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
}
.oga-prompt-image {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: #eee;
}
.oga-prompt-image img { width: 100%; height: 100%; object-fit: cover; }
.oga-prompt-body { flex: 1; min-width: 0; }
.oga-prompt-title { font-weight: 650; margin: 0 0 8px; font-size: 0.95rem; }
.oga-prompt-text { font-size: 0.875rem; color: var(--oga-muted); line-height: 1.55; margin: 0 0 12px; white-space: pre-wrap; }
.oga-prompt-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.oga-copy-icon-btn, .oga-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #111 !important;
    color: #fff !important;
    border: 1px solid #111 !important;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.oga-copy-icon-btn:hover, .oga-action-btn:hover {
    background: #333 !important;
    color: #fff !important;
    border-color: #333 !important;
}
.oga-share-btn, .oga-btn-wa {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    border: 1px solid #d1fae5;
    color: #128C7E;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.oga-share-btn:hover, .oga-btn-wa:hover { background: #128C7E; color: #fff; border-color: #128C7E; }
.oga-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.oga-error { color: #dc2626; }

.oga-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--oga-muted);
    padding: 16px 0;
}
.oga-dots span {
    display: inline-block;
    width: 7px; height: 7px;
    background: #60a5fa;
    border-radius: 50%;
    margin: 0 2px;
    animation: ogaBounce 1.2s infinite ease-in-out;
}
.oga-dots span:nth-child(2) { animation-delay: 0.2s; }
.oga-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ogaBounce {
    0%, 80%, 100% { transform: scale(0.5); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Library grid */
.oga-library-section, .oga-library-view {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 60px;
    width: 100%;
}
.oga-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.oga-link-btn {
    background: none;
    border: 1px solid var(--oga-border);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 500;
}
.oga-link-btn:hover { background: #fff; }

.oga-prompt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.oga-grid-card {
    background: var(--oga-surface);
    border: 1px solid var(--oga-border);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.oga-grid-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.oga-grid-thumb {
    aspect-ratio: 3/4;
    background: #eceae6;
    overflow: hidden;
}
.oga-grid-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.oga-grid-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: linear-gradient(135deg, #f3e8ff, #e0e7ff);
}
.oga-grid-meta { padding: 12px 14px 14px; }
.oga-grid-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.oga-grid-stats {
    display: flex;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--oga-muted);
}

/* Modal */
.oga-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.oga-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}
.oga-modal-box {
    position: relative;
    background: #fff;
    border-radius: 20px;
    max-width: 920px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}
.oga-modal-x {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--oga-border);
    background: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}
.oga-modal-img {
    background: #f0efed;
    min-height: 280px;
}
.oga-modal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.oga-modal-body { padding: 28px 24px; }
.oga-modal-body h2 {
    font-size: 1.2rem;
    margin: 0 0 10px;
    line-height: 1.35;
}
.oga-modal-stats {
    font-size: 0.85rem;
    color: var(--oga-muted);
    margin-bottom: 16px;
}
.oga-modal-prompt-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--oga-muted);
    margin-bottom: 8px;
}
.oga-modal-prompt {
    background: #fafaf9;
    border: 1px solid var(--oga-border);
    border-radius: 12px;
    padding: 14px;
    font-size: 0.875rem;
    line-height: 1.55;
    max-height: 220px;
    overflow-y: auto;
    white-space: pre-wrap;
    margin-bottom: 16px;
}
.oga-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.oga-empty-lib { color: var(--oga-muted); grid-column: 1 / -1; }

/* Overlay mobile */
.oga-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 999;
    border: none;
}
.oga-sidebar-overlay.show { display: block; }

@media (max-width: 900px) {
    .oga-modal-box { grid-template-columns: 1fr; }
    .oga-modal-img { max-height: 240px; }
}
@media (max-width: 768px) {
    .oga-sidebar {
        position: fixed;
        left: 0; top: 0; bottom: 0;
        transform: translateX(-105%);
        z-index: 1000;
        box-shadow: 4px 0 24px rgba(0,0,0,0.1);
    }
    .oga-sidebar.open { transform: translateX(0); }
    .oga-menu-toggle { display: flex; }
    .oga-hero-title { font-size: 1.75rem; }
    .oga-hero { padding: 28px 16px 16px; }
    .oga-prompt-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .oga-library-section, .oga-library-view { padding: 24px 14px 40px; }
    .oga-prompt-item { flex-direction: column; }
    .oga-prompt-image { width: 100%; height: 160px; }
}

.oga-nav-label {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #9a9a9a;
    padding: 6px 7px 1px;
}


/* Theme toggle button */
.oga-theme-btn {
    background: #111;
    color: #fff;
    border: none;
    border-radius: 999px;
    height: 36px;
    padding: 0 14px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.oga-theme-btn:hover { opacity: 0.9; }
.oga-app[data-theme="dark"] .oga-theme-btn {
    background: #f4f4f5;
    color: #111;
}

/* ===== DARK THEME ===== */
.oga-app[data-theme="dark"] {
    --oga-bg: #0f0f10;
    --oga-surface: #1a1a1c;
    --oga-border: #2a2a2e;
    --oga-text: #f4f4f5;
    --oga-muted: #a1a1aa;
    --oga-black: #f4f4f5;
    --oga-sidebar: #121214;
}
.oga-app[data-theme="dark"] .oga-hero-box,
.oga-app[data-theme="dark"] .oga-card,
.oga-app[data-theme="dark"] .oga-grid-card,
.oga-app[data-theme="dark"] .oga-modal-box {
    background: var(--oga-surface);
    border-color: var(--oga-border);
}
.oga-app[data-theme="dark"] .oga-hero-input { color: #f4f4f5; }
.oga-app[data-theme="dark"] .oga-generate-btn {
    background: #f4f4f5;
    color: #111;
}
.oga-app[data-theme="dark"] .oga-chip {
    background: #1a1a1c;
    border-color: #2a2a2e;
    color: #f4f4f5;
}
.oga-app[data-theme="dark"] .oga-chip:hover {
    background: #f4f4f5;
    color: #111;
}
.oga-app[data-theme="dark"] .oga-nav-item.active { background: #2a2a2e; }
.oga-app[data-theme="dark"] .oga-prompt-item,
.oga-app[data-theme="dark"] .oga-modal-prompt {
    background: #141416;
    border-color: #2a2a2e;
}
.oga-app[data-theme="dark"] .oga-copy-icon-btn,
.oga-app[data-theme="dark"] .oga-action-btn {
    background: #f4f4f5 !important;
    color: #111 !important;
    border-color: #f4f4f5 !important;
}
.oga-app[data-theme="dark"] .oga-topbar {
    background: rgba(15,15,16,0.9);
}
.oga-app[data-theme="dark"] .oga-theme-btn:hover { background: rgba(255,255,255,0.08); }

.oga-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.oga-stat-item {
    background: #fafaf9;
    border: 1px solid var(--oga-border);
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
}
.oga-stat-value { font-size: 1.35rem; font-weight: 700; }
.oga-stat-label { font-size: 0.72rem; color: var(--oga-muted); margin-top: 4px; }
