* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

.chat-panel {
    width: 40%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e0e0e0;
    background: #fafafa;
}

.chat-header {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    background: white;
}

.chat-header h1 {
    font-size: 18px;
    color: #333;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-style: italic;
}

.message {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    max-width: 90%;
    word-wrap: break-word;
}

.message.user {
    background: #007bff;
    color: white;
    margin-left: auto;
    text-align: right;
}

.message.assistant {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
}

.message.error {
    background: #fff3f3;
    color: #dc3545;
    border: 1px solid #f5c6cb;
}

.message.typing {
    color: #999;
    font-style: italic;
}

.chat-input-area {
    padding: 16px;
    border-top: 1px solid #e0e0e0;
    background: white;
    display: flex;
    gap: 8px;
}

.chat-input-area textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
}

.send-button {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.send-button:hover {
    background: #0056b3;
}

.send-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.preview-panel {
    width: 60%;
    display: flex;
    flex-direction: column;
}

.preview-header {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h2 {
    font-size: 18px;
    color: #333;
}

.download-button {
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.download-button:hover {
    background: #218838;
}

.preview-container {
    flex: 1;
    padding: 16px;
    background: #f0f0f0;
}

.preview-iframe {
    width: 100%;
    height: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
}
