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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #060606 0%, #900707 100%);
    min-height: 100vh;
    padding: 20px;
}

#root {
    max-width: 1200px;
    margin: 0 auto;
}

.container {
    background: rgb(251, 250, 250);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 30px;
    height: 90vh;
    display: flex;
    flex-direction: column;
}

header {
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
    padding-bottom: 15px;
}

h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 6px;
    line-height: 1.2;
}

.eyebrow {
    color: #8a8f9d;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.title-subheading {
    color: #101828;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.25;
}

.subtitle {
    color: #5f6676;
    font-size: 15px;
    font-weight: 500;
}

.chat-area {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.message {
    margin-bottom: 15px;
    display: flex;
    animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    justify-content: flex-end;
}

.message.agent {
    justify-content: flex-start;
}

.message-content {
    max-width: 60%;
    padding: 12px 16px;
    border-radius: 8px;
    word-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.45;
}

.message.user .message-content {
    background: #667eea;
    color: white;
}

.message.agent .message-content {
    background: #e8e8e8;
    color: #333;
}

.message.agent .message-content h2 {
    font-size: 18px;
    line-height: 1.3;
    margin: 10px 0 8px;
    font-weight: 800;
    color: #1f2937;
}

.message.agent .message-content h3 {
    font-size: 16px;
    line-height: 1.35;
    margin: 8px 0 6px;
    font-weight: 700;
    color: #374151;
}

.message.agent .message-content p {
    margin: 8px 0;
}

.message.agent .message-content ul {
    margin: 6px 0 10px 20px;
    padding: 0;
}

.message.agent .message-content li {
    margin: 4px 0;
}

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

.file-tools {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-input-hidden {
    display: none;
}

.file-upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #667eea;
    background: #eef1ff;
    color: #2c3ca5;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.file-upload-btn:hover {
    background: #dfe5ff;
}

.file-help {
    color: #666;
    font-size: 12px;
}

.selected-files {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.file-chip {
    background: #f2f4fb;
    color: #2f3348;
    border: 1px solid #dbe0f2;
    border-radius: 999px;
    font-size: 12px;
    padding: 4px 10px;
}

input[type="text"] {
    flex: 1 1 auto;
    min-width: 240px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

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

@media (max-width: 700px) {
    .input-area {
        flex-direction: column;
    }

    input[type="text"],
    button {
        width: 100%;
    }
}

button:hover {
    background: #764ba2;
}

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

.loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.loader {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
