/*----- RESET & BASE -----*/
   :root {
            --accent-color: #03fca1;
        }
        body {
            margin: 0;
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            overflow: auto;
            background: #fff;
        }
        * {
            box-sizing: border-box;
        }

/*--Slide Container & Sections --*/
        .slide-container {
            position: fixed;
            top: 0; left: 0;
            width: 100vw;
            height: 100vh;
            overflow: hidden;
            z-index: 1;
        }
        .slide-section {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            opacity: 0;
            z-index: 1;
            pointer-events: none;
            transition: opacity .5s, transform .5s;
            transform: translateY(30px);
        }
        #section1 {
             background: url('https://ai.gab.cantho.vn/wp-content/uploads/2025/08/anh-bia-gab-ai-pc-1.webp') center/cover no-repeat;
        }
        .slide-section.active {
            opacity: 1;
            z-index: 2;
            pointer-events: auto;
            transform: translateY(0);
            flex-direction: column;
        }

        /*----- Header GAB-AI -----*/
        .gab-ai-ps {
            position: relative;
            z-index: 99;
            background: #fff;
            box-shadow: 0 4px 24px 0 rgba(0,0,0,0.07);
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 16px 0;
            width: 100%;
        }
        .logo-gab-ai img {
            max-width: 100px;
            height: auto;
        }
        .info-gab-ai {
            display: flex;
            gap: 24px;
            margin-top: 14px;
        }
        .hotline-gab-ai, .zalo-gab-ai {
            min-width: 180px;
            text-align: center;
            padding: 8px 0;
            border-radius: 8px;
            font-weight: 600;
            font-size: 16px;
            text-decoration: none;
            color: #000;
            transition: box-shadow 0.2s, background 0.2s;
        }
        .hotline-gab-ai {
            border-left: 4px solid var(--accent-color);
            border-bottom: 4px solid var(--accent-color);
        }
        .zalo-gab-ai {
            border-right: 4px solid var(--accent-color);
            border-top: 4px solid var(--accent-color);
        }
        .hotline-gab-ai:hover, .zalo-gab-ai:hover {
            background: #f0fff7;
            box-shadow: 0 2px 12px rgba(3,252,161,0.15);
            color: #01836f;
        }
        @media (max-width: 768px) {
            .gab-ai-ps { padding: 12px 0; }
            .info-gab-ai { gap: 16px; }
            .hotline-gab-ai, .zalo-gab-ai { min-width: 140px; font-size: 15px; }
        }
        @media (min-width: 769px) {
            .gab-ai-ps { flex-direction: row; justify-content: center; height: 120px; padding: 0; }
            .logo-gab-ai { margin-right: 36px; }
            .info-gab-ai { flex-direction: column; gap: 10px; margin-top: 0; }
        }

        /*----- Button Row on Main Screen -----*/
        #section1 .btn-row {
            display: flex;
            flex-direction: row;
            gap: 230px;
            margin-top: auto;
           margin-bottom: 19vh;
					margin-right: 200px;
        }
        @media (max-width: 769px) {
            #section1 .btn-row {
                flex-direction: column;
                gap: 155px;
							 margin-right: 0;
							margin-bottom: auto;
            }
					 #avt-sgcar-ai {
        order: 1;
    }
					#avt-gab-ai {
        order: 2;
    }
        }
        .avt-btn {
            font-family: "Comic Relief", system-ui, Arial, sans-serif;
            width: 180px;
            padding: 8px 15px;
            font-size: 22px;
            text-shadow: 1px 1px 2px #ffffff;
            color: black;
            background: linear-gradient(120deg, #b6eaff, #66a6ff);
            border: 2px solid white;
            border-radius: 9px;
            box-shadow: 0 0 4px 0 #b6eaff;
            cursor: pointer;
            transition: transform 0.2s, filter 0.18s;
            animation: btnflash 0.8s infinite alternate;
        }
        .avt-btn:hover {
            transform: translateY(-3px);
        }
        @keyframes btnflash {
            from { filter: brightness(1.04); box-shadow: 0 0 4px 0 #b6eaff; }
            to { filter: brightness(1.19); box-shadow: 0 0 12px 3px #e3f7ff; }
        }

        /*----- Loader Overlay -----*/
        .loader {           
            position: fixed !important; 
            top: 0 !important;
            left: 0 !important;
            width: 100vw !important;  
            height: 100vh !important; 
            z-index: 9999 !important; 
            background: rgba(26, 27, 38, 0.75) !important;
            display: flex !important;
            justify-content: center !important;
            align-items: center !important; 
            opacity: 0 !important;
            pointer-events: none !important;
            transition: opacity 0.3s ease-in-out !important;
            transform: none !important; 
        }
        .loader.visible {
            opacity: 1 !important;
            pointer-events: auto !important;
        }
        .loader-inner {
            width: 50px;
            height: 50px;
            border: 5px solid rgba(255, 255, 255, 0.3);
            border-top-color: var(--accent-color);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        /*----- Chat Container -----*/
        .chat-container-wrapper {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
        }
        .chat-container-inner {
            width: 100%;
            max-width: 900px;
            height: 100%;
            max-height: 90vh;
            background: #fff;
            color: #000;
            border-radius: 18px;
            box-shadow: 0 6px 36px 0 rgba(0,0,0,0.10);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            animation: fadeIn 0.8s;
            font-size: 14px;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: scale(0.97); }
            to { opacity: 1; transform: scale(1); }
        }
        .chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 24px 22px 0 22px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            scroll-behavior: smooth;
        }
        .chat-messages::-webkit-scrollbar { width: 8px; }
        .chat-messages::-webkit-scrollbar-track { background: #f1f1f1; }
        .chat-messages::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
        .chat-messages::-webkit-scrollbar-thumb:hover { background: #aaa; }

        /*----- Chat Bubbles -----*/
        .chat-msg { display: flex; }
        .chat-user { justify-content: flex-end; }
        .chat-bot { justify-content: flex-start; }
        .chat-bubble {
            font-size: 1.05em;
            line-height: 1.5;
            padding: 11px 18px;
            border-radius: 20px;
            box-shadow: 0 1px 6px #0001;
            max-width: 85%;
            word-break: break-word;
            white-space: pre-line;
        }
        .chat-user .chat-bubble {
            background: linear-gradient(120deg, #e6e9f0 60%, #eef1f5 100%);
            color: #000;
            border-bottom-right-radius: 8px;
        }
        .chat-bot .chat-bubble {
            background: #f4f7fa;
            color: #222;
            border-bottom-left-radius: 8px;
        }

        /*----- Chat Input Bar -----*/
        .chat-input-bar {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 18px 22px;
            background: #fff;
            border-top: 1px solid #eee;
            margin-top: 12px;
        }
        .chat-input {
            flex: 1;
            padding: 13px 14px;
            font-size: 1.08em;
            border: 1.5px solid #ddd;
            border-radius: 8px;
            outline: none;
            transition: border .16s;
            background: #f6fafd;
            color: #222;
        }
        .chat-input:focus {
            border-color: var(--accent-color);
            background: #f9fffc;
        }
        .chat-send-btn {
            padding: 11px 24px;
            font-size: 1em;
            font-weight: bold;
            border: none;
            border-radius: 8px;
            background: linear-gradient(90deg, #243949 70%, #517fa4 100%);
            color: #fff;
            cursor: pointer;
            transition: background .15s, transform 0.1s;
        }
        .chat-send-btn:hover {
            background: #01836f;
        }
        .chat-send-btn:active {
            transform: scale(0.95);
        }

        /*----- Back Button -----*/
        .back-btn {
            position: absolute;
            top: 20px;
            left: 20px;
            width: 44px;
            height: 44px;
            background-color: rgba(0, 0, 0, 0.3);
            border: 1px solid rgba(255, 255, 255, 0.4);
            border-radius: 50%;
            cursor: pointer;
            z-index: 10;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: background-color 0.2s;
        }
        .back-btn:hover {
            background-color: rgba(0, 0, 0, 0.5);
        }
        .back-btn::before {
            content: '←';
            color: white;
            font-size: 24px;
            font-weight: bold;
        }
        .back-to-other-btn {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10; 
					padding: 5px;
					width: 250px;
}
.back-to-other-btn:hover {
	transform: translateX(-50%) translateY(-3px);
}
.section2 {
	background: url('https://ai.gab.cantho.vn/wp-content/uploads/2025/08/anh-bia-gab-ai-pc-1.webp') center/cover no-repeat;
}
 /*----- Responsive Mobile -----*/
        @media (max-width: 768px) {
            .chat-container-inner {
                max-height: 65vh;
                border-radius: 10px;
							max-width: 90vw;
							
            }
            .chat-container-wrapper {
                padding: 0;
            }
            .back-btn {
                top: 15px;
                left: 15px;
							width: 150px;
							font-size: 15px;
            }
					 #section1 {
             background: url('https://ai.gab.cantho.vn/wp-content/uploads/2025/08/anh-bia-gab-ai-mobile-1.webp') center/cover no-repeat;
        }
					.avt-btn {
						padding: 3px;
						font-size: 16px;
						width: 150px;
					}
			

/*----  Work Page ------*/

           /* Container & Layout */
        .container-gradient {
            max-width: 90vw;
            margin-left: auto;
            margin-right: auto;
        }

        .main-layout-gradient {
            display: flex;
            flex-direction: row; /* Desktop-first: default to side-by-side */
            gap: 1.5rem;
            margin-bottom: 1.5rem;
        }

        @media (max-width: 1023px) { /* Switch to column on smaller screens */
            .main-layout-gradient {
                flex-direction: column;
            }
        }

        /* Typography */
        .main-title-gradient {
            text-align: center;
            font-size: 2.25rem!important;
            line-height: 2.5rem;
            font-weight: 800;
            margin-bottom: 0.5rem;
            color: transparent;
            -webkit-background-clip: text;
            background-clip: text;
            background-image: linear-gradient(to right, #38bdf8, #3b82f6);
            padding-top: 0.5rem;
            padding-bottom: 0.5rem;
        }

        .subtitle-gradient {
            margin-bottom: 1.5rem;
            color: #9ca3af;
            text-align: center;
        }

        .card-title-gradient {
            font-size: 1.2rem!important;
            line-height: 1.75rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: white!important;
        }

        /* Card Styles */
        .card-gradient {
            background-color: #1f2937;
            padding: 1.5rem;
            border-radius: 0.5rem;
        }
        
        .card-full-width-gradient {
            margin-top: 1.5rem;
        }

        /* Tabs */
        #tabs-container-gradient {
            display: flex;
            border-bottom: 1px solid #374151;
            margin-bottom: 1.2rem;
            justify-content: center;
            overflow-x: auto;
            -ms-overflow-style: none;
            scrollbar-width: none;
        }
        #tabs-container-gradient::-webkit-scrollbar {
            display: none;
        }
        .tab-button-gradient {
            padding: 10px 16px;
            cursor: pointer;
            border-bottom: 3px solid transparent;
            transition: all 0.3s ease;
            color: #9ca3af;
            font-weight: 500;
            white-space: nowrap;
            border-top-right-radius: 7px;
            border-top-left-radius: 7px;
            border: none;
            background: transparent;
        }
        .tab-button-gradient:hover {
            color: #fff;
            background: #006aff;
        }
        .tab-button-gradient.active-gradient {
            color: #fff;
            background: #006aff;
            border: none;
        }
        .tab-content-gradient {
            display: none;
        }
        .tab-content-gradient.active-gradient {
            display: block;
        }

        /* Gradient & Color Picker */
        #gradient-output-gradient {
            flex: 1 1 0%;
            width: 100%;
            height: 300px;
            border: 2px solid #374151;
            border-radius: 8px;
            transition: background 0.5s ease;
        }
        #color-picker-container-gradient {
            background-color: #1f2937;
            padding: 20px;
            border-radius: 12px;
            width: 100%;
            max-width: 320px;
            flex-shrink: 0;
            height: 300px;
        }
        .sv-canvas-container-gradient {
            position: relative;
            width: 100%;
            height: 200px;
        }
        #saturation-value-canvas-gradient {
            width: 100%;
            height: 100%;
            border-radius: 8px;
            cursor: crosshair;
        }
        #sv-selector-gradient {
            position: absolute;
            width: 16px;
            height: 16px;
            border: 2px solid white;
            border-radius: 50%;
            box-shadow: 0 0 0 2px black;
            pointer-events: none;
            transform: translate(-50%, -50%);
        }
        .hue-slider-container-gradient {
            position: relative;
            width: 100%;
            height: 20px;
            margin-top: 15px;
        }
        #hue-canvas-gradient {
            width: 100%;
            height: 100%;
            border-radius: 10px;
            cursor: pointer;
        }
        #hue-selector-gradient {
            position: absolute;
            top: 50%;
            width: 12px;
            height: 24px;
            border: 2px solid white;
            border-radius: 4px;
            box-shadow: 0 0 0 2px black;
            pointer-events: none;
            transform: translate(-50%, -50%);
        }

        /* Color Stops */
        .color-stop-gradient {
            display: flex;
            align-items: center;
            margin-bottom: 10px;
            padding: 8px;
            border-radius: 8px;
            border: 2px solid transparent;
            cursor: pointer;
            transition: all 0.2s ease-in-out;
        }
        .color-stop-gradient.active-gradient {
            border-color: #3b82f6;
            background-color: #374151;
        }
        .color-preview-gradient {
            width: 40px;
            height: 40px;
            border: 2px solid #4b5563;
            border-radius: 8px;
            flex-shrink: 0;
        }
        .color-codes-gradient {
            display: flex;
            flex-direction: column;
            margin-left: 12px;
            gap: 4px;
        }
        .color-stop-gradient input[type="text"] {
            padding: 6px 8px;
            border-radius: 6px;
            border: 1px solid #4A5568;
            background-color: #1f2937;
            color: white;
            width: 180px;
            font-family: monospace;
            cursor: pointer;
            transition: background-color 0.2s;
        }
        .color-stop-gradient input[type="text"]:hover {
            background-color: #374151;
        }
        
        /* Palettes */
        .palette-grid-gradient {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
        }
        .palette-card-gradient {
            background-color: #1f2937;
            border-radius: 8px;
            padding: 12px;
            cursor: pointer;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        .palette-card-gradient:hover {
            transform: translateY(-4px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        }
        .palette-preview-gradient {
            display: flex;
            height: 60px;
            border-radius: 6px;
            overflow: hidden;
            margin-bottom: 10px;
            border: 1px solid #374151;
        }
        .palette-name-gradient {
            font-weight: 600;
            text-align: center;
            color: #d1d5db;
            margin-top: 0.5rem;
        }

        /* Buttons & Inputs */
        #add-color-stop-gradient {
            margin-top: 1rem;
            width: 100%;
            padding: 0.5rem 1rem;
            background-color: #2563eb;
            border-radius: 0.5rem;
            transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
            border: none;
            color: white;
            cursor: pointer;
        }
        #add-color-stop-gradient:hover {
            background-color: #1d4ed8;
        }
        
        .remove-btn-gradient {
            margin-left: auto;
            padding: 0.25rem 0.75rem;
            background-color: #dc2626;
            color: white;
            border-radius: 0.375rem;
            align-self: center;
            border: none;
            cursor: pointer;
            transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .remove-btn-gradient:hover {
            background-color: #b91c1c;
        }
        
        #css-output-gradient {
            width: 100%;
            padding: 0.5rem;
            background-color: #111827;
            color: #d1d5db;
            border-radius: 0.375rem;
            border: 1px solid #374151;
            font-family: monospace;
            resize: vertical;
        }
        
        /* Toast Notification */
        #toast-gradient {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%) translateY(150%);
            padding: 12px 24px;
            background-color: #2563eb;
            color: white;
            border-radius: 8px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
            transition: transform 0.4s ease-in-out;
            z-index: 2000;
            font-weight: 500;
        }
        #toast-gradient.show-gradient {
            transform: translateX(-50%) translateY(0);
        }
