/* General styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 15px;
    background-color: #19232D;
    color: #abb2bf;
    font-size: 16px;
}

/* Chat history container */
#history {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Individual message blocks */
.message {
    max-width: 90%;
    word-wrap: break-word;
}

/* Message Header */
.message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
}

.icon {
    width: 32px;
    height: 32px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.role {
    font-weight: 600;
}

.timestamp {
    color: #6c757d;
    font-size: 12px;
}

/* User message */
.user {
    padding: 15px;
    background-color: #262E38;
    border-radius: 8px;
}

.user .icon {
    background-color: #2563eb;
}

/* Assistant message */
.assistant {
    padding: 15px;
    background-color: #262E38;
    border-radius: 8px;
}

.assistant .icon {
    background-color: #5865f2;
}

/* Code blocks */
pre {
    position: relative;
    padding: 1em;
    margin: 1em 0;
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    background-color: #23241f; /* Monokai Background */
    border-radius: 6px;
}

.copy-button {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 5px 8px;
    border: none;
    background-color: #555;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

pre:hover .copy-button {
    opacity: 1;
}

code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
    font-size: 0.9em;
}

th, td {
    border: 1px solid #4b5563;
    padding: 8px 15px;
}

th {
    font-weight: 600;
    background-color: #323840;
}

tr:nth-child(2n) {
    background-color: #2c3138;
}
