:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --success-color: #16a34a;
    --danger-color: #dc2626;
    --text-color: #1e293b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    /* Add gradient colors */
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    --gradient-success: linear-gradient(135deg, #16a34a 0%, #059669 100%);
    
    /* Add glassmorphism effect */
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    
    /* Add dark mode variables */
    --dark-bg: #0f172a;
    --dark-text: #f8fafc;

    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

/* Enhanced Chat Interface */
.chat-interface {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-left: var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Modern Message Bubbles */
.message-content {
    max-width: 90%;
    word-wrap: break-word;
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    box-shadow: var(--shadow-md);
    display: inline-block;
}

.message-content::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: inherit;
    transform: rotate(45deg);
}

.bot-message .message-content::after {
    left: -10px;
    top: 15px;
}

.user-message .message-content::after {
    right: -10px;
    top: 15px;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, #bfdbfe 0%, #93c5fd 25%, #60a5fa 50%, #3b82f6 75%, #2563eb 100%);
    animation: gradientFlow 20s ease infinite;
    z-index: -1;
    opacity: 0.1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* Add message status indicators */
.message-status {
    display: flex;
    gap: 4px;
    align-items: center;
    font-size: 0.75rem;
    color: #64748b;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    padding: 0.75rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
}

/* Main Container Grid */
.container {
    display: grid;
    grid-template-columns: 380px 1fr;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
}

.capabilities-list {
    padding-left: 1rem;
    list-style: none;
}

.capabilities-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    word-wrap: break-word;
    max-width: 100%;
    overflow-wrap: break-word;
}

.capabilities-list li i {
    flex-shrink: 0;
}


/* Sidebar Styles */
.sidebar {
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    overflow-x: hidden;
    padding: 1.5rem 1rem;
    height: 100vh;
    overflow-y: auto;
    position: sticky;
    top: 0;
}

.sidebar-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.brand {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.system-status {
    font-size: 0.875rem;
    color: #64748b;
}

.status-active {
    color: var(--success-color);
    font-weight: 500;
}

/* Toggle Button for Booking Form */
.toggle-form-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    margin-bottom: 1rem;
}

.toggle-form-btn:hover {
    background: var(--secondary-color);
}

/* Appointment Booking Form Styles */
.booking-form {
    background-color: #f1f5f9;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.appointment-form h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group input[type="time"] {
    margin-top: 0.5rem;
    width: 100%;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.dual-input {
    flex-direction: column;
    gap: 0.5rem;
    display: flex;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--secondary-color);
}
/* Slide-down Forms */
.form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.form-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    transform: translateY(-50px);
    opacity: 0;
    transition: all 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

.form-container.active {
    transform: translateY(0);
    opacity: 1;
}

.dual-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.dual-column > div {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: var(--radius-md);
}

.action-buttons {
    display: grid;
    gap: 0.5rem;
    margin: 1rem 0;
}

.action-btn {
    padding: 1rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.action-btn.primary { background: var(--primary-color); color: white; }
.action-btn.warning { background: #f59e0b; color: white; }
.action-btn.danger { background: var(--danger-color); color: white; }


/* Appointments List Styles */
.appointments-list h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.appointments-cards {
    max-height: 40vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.appointment-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.appointment-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.appointment-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.appointment-card p {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

/* Chat Interface Styles */
.chat-interface {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    height: 95vh;
    flex: 1;
    margin: 1rem;
    border-radius: 25px;
    overflow: hidden;
}

.chat-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.online-dot {
    width: 10px;
    height: 10px;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.typing-indicator {
    font-size: 0.875rem;
    color: #64748b;
    opacity: 0;
    transition: var(--transition);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: #f8fafc;
}

.message {
    display: flex;
    gap: 1rem;
    max-width: 75%;
    animation: fadeIn 0.3s ease-out;
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-content {
    border-radius: 1.5rem;
    position: relative;
    overflow: hidden;
}

.user-message .message-content {
    background: var(--primary-color);
    color: white;
}

/* Chat Input Styles */
.chat-input {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    background: var(--card-bg);
}

.input-container {
    position: relative;
    display: flex;
    gap: 0.75rem;
}

#userInput {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: var(--transition);
}

#userInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-send {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
}

.btn-send:hover {
    background: var(--secondary-color);
}

.quick-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.quick-action-btn {
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.quick-action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Animations */
/* Add these animations */
@keyframes gradientFlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        height: 100vh;
    }

    .sidebar {
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .chat-interface {
        height: calc(100vh - 300px);
    }
}
