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

:root {
    --primary: #C084D4;
    --primary-dark: #9B59B6;
    --primary-light: #E8D5F5;
    --secondary: #89CDD8;
    --accent: #F2A7C3;
    --bg-1: #FAF7FF;
    --bg-2: #F0EAF8;
    --text-dark: #2D2D2D;
    --text-light: #6E6E6E;
    --text-muted: #9A9A9A;
    --white: #FFFFFF;
    --surface: rgba(255,255,255,0.92);
    --border: rgba(192, 132, 212, 0.15);
    --shadow-sm: 0 2px 12px rgba(155, 89, 182, 0.08);
    --shadow-md: 0 8px 32px rgba(155, 89, 182, 0.12);
    --shadow-lg: 0 20px 60px rgba(155, 89, 182, 0.16);
}

body {
    font-family: 'DM Sans', sans-serif;
    background: linear-gradient(150deg, var(--bg-1) 0%, var(--bg-2) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.06;
    animation: float 24s infinite ease-in-out;
}

.circle-1 {
    width: 480px;
    height: 480px;
    top: -180px;
    left: -180px;
    background: var(--primary);
    animation-delay: 0s;
}

.circle-2 {
    width: 560px;
    height: 560px;
    bottom: -200px;
    right: -200px;
    background: var(--secondary);
    animation-delay: 8s;
}

.circle-3 {
    width: 320px;
    height: 320px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--accent);
    animation-delay: 16s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(24px, -24px) scale(1.06); }
    66% { transform: translate(-16px, 16px) scale(0.96); }
}

/* Container */
.chat-container {
    width: 100%;
    max-width: 680px;
    height: 86vh;
    background: var(--surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255,255,255,0.7);
}

/* Header */
.chat-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 22px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
    color: white;
    letter-spacing: 0.05em;
    border: 1.5px solid rgba(255,255,255,0.35);
    flex-shrink: 0;
}

.header-info h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

.header-info p {
    font-size: 12px;
    opacity: 0.82;
    font-weight: 300;
    letter-spacing: 0.02em;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.15);
    padding: 7px 14px;
    border-radius: 20px;
}

.status-dot {
    width: 7px;
    height: 7px;
    background: #6EE7B7;
    border-radius: 50%;
    animation: pulse 2.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.status-text {
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.03em;
}

/* Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
    background: linear-gradient(to bottom, #FAFAFA 0%, #F6F4FB 100%);
    scroll-behavior: smooth;
}

.message {
    margin-bottom: 18px;
    display: flex;
    gap: 11px;
    animation: fadeUp 0.35s ease-out;
}

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

.message-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--primary-light);
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.robot-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.message-content {
    flex: 1;
    max-width: 75%;
}

.message-text {
    padding: 13px 18px;
    border-radius: 18px;
    line-height: 1.65;
    font-size: 14px;
    font-weight: 400;
    word-wrap: break-word;
}

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

.user-message .message-avatar {
    order: 2;
    background: var(--primary-light);
    color: var(--primary-dark);
}

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

.user-message .message-text {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-bottom-right-radius: 5px;
    box-shadow: 0 4px 14px rgba(155, 89, 182, 0.25);
}

.bot-message .message-text {
    background: var(--white);
    color: var(--text-dark);
    border: 1px solid var(--border);
    border-bottom-left-radius: 5px;
    box-shadow: var(--shadow-sm);
}

.bot-message .message-text ul {
    margin: 10px 0;
    padding-left: 18px;
}

.bot-message .message-text li {
    margin: 6px 0;
    color: var(--text-light);
    font-size: 13.5px;
    line-height: 1.5;
}

/* Typing */
.typing-indicator { padding: 0 28px 8px; }

.typing-dots {
    display: flex;
    gap: 5px;
    padding: 14px 18px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 5px;
    width: fit-content;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.typing-dots span {
    width: 7px;
    height: 7px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.5;
    animation: bounce 1.4s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-8px); opacity: 1; }
}

/* Input */
.chat-input-container {
    padding: 18px 24px;
    background: white;
    border-top: 1px solid var(--border);
}

.input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.chat-input {
    flex: 1;
    padding: 13px 18px;
    border: 1.5px solid var(--border);
    border-radius: 50px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    outline: none;
    transition: all 0.25s ease;
    background: #FAFAFA;
    color: var(--text-dark);
}

.chat-input::placeholder { color: var(--text-muted); }

.chat-input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(192, 132, 212, 0.08);
}

.send-button {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(155, 89, 182, 0.3);
    flex-shrink: 0;
}

.send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(155, 89, 182, 0.4);
}

.send-button:active { transform: scale(0.96); }

/* Suggestions */
.suggestions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    overflow-x: auto;
    padding: 3px 0;
}

.suggestion-chip {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(192, 132, 212, 0.35);
    border-radius: 50px;
    font-size: 12.5px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    color: var(--primary-dark);
    cursor: pointer;
    transition: all 0.22s ease;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.suggestion-chip:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(155, 89, 182, 0.2);
}

/* Scrollbar */
.chat-messages::-webkit-scrollbar { width: 5px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(192, 132, 212, 0.3);
    border-radius: 10px;
}
.chat-messages::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Responsive */
@media (max-width: 768px) {
    body { padding: 0; }

    .chat-container {
        height: 100vh;
        max-width: 100%;
        border-radius: 0;
    }

    .chat-header { padding: 18px 20px; border-radius: 0; }
    .chat-messages { padding: 18px 16px; }
    .chat-input-container { padding: 14px 16px; }

    .header-info h1 { font-size: 18px; }
    .header-info p { font-size: 11px; }

    .avatar { width: 40px; height: 40px; font-size: 13px; }
    .message-content { max-width: 82%; }
    .message-text { font-size: 13.5px; padding: 11px 15px; }
    .chat-input { font-size: 14px; padding: 11px 16px; }
    .send-button { width: 42px; height: 42px; }
    .suggestion-chip { font-size: 12px; padding: 7px 13px; }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}