:root {
    /* Color Palette - Modern & Vibrant */
    --primary-color: #6366f1;
    /* Indigo */
    --accent-color: #8b5cf6;
    /* Violet */
    --bg-gradient-start: #f3f4f6;
    /* Light gray */
    --bg-gradient-end: #e5e7eb;

    --chat-bg: rgba(255, 255, 255, 0.85);
    /* Glassy White */
    --text-primary: #111827;
    /* Near Black */
    --text-secondary: #4b5563;
    /* Gray */

    --message-bot-bg: #ffffff;
    --message-bot-text: #1f2937;
    --message-user-bg: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --message-user-text: #ffffff;

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-strong: 0 10px 40px rgba(0, 0, 0, 0.1);

    --glass-border: 1px solid rgba(255, 255, 255, 0.6);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #f0f2f5;
    position: relative;
}

/* Background Animation */
.background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(120deg, #fdfbfb 0%, #ebedee 100%);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    /* Soft glow */
    opacity: 0.6;
    animation: drift 20s infinite alternate ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #e0e7ff 0%, rgba(255, 255, 255, 0) 70%);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #f5f3ff 0%, rgba(255, 255, 255, 0) 70%);
    bottom: -150px;
    right: -150px;
    animation-delay: -10s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 30px) scale(1.1);
    }
}

/* Main Container */
.main-container {
    width: 100%;
    max-width: 900px;
    height: 100%;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    background: var(--chat-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-strong);
}

@media (min-width: 900px) {
    .main-container {
        height: 90vh;
        border-radius: 24px;
        border: var(--glass-border);
    }
}

/* Header */
.app-header {
    padding: 20px 28px;
    background: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.avatar-container {
    position: relative;
}

.avatar-image {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    /* Squircle */
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.status-indicator {
    width: 14px;
    height: 14px;
    background-color: #22c55e;
    border: 2px solid #ffffff;
    border-radius: 50%;
    position: absolute;
    bottom: -2px;
    right: -2px;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.title-container h1 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.title-container p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Chat Area */
.chat-container {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    scroll-behavior: smooth;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
}

.message {
    max-width: 85%;
    display: flex;
    flex-direction: column;
    animation: message-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes message-pop {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message.bot-message {
    align-self: flex-start;
}

.message.user-message {
    align-self: flex-end;
}

.message-content {
    padding: 16px 22px;
    border-radius: 20px;
    font-size: 0.98rem;
    line-height: 1.65;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.bot-message .message-content {
    background: var(--message-bot-bg);
    color: var(--message-bot-text);
    border-top-left-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.user-message .message-content {
    background: var(--message-user-bg);
    color: var(--message-user-text);
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

/* Suggestion Chips */
.suggestion-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    margin-top: 16px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.suggestion-chips button {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 10px 18px;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    font-family: inherit;
}

.suggestion-chips button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

/* Input Area */
.input-area {
    padding: 24px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.input-container {
    display: flex;
    align-items: flex-end;
    background: #ffffff;
    border: 1px solid #e0e7ff;
    border-radius: 24px;
    padding: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.input-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

textarea {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    max-height: 120px;
    font-family: inherit;
    font-size: 1rem;
    padding: 12px 16px;
    color: var(--text-primary);
}

#send-btn {
    background: var(--message-user-bg);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

#send-btn:hover {
    transform: scale(1.1) rotate(-10deg);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

#send-btn:active {
    transform: scale(0.95);
}

.branding {
    text-align: center;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 12px;
}

.branding strong {
    color: var(--primary-color);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Typing Indicator */
.typing-dots {
    display: flex;
    gap: 5px;
    padding: 2px 4px;
}

.dot {
    width: 6px;
    height: 6px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typing-bounce 1.2s infinite ease-in-out both;
}

.dot:nth-child(1) {
    animation-delay: 0s;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}