#pksm-chatbot {
    width: 100%;
    max-width: 600px;
    margin: 30px auto;
    padding: 10px;
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    font-family: Arial, sans-serif;
}

#chat-header {
    font-weight: bold;
    text-align: center;
    padding: 10px;
    background-color: #007bff;
    color: #fff;
    border-radius: 6px 6px 0 0;
    margin-bottom: 10px;
}

#chat-history {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background-color: #fafafa;
    border-radius: 6px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
}

#story-container {
    display: none;
    background-color: #fff;
    margin-top: 10px;
}

.story-page {
    margin: 20px 0;
    padding: 10px;
    border: 1px dashed #ccc;
    border-radius: 4px;
}
.story-page h2 {
    font-size: 16px;
    margin-bottom: 8px;
}
.story-page p {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 12px;
}
.story-page img {
    display: block;
    margin: 20px auto;
    max-width: 200px;
}
.cover-page h1 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 10px;
}
.cover-page img {
    display: block;
    margin: 20px auto;
    max-width: 200px;
}

.user-message,
.bot-message {
    display: inline-block;
    clear: both;
    padding: 10px 15px;
    margin: 5px 0;
    border-radius: 20px;
    max-width: 80%;
    word-wrap: break-word;
}

.user-message {
    background-color: #d1e7dd;
    float: right;
    text-align: right;
}

.bot-message {
    background-color: #fff3cd;
    float: left;
    text-align: left;
}

.bot-message img {
    display: block;
    margin: 5px 0;
    max-width: 200px;
}

.pksm-input-row {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

#user-input {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

#voice-select {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

#send-btn,
#voice-mode-btn {
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    color: #fff;
    background-color: #007bff;
}

#send-btn:hover,
#voice-mode-btn:hover {
    background-color: #0056b3;
}

.pksm-actions-row {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

#generate-pdf-btn {
    padding: 10px 15px;
    cursor: pointer;
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 6px;
}

#generate-pdf-btn:hover {
    background-color: #218838;
}
