/**
 * PromptLab Engine v3 - Frontend Modern Minimalist Styling
 */

.promptlab-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
}

/* HERO SECTION */
.promptlab-hero {
    text-align: center;
    padding: 50px 20px 35px;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    border-radius: 20px;
    color: #ffffff;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
}

.promptlab-hero-title {
    font-size: 38px;
    font-weight: 800;
    margin: 0 0 10px;
    background: linear-gradient(90deg, #a5b4fc, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.promptlab-hero-subtitle {
    font-size: 15px;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto 25px;
}

/* SEARCH FORM */
.promptlab-search-form {
    position: relative;
    max-width: 600px;
    margin: 0 auto 20px;
}

.promptlab-search-input-wrapper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 30px;
    padding: 6px 8px 6px 18px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.promptlab-search-icon {
    width: 18px;
    height: 18px;
    color: #64748b;
    margin-right: 8px;
}

.promptlab-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #1e293b;
    background: transparent;
}

.promptlab-search-btn {
    background: #6366f1;
    color: #fff;
    border: none;
    padding: 9px 22px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.promptlab-search-btn:hover {
    background: #4f46e5;
}

/* QUICK NAV CHIPS */
.promptlab-quick-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.promptlab-chip {
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.promptlab-chip:hover, .promptlab-chip.active {
    background: #6366f1;
    color: #ffffff;
}

/* LIBRARY GALLERY & CARD STYLES */
/* Styles for Pinterest-style image card grid and showcase are defined in library.css */

/* AD BANNERS */
.promptlab-ad-banner {
    width: 100%;
    min-height: 90px;
    margin: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* MONOSPACE PROMPT COMMAND BOX (PREMIUM REDESIGN) */
.promptlab-container .promptlab-prompt-box * {
    box-sizing: border-box;
}

.promptlab-container .promptlab-prompt-box {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
    padding: 0 !important;
    margin: 24px 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

/* Subtle Gradient Fade at the Bottom */
.promptlab-container .promptlab-prompt-box::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 44px !important;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.95) 100%) !important;
    pointer-events: none !important;
    border-bottom-left-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
    z-index: 5 !important;
}

.promptlab-container .prompt-box-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 16px 20px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    z-index: 10 !important;
    position: relative !important;
}

.promptlab-container .prompt-box-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    color: #4b5563 !important;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.promptlab-container .promptlab-copy-btn {
    background: #6366f1 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 8px 18px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.promptlab-container .promptlab-copy-btn:hover {
    background: #4f46e5 !important;
    transform: translateY(-1px) !important;
}

.promptlab-container .prompt-box-body {
    flex: 1 1 auto !important;
    height: 520px !important;
    max-height: 520px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scroll-behavior: smooth !important;
    scrollbar-width: thin !important;
    scrollbar-color: #64748b #f1f5f9 !important;
    padding: 24px !important;
    margin: 0 !important;
    background: #ffffff !important;
    color: #555555 !important;
    font-family: Consolas, Monaco, "Cascadia Code", "Courier New", monospace !important;
    font-size: 17px !important;
    font-style: italic !important;
    line-height: 1.8 !important;
    letter-spacing: 0.2px !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    user-select: text !important;
    -webkit-user-select: text !important;
    box-sizing: border-box !important;
}

/* Suppress extra line height from nl2br while preserving pre-wrap \n */
.promptlab-container .prompt-box-body br {
    display: none !important;
}

/* Modern Thin Scrollbar for Webkit/Blink */
.promptlab-container .prompt-box-body::-webkit-scrollbar {
    width: 8px !important;
}

.promptlab-container .prompt-box-body::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
    border-radius: 4px !important;
}

.promptlab-container .prompt-box-body::-webkit-scrollbar-thumb {
    background: #64748b !important;
    border-radius: 4px !important;
}

.promptlab-container .prompt-box-body::-webkit-scrollbar-thumb:hover {
    background: #475569 !important;
}

/* Responsive Prompt Area Heights & Typography */
@media screen and (max-width: 1024px) {
    .promptlab-container .prompt-box-body {
        height: 420px !important;
        max-height: 420px !important;
        font-size: 16px !important;
        padding: 20px !important;
    }
}

@media screen and (max-width: 640px) {
    .promptlab-container .prompt-box-body {
        height: 300px !important;
        max-height: 300px !important;
        font-size: 15px !important;
        padding: 16px !important;
    }
    .promptlab-container .prompt-box-header {
        padding: 12px 16px !important;
    }
}

/* RELATED PROMPTS SECTION */
.promptlab-related-section {
    margin-top: 20px;
}

.promptlab-related-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #0f172a;
}

.promptlab-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-size: 16px;
}
