/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    height: 100vh;
    overflow: hidden;
}

.container-fluid {
    height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    background: linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 100%);
    border-left: 1px solid #404040;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.show {
    opacity: 1;
    visibility: visible;
}

.sidebar-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-bottom: 1px solid #404040;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-header h4 {
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.menu-categories {
    padding: 1rem;
}

.category-section {
    margin-bottom: 2rem;
}

.category-title {
    color: #ecf0f1;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e74c3c;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu-item {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border: 1px solid #404040;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.menu-item:hover::before {
    left: 100%;
}

.menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: #e74c3c;
}

.menu-item.active {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-color: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.menu-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-left: 1rem;
    border: 2px solid #404040;
    transition: border-color 0.3s ease;
}

.menu-item.active .menu-item-image {
    border-color: #fff;
}

.menu-item-content {
    flex: 1;
}

.menu-item-name {
    color: #ecf0f1;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.menu-item.active .menu-item-name {
    color: #fff;
}

.menu-item-description {
    color: #bdc3c7;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.menu-item.active .menu-item-description {
    color: #f8f9fa;
}

.menu-item-price {
    color: #e74c3c;
    font-weight: 700;
    font-size: 1.1rem;
}

.menu-item.active .menu-item-price {
    color: #fff;
}

/* Chat Area Styles */
.chat-area {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.chat-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.chat-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 1.5rem;
    border-bottom: 1px solid #404040;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Hamburger Button */
.hamburger-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.hamburger-btn span {
    display: block;
    height: 3px;
    width: 100%;
    background: #ecf0f1;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #2c3e50;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #e74c3c;
    border-radius: 3px;
}

.message {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.assistant-message {
    display: flex;
    justify-content: flex-start;
}

.user-message {
    display: flex;
    justify-content: flex-end;
}

.message-content {
    max-width: 70%;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border: 1px solid #404040;
    border-radius: 18px;
    padding: 1rem 1.25rem;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.user-message .message-content {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-color: #e74c3c;
}

.message-text {
    color: #ecf0f1;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.user-message .message-text {
    color: #fff;
}

.message-time {
    color: #95a5a6;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.user-message .message-time {
    color: rgba(255, 255, 255, 0.8);
}

.chat-input-container {
    padding: 1.5rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-top: 1px solid #404040;
}

.input-group {
    position: relative;
}

.chat-input {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border: 2px solid #404040;
    border-radius: 25px;
    padding: 0.75rem 1.25rem;
    color: #ecf0f1;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.chat-input:focus {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border-color: #e74c3c;
    color: #ecf0f1;
    box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.25);
}

.chat-input::placeholder {
    color: #95a5a6;
}

.send-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.send-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.send-btn:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        z-index: 999;
        transition: right 0.3s ease;
    }
    
    .sidebar.show {
        right: 0;
    }
    
    .chat-area {
        width: 100%;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .menu-item {
        padding: 0.75rem;
    }
    
    .menu-item-image {
        width: 50px;
        height: 50px;
    }
    
    .hamburger-btn {
        display: flex;
    }
}

@media (min-width: 769px) {
    .hamburger-btn {
        display: flex;
    }
    
    .mobile-overlay {
        display: none;
    }
}

@media (max-width: 576px) {
    .chat-header {
        padding: 1rem;
    }
    
    .chat-messages {
        padding: 1rem;
    }
    
    .chat-input-container {
        padding: 1rem;
    }
    
    .message-content {
        max-width: 90%;
        padding: 0.75rem 1rem;
    }
}

/* Loading Animation */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border: 1px solid #404040;
    border-radius: 18px;
    max-width: 70%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.typing-dot {
    width: 10px;
    height: 10px;
    background: #e74c3c;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: translateY(0) scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: translateY(-10px) scale(1.1);
        opacity: 1;
    }
}

/* Typing Effect */
.typing-text {
    overflow: hidden;
    border-right: 2px solid #e74c3c;
    white-space: nowrap;
    animation: typingCursor 1s infinite;
}

@keyframes typingCursor {
    0%, 50% {
        border-color: #e74c3c;
    }
    51%, 100% {
        border-color: transparent;
    }
}

/* Message Animation */
.message-typing {
    animation: messageSlideIn 0.5s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner h4 {
    color: #ecf0f1;
    margin: 0;
    font-size: 1.1rem;
}

.loading-dots {
    display: flex;
    gap: 0.5rem;
}

.loading-dot {
    width: 12px;
    height: 12px;
    background: #e74c3c;
    border-radius: 50%;
    animation: loadingBounce 1.5s infinite ease-in-out;
}

.loading-dot:nth-child(1) {
    animation-delay: -0.3s;
}

.loading-dot:nth-child(2) {
    animation-delay: -0.15s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes loadingBounce {
    0%, 80%, 100% {
        transform: translateY(0) scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: translateY(-15px) scale(1.2);
        opacity: 1;
    }
}

/* Smooth transitions */
* {
    transition: all 0.3s ease;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #2c3e50;
}

::-webkit-scrollbar-thumb {
    background: #e74c3c;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c0392b;
}
