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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.chat-container {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.chat-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 600px;
    max-height: 90vh;
}

/* Header */
.chat-header {
    padding: 32px 24px 24px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.avatar {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
}

.avatar-letter {
    width: 60px;
    height: 60px;
    background: #000;
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
}

.chat-header h1 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #000;
}

.status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
}

.status-text {
    color: #666;
}

/* Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    gap: 12px;
    animation: fadeIn 0.3s ease;
}

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

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

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #000;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.message.user-message .message-avatar {
    background: #000;
}

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

.message-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.5;
}

.message.bot-message .message-bubble {
    background: #f5f5f5;
    color: #000;
    border-bottom-left-radius: 4px;
}

.message.user-message .message-bubble {
    background: #000;
    color: white;
    border-bottom-right-radius: 4px;
}

.message-bubble a {
    color: inherit;
    text-decoration: underline;
    word-break: break-word;
}

.message-bubble p {
    margin: 0 0 8px 0;
    line-height: 1.6;
}

.message-bubble p:last-child {
    margin-bottom: 0;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 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 typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Quick Actions */
.quick-actions {
    padding: 16px 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    border-top: 1px solid #f0f0f0;
}

.quick-btn {
    padding: 10px 20px;
    border: 1px solid #e5e5e5;
    background: white;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.quick-btn:hover {
    border-color: #000;
    color: #000;
    background: #f9f9f9;
}

/* Input Area */
.chat-input-container {
    padding: 20px 24px;
    border-top: 1px solid #f0f0f0;
}

#chatForm {
    display: flex;
    gap: 12px;
    align-items: center;
}

#userInput {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

#userInput:focus {
    border-color: #000;
}

#userInput::placeholder {
    color: #999;
}

.send-btn {
    padding: 12px 24px;
    background: #000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.send-btn:hover {
    background: #333;
}

.send-btn:active {
    transform: scale(0.98);
}

.send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

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

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #000;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

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

    .chat-card {
        border-radius: 0;
        min-height: 100vh;
        max-height: 100vh;
    }

    .chat-header {
        padding: 24px 16px 16px;
    }

    .chat-messages {
        padding: 16px;
    }

    .quick-actions {
        padding: 12px 16px;
    }

    .chat-input-container {
        padding: 16px;
    }

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

    .modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
    }

    #my-lunacal-inline-meeting {
        height: calc(100vh - 80px) !important;
    }
}
