* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
            background: #1e1e1e;
            color: #fff;
            overflow: hidden;
            width: 100vw;
            height: 100vh;
        }

        .container {
            display: flex;
            flex-direction: column;
            height: 100vh;
            width: 100vw;
        }

        /* Header */
        .header {
            padding: 2px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);
            flex-shrink: 0;
            background-color: #272822;
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .logo {
            font-size: 18px;
            font-weight: 600;
            background: linear-gradient(45deg, #007acc, #00d4ff);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            display: none;
        }

        .file-controls {
            display: flex;
            gap: 8px;
            margin-left: -11px;
        }

        .file-input-wrapper {
            position: relative;
            overflow: hidden;
            display: inline-block;
            float: left;
            margin: -4px 0px 1px 4px;
            /* width: 300px; */
        }

        .file-input {
            position: absolute;
            left: -9999px;
            opacity: 0;
        }

        .btn {
            padding: 8px 8px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 500;
            transition: all 0.2s ease;
            background-color: #181915;
        }
.btn svg{width:30px;height:30px;margin: -4px -1px -10px -3px;fill: #FFF;}
.btn:hover svg{margin: -4px -1px -10px -3px;}
.btn:hover svg path{fill:#ffc107;}

#save-btn{
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 400;
            transition: all 0.2s ease;
            fill: #ffffff;
            background: none;
            margin: -10px 7px -9px -4px;
            top: 11px;
            position: relative;
            color: #FFF;
            font-size: 26px;
            }
#save-btn svg{width: 30px;height: 30px;fill:#FFF;}
#save-btn:hover svg{fill:#ffc107}
        .btn.primary {
            background: linear-gradient(135deg, #c56c54 0%, #ffba49 100%);
        }

        .btn.primary:hover {
            background: linear-gradient(135deg, #9a3b20 0%, #ffba49 100%);
        }

        .analysis-mode {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #ccc;
            font-size: 12px;
        }

        .mode-select {
            background: #404040;
            color: #fff;
            border: 1px solid #555;
            border-radius: 4px;
            padding: 4px 8px;
            font-size: 11px;
            max-width: 140px;
            /* letter-spacing: 1px; */
        }

        /* Tabs */
        .tabs-container {
            overflow-x: auto;
            white-space: nowrap;
            flex-shrink: 0;
            background-color: #181915;
            padding-top: 7px;
        }

        .tabs {
            display: flex;
            min-height: 40px;
        }

        .tab {
            background: #202020;
            color: #ccc;
            padding: 10px 20px;
            border: none;
            cursor: pointer;
            font-size: 13px;
            min-width: 140px;
            max-width: 220px;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            transition: all 0.2s ease;
            position: relative;
            border-radius: 12px 12px 0 0;
            /* border: 1px solid #404040; */
        }

        .tab.active {
            background: #3d3d38;
            color: #fff;
            /* background: linear-gradient(45deg, #009688, #f6ae4b); */
        }

        .tab.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(45deg, #009688, #f6ae4b);
            background: linear-gradient(135deg, #5b7183 0%, #49483e 100%);
        }

        .tab:hover:not(.active) {
            background: #4a4a4a;
            color: #fff;
        }
.tab span{overflow:hidden;}
        .tab-close {
            background: none;
            border: none;
            color: #999;
            cursor: pointer;
            font-size: 16px;
            padding: 0;
            width: 18px;
            height: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 3px;
            transition: all 0.2s ease;
        }

        .tab-close:hover {
            background: #666;
            color: #fff;
        }
.tab.add-tab{width: 40px;min-width: 37px;padding: 0 0 0 9px !important;font-size: 35px;/* background-color: #009688; */color: #FFF;border-radius: 10px 10px 0 0;background: linear-gradient(279deg, #009688, #f6ae4b);background: linear-gradient(135deg, #6e8191 0%, #5a7081 100%);}
.tab.add-tab:hover{background: linear-gradient(135deg, #69727a 0%, #5a7081 100%);}

/* Main content area */
        .main-content {
            flex: 1;
            display: flex;
            overflow: hidden;
            width: 100%;
            height: calc(100vh - 120px);
            /* max-height: calc(100vh - 120px); */
        }

        .editor-panel {
            background: #272822;
            display: flex;
            flex-direction: column;
            width: 60%;
            min-width: 300px;
            height: 100%;
            max-height: 100%;
        }

        .resizer {
            width: 10px;
            background: #3d3d38;
            cursor: col-resize;
            transition: background 0.2s ease;
            position: relative;
            flex-shrink: 0;
        }

        .resizer:hover {
            background: #ab624d;
        }

        .resizer::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 2px;
            height: 40px;
            background: #666;
            border-radius: 1px;
        }

        .ai-panel {
            background: #252526;
            display: flex;
            flex-direction: column;
            width: 40%; 
            min-width: 300px;
        }

        .editor-wrapper {
            flex: 1;
            display: flex;
            position: relative;
            width: 100%;
            height: 100%;
            min-height: 0;
        }

        .editor-main {
            flex: 1;
            position: relative;
            width: calc(100% - 100px); 
            height: 100%; 
    min-height: 0; 
        }

        #editor {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            font-size: 14px;
            width: 100%;
            height: 100%;
            max-height: 100%;
        }

        .minimap-container {
width: 160px;
    background: #272822;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    user-select: none;
    overflow-y: auto;
        }

        .minimap-container:hover {
          background: #2d2d28;
        }

        .minimap {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            font-size: 2px;
            line-height: 2px;
            width: 100%;
            height: 100%;
        }

        /* AI Panel */
        .ai-header {
            /* background: linear-gradient(135deg, #2d2d30 0%, #3c3c3c 100%); */
            padding: 7px 20px 6px 20px;
            border-bottom: 1px solid #404040;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-shrink: 0;
            background-color: #3d3d38;
            height: 54px;
        }

        .ai-title {
            font-size: 16px;
            font-weight: 600;
            background: linear-gradient(45deg, #ff6b6b, #ffd93d);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .selection-info {
            font-size: 11px;
            color: #999;
            background: #404040;
            padding: 4px 8px;
            border-radius: 4px;
            display: none;
        }

        .ai-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            height: 100%;
        }

        .chat-container {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
            background: #181915;
        }

        .message {
            margin: 10px 0px 20px 0px;
            animation: fadeIn 0.3s ease;
            float: right;
            clear: both;
        }
.message.ai {
    float: left;
    max-width: 100%;
}
        .message.user {
            text-align: right;
        }

        .message-content {
            display: inline-block;
            max-width: 100%;
            padding: 12px 16px;
            border-radius: 12px;
            font-size: 14px;
            line-height: 1.4;
        }

        .message.user .message-content {
            background: linear-gradient(135deg, #505558 0%, #9b9b9b 100%);
            color: white;
        }

        .message.ai .message-content {
            background: #272822;
            color: #fff;
            /* border: 1px solid #404040; */
        }


        .input-area {
            background: #3d3d38;
            padding: 16px 20px;
            /* border-top: 1px solid #404040; */
            flex-shrink: 0;
        }

        .input-wrapper {
            display: flex;
            gap: 12px;
            align-items: flex-end;
        }

        .input-field {
            flex: 1;
            background: #272822;
            border: 1px solid #272822;
            border-radius: 8px;
            padding: 10px 16px;
            color: #fff;
            font-size: 14px;
            resize: none;
            min-height: 40px;
            max-height: 120px;
            overflow-y: auto;
        }

        .input-field:focus {
            outline: none;
            border-color: #000000;
            box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
        }

        .send-btn {
            background: linear-gradient(45deg, #009688, #f6ae4b);
            color: white;
            border: none;
            border-radius: 8px;
            padding: 12px 20px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.2s ease;
            white-space: nowrap;
            background: linear-gradient(135deg, #5b7183 0%, #49483e 100%);
        }

        .send-btn:hover:not(:disabled) {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 122, 204, 0.3);
            background: linear-gradient(45deg, #009688, #eb9d32);
        }

        .send-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* Responsive design */
        @media (max-width: 1024px) {
            .minimap-container {
                width: 80px;
            }
            
            .tab {
                min-width: 100px;
                max-width: 150px;
                padding: 10px 16px;
            }
        }

        @media (max-width: 768px) {
            .main-content {
                flex-direction: column;
                height: calc(100vh - 120px);
            }
            
            .editor-panel {
                width: 100%;
                height: 50%;
            }
            
            .ai-panel {
                width: 100%;
                height: 50%;
            }
            
            .resizer {
                width: 100%;
                height: 6px;
                cursor: row-resize;
            }
            
            .resizer::after {
                width: 40px;
                height: 2px;
            }
            
            .minimap-container {
                display: none;
            }
            
            .editor-main {
                width: 100%;
            }
            
            .header {
                flex-direction: column;
                gap: 12px;
                padding: 12px 16px;
            }
            
            .header-left {
                width: 100%;
                justify-content: space-between;
            }
            
            .analysis-mode {
                order: -1;
            }
        }

        @media (max-width: 480px) {
            .tab {
                min-width: 80px;
                max-width: 120px;
                padding: 10px 12px;
            }
            
            .input-wrapper {
                flex-direction: column;
                gap: 8px;
            }
            
            .send-btn {
                align-self: stretch;
            }
        }

        /* Animations */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Scrollbars */
        .tabs-container::-webkit-scrollbar,
        .chat-container::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }

        .tabs-container::-webkit-scrollbar-track,
        .chat-container::-webkit-scrollbar-track {
            background: #2d2d30;
        }

        .tabs-container::-webkit-scrollbar-thumb,
        .chat-container::-webkit-scrollbar-thumb {
            background: #555;
            border-radius: 3px;
        }

        .tabs-container::-webkit-scrollbar-thumb:hover,
        .chat-container::-webkit-scrollbar-thumb:hover {
            background: #666;
        }

        /* Code highlighting in messages */
        .message pre {
            /* background: #49483e; */
            border-radius: 6px;
            /* padding: 12px; */
            margin: 8px 0;
            overflow-x: auto;
            font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
            font-size: 13px;
        }

        .message code {
            background: #404040;
            padding: 2px 6px;
            border-radius: 3px;
            font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
            font-size: 13px;
        }

          .ace_marker-layer .minimap-viewport {
            background: rgba(0, 122, 204, 0.15);
            border: 1px solid rgba(0, 122, 204, 0.3);
            border-radius: 2px;
            box-sizing: border-box;
        }

        .minimap .ace_cursor {
            display: block !important;
            width: 2px !important;
            background: #007acc !important;
            opacity: 0.8;
        }

        .minimap .ace_active-line {
            background: rgba(255, 255, 255, 0.08) !important;
        }

          .minimap .ace_scroller {
            transition: none;
        }

        .minimap-container:active {
            background: #0f0f0f;
        }

         .welcome-screen {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            background: #1e1e1e;
            color: #ccc;
            text-align: center;
            padding: 40px;
        }

        .welcome-screen h2 {
            color: #fff;
            margin-bottom: 16px;
            font-size: 24px;
        }

        .welcome-screen p {
            margin-bottom: 24px;
            line-height: 1.6;
        }


::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #3d3d38;
}

::-webkit-scrollbar-thumb {
    background-color: #63635f;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #b4b4b4;
}
.ace_active-line {
background-color:transparent !important;
}

#menu{float:right;margin: -38px 10px 2px 0px;}
#menu:hover{cursor:pointer;}
#glmn {
    position: absolute;
    width: 185px;
    height: 85px;
    margin: 7px 0px 0px 0px;
    right: 9px;
    top: 51px;
    border-radius: 8px;
    padding: 15px 20px 15px 20px;
    color: #000;
    display: none;
    font-size: 14px;
    background: linear-gradient(45deg, #009688, #f6ae4b);
}
#menu img{width: 24px;}
#glmn a {
    float: left;
    width: 100%;
    color: #000;
    text-decoration: none;
    margin: 0px 0px 10px 0px;
    font-size: 14px;
}
#glmn a:hover{text-decoration:underline;}
#glmn a.exit {
    text-align: right;
    color: #fff;
    font-size: 13px;
    margin: 8px -9px -24px 5px;
    width: auto;
    float: right;
    background-color: #000;
    border-radius: 4px;
    padding: 0px 5px 3px 5px;
}



























.panel-toggle-buttons {
    display: flex;
    background-color: #181915;
    border-radius: 6px;
    padding: 3px;
    margin-left: auto; 
    margin-right: 15px;
}

.panel-toggle-btn {
    background: transparent;
    border: none;
    color: #ccc;
    padding: 5px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    height: 34px;
}
.panel-toggle-btn svg{fill:#848484;}
.panel-toggle-btn.active {
    background: linear-gradient(45deg, #009688, #f6ae4b);
    color: white;
    background: linear-gradient(135deg, #5b7183 0%, #49483e 100%);
}

.panel-toggle-btn:not(.active):hover {
    background-color: #3a3a3a;
}
.panel-toggle-btn:not(.active):hover svg {
    fill:#FFF;
}
.panel-toggle-btn.active svg{fill:#FFEB3B;}
#preview-panel {
    flex: 1;
    overflow: hidden;
    height: 100%;
    background-color: #fff; 
}

#preview-frame {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .ai-header {
        flex-wrap: wrap;
        gap: 10px;
    }
    .panel-toggle-buttons {
        order: 1; 
        margin-left: 0;
    }
    .analysis-mode {
        order: 2;
    }
}
.fullscreen-btn {
    position: relative;
    top: 25px;
    right: 10px;
    background: rgb(39 40 34);
    color: #8f8f8f;
    border: none;
    padding: 0px 6px 2px 6px;
    cursor: pointer;
    font-size: 16px;
    z-index: 1000;
    float: right;
    font-weight: 900;
    border-radius: 4px;
    margin: -15px 0px -15px -15px;
}

.fullscreen-btn:hover {
    background: rgba(0,0,0,0.9);
}

#preview-panel.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: white;
}

#preview-panel.fullscreen #preview-frame {
    width: 100% !important;
    height: 100% !important;
}

.ace_scrollbar {
    overflow-x: hidden !important;
}
.download-btn {
    position: relative;
    top: 44px; 
    right: 50px; 
    background: rgb(39 40 34);
    color: #8f8f8f;
    border: none;
    padding: 0px 8px 2px 8px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
    z-index: 10; 
    transition: background-color 0.2s, color 0.2s;
    margin: 0px -40px -50px 45px;
    float: right;
}

.download-btn:hover {
    background-color: #555;
    color: #fff;
}


.minimap .ace_marker-layer .minimap-viewport {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: absolute;
    z-index: 20;
}
#minimap {
    cursor: pointer;
}

#minimap .ace_marker-layer .minimap-viewport {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

#minimap:hover .ace_marker-layer .minimap-viewport {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}


#minimap .ace_cursor-layer {
    opacity: 0.7;
}

.context-info pre {
    margin: 8px 0;
    background: #404040;
    padding: 8px;
    border-radius: 3px;
    overflow-x: auto;
    white-space: pre-wrap;
}

.context-info code {
    background: #333;
    padding: 2px 4px;
    border-radius: 2px;
}
.context-info{
    background: rgb(39 40 34);
    border-left: 3px solid rgb(0, 150, 136);
    padding: 10px;
    margin: 5px 0px;
    border-radius: 4px;
    font-size: 12px;
    color: rgb(204, 204, 204);
    background: linear-gradient(135deg, #5b7183 0%, #49483e 100%);
    float: left;
    clear: both;
}
#clearCd{background-color:#ffffff00;border-radius:6px;border:none;margin: 0px -10px 0px 0px;}
#clearCd svg{fill:#7e7e7e;width: 28px;height: 28px;}
#clearCd:hover svg{fill:#E91E63; cursor: pointer;}


.cthth_nero {
    float: right;
    clear: both;
    margin: -39px 46px 0px 0px;
    padding: 0px 0px 0px 0px;
    z-index: 2;
    position: relative;
    height: 26px;
    background-color: #ffffff;
    border-radius: 6px;
}
.cthth_nero div.nro {
    border-radius: 7px;
    height: 24px;
    padding: 6px 5px 0px 5px;
    line-height: 14px;
    width: 74px;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    color: #000000;
    overflow: hidden;
}
.cthth_nero div.nro:hover{color:#E91E63}


.message.ai ul,.message.ai ol{margin:0px 0px 0px 20px}
.message.ai pre {
    background: #49483e00;
    padding: 0px;
 }



.message.ai a {color: #7288f7;}
.message.ai a:hover {color: #B079F3;}
.message.ai ol, .message.ai ul {/* color: #F7F79B; */margin-left: 1em;padding: .5rem;}
.message.ai li {margin-bottom: 0.5rem;}
.message.ai strong, .message.ai b {color: #60d8da;}
.message.ai ol li {} 
.message.ai ul li {/* color: #FFF0B4; */}
.message.ai ul li strong,.message.ai ul li b{color: #F9BD70;}
.message.ai ol li strong,.message.ai ol li b{color: #f92472;}
.message.ai ol li p strong,.message.ai ul li p strong{color: #FFEF00;}
.message.ai i, .message.ai em {color: #FFF;}
.message.ai h1,.message.ai h1 strong{color: #9EC8FF;line-height:2.2rem;font-size: 20px;} 
.message.ai h1{margin: 1rem 0;}
.message.ai h2 ,.message.ai h2 strong{color: #FFD700;font-size: 20px;}
.message.ai h2{margin: 1.5rem 0;}
.message.ai h3,.message.ai h3 strong{color: #00FF58;font-size: 20px;}
.message.ai h3{margin: 1rem 0;}
.message.ai h4,.message.ai h4 strong{color: #B633FF;font-size: 20px;}
.message.ai h4{margin: .5rem 0;}
.message.ai h5,.message.ai h5 strong{color: #B600FF;font-size: 20px;}
.message.ai h5{margin: .3rem 0;}
.message.ai h6,.message.ai h6 strong{color: #F29595;font-size: 20px;}
.message.ai h6{margin: .1rem 0;}
.message.ai li p{display: contents;}








.message-content table {width: 100%;border: none;border-collapse: separate;float: left;clear: both;margin: 10px 0px 10px 0px;border-spacing: 1px;background-color: #c9c9c9;border-radius: 10px;overflow: hidden;border: 2px solid #c9c9c9;}
.message-content table thead th {font-weight: bold;text-align: left;padding: 10px 15px;/* background: #ffffff; */font-size: 15px;color: #000;}
.message-content table tr th:first-child, .message-content table tr td:first-child {
}
.message-content table tr th:last-child, .message-content table tr td:last-child {border-right: none;}
.message-content table thead tr th:first-child {border-radius: 6px 0 0 0;}
.message-content table thead tr th:last-child {border-radius: 0 6px 0 0;}
.message-content table tbody td {text-align: left;border: none;padding: 10px 15px;font-size: 14px;vertical-align: top;}
.message-content table tbody tr:last-child td{}
.message-content table tbody tr:last-child td:first-child {}
.message-content table tbody tr:last-child td:last-child {border-radius: 0 0 10px 0;}
.message-content table tbody tr:nth-child(1n),.message-content table tbody tr:nth-child(1n) strong{background: #646464;color: #FFF;}
.message-content table tbody tr:nth-child(even),.message-content table tbody tr:nth-child(even) strong {background: #aeaeae; color: #000;}
.message-content ol ul,.message-content ul ol{margin: 0px; padding: 0px;}
.message-content ol ul li,.message-content ul ol li{/* color:#FFF0B4; */}







.mermaid{margin:2rem 1rem 2rem 1rem;background-color: #404040;border-radius: 6px;padding: 1rem;background: linear-gradient(135deg, #505558 0%, #9b9b9b 100%);}
.mermaid svg{margin: 0 auto; display: block;}
pre code.hljs {
    text-align: left;
}
.fancybox__viewport{
    /*background: linear-gradient(135deg, #505558 0%, #9b9b9b 100%);*/
    background: #ffffff4a;
}
.mermaid svg .node rect {rx: 8px; ry: 8px; stroke: #272822; stroke-width: 2px; fill: #1f2020 !important;}



.message .mnu{
  position: relative;
  width: 30px;
  min-width: 30px;
  padding: 8px 0px 0px 8px;
  height: 100px;
  border-radius: 16px 16px 16px 16px;
  margin: -1px -9px -100px -50px;
  color: #fff;
  visibility: hidden;
  float: right;
  background-color: #3a3a3a;
  right: 0px;
  z-index: 2;
  }
.message .mnu:hover{background-color: #272822; color:#FFF;}
.message .mnu i{margin: 6px 14px 6px 0px;float: left;clear: both;}
.message .mnu i.fa-download{margin: 6px 14px 10px 0px;}
.message .mnu i:hover{color:#b15e55; cursor:pointer;}
.message .mnu2{width: 30px;min-width: 30px;height: 102px;padding: 8px 0px 0px 8px;margin: -7px -2px -120px -16px;z-index: 0;float: left;}
.message:hover .mnu{visibility: visible; z-index: 4; background-color:#3a3a3a; color:#fff;}

.code-block-wrapper {
    position: relative;
    margin: 1em 0;
}

.code-block-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.code-block-wrapper:hover .code-block-actions {
    opacity: 1;
}

.code-action-btn {
    background-color: #444;
    color: #eee;
    border: 1px solid #666;
    border-radius: 4px;
    padding: 4px 8px;
    font-family: sans-serif;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.code-action-btn:hover {
    background-color: #555;
}

.code-block-wrapper > pre {
    margin: 0;
}



    .chat-attachment {
            display: flex;
            align-items: center;
            gap: 6px;
            margin: 0px -6px 0px -20px;
        }

        .image-btn {
            width: 40px;
            height: 40px;
            border: 1px solid #444;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            background: #272822;
            transition: all 0.2s ease;
            position: relative;
            overflow: hidden;
        }

        .image-btn:hover {
            background: #4a4a4a;
            border-color: #666;
        }

        .image-btn.has-image {
            border-color: #0084ff;
        }

        .image-btn img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 4px;
        }

        .image-btn i {
            font-size: 14px;
            color: #888;
        }

        .image-btn.has-image i {
            color: #fff;
        }

        .delete-x {
            position: absolute;
            top: -2px;
            right: -2px;
            width: 14px;
            height: 14px;
            background: #ff4444;
            border-radius: 50%;
            display: none;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 8px;
            color: white;
        }

        .image-btn.has-image:hover .delete-x {
            display: flex;
        }

        .action-btn {
            width: 37px;
            height: 37px;
            border: none;
            border-radius: 4px;
            background: #272822;
            color: #aaa;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            transition: all 0.2s ease;
            /* background: linear-gradient(135deg, #5b7183 0%, #49483e 100%); */
        }

        .action-btn:hover {
            background: #555;
            color: #fff;
        }

        .action-btn.primary {
            background: #0084ff;
            color: white;
        }

        .action-btn.primary:hover {
            background: #0066cc;
        }

        .draw-panel {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: #2a2a2a;
            border: 1px solid #444;
            border-radius: 8px;
            padding: 12px;
            z-index: 1000;
            box-shadow: 0 4px 20px rgba(0,0,0,0.5);
        }

        .draw-canvas {
            border: 1px solid #444;
            border-radius: 4px;
            cursor: crosshair;
            background: white;
        }

        .draw-controls {
            display: flex;
            gap: 6px;
            margin-top: 8px;
            justify-content: center;
        }

        .draw-btn {
            padding: 4px 8px;
            border: none;
            border-radius: 4px;
            background: #444;
            color: #fff;
            cursor: pointer;
            font-size: 11px;
            transition: background 0.2s ease;
        }

        .draw-btn:hover {
            background: #555;
        }

        .draw-btn.save {
            background: #0084ff;
        }

        .draw-btn.save:hover {
            background: #0066cc;
        }

        #fileInput,#fileInput2, #imageData {
            display: none;
        }

        .overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.7);
            z-index: 999;
        }




.code-action-btn {
    position: relative; 
    transition: background-color 0.2s, color 0.2s;
}

.code-action-btn.is-copied {
    background: linear-gradient(135deg, #5b7183 0%, #49483e 100%);
    color: white;
}

.code-action-btn.is-copied span {
    visibility: hidden;
}

.code-action-btn.is-copied::after {
    content: '✓ Успешно'; 
    position: absolute;
    top: 0px;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.edgeLabel{
    background-color:#b2bec3 !important;
    padding:0px 4px 2px 4px !important;
    margin:10px !important;
    border-radius:4px !important;
    font-size:11.3px;
    color:#000 !important;
    fill: #000 !important;
    text-align: left !important;
}
