/* Menggunakan @import untuk menjaga kerapian */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* --- Gaya Dasar --- */
body, #aci-chat-window { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; }
.gradient-text { background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dark .gradient-text { background: linear-gradient(90deg, #818cf8 0%, #a78bfa 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* --- Gaya Chat Bubble --- */
.chat-bubble-aci { max-width: 80%; width: fit-content; padding: 0.75rem 1rem; animation: 0.5s ease-out forwards fadeIn; }
.user-bubble-aci { background-color: #4f46e5; color: white; border-radius: 20px 5px 20px 20px; align-self: flex-end; }
.ai-bubble-aci { background-color: #e2e8f0; color: #1f2937; border-radius: 5px 20px 20px 20px; align-self: flex-start; }
.dark .ai-bubble-aci { background-color: #334155; color: #e5e7eb; }

/* --- Animasi --- */
.typing-indicator span { height: 8px; width: 8px; margin: 0 2px; background-color: #9ca3af; display: inline-block; border-radius: 50%; animation: 1.4s ease-in-out infinite both bounce; }
.dark .typing-indicator span { background-color: #cbd5e1; }
.typing-indicator span:nth-of-type(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-of-type(2) { animation-delay: -0.16s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1.0); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to   { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation-name: fadeIn; }

/* --- Gaya "Proses Berpikir" AI --- */
.ai-bubble-aci details { margin-top: 1rem; padding: 0.75rem; border-radius: 0.5rem; background-color: rgba(0, 0, 0, 0.05); border: 1px solid rgba(0, 0, 0, 0.08); }
.dark .ai-bubble-aci details { background-color: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); }
.ai-bubble-aci summary { cursor: pointer; font-weight: 500; font-size: 0.8rem; color: #475569; }
.dark .ai-bubble-aci summary { color: #94a3b8; }
.ai-bubble-aci .thought-content { margin-top: 0.5rem; font-size: 0.75rem; color: #64748b; opacity: 0.8; white-space: pre-wrap; }
.dark .ai-bubble-aci .thought-content { color: #94a3b8; }

/* --- [GAYA BARU] Blok Kode Ala VS Code --- */
.code-block-container {
    background-color: #1e1e1e; /* Warna background editor VS Code */
    border-radius: 0.5rem;
    margin: 0.75rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: 1px solid #3a3a3a;
}
.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background-color: #333333;
    border-bottom: 1px solid #444;
}
.code-block-lang {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    color: #cccccc;
    font-weight: 500;
    text-transform: uppercase;
}
.copy-code-btn {
    background-color: #252526;
    border: 1px solid #4a4a4a;
    color: #cccccc;
    cursor: pointer;
    transition: background-color 0.2s;
    padding: 0.25rem 0.6rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.copy-code-btn:hover {
    background-color: #3a3a3a;
    color: white;
}
.code-block-body {
    max-height: 400px;
    overflow: auto;
    display: flex; /* Menggunakan flexbox untuk nomor baris */
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
/* Kolom untuk nomor baris */
.line-numbers {
    flex-shrink: 0;
    padding: 0.75rem 1rem 0.75rem 0.75rem;
    text-align: right;
    color: #5c6370; /* Warna nomor baris abu-abu */
    font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    user-select: none; /* Agar tidak bisa diseleksi */
    border-right: 1px solid #3a3a3a;
}
.line-numbers > div {
    min-height: 21px; /* Sesuaikan dengan line-height pre */
}
/* Kolom untuk kode */
.code-block-body pre[class*="language-"] {
    margin: 0 !important;
    padding: 0.75rem 1rem !important;
    background: transparent !important;
    flex-grow: 1;
    overflow: visible;
    line-height: 21px;
}
/* Menimpa gaya inline code default Prism agar tidak ada background */
:not(pre) > code[class*="language-"] {
    background: transparent !important;
}

/* --- Gaya "Proses Berpikir" AI --- */
.ai-bubble-aci details { 
    margin-top: 1rem; 
    padding: 0.75rem; 
    border-radius: 0.5rem; 
    background-color: rgba(0, 0, 0, 0.05); 
    border: 1px solid rgba(0, 0, 0, 0.08); 
}
.dark .ai-bubble-aci details { 
    background-color: rgba(255, 255, 255, 0.05); 
    border-color: rgba(255, 255, 255, 0.1); 
}
.ai-bubble-aci summary { 
    cursor: pointer; 
    font-weight: 500; 
    font-size: 0.8rem; 
    color: #475569; 
}
.dark .ai-bubble-aci summary { 
    color: #94a3b8; 
}
.ai-bubble-aci .thought-content { 
    margin-top: 0.5rem; 
    font-size: 0.75rem; 
    color: #64748b; 
    opacity: 0.8; 
    white-space: pre-wrap; 
}
.dark .ai-bubble-aci .thought-content { 
    color: #94a3b8; 
}