/* =========================================
   BASE SETTINGS & SCROLLBARS
   ========================================= */

::-webkit-scrollbar { width: 0px; background: transparent; }

.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent; 
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1); 
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2); 
}

/* =========================================
   MESSAGE ANIMATIONS & LAYOUT
   ========================================= */

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-animate {
    animation: slideUpFade 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.message-container {
    display: flex;
    width: 100%;
    margin-bottom: 1rem;
}

.message-content {
    line-height: 1.7;
    font-size: 0.95rem;
}

/* User Message: Minimal frosted pill */
.msg-user {
    justify-content: flex-end;
}

.msg-user .message-content {
    background-color: #111111;
    color: #EDEDED;
    padding: 10px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    white-space: pre-wrap;
    max-width: 70%;
    font-weight: 300;
}

/* AI Message: Pure text, seamlessly integrated */
.msg-ai {
    justify-content: flex-start;
}

.msg-ai .message-content {
    background: transparent;
    color: #D4D4D4;
    padding: 4px 0;
    width: 100%;
    max-width: 100%;
    font-weight: 300;
}

/* =========================================
   MARKDOWN TYPOGRAPHY (Linear/Vercel Vibe)
   ========================================= */

.prose p { margin-bottom: 1rem; color: #D4D4D4; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: #FFFFFF; font-weight: 500; }
.prose ul { list-style-type: disc; padding-left: 1.5rem; margin-bottom: 1rem; color: #D4D4D4; }
.prose ol { list-style-type: decimal; padding-left: 1.5rem; margin-bottom: 1rem; color: #D4D4D4; }
.prose li { margin-bottom: 0.25rem; }

/* Inline code */
.prose code:not(pre code) {
    background-color: rgba(255, 255, 255, 0.05);
    color: #E5E5E5;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85em;
    font-family: 'JetBrains Mono', monospace;
}

/* =========================================
   PREMIUM CODE BLOCKS (macOS Style)
   ========================================= */

.prose pre {
    background-color: #050505 !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px !important;
    margin: 1.5rem 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

/* Mac-style Window Dots & Header */
.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background-color: #0A0A0A;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
}

.mac-dots {
    display: flex;
    gap: 6px;
}
.mac-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot-red { background-color: #FF5F56; }
.dot-yellow { background-color: #FFBD2E; }
.dot-green { background-color: #27C93F; }

.lang-label {
    color: #666;
    font-family: 'JetBrains Mono', monospace;
    text-transform: lowercase;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.prose pre code {
    display: block;
    padding: 16px !important;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #E5E5E5;
}

/* Copy Button */
.copy-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #666;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 400;
    opacity: 0; /* Hidden by default */
}
.prose pre:hover .copy-btn {
    opacity: 1; /* Show on hover for cleaner UI */
}
.copy-btn:hover { color: #FFF; }