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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

header {
    text-align: center;
    margin-bottom: 25px;
}

header h1 {
    color: #333;
    font-size: 2.5em;
}

header p {
    color: #666;
    margin-top: 5px;
}

#chat-container {
    height: 500px;
    overflow-y: auto;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    background: #fafafa;
}

.message {
    margin: 12px 0;
    padding: 12px 18px;
    border-radius: 15px;
    max-width: 85%;
    line-height: 1.5;
    word-wrap: break-word;
}

.user-message {
    background: #667eea;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.bot-message {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 5px;
}

.bot-message h1, .bot-message h2, .bot-message h3 {
    margin: 10px 0 5px 0;
    color: #667eea;
}

.bot-message ul, .bot-message ol {
    margin-left: 20px;
    margin-top: 5px;
}

.bot-message a {
    color: #667eea;
    text-decoration: underline;
}

.bot-message table {
    border-collapse: collapse;
    margin: 10px 0;
    width: 100%;
}

.bot-message th, .bot-message td {
    border: 1px solid #ddd;
    padding: 6px 10px;
    text-align: left;
}

.bot-message th {
    background: #f0f0f0;
}

#input-container {
    display: flex;
    gap: 10px;
}

#user-input {
    flex: 1;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: border 0.3s;
}

#user-input:focus {
    border-color: #667eea;
}

button {
    padding: 14px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
}

button:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

#download-pdf {
    width: 100%;
    margin-top: 15px;
    background: #48bb78;
    font-size: 18px;
    padding: 16px;
}

#download-pdf:hover {
    background: #38a169;
}

#new-trip {
    width: 100%;
    margin-top: 10px;
    background: #ed8936;
}

#new-trip:hover {
    background: #dd6b20;
}

.typing {
    display: inline-block;
}

.typing::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

@media (max-width: 600px) {
    .container { padding: 15px; }
    header h1 { font-size: 1.8em; }
    #chat-container { height: 400px; }
    .message { max-width: 95%; }
}