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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    height: 92vh;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 30px 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid rgba(255,255,255,0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    backdrop-filter: blur(10px);
}

.header-text h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.header-text p {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 400;
}

.header-stats {
    display: flex;
    gap: 20px;
    font-size: 13px;
}

.stat-item {
    background: rgba(255,255,255,0.15);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-weight: 700;
    font-size: 18px;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background: #f8fafc;
    position: relative;
}

.chat-container::-webkit-scrollbar {
    width: 8px;
}

.chat-container::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.chat-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.message {
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

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

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    order: 2;
}

.message.assistant .message-avatar {
    background: linear-gradient(135deg, #7e22ce, #9333ea);
    color: white;
}

.message-content {
    max-width: 65%;
    padding: 16px 20px;
    border-radius: 16px;
    line-height: 1.6;
    font-size: 15px;
}

.message.user .message-content {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);
}

.message.assistant .message-content {
    background: white;
    color: #1e293b;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.property-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-left: 4px solid #1e3c72;
    padding: 18px;
    margin: 12px 0;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.property-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 60, 114, 0.15);
}

.property-card h4 {
    color: #1e3c72;
    margin-bottom: 10px;
    font-size: 17px;
    font-weight: 600;
}

.property-card p {
    font-size: 14px;
    margin: 6px 0;
    color: #475569;
}

.property-card .price {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #1e3c72, #7e22ce);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 10px 0;
}

.property-card .status-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #10b981;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.property-card .status-badge.for-sale {
    background: #ef4444;
}

.property-card a {
    color: #1e3c72;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 16px 20px;
    background: white;
    border-radius: 16px;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.typing-indicator span {
    width: 10px;
    height: 10px;
    background: #7e22ce;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1.2); opacity: 1; }
}

.input-area {
    padding: 24px 30px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 16px;
    align-items: center;
}

#userInput {
    flex: 1;
    padding: 16px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.3s;
    background: #f8fafc;
}

#userInput:focus {
    border-color: #1e3c72;
    background: white;
    box-shadow: 0 0 0 4px rgba(30, 60, 114, 0.1);
}

#sendBtn {
    padding: 16px 36px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);
}

#sendBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 60, 114, 0.4);
}

#sendBtn:active {
    transform: translateY(0);
}

#sendBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.welcome-message {
    text-align: center;
    padding: 60px 40px;
    color: #64748b;
}

.welcome-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.welcome-message h2 {
    color: #1e293b;
    margin-bottom: 12px;
    font-size: 28px;
    font-weight: 700;
}

.welcome-message p {
    font-size: 16px;
    margin-bottom: 30px;
}

.suggestions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}

.suggestion-chip {
    padding: 14px 20px;
    background: white;
    border: 2px solid #e2e8f0;
    color: #1e293b;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.suggestion-chip:hover {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 60, 114, 0.3);
}

.powered-by {
    text-align: center;
    padding: 12px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    font-size: 12px;
    color: #64748b;
}

.powered-by strong {
    color: #1e3c72;
    font-weight: 600;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 16px;
    }

    .header-stats {
        width: 100%;
        justify-content: space-around;
    }

    .message-content {
        max-width: 85%;
    }
}