
:root {
    --ig-primary: #0095f6;
    --ig-secondary: #262626;
    --ig-background: #fafafa;
    --ig-border: #dbdbdb;
    --ig-text: #262626;
    --ig-text-light: #8e8e8e;
    --ig-gradient-start: #7638fa;
    --ig-gradient-mid: #df2144;
    --ig-gradient-end: #feda77;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
    background-color: var(--ig-background);
    color: var(--ig-text);
    padding: 0;
    margin: 0;
    min-height: 100vh;
}

.section-header {
    text-align: center;
    padding: 20px;
}

.section-header h2 {
    font-weight: 700;
    margin-bottom: 10px;
}

.chat-container {
    max-width: 480px;
    margin: 30px auto;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    height: 90vh;
    max-height: 680px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--ig-border);
    margin-bottom: 100px;
}

.chat-header {
    padding: 15px;
    border-bottom: 1px solid var(--ig-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--ig-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.profile-info {
    line-height: 1.3;
}

.profile-name {
    font-weight: 600;
    font-size: 16px;
    margin: 0;
}

.profile-status {
    color: var(--ig-text-light);
    font-size: 13px;
    margin: 0;
}

.chat-actions {
    display: flex;
    gap: 15px;
    font-size: 20px;
    color: var(--ig-primary);
}

.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #fff;
}

.message {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--ig-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.message-bubble {
    background-color: var(--ig-background);
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 70%;
    word-wrap: break-word;
}

.message.user .message-bubble {
    background-color: var(--ig-primary);
    color: white;
}

.message-time {
    font-size: 11px;
    color: var(--ig-text-light);
    margin-top: 4px;
}

.chat-footer {
    padding: 15px;
    border-top: 1px solid var(--ig-border);
}

.message-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.message-input {
    flex: 1;
    background-color: var(--ig-background);
    border-radius: 24px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
}

.message-input input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    padding: 8px 0;
    font-size: 14px;
}

.message-input-actions {
    display: flex;
    gap: 12px;
    color: var(--ig-text-light);
    font-size: 20px;
}

.send-button {
    background-color: var(--ig-primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
}

.submit-button {
    width: 100%;
    background: linear-gradient(45deg, var(--ig-gradient-start), var(--ig-gradient-mid), var(--ig-gradient-end));
    color: white;
    border: none;
    padding: 12px;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background-color: var(--ig-background);
    border-radius: 18px;
    width: fit-content;
    margin-bottom: 20px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: var(--ig-text-light);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 200ms; }
.typing-dot:nth-child(2) { animation-delay: 300ms; }
.typing-dot:nth-child(3) { animation-delay: 400ms; }

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@media (max-width: 520px) {
    .chat-container {
        margin: 0;
        height: 100vh;
        border-radius: 0;
    }
}
