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

body {
    font-family: 'Courier New', monospace;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: #2c3e50;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo img {
    height: 40px;
}

.title-section span {
    font-size: 20px;
    font-weight: bold;
}

.tagline {
    font-size: 12px;
    color: #bdc3c7;
    font-style: italic;
    margin-top: 2px;
}

.buttons button {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    margin-left: 10px;
    border-radius: 4px;
    cursor: pointer;
}

.buttons button:hover {
    background: #2980b9;
}

.buttons button:nth-last-child(1),
.buttons button:nth-last-child(2) {
    background: #95a5a6;
    color: #7f8c8d;
    cursor: not-allowed;
}

.buttons button:nth-last-child(1):hover,
.buttons button:nth-last-child(2):hover {
    background: #95a5a6;
}

.buttons button:nth-child(3) {
    margin-left: 70px;
}

.buttons button:nth-child(5) {
    margin-left: 70px;
}

.mobile-buttons {
    display: none;
    padding: 10px;
    background: #2c3e50;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mobile-buttons button {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.mobile-buttons button:hover {
    background: #2980b9;
}

.mobile-buttons button:nth-last-child(1),
.mobile-buttons button:nth-last-child(2) {
    background: #95a5a6;
    color: #7f8c8d;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .buttons {
        display: none;
    }
    
    .mobile-buttons {
        display: grid;
    }
    
    body {
        height: auto;
    }
    
    .editor-container {
        height: calc(100vh - 120px);
    }
}

.editor-container {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 4px 1fr;
    height: calc(100vh - 60px);
}

.preview-section {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.preview-panel {
    flex: 1;
}

.preview-resize {
    display: none;
}

@media (max-width: 768px) {
    .editor-container {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 4px 1fr;
    }
    
    .resize-handle.vertical {
        display: none;
    }
    
    .preview-resize {
        display: block;
    }
    
    .preview-section {
        order: 2;
    }
    
    .editors {
        order: 1;
    }
}

.editors {
    display: flex;
    flex-direction: column;
}

.editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    min-height: 100px;
}

.resize-handle {
    background: #ddd;
    cursor: row-resize;
}

.resize-handle.horizontal {
    height: 4px;
    cursor: row-resize;
}

.resize-handle.vertical {
    width: 4px;
    cursor: col-resize;
}

.resize-tip {
    position: fixed;
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    pointer-events: none;
    display: none;
}

.editor-header {
    background: #34495e;
    color: white;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.save-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.save-btn:hover {
    background: #2ecc71;
}

textarea {
    flex: 1;
    border: none;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: none;
    outline: none;
}

.preview-panel {
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    border-left: none;
}

#preview {
    flex: 1;
    width: 100%;
    background: white;
}

/* Chatbot Styles */
.chatbot-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: all 0.3s ease;
}

.chatbot-icon:hover {
    transform: scale(1.1);
    background: #5a67d8;
}

.chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 10000;
    display: none;
    flex-direction: column;
    font-family: Arial, sans-serif;
}

.chatbot-window.show {
    display: flex;
}

.chatbot-header {
    background: #667eea;
    color: white;
    padding: 15px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 16px;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 25px;
    height: 25px;
}

.chatbot-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
}

.chatbot-input {
    padding: 15px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 8px;
    background: white;
}

.chatbot-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    font-size: 14px;
}

.message {
    margin: 10px 0;
    padding: 12px;
    border-radius: 8px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.4;
}

.message.user {
    background: #667eea;
    color: white;
    margin-left: auto;
    text-align: right;
}

.message.bot {
    background: #f1f3f4;
    color: #333;
    border: 1px solid #e0e0e0;
}

.send-btn, .voice-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.send-btn {
    background: #667eea;
    color: white;
}

.send-btn:hover {
    background: #5a67d8;
}

.voice-btn {
    background: #28a745;
    color: white;
}

.voice-btn:hover {
    background: #218838;
}

.voice-btn.recording {
    background: #dc3545;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.footer {
    background: #2c3e50;
    color: white;
    padding: 10px 0;
    text-align: center;
    font-size: 12px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}