
body{
    margin:0;
    font-family:Segoe UI,sans-serif;
    background:#1a1a2e;
    color:white;
    font-size:13px;
}

header{
    background:#0f3460;
    padding:18px;
    text-align:center;
    border-bottom:1px solid #2a2a4a;
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
}

.header-logo{
    height:55px;
    width:auto;
    border-radius:8px;
    object-fit:contain;
}

.logo-link{
    position:absolute;
    left:18px;
    top:50%;
    transform:translateY(-50%);
    display:flex;
    align-items:center;
}

.toolbar{
    display:flex;
    gap:10px;
    padding:12px;
    background:#16213e;
}

.layout{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
    padding:12px;
}

.left-panel,.right-panel{
    background:#0f3460;
    border-radius:12px;
    padding:15px;
    border:1px solid #2a2a4a;
}

.diagram-box{
    margin-bottom:15px;
    animation: diagramSlideIn 0.5s ease-out both;
}

@keyframes diagramSlideIn{
    from{
        opacity:0;
        transform: translateY(-12px) scale(0.95);
    }
    to{
        opacity:1;
        transform: translateY(0) scale(1);
    }
}

.expand-btn{
    background:linear-gradient(45deg,#e94560,#533483);
}

#description{
    margin-top:15px;
    line-height:1.8;
    font-size:14.5px;
}

#description li{
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    margin:6px 0;
    color:#ccc;
}

#description li.revealed{
    opacity: 1;
    transform: translateX(0);
}

.reveal-controls{
    display:flex;
    gap:8px;
    margin-top:10px;
    align-items:center;
}

.reveal-btn{
    background:linear-gradient(45deg,#533483,#0f3460);
    font-size:13px;
    padding:8px 14px;
}

.reveal-btn:hover{
    background:linear-gradient(45deg,#e94560,#533483);
}

.reveal-counter{
    color:#7fdbca;
    font-size:12px;
    margin-left:8px;
}

#description h4{
    color:#7fdbca;
    margin:18px 0 8px 0;
    font-size:15px;
    border-bottom:1px solid #2a2a4a;
    padding-bottom:4px;
}

.section-heading{
    color:#e94560;
    font-size:18px;
    margin:0 0 12px 0;
    padding-bottom:8px;
    border-bottom:2px solid #533483;
    text-align:left;
}

#description p{
    margin:8px 0;
    color:#ddd;
}

#description ul{
    margin:8px 0 8px 10px;
    padding-left:16px;
}

#description code{
    background:#111827;
    color:#7fdbca;
    padding:2px 6px;
    border-radius:4px;
    font-family:Consolas,monospace;
    font-size:13px;
}

#description strong{
    color:#fff;
}

#description em{
    color:#e94560;
    font-style:italic;
}

#syntax{
    margin-top:20px;
    background:#111827;
    padding:12px;
    border-radius:8px;
    font-family:Consolas;
    color:#7fdbca;
    white-space:pre-wrap;
}

button{
    border:none;
    padding:10px 14px;
    border-radius:8px;
    background:#e94560;
    color:white;
    cursor:pointer;
}

button:hover{
    opacity:0.9;
}

select{
    background:#111827;
    color:white;
    border:1px solid #333;
    padding:10px;
    border-radius:8px;
}

.CodeMirror{
    height:420px;
    font-size:15px;
}

#exampleTabs{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-bottom:10px;
}

.example-btn{
    background:#533483;
}

.example-btn.active-tab{
    background:#e94560;
    outline: 2px solid #7fdbca;
}

.action-row{
    margin-top:10px;
    margin-bottom:10px;
}

#output{
    background:black;
    color:#7fdbca;
    padding:12px;
    height:180px;
    overflow:auto;
    border-radius:8px;
}

.fullscreen{
    position:fixed !important;
    top:0;
    left:0;
    width:100%;
    height:100%;
    z-index:999;
    overflow:auto;
}

@media(max-width:900px){
    .layout{
        grid-template-columns:1fr;
    }
}

.chat-panel{
    margin-top:12px;
    border:1px solid #2a2a4a;
    border-radius:10px;
    overflow:hidden;
    background:#0a1628;
}

.chat-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:10px 14px;
    background:#16213e;
    cursor:pointer;
    font-size:14px;
    color:#7fdbca;
}

.chat-toggle{
    background:none;
    color:#7fdbca;
    font-size:14px;
    padding:4px 8px;
}

.chat-body{
    display:none;
    flex-direction:column;
    max-height:280px;
}

.chat-body.open{
    display:flex;
}

.chat-messages{
    flex:1;
    overflow-y:auto;
    padding:12px;
    max-height:200px;
    min-height:80px;
}

.chat-msg{
    margin:8px 0;
    padding:8px 12px;
    border-radius:8px;
    font-size:13px;
    line-height:1.5;
    max-width:90%;
    word-wrap:break-word;
}

