body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
            margin: 0;
            padding: 0;
            background-color: #1e1e1e;
            color: #e0e0e0;
        }

        /* Navigation Header */
        

        .main-content {
            max-width: 900px;
            margin: 0 auto;
            padding: 20px;
        }

        .container {
            background: #2d2d2d;
            padding: 20px;
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
            display: flex;
            flex-direction: column;
            height: 90vh;
            border: 1px solid #444;
        }

        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 1px solid #444;
        }

        .header h2 {
            margin: 0;
            color: #fff;
        }

        .config-area {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        input[type="text"] {
            padding: 8px 12px;
            border: 1px solid #555;
            border-radius: 6px;
            background: #3d3d3d;
            color: #fff;
        }

        button {
            padding: 8px 16px;
            background: #007acc;
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            transition: opacity 0.2s;
            font-weight: 500;
        }

        button:hover {
            opacity: 0.9;
        }

        button:disabled {
            background: #555;
            cursor: not-allowed;
        }

        .chat-box {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
            border: 1px solid #444;
            border-radius: 8px;
            margin-bottom: 20px;
            background: #252526;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .message-container {
            display: flex;
            flex-direction: column;
            max-width: 80%;
        }

        .message-container.user {
            align-self: flex-end;
            align-items: flex-end;
        }

        .message-container.bot {
            align-self: flex-start;
            align-items: flex-start;
        }

        .sender-name {
            font-size: 0.8em;
            margin-bottom: 4px;
            color: #aaa;
            margin-left: 4px;
            margin-right: 4px;
        }

        .message {
            padding: 12px 16px;
            border-radius: 12px;
            line-height: 1.5;
            word-wrap: break-word;
            position: relative;
        }

        .message.user {
            background: #007acc;
            color: white;
            border-bottom-right-radius: 2px;
        }

        .message.bot {
            background: #3e3e42;
            color: #e0e0e0;
            border-bottom-left-radius: 2px;
            border: 1px solid #555;
        }

        .message.system {
            background: #3d2d2d;
            color: #ff6b6b;
            align-self: center;
            font-size: 0.9em;
            max-width: 90%;
            border: 1px solid #552b2b;
        }

        .message.rate-limit-error {
            background: linear-gradient(135deg, #3d2d2d 0%, #2d2d3d 100%);
            border: 1px solid #ff6b6b;
            padding: 16px;
            max-width: 350px;
        }

        .timestamp {
            font-size: 0.7em;
            opacity: 0.7;
            margin-top: 6px;
            display: block;
            text-align: right;
        }

        .input-area {
            display: flex;
            gap: 10px;
        }

        .input-area input {
            flex: 1;
            padding: 12px;
            border: 1px solid #555;
            border-radius: 8px;
            font-size: 16px;
            background: #3d3d3d;
            color: #fff;
        }

        .input-area input:focus {
            outline: 2px solid #007acc;
            border-color: transparent;
        }

        .load-more {
            text-align: center;
            margin-bottom: 10px;
        }

        .load-more button {
            background: #3e3e42;
            color: #ccc;
            font-size: 0.85em;
            width: 100%;
            border: 1px dashed #555;
        }

        .load-more button:hover {
            background: #4e4e52;
            color: #fff;
        }

        .typing-indicator {
            font-style: italic;
            color: #888;
            font-size: 0.9em;
            margin-bottom: 10px;
            display: none;
            margin-left: 10px;
        }

        /* Scrollbar styling */
        ::-webkit-scrollbar {
            width: 8px;
        }

        ::-webkit-scrollbar-track {
            background: #2d2d2d;
        }

        ::-webkit-scrollbar-thumb {
            background: #555;
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: #666;
        }

        /* Product Cards Styling */
        .product-cards-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 15px;
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px solid #555;
        }

        .product-card {
            background: #3d3d3d;
            border-radius: 8px;
            overflow: hidden;
            transition: all 0.3s;
            border: 1px solid #555;
            display: flex;
            flex-direction: column;
        }

        .product-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
            border-color: #667eea;
        }

        .product-card img {
            width: 100%;
            height: 200px;
            object-fit: cover;
            background: #2d2d2d;
        }

        .product-card-body {
            padding: 12px;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
        }

        .product-sku {
            font-size: 0.75em;
            color: #667eea;
            font-weight: bold;
            margin-bottom: 5px;
        }

        .product-name {
            font-size: 0.9em;
            color: #fff;
            margin-bottom: 10px;
            line-height: 1.3;
            flex-grow: 1;
        }

        .product-price {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 10px;
        }

        .price-original {
            font-size: 0.85em;
            color: #888;
            text-decoration: line-through;
        }

        .price-sale {
            font-size: 1.1em;
            color: #ff6b6b;
            font-weight: bold;
        }

        .price-regular {
            font-size: 1.1em;
            color: #4caf50;
            font-weight: bold;
        }

        .product-link {
            display: block;
            text-align: center;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            text-decoration: none;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 0.85em;
            transition: all 0.3s;
        }

        .product-link:hover {
            opacity: 0.9;
            transform: scale(1.02);
        }

        /* Response Time */
        .response-time {
            font-size: 0.75em;
            color: #888;
            margin-top: 8px;
            font-style: italic;
        }

        /* Per-Message Toggle Button */
        .message-view-toggle {
            display: flex;
            gap: 5px;
            background: #3d3d3d;
            border-radius: 6px;
            padding: 4px;
            border: 1px solid #555;
            margin-top: 10px;
            width: fit-content;
        }

        .message-view-toggle button {
            padding: 6px 12px;
            font-size: 0.8em;
            background: transparent;
            color: #aaa;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .message-view-toggle button.active {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }

        .message-view-toggle button:hover:not(.active) {
            background: #4d4d4d;
            color: #fff;
        }

        /* Raw JSON View */
        .raw-json-view {
            background: #1e1e1e;
            border: 1px solid #555;
            border-radius: 8px;
            padding: 12px;
            margin-top: 10px;
            overflow-x: auto;
        }

        .raw-json-view pre {
            margin: 0;
            font-family: 'Courier New', monospace;
            font-size: 0.85em;
            color: #d4d4d4;
            white-space: pre-wrap;
            word-wrap: break-word;
        }

        /* Filtered content view */
        .filtered-content {
            display: block;
        }

        .raw-content {
            display: none;
        }

        /* --- Modern Layout & Animations --- */
        .main-content {
            max-width: 1400px;
            /* Wider container */
            margin: 0 auto;
            padding: 20px;
            height: calc(100vh - 80px);
            /* Fill remaining height */
            box-sizing: border-box;
        }

        .main-layout {
            display: flex;
            height: 100%;
            gap: 0;
            /* Gap handled by margin in panel for smooth transition */
            position: relative;
        }

        /* Chat Container flex fix */
        .container {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: #2d2d2d;
            border-radius: 16px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
            border: 1px solid #444;
            height: 100%;
            padding: 0;
            overflow: hidden;
            transition: all 0.3s ease;
            z-index: 10;
        }

        /* Internal padding for chat container */
        .chat-internal-wrapper {
            padding: 20px;
            display: flex;
            flex-direction: column;
            height: 100%;
            box-sizing: border-box;
        }

        /* PROMPT PANEL - Slide In Style */
        .prompt-panel {
            width: 0;
            opacity: 0;
            background: #1e1e1e;
            /* Darker contrast */
            border-left: 1px solid #444;
            border-radius: 16px;
            display: flex;
            flex-direction: column;
            padding: 0;
            /* Padding handled internally to avoid width jump */
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            overflow: hidden;
            margin-left: 0;
            box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
            white-space: nowrap;
            /* Prevent content flicker during width change */
        }

        .prompt-panel.open {
            width: 500px;
            /* Wider editor */
            opacity: 1;
            margin-left: 20px;
            padding: 20px;
        }

        .prompt-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            border-bottom: 1px solid #333;
            padding-bottom: 15px;
        }

        .prompt-header h3 {
            font-size: 1.2em;
            color: #4fc3f7;
            /* Nice blue accent */
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .prompt-textarea {
            flex: 1;
            background: #111;
            color: #dcdccc;
            /* Soft code color */
            border: 1px solid #333;
            border-radius: 8px;
            padding: 15px;
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
            font-size: 14px;
            line-height: 1.6;
            resize: none;
            margin-bottom: 15px;
            white-space: pre-wrap;
            /* Wrap code */
            overflow-y: auto;
            box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
        }

        .prompt-textarea:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(102, 126, 234, 0.2);
        }

        .panel-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-top: 10px;
            border-top: 1px solid #333;
        }

        .status-text {
            font-size: 0.8em;
            color: #666;
            font-style: italic;
        }

        /* Buttons Update */
        .action-btn {
            padding: 10px 20px;
            border-radius: 8px;
            font-weight: 600;
            font-size: 0.9em;
            border: none;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .btn-reload {
            background: #333;
            color: #aaa;
        }

        .btn-reload:hover {
            background: #444;
            color: white;
        }

        .btn-save {
            background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
            color: white;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
        }

        .btn-save:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
        }

        .btn-close-panel {
            background: transparent;
            border: none;
            color: #666;
            font-size: 1.5rem;
            cursor: pointer;
            transition: color 0.2s;
            line-height: 1;
        }

        .btn-close-panel:hover {
            color: #ff6b6b;
        }