* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background: #2c3e50;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 1400px;
    max-width: 100%;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 90vh;
}

/* Header */
.header {
    background: #3498db;
    padding: 15px 30px;
    border-bottom: 3px solid #2980b9;
    flex-shrink: 0;
}

.ascii-header {
    color: white;
    font-size: 16px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    white-space: pre;
    margin: 0;
    line-height: 1.4;
}

/* Main content layout */
.main-content {
    display: grid;
    grid-template-columns: 320px 1fr 380px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Left Sidebar Container */
.left-sidebar {
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    height: 100%;
    overflow: hidden;
    border-right: 2px solid #bdc3c7;
}

/* Chat section */
.chat-section {
    display: flex;
    flex-direction: column;
    background: #ecf0f1;
    border-right: 2px solid #bdc3c7;
    min-height: 0;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
}

/* Message styling */
.message {
    max-width: 85%;
    width: fit-content;
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
}

.message-content {
    padding: 15px 20px;
    border-radius: 10px;
    width: 100%;
}

.bot-message .message-content {
    background: white;
    border: 1px solid #bdc3c7;
    border-top-left-radius: 0;
}

.user-message .message-content {
    background: #3498db;
    color: white;
    border-top-right-radius: 0;
}

.message-content strong {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    opacity: 0.9;
}

.bot-output, .user-output {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 12px;
    border-radius: 5px;
    margin-top: 5px;
    max-width: 100%;
}

.bot-output {
    background: #f8f9fa;
    color: #2c3e50;
    border-left: 4px solid #3498db;
}

.user-output {
    background: #e8f4fd;
    color: #2c3e50;
    border-left: 4px solid #2980b9;
}

.message-time {
    font-size: 11px;
    color: #7f8c8d;
    margin-top: 5px;
    text-align: right;
}

/* Ticket summary styling */
.ticket-summary {
    background: #fff3cd !important;
    border-left: 4px solid #f39c12 !important;
    color: #856404 !important;
    font-weight: bold;
}

/* Input container */
.input-container {
    display: flex;
    padding: 20px;
    background: white;
    border-top: 2px solid #bdc3c7;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.prompt {
    color: #3498db;
    font-size: 16px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

.chat-input {
    flex: 1;
    background: #ecf0f1;
    border: 1px solid #bdc3c7;
    color: #2c3e50;
    padding: 12px 15px;
    font-size: 14px;
    border-radius: 5px;
    outline: none;
    min-width: 0;
}

.chat-input:focus {
    border-color: #3498db;
    background: white;
}

.send-btn {
    background: #3498db;
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    border-bottom: 3px solid #2980b9;
    white-space: nowrap;
}

.send-btn:hover {
    background: #2980b9;
}

.send-btn:active {
    transform: translateY(2px);
    border-bottom-width: 1px;
}

.send-btn:disabled {
    background: #bdc3c7;
    border-bottom-color: #95a5a6;
    cursor: not-allowed;
}

/* Right Sidebar Container */
.right-sidebar {
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    height: 100%;
    overflow: hidden;
}

/* Stats Sidebar - Scrollable */
.stats-sidebar {
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.stats-panel {
    background: white;
    border: 1px solid #bdc3c7;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.stats-panel h3 {
    color: #2c3e50;
    font-size: 16px;
    margin-bottom: 15px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 14px;
}

.stat-item span:first-child {
    color: #7f8c8d;
}

.stat-value {
    color: #3498db;
    font-weight: bold;
    font-size: 16px;
}

/* Quick help section */
.quick-help {
    background: white;
    border: 1px solid #bdc3c7;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.quick-help h3 {
    color: #2c3e50;
    font-size: 16px;
    margin-bottom: 15px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.help-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.help-btn {
    background: #ecf0f1;
    border: 1px solid #bdc3c7;
    color: #2c3e50;
    padding: 10px 8px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    text-align: left;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.help-btn:hover {
    background: #3498db;
    color: white;
    border-color: #2980b9;
}

/* Reset button */
.reset-btn {
    width: 100%;
    background: #e74c3c;
    border: none;
    color: white;
    padding: 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    border-bottom: 3px solid #c0392b;
    flex-shrink: 0;
}

.reset-btn:hover {
    background: #c0392b;
}

.reset-btn:active {
    transform: translateY(2px);
    border-bottom-width: 1px;
}

/* AI Technology Panel - Static */
.ai-tech-panel {
    background: #8e44ad;
    padding: 20px;
    flex-shrink: 0;
    overflow-y: auto;
    height: 100%;
}

.ai-tech-panel h3 {
    color: white;
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 2px solid #f1c40f;
    padding-bottom: 10px;
    font-weight: bold;
}

.ai-tech-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ai-tech-badge {
    background: #f1c40f;
    color: #2c3e50;
    padding: 10px 15px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    letter-spacing: 1px;
    border: 2px solid white;
}

.ai-tech-details {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 5px solid #f1c40f;
}

.ai-tech-details p {
    margin: 10px 0;
    font-size: 14px;
    color: #2c3e50;
    border-bottom: 1px solid #ecf0f1;
    padding-bottom: 8px;
    display: flex;
    align-items: baseline;
}

.ai-tech-details p:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tech-label {
    color: #8e44ad;
    font-weight: bold;
    min-width: 120px;
    display: inline-block;
    font-size: 13px;
}

.ai-tech-details span:not(.tech-label) {
    color: #34495e;
    flex: 1;
    padding-left: 10px;
}

.ai-tech-desc {
    background: #ecf0f1;
    padding: 15px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: #2c3e50;
    border: 1px solid #bdc3c7;
    border-right: 5px solid #27ae60;
}

.ai-tech-desc strong {
    color: #27ae60;
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #ecf0f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #ecf0f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        height: 95vh;
    }
    
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .left-sidebar {
        border-right: none;
        border-bottom: 2px solid #bdc3c7;
        height: auto;
    }

    .chat-section {
        border-right: none;
        border-bottom: 2px solid #bdc3c7;
    }
    
    .right-sidebar {
        height: 400px;
    }
    
    .message {
        max-width: 95%;
    }
    
    .input-container {
        flex-wrap: wrap;
    }
    
    .send-btn {
        width: 100%;
    }
    
    .help-buttons-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-label {
        min-width: 100px;
    }
    
    .ai-tech-details p {
        flex-wrap: wrap;
    }
    
    .ai-tech-details span:not(.tech-label) {
        padding-left: 0;
        padding-top: 5px;
        flex: 0 0 100%;
    }
}

/* Ensure proper text wrapping in pre tags */
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
}