.chat-msg.bot{
    background:#16213e;
    color:#ddd;
    border:1px solid #2a2a4a;
}

.chat-msg.user{
    background:#533483;
    color:white;
    margin-left:auto;
    text-align:right;
}

.chat-msg code{
    background:#111827;
    color:#7fdbca;
    padding:1px 5px;
    border-radius:3px;
    font-size:12px;
}

.chat-msg.loading{
    color:#7fdbca;
    font-style:italic;
}

.chat-input-row{
    display:flex;
    gap:8px;
    padding:10px 12px;
    border-top:1px solid #2a2a4a;
    background:#16213e;
}

.chat-input-row input{
    flex:1;
    background:#111827;
    color:white;
    border:1px solid #333;
    padding:8px 12px;
    border-radius:6px;
    font-size:13px;
}

.chat-input-row button{
    background:#e94560;
    padding:8px 16px;
    font-size:13px;
    border-radius:6px;
}

.CodeMirror-selected{
    background:#533483 !important;
}

.CodeMirror-focused .CodeMirror-selected{
    background:#533483 !important;
}

.CodeMirror-line::selection,
.CodeMirror-line > span::selection,
.CodeMirror-line > span > span::selection{
    background:#533483 !important;
}

.chat-disclaimer{
    background:#1a1a2e;
    border:1px solid #e94560;
    border-radius:6px;
    padding:8px 12px;
    margin:10px 12px 0 12px;
    font-size:11px;
    color:#ccc;
    line-height:1.5;
}

.ai-chat-prominent{
    margin-top:12px;
    border:2px solid #7fdbca;
    border-radius:12px;
    background:#0a1628;
    overflow:hidden;
}

.ai-chat-header{
    padding:12px 16px;
    background:linear-gradient(135deg,#533483,#0f3460);
    font-size:15px;
    color:#7fdbca;
    font-weight:bold;
}

.ai-chat-disclaimer{
    padding:6px 16px;
    font-size:10px;
    color:#888;
    background:#0f1a2e;
    border-bottom:1px solid #2a2a4a;
}

.ai-chat-prominent .chat-messages{
    max-height:220px;
    min-height:100px;
    overflow-y:auto;
    padding:12px 16px;
}

.ai-chat-prominent .chat-input-row{
    display:flex;
    gap:8px;
    padding:12px 16px;
    border-top:1px solid #2a2a4a;
    background:#16213e;
}

.ai-chat-prominent .chat-input-row input{
    flex:1;
    background:#111827;
    color:white;
    border:1px solid #7fdbca;
    padding:10px 14px;
    border-radius:8px;
    font-size:13px;
}

.ai-chat-prominent .chat-input-row button{
    background:#7fdbca;
    color:#1a1a2e;
    padding:10px 18px;
    font-size:13px;
    border-radius:8px;
    font-weight:bold;
}

.output-details{
    margin-top:10px;
    border:1px solid #2a2a4a;
    border-radius:8px;
    overflow:hidden;
}

.output-details summary{
    padding:8px 14px;
    background:#16213e;
    color:#aaa;
    cursor:pointer;
    font-size:12px;
}

.output-details pre{
    background:black;
    color:#7fdbca;
    padding:10px;
    margin:0;
    font-size:12px;
    max-height:120px;
    overflow:auto;
}

.ai-chat-prominent .chat-msg{
    margin:8px 0;
    padding:10px 14px;
    border-radius:8px;
    font-size:13px;
    line-height:1.6;
    max-width:95%;
    word-wrap:break-word;
}

.ai-chat-prominent .chat-msg.bot{
    background:#16213e;
    color:#ddd;
    border:1px solid #2a2a4a;
}

.ai-chat-prominent .chat-msg.user{
    background:#533483;
    color:white;
    margin-left:auto;
    text-align:right;
}

.ai-chat-prominent .chat-msg code{
    background:#111827;
    color:#7fdbca;
    padding:2px 6px;
    border-radius:4px;
    font-family:Consolas,monospace;
    font-size:12px;
}

.ai-chat-prominent .chat-msg br{
    display:block;
    content:"";
    margin:4px 0;
}

.header-links{
    position:absolute;
    right:18px;
    display:flex;
    gap:10px;
    align-items:center;
}

.promo-link{
    background:linear-gradient(135deg,#e94560,#533483);
    color:white;
    padding:6px 12px;
    border-radius:6px;
    font-size:11px;
    text-decoration:none;
    font-weight:bold;
    white-space:nowrap;
}

.promo-link:hover{
    opacity:0.9;
}


.header-links{
    position:absolute;
    right:18px;
    display:flex;
    gap:10px;
    align-items:center;
}

.promo-link{
    background:linear-gradient(135deg,#e94560,#533483);
    color:white;
    padding:6px 12px;
    border-radius:6px;
    font-size:11px;
    text-decoration:none;
    font-weight:bold;
    white-space:nowrap;
}

.promo-link:hover{
    opacity:0.9;
}