/*-----Code ------------*/


.header-code {
            padding: 1rem;
            background-color: #1f2335;
            border-bottom: 1px solid #414868;
        }
        .h1-code {
            font-size: 1.25rem!important;
            line-height: 1.75rem;
            font-weight: 700;
            text-align: center;
            color: #fff;
        }
        .main-container-code {
            display: grid;
            grid-template-columns: repeat(1, minmax(0, 1fr));
            height: calc(100vh - 65px);
            gap: 1rem;
            padding: 1rem;
            box-sizing: border-box;
        }
        @media (min-width: 768px) {
            .main-container-code {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }
        .left-column-code {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            overflow-y: auto;
        }
        .editor-container-wrapper-code {
            flex: 1 1 0%;
            display: flex;
            flex-direction: column;
            min-height: 0;
        }
        .editor-pane-code {
            display: grid;
            grid-template-rows: repeat(3, minmax(0, 1fr));
            height: 100%;
            gap: 1rem;
        }
        .editor-wrapper-code {
            display: flex;
            flex-direction: column;
            min-height: 0;
        }
        .editor-label-code {
            font-weight: 600;
            color: #a9b1d6;
            padding-left: 4px;
            margin-bottom: 0.25rem;
        }
        .editor-div-code {
            height: 100%;
        }
        .console-wrapper-code, .libs-wrapper-code {
            display: flex;
            flex-direction: column;
        }
        .libs-container-code {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 1rem;
        }
        .right-column-code {
            height: 100%;
            display: flex;
            flex-direction: column;
        }
        .tabs-container-code {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.5rem;
        }
        .mobile-controls-code {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.5rem;
            padding: 0.25rem;
            background-color: #24283b;
            border-radius: 0.5rem;
        }
        .select-code {
            background-color: #414868;
            color: white;
            padding: 0.25rem;
            border-radius: 0.375rem;
            font-size: 0.75rem;
            line-height: 1rem;
            border: none;
        }
        .size-input-container-code {
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        .size-input-code {
            width: 4rem;
            padding: 0.25rem;
            background-color: #414868;
            color: white;
            border-radius: 0.375rem;
            font-size: 0.75rem;
            line-height: 1rem;
            border: none;
        }
        .x-separator-code {
            font-size: 0.75rem;
            line-height: 1rem;
        }
        .mobile-preview-wrapper-code {
            width: 100%;
            flex: 1 1 0%;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 1rem;
            border-radius: 0.5rem;
            box-sizing: border-box;
        }
        .desktop-iframe-container-code {
            width: 100%;
            height: 100%;
            flex: 1 1 0%;
            border-radius: 0.5rem;
        }
        .mobile-tab-content-code {
            gap: 0.5rem;
        }

        /* CSS gốc với hậu tố "-code" */
        .CodeMirror { height: 100%; font-size: 14px; border-radius: 8px; border: 1px solid #414868; }
        .CodeMirror-gutters { background: #24283b !important; }
        iframe { background-color: white; border: 1px solid #414868; transition: width 0.3s, height 0.3s; }
        .tab-button-code { padding: 8px 16px; cursor: pointer; border-radius: 6px; background-color: #24283b; color: #a9b1d6; transition: background-color 0.3s, color 0.3s; border: none; }
        .tab-button-code.active-code { background-color: #7aa2f7; color: #1a1b26; font-weight: 600; }
        .tab-content-code { display: none; width: 100%; height: 100%; flex-direction: column; }
        .tab-content-code.active-code { display: flex; }
        #mobile-preview-wrapper { background-color: #1f2335; overflow: auto; }
        #preview-iframe-mobile { border: 4px solid #333; border-radius: 20px; box-shadow: 0 0 20px rgba(0,0,0,0.5); }
        #console-output { background-color: #24283b; border-radius: 8px; border: 1px solid #414868; height: 100px; overflow-y: auto; padding: 10px; font-family: 'Courier New', monospace; font-size: 13px; }
        .console-log-code { color: #c0caf5; }
        .console-error-code { color: #f7768e; }
        .console-warn-code { color: #e0af68; }
        .console-info-code { color: #7aa2f7; }
        .library-textarea-code { background-color: #24283b; border: 1px solid #414868; color: #c0caf5; font-family: 'Courier New', Courier, monospace; font-size: 13px; border-radius: 8px; padding: 10px; width: 100%; height: 60px; resize: vertical; box-sizing: border-box; }
/*---Convert Page -----*/

.tab-btn-convert { transition: all 0.2s; }
        .tab-btn-convert.active { border-color: #3b82f6; background-color: #3b82f6; color: white; }
        .tab-content-convert { display: none; }
        .tab-content-convert.active { display: block; }
        .loader-convert {
            border: 4px solid #f3f3f3; border-radius: 50%; border-top: 4px solid #3498db;
            width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 20px auto;
        }
       

 

