* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --gray-color: #6b7280;
    --border-color: #e5e7eb;
}

body {
    font-family: 'Inter', 'Noto Sans Bengali', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1400px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 95vh;
}

/* Header Styles */
.header {
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 2.5rem;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.tagline {
    margin-top: 5px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.online {
    background: var(--secondary-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.chat-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    background: var(--light-color);
}

.chat-header {
    padding: 20px 30px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h2 {
    color: var(--dark-color);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.new-chat-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.new-chat-btn:hover {
    background: var(--primary-dark);
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    display: flex;
    gap: 15px;
    max-width: 80%;
}

.message.bot {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.message.user .avatar {
    background: var(--secondary-color);
}

.message-content {
    background: white;
    padding: 15px 20px;
    border-radius: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.message.bot .message-content {
    border-top-left-radius: 5px;
}

.message.user .message-content {
    background: var(--primary-color);
    color: white;
    border-top-right-radius: 5px;
}

.message-text {
    line-height: 1.6;
    font-size: 0.95rem;
}

.greeting {
    color: var(--primary-color);
    font-weight: 600;
}

.message-time {
    font-size: 0.75rem;
    color: var(--gray-color);
    margin-top: 5px;
    text-align: right;
}

.message.user .message-time {
    color: rgba(255, 255, 255, 0.8);
}

/* Input Area */
.input-area {
    padding: 20px 30px;
    background: white;
    border-top: 1px solid var(--border-color);
}

.quick-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.quick-btn {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
    color: var(--dark-color);
}

.quick-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.input-container input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Inter', 'Noto Sans Bengali', sans-serif;
    transition: border-color 0.3s;
}

.input-container input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-container button {
    width: 50px;
    border: none;
    border-radius: 12px;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-container button:hover {
    background: var(--primary-dark);
}

#voiceBtn {
    background: var(--secondary-color);
}

#voiceBtn:hover {
    background: #0da271;
}

.input-hint {
    font-size: 0.8rem;
    color: var(--gray-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Sidebar */
.sidebar {
    flex: 1;
    background: white;
    border-left: 1px solid var(--border-color);
    padding: 25px;
    overflow-y: auto;
}

.info-card, .guide-card, .emergency-card {
    background: var(--light-color);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.info-card h3, .guide-card h3, .emergency-card h3 {
    color: var(--dark-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Inter', 'Noto Sans Bengali', sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Guide Steps */
.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.step {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.step-icon {
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content strong {
    display: block;
    margin-bottom: 4px;
    color: var(--dark-color);
    font-size: 0.9rem;
}

.step-content p {
    color: var(--gray-color);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Emergency Card */
.contact-info {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.contact-info p {
    margin-bottom: 8px;
    color: var(--dark-color);
    font-size: 0.9rem;
}

.btn-emergency {
    width: 100%;
    padding: 14px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.3s;
}

.btn-emergency:hover {
    background: #dc2626;
}

/* Footer */
.footer {
    padding: 15px 30px;
    background: var(--dark-color);
    color: white;
    text-align: center;
    font-size: 0.85rem;
}

.disclaimer {
    margin-top: 5px;
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-color);
}

.modal-body {
    padding: 20px;
}

.priority-selector {
    margin: 20px 0;
}

.priority-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.priority-option {
    flex: 1;
}

.priority-option input {
    display: none;
}

.priority-label {
    display: block;
    padding: 8px 12px;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.priority-option input:checked + .priority-label {
    transform: scale(1.05);
    font-weight: bold;
}

.priority-label.low {
    background: #d1fae5;
    color: #065f46;
}

.priority-label.medium {
    background: #fef3c7;
    color: #92400e;
}

.priority-label.high {
    background: #fee2e2;
    color: #991b1b;
}

.priority-label.emergency {
    background: #fecaca;
    color: #7f1d1d;
    animation: emergency-pulse 1.5s infinite;
}

@keyframes emergency-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-secondary {
    flex: 1;
    padding: 12px;
    background: var(--light-color);
    color: var(--dark-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    
    .chat-messages {
        max-height: 50vh;
    }
}

@media (max-width: 768px) {
    .container {
        height: auto;
        min-height: 100vh;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .priority-options {
        flex-wrap: wrap;
    }
}

/* Add to existing style.css */

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
    max-width: 300px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.notification.success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.notification.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.notification.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.notification i {
    font-size: 1.2rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Typing indicator */
.typing-indicator .message-content {
    background: transparent !important;
    box-shadow: none !important;
    padding: 10px !important;
}

.typing-dots {
    display: flex;
    gap: 4px;
    padding: 5px 0;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { 
        transform: translateY(0); 
        opacity: 0.4; 
    }
    30% { 
        transform: translateY(-5px); 
        opacity: 1; 
    }
}

/* Chat messages scrolling fix */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scroll-behavior: smooth;
}

/* Smooth scroll for chat */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Modal scroll fix */
.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Input area improvements */
.input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    background: white;
    border-radius: 12px;
    padding: 5px;
    border: 2px solid var(--border-color);
    transition: border-color 0.3s;
}

.input-container:focus-within {
    border-color: var(--primary-color);
}

.input-container input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', 'Noto Sans Bengali', sans-serif;
    background: transparent;
}

.input-container input:focus {
    outline: none;
}

/* Quick buttons hover effect */
.quick-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.quick-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.quick-btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

/* Message hover effect */
.message-content {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.message-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Loading animation for buttons */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .chat-messages {
        padding: 15px;
        gap: 15px;
    }
    
    .message {
        max-width: 90% !important;
    }
    
    .input-area {
        padding: 15px;
    }
    
    .quick-buttons {
        gap: 5px;
    }
    
    .quick-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .sidebar {
        padding: 15px;
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .chat-messages::-webkit-scrollbar-track {
        background: #2d2d2d;
    }
    
    .chat-messages::-webkit-scrollbar-thumb {
        background: #555;
    }
    
    .chat-messages::-webkit-scrollbar-thumb:hover {
        background: #777;
    }
}

/* Accessibility improvements */
.btn-primary:focus,
.btn-emergency:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-primary,
    .btn-emergency {
        border: 2px solid white;
    }
    
    .message-content {
        border: 1px solid var(--border-color);
    }
}

/* Print styles */
@media print {
    .input-area,
    .sidebar,
    .chat-header button {
        display: none !important;
    }
    
    .chat-messages {
        overflow: visible;
        height: auto;
    }
    
    .container {
        box-shadow: none;
        height: auto;
    }
}