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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Левая панель - Меню */
.sidebar {
    width: 280px;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.header-logo:hover {
    opacity: 0.8;
}

.logo-svg {
    height: 24px;
    width: auto;
    max-width: 120px;
    vertical-align: middle;
}

.logo-text {
    font-size: 12px;
    font-weight: 400;
    color: #222222;
    margin-top: 8px;
    text-decoration: none;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    color: #333;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
}

.menu-list {
    padding: 10px 0;
}

.menu-item {
    padding: 15px 20px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.menu-item:hover {
    background: #e8e8e8;
}

.menu-item.active {
    background: #f6f6f6;
    color: #333;
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #333;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
}

.user-status {
    font-size: 0.8rem;
    color: #999;
}

/* Правая панель - Чат */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.chat-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
}

.chat-header h3 {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.chat-messages {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.empty-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #333;
}

.message {
    max-width: 75%;
    padding: 14px 20px;
    border-radius: 20px;
    word-wrap: break-word;
    line-height: 1.6;
}

.message.user {
    align-self: flex-end;
    background: #f0f0f0;
    color: #333;
}

.message.bot {
    align-self: flex-start;
    background: #f9f9f9;
    color: #333;
}

.chat-input {
    padding: 20px 40px 30px;
    background: white;
    display: flex;
    justify-content: center;
}

.input-wrapper {
    max-width: 800px;
    width: 100%;
    position: relative;
}

.chat-input input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 1px solid #d0d0d0;
    border-radius: 25px;
    outline: none;
    font-size: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.chat-input input:focus {
    border-color: #999;
}

.chat-input button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: #333;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input button:hover {
    background: #555;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    margin-right: 15px;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #666;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover span {
    background: #333;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .app-container {
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height для мобильных */
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .chat-header {
        display: flex;
        align-items: center;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        height: 100dvh;
        width: 280px;
        z-index: 1000;
        background: white;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0);
    }
    
    .sidebar.active {
        left: 0;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .chat-container {
        width: 100%;
        height: 100vh;
        height: 100dvh;
    }
    
    .chat-input {
        padding: 15px 20px 20px;
    }
    
    .chat-input input {
        font-size: 16px;
    }
    
    .chat-messages {
        padding: 20px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    body {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100vh;
        height: 100dvh;
    }
    
    .app-container {
        overflow: hidden;
    }
    
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0);
        pointer-events: none;
        transition: background 0.3s ease;
        z-index: 999;
    }
    
    body.menu-open::before {
        background: rgba(0, 0, 0, 0.5);
        pointer-events: all;
    }
}

